Repository navigation
Description
P5 Motor vehicle costing and restrictions · key
P5.13· size M
Goal
Motorcycle and motor scooter costing are ported in full with every option, reusing the motor kernel.
Upstream reference (Valhalla 3.9.3)
src/sif/motorcyclecost.ccsrc/sif/motorscootercost.cc
Scope
- Motorcycle: access, edge and transition cost, use_highways, use_tolls, use_trails and shared penalties.
- Motor scooter: top_speed, use_primary, use_hills, grade-based factors and its access rules.
- Compile both into the motor kernel's POD; add table columns only where behaviour differs.
- Lower bounds and fuzzer coverage for both.
Design notes
- Models differ mostly in tables, not code; avoid a new kernel instantiation unless measurements require it (see P4.22).
Acceptance criteria
- Parity gate A for both models on sampled cases.
- Upstream tests for both models ported and green.
- Admissibility fuzzer passes for both.
-
zig build testgreen.
Verification
Landed in 8ba6e47. Both models share a motor costing path. Utrecht and Liechtenstein each supplied 68 profiles and 10.2 million calls per mode. Across both extracts, 27.2 million turns and all 26 fixed-path recosts matched exactly. The maximum relative edge-cost error was 3.57e-7.
The ported motorcycle curvature and motorcycle/scooter top-speed fixtures passed in both search directions. The native suite passed all 31 build steps and the motor admissibility fuzzer ran cleanly for 60 seconds. The Linux ReleaseFast binary was 19,488,424 bytes, with zero search instantiations and two CLI costing kernels.
Blocked by
- [P5.11] Auto costing: full port of autocost.cc (auto, bus, taxi, HOV variants) #127
P5.11Auto costing: full port of autocost.cc (auto, bus, taxi, HOV variants)
Rules for working on this repository are in AGENTS.md. The plan is in docs/PLAN.md.
Activity
chrisbbreuer commentedon Nov 20, 2026
All ten CI jobs passed for
8ba6e47. The 60-secondmotor-costing,request, andcosting-referencefuzz runs also completed cleanly.CI run