Class PDPTWDdoMain

java.lang.Object
org.ddolib.examples.layered.pdptw.PDPTWDdoMain

public final class PDPTWDdoMain extends Object
Single Vehicle Pick-up and Delivery Problem with Time Window (PDPTW) with Ddo. Main class for solving the Pickup and Delivery Problem with Time Window (PDPTW) using the Dynamic Decision Diagram Optimization (DDO) approach.

This class demonstrates how to build and execute a DDO-based solver for a randomly generated PDPTW instance. The PDPTW involves scheduling a set of pickup and delivery tasks while minimizing the overall cost or time, typically under precedence, capacity and time window constraints.

Execution workflow:

Usage example:


 // Run the DDO solver on a randomly generated PDPTW instance
 java PDPTWDdoMain

 // Example output:
 Solution: [0, 2, 5, 7, ...]
 SearchStatistics{status=OPTIMAL, nodes=..., time=...}
 

Notes:

  • The PDPTW instance is generated with a fixed random seed (new Random(1)) to ensure reproducible results.
  • DDO explores an approximation of the full search space by iteratively refining decision diagrams, offering a good trade-off between accuracy and performance.
  • Caching is enabled (useCache() = true) to avoid redundant computations across iterations.
See Also:
  • Method Details

    • main

      public static void main(String[] args) throws IOException, InvalidSolutionException
      Entry point for solving a randomly generated Pickup and Delivery Problem (PDPTW) instance using the Dynamic Decision Diagram Optimization (DDO) method.

      The instance is created with predefined parameters and solved using a DDO model that integrates relaxation, ranking, lower bounds, and frontier management heuristics.

      Parameters:
      args - optional command-line arguments (not used in this example)
      Throws:
      IOException - if an error occurs during instance generation
      InvalidSolutionException - if the solution found by the solver does not respect the problem's constraints