pub struct ScanDispatch { /* private fields */ }Expand description
Elevator dispatch using the SCAN (elevator) algorithm.
Each car tracks a sweep direction; stops demanded in that direction
receive a positional cost while stops behind are excluded. When
nothing remains ahead, the sweep reverses and the car considers the
reverse side. Direction and mode are resolved once per pass in
DispatchStrategy::prepare_car so ranking is independent of the
iteration order over stops.
Implementations§
Source§impl ScanDispatch
impl ScanDispatch
Trait Implementations§
Source§impl Default for ScanDispatch
impl Default for ScanDispatch
Source§impl DispatchStrategy for ScanDispatch
impl DispatchStrategy for ScanDispatch
Source§fn prepare_car(
&mut self,
car: EntityId,
car_position: f64,
group: &ElevatorGroup,
manifest: &DispatchManifest,
world: &World,
)
fn prepare_car( &mut self, car: EntityId, car_position: f64, group: &ElevatorGroup, manifest: &DispatchManifest, world: &World, )
Source§fn rank(
&mut self,
car: EntityId,
car_position: f64,
_stop: EntityId,
stop_position: f64,
_group: &ElevatorGroup,
_manifest: &DispatchManifest,
_world: &World,
) -> Option<f64>
fn rank( &mut self, car: EntityId, car_position: f64, _stop: EntityId, stop_position: f64, _group: &ElevatorGroup, _manifest: &DispatchManifest, _world: &World, ) -> Option<f64>
Source§fn notify_removed(&mut self, elevator: EntityId)
fn notify_removed(&mut self, elevator: EntityId)
Notify the strategy that an elevator has been removed. Read more
Source§fn pre_dispatch(
&mut self,
_group: &ElevatorGroup,
_manifest: &DispatchManifest,
_world: &mut World,
)
fn pre_dispatch( &mut self, _group: &ElevatorGroup, _manifest: &DispatchManifest, _world: &mut World, )
Optional hook called once per group before the assignment pass. Read more
Source§fn fallback(
&mut self,
_car: EntityId,
_car_position: f64,
_group: &ElevatorGroup,
_manifest: &DispatchManifest,
_world: &World,
) -> DispatchDecision
fn fallback( &mut self, _car: EntityId, _car_position: f64, _group: &ElevatorGroup, _manifest: &DispatchManifest, _world: &World, ) -> DispatchDecision
Decide what an idle car should do when no stop was assigned to it. Read more
Auto Trait Implementations§
impl Freeze for ScanDispatch
impl RefUnwindSafe for ScanDispatch
impl Send for ScanDispatch
impl Sync for ScanDispatch
impl Unpin for ScanDispatch
impl UnsafeUnpin for ScanDispatch
impl UnwindSafe for ScanDispatch
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