Skip to content

[P5.13] Motorcycle and motor scooter costing #129

Closed

Description

@chrisbbreuer

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.cc
  • src/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 test green.

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


Rules for working on this repository are in AGENTS.md. The plan is in docs/PLAN.md.

Activity

  1. added
    blocked
    phase:5
    area:costing
    type:port
    size:M
    on Nov 17, 2026
  2. added
    ready
    and removed
    blocked
    on Nov 20, 2026
  3. chrisbbreuer commented on Nov 20, 2026

    @chrisbbreuer
    MemberAuthor

    All ten CI jobs passed for 8ba6e47. The 60-second motor-costing, request, and costing-reference fuzz runs also completed cleanly.

    CI run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:costingphase:5readysize:Mtype:port

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions