Package org.ddolib.examples.pdp
Class PDPLnsMain
java.lang.Object
org.ddolib.examples.pdp.PDPLnsMain
Entry point for solving the Single Vehicle Pick-up and Delivery Problem (PDP)
using a Large Neighborhood Search (LNS) approach combined with
Decision Diagram Optimization (DDO).
The Single Vehicle Pick-up and Delivery Problem consists in determining a sequence of pick-ups and deliveries for a single vehicle such that:
- All requests (pick-up and corresponding delivery) are served
- Vehicle capacity and precedence constraints are respected
- The total cost or travel distance is minimized
This class demonstrates how to:
- Generate a PDP instance programmatically
- Define a
LnsModelwith problem-specific components - Use a lower bound heuristic to guide the search
- Use a ranking heuristic to prioritize states
- Control the decision diagram width
- Run a Large Neighborhood Search (LNS) optimization
- Print intermediate and final solutions
Instance Configuration
In this example, a random PDP instance is generated with:
- 18 requests
- 2 vehicles (single vehicle may still be assumed for sequencing)
- 3 maximum capacity per vehicle
- Random seed: 1
Model Components
PDPProblem– defines the pick-up and delivery requestsPDPFastLowerBound– provides a fast lower bound on the total costPDPRanking– ranks states during decision diagram compilationFixedWidth– limits the decision diagram width
Search Configuration
- Search strategy: Large Neighborhood Search (LNS)
- Time limit: 10,000 milliseconds (10 seconds)
- Width heuristic: fixed width of 1,000 nodes per layer
Output
The program prints:
- Intermediate solutions during the search
- Final solution statistics
- The best sequence of pick-ups and deliveries found
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PDPLnsMain
public PDPLnsMain()
-
-
Method Details
-
main
Main entry point of the program.Generates a PDP instance, configures the LNS model with problem-specific heuristics, and runs the optimization process.
- Parameters:
args- command-line arguments (currently unused)- Throws:
IOException- if any file access occurs (not used here but for consistency)
-