Class PDPTWAstarMain

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

public final class PDPTWAstarMain 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 A* (A-star) search algorithm.

This class demonstrates how to configure and execute an A* 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 details:

Usage example:


 // Run the A* PDPTW solver
 java PDPTWAstarMain

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

Notes:

  • The PDPTW instance is generated with a fixed random seed (new Random(1)) to ensure reproducible results.
  • This class serves as a demonstration of how to apply A* to combinatorial optimization within the PDPTW framework.
See Also:
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Entry point for solving a randomly generated Pickup and Delivery Problem (PDP) instance using the A* algorithm.

      The instance is created with fixed parameters and solved by the A* search framework provided by the Solvers utility.

      Parameters:
      args - optional command-line arguments (not used in this example)
      Throws:
      IOException - if an error occurs while reading or generating the instance