Skip to main content

elevator_core/systems/
mod.rs

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