Class KSDdoMainWithCluster

java.lang.Object
org.ddolib.examples.knapsack.KSDdoMainWithCluster

public class KSDdoMainWithCluster extends Object
Knapsack Problem (KS) with Ddo.

This class demonstrates how to solve an instance of the bounded Knapsack Problem (BKP) using a Decision Diagram Optimization (DDO) algorithm.

The program performs the following steps:

  1. Loads a knapsack instance from a data file.
  2. Defines a DdoModel with:
  3. Creates a Solvers and runs the DDO algorithm.
  4. Prints updates when a new incumbent solution is found and stops after 10 seconds of runtime.
  5. Outputs the final search statistics.

The DDO solver leverages relaxed decision diagrams, caching, and state ranking to efficiently explore the search space for high-quality solutions.

  • Constructor Details

    • KSDdoMainWithCluster

      public KSDdoMainWithCluster()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Entry point of the DDO demonstration for the Knapsack Problem.
      Parameters:
      args - command-line arguments (not used)
      Throws:
      IOException - if the instance file cannot be read