Plantation driver & delivery: multi-stop daily route planner - single-file offline web page; enter each stop's crate count, time window (wholesale market chases the dawn trade, stores take mornings, group-buy points take afternoons) and unload duration, and it outputs stop order, per-stop latest departure times, the backwards departure time, and a last-stop-first-loaded manifest; drive times are hand-entered, no map APIs; if the day does not fit, it says so and names the clash
Build me a directly usable single-file web tool
(HTML with inline CSS/JS, opens on double-click,
runs offline, no installs, no accounts, no map
or external services) for planning a plantation's
daily delivery route.
Three input sections:
1 Stops
- Fields: stop name / order details (variety +
crate count, multiple lines fine) / earliest
arrival / latest arrival (the time window) /
expected unload minutes / contact phone
(optional)
- A stop with both window fields blank counts as
"any time"
- Paste import supported; rows that fail to
parse turn red and show the raw text
2 Drive-time matrix
- Minutes between every pair of points (including
depot-to-stop), hand-entered from my own
daily experience
- The tool estimates nothing: any route touching
a missing leg is not planned and is flagged
"missing drive time"
3 Departure & vehicle
- Depot / earliest possible departure / van
capacity in crates / optional return deadline
(latest end of day)
Computation and output:
1 A feasible plan (if one exists):
- Stop order with, per stop: arrival time /
departure time / whether the window is tight
("latest 9:00, actual 8:52, 8 min spare")
- The backwards departure time
- Idle waits between stops (early arrival, sit
and wait), listed per stop - the basis for
deciding whether to slot an errand into the
gap
2 A loading manifest ("last stop, first loaded"):
each stop's crates and varieties listed in
reverse stop order; load from the bottom of
the list upward
3 Overload and conflict checks:
- Total crates over capacity flagged red with
the excess
- Mutually unsatisfiable windows: state plainly
"no feasible plan" and name the two clashing
constraints ("stop A latest 9:00 vs stop B
earliest 10:30, with 90 minutes of driving
and 40 minutes of unload between"), plus the
direction of the fix (drop which stop, or
widen which window by how many minutes) -
never output a plan that violates a window
Hard requirements:
- Every computation uses only the drive times
and durations I entered - no built-in "average
city speed" defaults
- When multiple plans exist, output one, chosen
by shortest total idle time - no exhaustive
lists
- Data persists in browser local storage; CSV
export covers stops + plan + manifest; today's
data can be edited for tomorrow
- UI in English, readable in a phone browser
(drivers check the manifest from the cab)
Why it is written this way
Banning map APIs is this tool's most important trade. Map-based travel estimates fail precisely here - "which road at 4 a.m. toward the market" - because dawn traffic, and the queue to enter the market gate, are things maps do not know, while the driver who runs the road daily carries real numbers. A hand-entered drive-time matrix sounds primitive but swaps the weakest link of route planners (estimation) for the strongest (experience). And the whole plan's correctness hangs on time estimates: sequence it as cleverly as you like, drive times off by twenty minutes and everything arrives late.
Idle waits get their own output because they are the route's real hidden cost: on tight-window days, drivers burn hours "arriving early and waiting". With waits listed per stop, the driver decides whether to slot a curbside errand into the gap or leave later and sleep an extra half hour - the tool does not make that decision, but it puts the data for it in plain sight.
"Say so when it does not fit" is a hard requirement against the tool being too clever: when windows clash, most routing software emits a "best effort" plan - late at one or two stops - which looks like a plan but hides the breach inside the itinerary. Stating "no feasible plan" and naming the two constraints that fight, plus how many minutes of slack would resolve it, lets the driver immediately call one stop and ask for a half-hour grace - a call far more useful than a plausible-looking schedule.
The last-stop-first-loaded manifest translates the route directly into loading actions: reverse stop order IS loading order, bottom of the list up. Route planners usually stop at "the sequence", but a driver standing at the open door at 5 a.m. needs "which crates go in first" - skip that translation and even the optimal route means digging through the load at every stop.
Variables
| Variable | Notes |
|---|---|
| Drive-time matrix | Minutes between points, from your own runs - include time-of-day differences by entering the number for the hour you'll actually drive; this is the tool's accuracy ceiling |
| Stop time windows | The hard constraints per stop - wholesale, stores, group-buy points each have real ones; entering "morning-ish" produces a plan made of wishes |
| Van capacity & unload durations | Capacity in crates and each stop's real unload pace (stores unload slow, markets take whole pallets fast) - overload checks and every time projection depend on them |