Vivek Paladiya
unread,Oct 14, 2025, 12:42:52 AM (3 days ago) Oct 14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to or-tools-discuss
Debugging Skip Decisions in OR-Tools VRP Optimization
Problem:
Using OR-Tools for VRP optimization (package delivery system), where:
- Multiple delivery locations
- Fleet of vehicles
- Time window constraints
- Various real-world constraints
Implementation:
- OR-Tools with PARALLEL_CHEAPEST_INSERTION
- GUIDED_LOCAL_SEARCH
- Using Constraint Programming
Key Constraints:
Hard:
- Time windows (delivery hours)
- Vehicle capacity
- Maximum route duration
- Paired deliveries (pickup → delivery)
Soft (Penalties):
- Distance between stops
- Late deliveries
- Extra vehicle usage
- Non-preferred routes
Challenge:
Optimizer skips some deliveries, but we can't determine why. Example:
```python
skip_penalty = base_cost
if delivery.is_priority:
skip_penalty += priority_penalty
routing.AddDisjunction([delivery_index], skip_penalty, True)
```
Need to understand:
1. Why deliveries are skipped
2. Which constraints caused the skip
3. Was it due to:
- Time window violations?
- Distance/cost inefficiency?
- Capacity constraints?
- Accumulated penalties?
Looking for: An approach to track and analyze solver's skip decisions without significant performance impact.
Question: How can we implement skip reason tracking in OR-Tools VRP to understand why certain deliveries are excluded from the solution?