pub struct DemandWeighted;Expand description
Position idle elevators near stops with historically high demand.
Reads per-stop throughput from the MetricTags system to weight
stop positions. Idle elevators are assigned to the highest-demand
stops that don’t already have an elevator nearby.
Trait Implementations§
Source§impl RepositionStrategy for DemandWeighted
impl RepositionStrategy for DemandWeighted
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 DemandWeighted
impl RefUnwindSafe for DemandWeighted
impl Send for DemandWeighted
impl Sync for DemandWeighted
impl Unpin for DemandWeighted
impl UnsafeUnpin for DemandWeighted
impl UnwindSafe for DemandWeighted
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