Class BKSAstarMain
java.lang.Object
org.ddolib.examples.layered.boundedknapsack.BKSAstarMain
Bounded Knapsack Problem (BKS) with AsTar. Main class for solving the Bounded Knapsack Problem
(BKS) using the A* search algorithm.
This class demonstrates how to set up a BKS problem instance, define an A* model, and solve
the problem using the Solvers.minimizeAstar(Model, java.util.function.BiConsumer) method.
It also prints the solution and search statistics 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 10 items, capacity 1000, and strongly correlated instance type.
- Defines an A* model for the problem, including a lower bound and dominance checker.
- Solves the problem using the A* search algorithm.
- Prints the solution and search statistics to the console.
- Parameters:
args- command-line arguments (not used)
-