Class MaxCoverDdoMain
java.lang.Object
org.ddolib.examples.maximumcoverage.MaxCoverDdoMain
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
DdoModelby 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 Summary
Constructors -
Method Summary
-
Constructor Details
-
MaxCoverDdoMain
public MaxCoverDdoMain()
-
-
Method Details
-
main
Program entry point.This method:
- Creates an instance of the MaxCover problem
- 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
- Runs the DDO solver in minimization mode
- 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
-