Build real route packs, fetch both London directions through TfL API, generate trips/PVR/duties, apply PCV-style break logic, export CSV, and save route packs for the simulator. Includes v6.1 custom-route loader compatibility and corrected two-way cycle PVR logic.
Use this for worldwide routes. London routes can be started from the TfL Lookup tab, then edited here.
3. Runtime profile per stop
Runtime is cumulative minutes from the first terminal to each stop. The simulator can use AM / PM / Evening / Night / Weekend profiles.
When you add/update a stop, these runtime values are saved against that stop and direction. If blank, the generator uses AM runtime.
Stops table
Direction
Order
Stop
Term
Control
Curtail
Driver Ch
Distance
AM
PM
Evening
Night
Weekend
Lat
Lon
4. Auto schedule generator
You only choose the starting pattern. Trip numbers, bus IDs, running numbers/duties, stop times and frequency rows are generated automatically.
Used for PVR and generated stop-times
Used for PVR and generated stop-times
0 = auto from cycle ÷ frequency
PVR is now calculated as a complete vehicle cycle: A→B runtime + B stand + B→A runtime + A stand, divided by frequency. Example: 60 + 60 at 10 min = 12 buses, plus layover allowance if configured.
TfL London route lookup
Use this only for London. The Netlify function calls TfL using the hidden TFL_API_KEY environment variable. Other cities should use Manual Builder or CSV Import.
Duty / PCV-style Compliance Engine
This creates realistic duties from the generated trips. Values are configurable because local rules and operator agreements differ. Use this to simulate drivers needing a legal/contractual break before returning to service.
Duties 0
Breaks created 0
Late-return risks 0
Compliance status —
Duty
Bus
Piece
Direction
Trip
Start
End
Work min
Break after
Available after
Status
Simulator use: if a driver arrives late at a break/relief point, the generated available after time is pushed forward. The bus can be shown as “Driver unavailable” until the minimum break is complete.
CSV Import / Export
Import one-row-per-stop-time CSV, or generate your own CSV from the manual builder. Required columns are auto-matched.
Local testing: use Download route JSON, then open the simulator and use Load Local JSON. This avoids Netlify deploys and function calls while testing route logic.