Martin Shell JumpStart Decision Sciences martin@martinshell.com Vehicle Routing with Time Windows Integrating Cplex Constraint Programming With Python Tools Martin Shell JumpStart Decision Sciences martin@martinshell.com
Overview Single Depot Multi Vehicle Routing Problem with Time Windows Fleet of Identical Trucks Respect Time Windows for Deliveries, Weight and Volume Constraints Multi-Objective Programming First Solve to Minimize Number of Trucks Used Second – Fix Number of Trucks to Minimum and Optimize on Total Travel Time Demo Shows Comparison of Routes and Costs Resulting from Turning Time Windows for Delivery On or Off
Sample Data Orders Locations Truck Capacity 3400 cu ft, 34000 lb. Open and Close Times are in minutes after midnight ID NAME LATITUDE LONGITUDE DEPOT 1 Somerville MA 42.39 -71.1 2 Foxborough MA 42.06 -71.25 3 Gloucester MA 42.62 -70.66 4 Worcester MA 42.27 -71.81 5 Brattleboro VT 42.86 -72.56 6 Great Barrington MA 42.19 -73.36 7 Hudson NY 42.25 -73.79 8 Saratoga Springs NY 43.07 -73.78 9 Danbury CT 41.39 -73.45 10 Rutland VT 43.61 -72.98 11 Concord NH 43.23 -71.56 12 Hartford CT 41.77 -72.67 13 Pawtucket RI 41.87 -71.37 14 Lebanon, NH 43.64 -72.25 15 Standish ME 43.74 -70.55 OrderID DEST Weight Volume Open Close LoadTime 1 2 2100 1050 780 840 25 3 870 435 690 810 35 4 1470 735 540 75 5 1530 765 600 750 50 6 2190 1095 30 7 1920 960 510 45 8 525 660 55 9 1410 705 570 20 10 990 495 900 11 1380 480 12 1740 13 1590 795 14 630 40 15 1260 Truck Capacity 3400 cu ft, 34000 lb.
Location Map Display
Solution Map Display 6 Trucks Used Total Travel Time 77:11
Results Without Time Windows 4 Trucks Used Travel Time 51:02