elevator_core/systems/mod.rs
1//! Tick-loop system phases run in sequence each simulation step.
2
3/// Advance transient states (boarding/exiting) to their next state.
4pub(crate) mod advance_transient;
5/// Assign idle elevators to stops via dispatch strategy.
6pub(crate) mod dispatch;
7/// Door open/close finite-state machine progression.
8pub(crate) mod doors;
9/// Per-tick energy consumption and regeneration tracking.
10#[cfg(feature = "energy")]
11pub(crate) mod energy;
12/// Board and exit riders at stops.
13pub(crate) mod loading;
14/// Aggregate metrics collection.
15pub(crate) mod metrics;
16/// Trapezoidal-profile elevator movement.
17pub(crate) mod movement;
18/// Reposition idle elevators for coverage.
19pub(crate) mod reposition;
20
21/// Context passed to every system phase.
22#[derive(Debug, Clone, Copy)]
23pub struct PhaseContext {
24 /// Current simulation tick number.
25 pub tick: u64,
26 /// Time step for this tick (seconds).
27 pub dt: f64,
28}