Class Max2SatDdoMain

java.lang.Object
org.ddolib.examples.max2sat.Max2SatDdoMain

public final class Max2SatDdoMain extends Object
Maximum 2-Satisfiability (MAX2SAT) (MAX2SAT) problem with Ddo. Entry point for solving the Maximum 2-Satisfiability (MAX2SAT) problem using the Decision Diagram Optimization (DDO) algorithm.

The DDO algorithm incrementally constructs and explores a decision diagram that represents all feasible partial assignments. It prunes suboptimal regions using relaxation and ranking heuristics, while maintaining lower bounds to ensure convergence toward the optimal solution.

Usage:

  • If no command-line argument is provided, the default instance file data/Max2Sat/wcnf_var_4_opti_39.txt is used.
  • Otherwise, the first argument should specify the path to a Weighted CNF (WCNF) instance file.

Example:


 java Max2SatDdoMain data/Max2Sat/wcnf_var_20_opti_110.txt
 

The program prints each new incumbent solution found during the search using the SolutionPrinter, followed by the final SearchStatistics, which summarize key performance metrics such as explored nodes, best objective value, and total computation time.

See Also:
  • Constructor Details

    • Max2SatDdoMain

      public Max2SatDdoMain()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Main entry point for executing the DDO algorithm on a MAX2SAT instance.
      Parameters:
      args - optional command-line argument specifying the path to the WCNF instance file; if omitted, a default instance file is used.
      Throws:
      IOException - if the instance file cannot be found, opened, or parsed.