🧩 Constraint Solving POTD:Problem of the Day: Vehicle Routing Problem with Time Windows (VRPTW) #36442
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Constraint Solving — Problem of the Day. A newer discussion is available at Discussion #36638. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Statement
The Vehicle Routing Problem with Time Windows (VRPTW) is a classic optimization problem that combines routing and scheduling constraints. You have:
Q[a_i, b_i]for each customer (arrive betweena_iandb_i)Goal: Construct a set of routes, one per vehicle, that:
Small Example
Suppose you have:
A solution might be: Vehicle 1 → Depot → Customer 1 → Customer 3 → Depot; Vehicle 2 → Depot → Customer 2 → Customer 4 → Depot, with cumulative travel time minimized.
Why It Matters
Last-mile delivery: Amazon, UPS, and DoorDash use VRPTW variants daily to route millions of packages while respecting delivery windows—a 1% improvement in travel distance saves millions annually.
Field service scheduling: Plumbers, electricians, and maintenance engineers must visit multiple sites within time windows (customer availability or technician shifts).
Humanitarian logistics: Disaster relief organizations use VRPTW to deliver aid across fragmented networks with strict access times.
Modeling Approaches
Approach 1: Mixed-Integer Programming (MIP)
Paradigm: Continuous relaxation with binary routing variables.
Variables:
x_{ij}^k ∈ {0, 1}: Vehiclektravels directly from customerito customerjt_i: Arrival time at customeriload_i: Load of vehicle upon arriving at customeriKey constraints:
a_i ≤ t_i ≤ b_ifor all customerst_i + service_i + travel_{ij} ≤ t_j + M(1 - x_{ij}^k)(if vehicle goes fromitoj)load_i + demand_j ≤ Qon feasible arcsTrade-offs: Strong LP relaxation; standard solver (CPLEX, Gurobi) easily scales to 100+ customers; but big-M coefficients can weaken bounds.
Approach 2: Constraint Programming (CP)
Paradigm: Rich domains, global constraints, and search via labeling.
Variables:
next[i]: Which customer (or depot) follows customeriin the routearrival[i]: Arrival time at customeri(integer domain)route_vehicle[i]: Which vehicle handles customeriKey constraints:
arrival[next[i]] = arrival[i] + service_i + travel[i, next[i]]a_i ≤ arrival[i] ≤ b_iTrade-offs: More natural expression of time/sequence; propagation on global constraints (cumulative, circuit) is stronger than MIP; scales well to thousands of customers with good search heuristics; fewer numerical issues.
Example Model (OR-Tools / Python-MiniZinc style)
Key Techniques
1. Time-Window Propagation & Reachability
2. Local Search & Large Neighborhood Search (LNS)
3. Decomposition & Route Enumeration
Challenge Corner
Can you model VRPTW with asymmetric costs and precedence constraints?
In real logistics, travel time may differ by direction (one-way streets, fuel costs). Some customers have precedence (must pick up before delivery at another location). How would you extend the models above to handle these? What propagation rules become crucial for pruning infeasible precedence+time-window combinations?
References
Solomon, M. M. (1987). "Algorithms for the Vehicle Routing and Scheduling Problems with Time Window Constraints." Operations Research, 35(2), 254–265.
Bent, R., & Van Hentenryck, P. (2006). "A Two-Stage Hybrid Local Search for the Vehicle Routing Problem with Time Windows." Journal of Heuristics, 12(4-5), 309–330.
Vidal, T., Crainic, T. G., Gendreau, M., & Prins, C. (2013). "Heuristics for Multi-Attribute Vehicle Routing Problems: A Survey and Synthesis." European Journal of Operational Research, 231(1), 1–21.
OR-Tools Routing Library (Google GitHub): Excellent open-source reference implementation with both MIP and CP engines.
Next problem will explore an emerging topic or a deeper scheduling variant!
Beta Was this translation helpful? Give feedback.
All reactions