Class PDPTWAcsMain
java.lang.Object
org.ddolib.examples.layered.pdptw.PDPTWAcsMain
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 Anytime
Column Search (ACS) algorithm.
This class demonstrates how to configure and run the ACS-based solver on an automatically generated PDP instance. The PDP consists of a set of pickup and delivery requests that must be scheduled while respecting precedence constraints and minimizing the total travel cost or time.
Execution details:
- A random PDPTW instance is generated using
PDPTWGenerator.genInstance(int, int, int, java.util.Random, Boolean). - The problem is wrapped into a
Modelthat specifies:- the
PDPTWProblemdefinition, - a fast lower bound through
PDPTWFastLowerBoundto guide ACS. - and the search column width (here set to 30).
- the
- The solver is then executed using
Solvers.minimizeAcs(AcsModel, java.util.function.BiConsumer). - Results and statistics are printed to the standard output.
Usage example:
// Run from the command line (no arguments required)
java PDPTWAcsMain
// Sample output:
RemainingJobs [...]
----> currentTime 42
SearchStatistics{status=OPTIMAL, iterations=..., time=...}
Notes:
- The instance generation is controlled by a fixed random seed (
new Random(1)) for reproducibility. - This example is primarily meant for experimentation and demonstration of the ACS solver.
- See Also:
-
Method Summary
-
Method Details
-
main
Entry point for the PDP ACS solver.Generates a random Pickup and Delivery Problem instance with Time Window and solves it using the Adaptive Column Search (ACS) framework.
- Parameters:
args- optional command-line arguments (not used in this version)- Throws:
IOException- if an error occurs during instance generation or file access
-