1 · Peak-day plan (linear program). Decides how to cover the gap between what is ordered and what the fleet can carry, at the lowest cost.
- Given
- D = 3,906 packages ordered · B = 1,600 packages the fleet carries in a normal day (32 vans × 50) · r = 192 extra packages per hour of fleet overtime (6 per van-hour × 32 vans) · co = $1,200 per fleet overtime hour ($37.50 per van-hour) · cu = $12.50 per partner package · cl = $18 per late package · U = partner contract limit · F = $10,225.81, the fleet's fixed day cost
- Decide
- o = overtime hours for the fleet (0 to 2) · u = packages sent to the partner · l = packages delivered late
Objective · lowest cost of the dayminimize F + co·o + cu·u + cl·l
ConstraintsB + r·o + u + l = D every package is delivered by someone, or late
0 ≤ o ≤ 2 at most two hours of overtime
u ≤ U the partner takes no more than the contract
u, l ≥ 0
Result: o = 2, u = 1,922, l = 0, for $36,651. Overtime is used first because it costs $6.25 per extra package, against $12.50 for the partner and $18 for a late delivery. The six strategies above are this model with o fixed at 0, 48, 72, 96 or 120 minutes; "Overtime only" also sets u = 0.
2 · Routing (capacitated vehicle routing, Google OR-Tools). Builds the van routes for a normal day.
- Given
- N = 500 stops plus one depot · K = 32 vans · Q = 50 packages per van · qi = packages for stop i · cij = travel distance from stop i to stop j
- Decide
- xijk = 1 if van k drives from i straight to j, otherwise 0
Objective · shortest total drivingminimize Σk Σi,j cij xijk
Constraintseach stop is visited by exactly one van, once
each van starts and ends at the depot
Σi on route k qi ≤ Q no van carries more than 50 packages
no loops that skip the depot
3 · Wave dispatch (simulation). Tests sending vans out again as they come back, instead of once in the morning.
- Given
- Windows w = 8:00, 10:00, 12:00, 14:00 · aw = packages ordered in each window (859, 1,020, 1,156, 871) · round trip = 4 hours · vw = van space at the depot when the window opens (1,600, 0, 800, 800): all 32 vans leave at 8:00 and are back at noon; 16 go out again at noon, so only the other 16 are free at 2 o'clock
- Rule
- On our vans in window w = min(aw, vw); the rest goes to the partner
Result: 2,459 packages on our vans and 1,447 to the partner, against 1,984 and 1,922 with one dispatch. Any split of the noon fleet between 12:00 and 2 o'clock gives the same 2,459, so the result does not depend on that choice. The day costs $29,513 to $34,964 depending on the price of a second trip, 5–19% below $36,651.
Sensitivity. Demand ±20% in 5% steps, partner capacity 1,500 to 2,000, overtime from 30 minutes to two hours. Maps in Folium.
Code on GitHub →