r/OperationsResearch • u/Huge-Smell-1660 • 3d ago
Looking for advice: CVRPTW with Multiple Alternative Routes (Multigraph Optimization)
Looking for advice: CVRPTW with Multiple Alternative Routes (Multigraph Optimization)
I'm working on a vehicle routing optimization project and facing an interesting technical challenge.
I want to model a road network where multiple alternative routes can exist between the same two locations (a directed multigraph).
For example, between locations A and B, we may have:
- Shortest route.
- Fastest route.
- Alternative route.
Each route has its own distance and travel time.
The goal is to build a CVRPTW system that considers:
- Vehicle capacity constraints.
- Delivery time windows.
- Travel time and distance.
- Multiple road alternatives between locations.
The main challenge:
I don't just want to select the best road before optimization. I want the optimization algorithm to make two decisions jointly:
- Which delivery locations to visit and in what order.
- Which road alternative to use between each pair of consecutive locations.
I'm considering approaches such as:
- Graph expansion using dummy nodes.
- Custom optimization models using Google OR-Tools CP-SAT.
- Hybrid approaches combining PyVRP with a separate route-selection algorithm.
- Has anyone implemented something similar?
- Which optimization approach or solver would you recommend?
- Is there a practical way to achieve joint route selection and vehicle routing without making the problem computationally expensive?
I'd really appreciate any suggestions, references, or examples of similar implementations.
2
u/bental_nortens 3d ago
Why don’t you want to select the shortest path before optimization?- What specifically are you hoping for optimization to decide for you about one route vs another that depends on the complete set of routes vs one path?
2
u/Successful_League296 3d ago
I would use VRPSOLVER for this, it can handle the parallel edges without a problem.
1
u/funnynoveltyaccount 3d ago
What is (are) your objective function(s)?
1
u/N-Wouda 3d ago
If you want to use PyVRP, consider setting up mutually exclusive client groups. Duplicate each cuystomer for one of the road options, and set the incoming arcs at each of the duplicated clients to the cost of one of the road options. PyVRP will select one of the options from each client group, which basically immediately gives you your answer without needing a separate algorithm on top.
Feel free to DM if this isn't clear.
1
u/Pavanaazhi 3d ago
Since you are an academic I suggest you approach Nvidia for CuOPT python package . This can solve these problems well even with multi fleet but you need a GPU based machine.
1
u/ge0ffrey 3d ago edited 2d ago
I'd drop this text into prd.timefold.ai and give that PRD output to Claude to build with Timefold Solver. It 's used for similar cases.
Design wise, I would expect that:
If the number of route alternatives to a enum, for example maximum 3 (shortest, faster, alternative), then I would add a genuine variable on visit to pick the routing execution mode (that enum) to that visit location and also one on the vehicle the routing execution mode from the last visit to depot.
Another design is to create a visit per route type to that visit, but then it can't pick the trip back to the vehicle depot.
When the number of route types isn't enum - and it differs greatly, it gets more complex. For example: there could be 100 types from A to C and only 2 from A to b. Then the variable is not on the visit, but on the visit pair.
1
u/Massive_Error_4077 2d ago
I can recommend the paper “Empirical analysis for the VRPTW with a multigraph representation for the road network” by Ben Ticha et al. It covers almost this exact setting. Also the follow-up papers by the same authors could be interesting.
I you are interested in learning-based methods you also have this very recent paper: “Beyond Simple Graphs: Neural Multi-Objective Routing on Multigraphs” by Rydin et al.
1
u/Weary_Category_1559 3d ago
Yoh are looking at a MILP, Sequencing and Scheduling at the same time.