pub struct NearestIdle;Expand description
No-op strategy: idle elevators stay where they stopped.
Use this to disable repositioning for a group while keeping the repositioning phase active for other groups.
Trait Implementations§
Source§impl RepositionStrategy for NearestIdle
impl RepositionStrategy for NearestIdle
Source§fn reposition(
&mut self,
_idle_elevators: &[(EntityId, f64)],
_stop_positions: &[(EntityId, f64)],
_group: &ElevatorGroup,
_world: &World,
_out: &mut Vec<(EntityId, EntityId)>,
)
fn reposition( &mut self, _idle_elevators: &[(EntityId, f64)], _stop_positions: &[(EntityId, f64)], _group: &ElevatorGroup, _world: &World, _out: &mut Vec<(EntityId, EntityId)>, )
Decide where to reposition idle elevators. Read more
Source§fn builtin_id(&self) -> Option<BuiltinReposition>
fn builtin_id(&self) -> Option<BuiltinReposition>
If this strategy is a known built-in variant, return it so
Simulation::set_reposition
callers don’t have to pass a separate BuiltinReposition id
that might drift from the dispatcher’s actual type. Read moreSource§fn min_arrival_log_window(&self) -> u64
fn min_arrival_log_window(&self) -> u64
Minimum
ArrivalLog retention
(in ticks) the strategy needs to function. Strategies that read
the log directly with a custom rolling window must override this
so Simulation::set_reposition
can widen
ArrivalLogRetention
to keep the data alive long enough for the query. Read moreAuto Trait Implementations§
impl Freeze for NearestIdle
impl RefUnwindSafe for NearestIdle
impl Send for NearestIdle
impl Sync for NearestIdle
impl Unpin for NearestIdle
impl UnsafeUnpin for NearestIdle
impl UnwindSafe for NearestIdle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more