Class MaxCoverDdoMain

java.lang.Object
org.ddolib.examples.maximumcoverage.MaxCoverDdoMain

public class MaxCoverDdoMain extends Object
Maximum Coverage (MaxCover) problem with Ddo

This class demonstrates how to solve an instance of the Maximum Coverage (MaxCover) problem (BKP) using a Decision Diagram Optimization (DDO) algorithm.

  • Builds an instance of the MaxCover problem (randomly generated or loaded from a file)
  • Defines a DdoModel by specifying the problem, relaxation, ranking strategy, width heuristic, and lower bound
  • Runs the DDO solver to compute a solution
  • Prints the resulting solution

The problem parameters (size, cardinality, random seed, etc.) can be easily modified to experiment with different instances.

  • Constructor Details

    • MaxCoverDdoMain

      public MaxCoverDdoMain()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Program entry point.

      This method:

      1. Creates an instance of the MaxCover problem
      2. Builds a DDO model by defining:
        • the problem to solve
        • the relaxation used during search
        • the state ranking strategy
        • the width heuristic (fixed width in this example)
        • a fast lower bound
      3. Runs the DDO solver in minimization mode
      4. Prints the intermediate and final solutions
      Parameters:
      args - command-line arguments (not used)
      Throws:
      IOException - if an error occurs while loading a problem instance from a file