BusPerformance • AVL OCC

Route Builder V6.1.1

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.

1. Route setup

2. Stops builder

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

DirectionOrderStopTermControlCurtailDriver ChDistanceAMPMEveningNightWeekendLatLon

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
DutyBusPieceDirectionTripStartEndWork minBreak afterAvailable afterStatus

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.

Download Route 24 example CSV

CSV columns: city_pack,route_id,route_name,direction,stop_order,stop_name,is_terminal,is_control_point,is_curtailment_point,is_driver_change_point,distance_km,runtime_am,runtime_pm,runtime_evening,runtime_night,runtime_weekend,lat,lon,trip_id,bus_id,duty,start_time,stop_time

Validation summary

Rows
0
Directions
0
Stops
0
Trips
0
Driver change
0
Curtailment
0

Route preview

Build/import route to preview stops.

Generated CSV rows

Open Simulator

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.

Saved routes

Click “View saved routes”.