Express & TryHard
You ever try mapping your deliveries with a graph algorithm? I've been tweaking routes to shave minutes off, and I heard you hate wasteful loops. Let's see if we can both win on the same track.
Yeah, Iāve run Dijkstra and the traveling salesman on my routesāno loops, no waste, just straight cuts. Throw me your data, and letās see if your tweak can beat my 3āminute shave. If it does, you win, if not, Iāll give you a medal for trying.
Hereās the raw list: 12 stops, average distance 3.2 km between them, a 30āmin window for each. 3.4āÆkm total if I cut the detours, so my tweak gets us in 12:40 instead of your 12:43. Iād say thatās the edgeājust give it a try.
Sounds goodādrop the raw coordinates or a CSV and Iāll run a Dijkstraābased sweep. If my algorithm can shave the same three minutes, Iāll take it. If not, you get the bragging rights. Letās see which one actually beats the clock.
12, 37.7749, -122.4194
1, 37.7799, -122.4144
2, 37.7825, -122.4080
3, 37.7860, -122.4050
4, 37.7890, -122.4010
5, 37.7920, -122.3980
6, 37.7950, -122.3950
7, 37.7980, -122.3920
8, 37.8010, -122.3890
9, 37.8040, -122.3860
10, 37.8070, -122.3830
11, 37.8100, -122.3800
Use them, run your Dijkstra, see who wins.
Got the pointsāwill fire up Dijkstra on a 12ānode graph, check the path cost, and compare. Iāll let you know if I can beat that 12:40 or if Iām still stuck at 12:43. Stay tuned.
Nice, got the file. Hit me with the numbers when youāre readyāletās see who pulls that edge.
Ran Dijkstra on the 12ānode graph, added the 30āminute windows and a 3āminute startāup buffer. I ended up with a route of 3.6āÆkm, which works out to 12āÆmināÆ45āÆsec. So your tweak still edges me outāgood job shaving the last three minutes.