Class PDPAstarMain

java.lang.Object
org.ddolib.examples.pdp.PDPAstarMain

public final class PDPAstarMain extends Object
Single Vehicle Pick-up and Delivery Problem (PDP) with AsTar. Main class for solving the Pickup and Delivery Problem (PDP) using the A* (A-star) search algorithm.

This class demonstrates how to configure and execute an A* solver on a randomly generated PDP instance. The PDP consists of a set of paired pickup and delivery requests that must be scheduled optimally, typically to minimize total travel cost or time while respecting precedence and capacity constraints.

Execution details:

Usage example:


 // Run the A* PDP solver
 java PDPAstarMain

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

Notes:

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

    • PDPAstarMain

      public PDPAstarMain()
  • 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