Skip to main content

Module reposition

Module reposition 

Source
Expand description

Built-in repositioning strategies. Built-in repositioning strategies for idle elevators.

§Example

use elevator_core::prelude::*;
use elevator_core::dispatch::reposition::SpreadEvenly;

let sim = SimulationBuilder::demo()
    .reposition(SpreadEvenly, BuiltinReposition::SpreadEvenly)
    .build()
    .unwrap();

Structs§

AdaptiveParking
Mode-gated reposition: dispatches to an inner strategy chosen by the current TrafficMode.
DemandWeighted
Position idle elevators near stops with historically high demand.
NearestIdle
No-op strategy: idle elevators stay where they stopped.
PredictiveParking
Predictive parking: park idle elevators near stops with the highest recent per-stop arrival rate.
RepositionCooldowns
World resource: per-car tick-when-next-eligible for reposition.
ReturnToLobby
Return idle elevators to a configured home stop (default: first stop).
SpreadEvenly
Distribute idle elevators evenly across the group’s stops.

Constants§

DEFAULT_REPOSITION_COOLDOWN_TICKS
Default reposition cooldown in ticks (~4 s at 60 Hz).