Package org.ddolib.examples.max2sat
Class Max2SatAcsMain
java.lang.Object
org.ddolib.examples.max2sat.Max2SatAcsMain
Maximum 2-Satisfiability (MAX2SAT) (MAX2SAT) problem with Acs.
Entry point for solving the Maximum 2-Satisfiability (MAX2SAT) problem
using the Anytime Column Search (ACS) algorithm.
This class demonstrates how to set up and run an ACS-based solver using
the Max2SatProblem, Max2SatState, and Max2SatFastLowerBound
components. The Ant Colony System is a stochastic optimization algorithm
inspired by the foraging behavior of ants, which iteratively refines
candidate solutions by simulating pheromone updates and heuristic choices.
Usage:
- If no command-line argument is provided, the default instance file
data/Max2Sat/wcnf_var_4_opti_39.txtis used. - Otherwise, the first argument should specify the path to a weighted CNF instance file (in WCNF format).
Example:
java Max2SatAcsMain data/Max2Sat/wcnf_var_20_opti_110.txt
The program prints the best solution found (assignment and cost) as well as search statistics (iterations, best cost, time, etc.).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Max2SatAcsMain
public Max2SatAcsMain()
-
-
Method Details
-
main
Main entry point for the MAX2SAT Ant Colony System solver.- Parameters:
args- an optional array containing the path to a WCNF instance file; if empty, a default test instance is used.- Throws:
IOException- if the instance file cannot be read or parsed.
-