Class BKSAstarMain

java.lang.Object
org.ddolib.examples.boundedknapsack.BKSAstarMain

public class BKSAstarMain extends Object
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.

  • Constructor Details

    • BKSAstarMain

      public BKSAstarMain()
  • Method Details

    • main

      public static void main(String[] args)
      Entry point of the application.

      The method performs the following steps:

      1. Creates a BKS problem instance with 10 items, capacity 1000, and strongly correlated instance type.
      2. Defines an A* model for the problem, including a lower bound and dominance checker.
      3. Solves the problem using the A* search algorithm.
      4. Prints the solution and search statistics to the console.
      Parameters:
      args - command-line arguments (not used)