Mode-transition state machine for travellers.
A traveller progresses through their TripPlan one Leg at a time. This crate tracks the current phase deterministically so the domain crates (crowd, vehicle, transit) only have to react to state changes, not compute them.
TripPlan
Leg