Class BKSDdoMain

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

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

  • Constructor Details

    • BKSDdoMain

      public BKSDdoMain()
  • 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 100 items, capacity 1000, and strongly correlated instance type.
      2. Defines a DDO model for the problem, including:
      3. Solves the problem using the DDO solver.
      4. Prints the solution and search statistics to the console.
      Parameters:
      args - command-line arguments (not used)