Skip to main content

Module arrival_log

Module arrival_log 

Source
Expand description

Rolling per-stop arrival log, the signal source for rate-driven dispatch and repositioning. Rolling per-stop arrival log.

Carries a CurrentTick sibling resource that mirrors Simulation::current_tick so strategies reading the log from phases without direct access to PhaseContext (e.g. RepositionStrategy) can still compute windowed queries.

Commercial group controllers sample per-stop arrival rates to pick traffic modes (up-peak, down-peak) and to pre-position idle cars ahead of expected demand (Otis Compass Infinity’s predictive parking, KONE Polaris’s pattern-driven mode switch). This log is the signal source: dispatch strategies read it via DispatchManifest::arrivals_at, reposition strategies read it directly from World resources.

The log is append-only during a tick and pruned at the start of each tick to keep memory bounded under long runs. Stored entries are (tick, stop) pairs; queries are by stop and time window only.

Structs§

ArrivalLog
Append-only log of per-stop arrival events used to compute rolling arrival-rate signals.
ArrivalLogRetention
World resource controlling how far back the ArrivalLog retains entries before Simulation::advance_tick prunes them.
CurrentTick
World resource mirroring the current simulation tick.
DestinationLog
Append-only log of rider destinations, mirror of ArrivalLog for the outgoing side of a trip.

Constants§

DEFAULT_ARRIVAL_WINDOW_TICKS
Default rolling window (in ticks).