Class BKSDdoMain
java.lang.Object
org.ddolib.examples.layered.boundedknapsack.BKSDdoMain
Bounded Knapsack Problem (BKS) with Ddo. Main class for solving the Bounded Knapsack Problem
(BKS) using a Decision Diagram Optimization (DDO) approach.
This class demonstrates how to set up a BKS problem instance, define a DDO model with
relaxation, ranking, lower bound, dominance checker, width heuristic, and frontier, and solve the
problem using Solvers.minimizeDdo(DdoModel, java.util.function.BiConsumer). The solution
and statistics are printed to the console.
-
Method Summary
-
Method Details
-
main
Entry point of the application.The method performs the following steps:
- Creates a BKS problem instance with 100 items, capacity 1000, and strongly correlated instance type.
- Defines a DDO model for the problem, including:
- Relaxation using
BKSRelax - Ranking using
BKSRanking - Lower bound using
BKSFastLowerBound - Dominance checker using
SimpleDominanceCheckerandBKSDominance - Cache enabled
- Width heuristic using
FixedWidth - Frontier using
SimpleFrontierandCutSetType.Frontier
- Relaxation using
- Solves the problem using the DDO solver.
- Prints the solution and search statistics to the console.
- Parameters:
args- command-line arguments (not used)
-