pub struct ScanDispatch { /* private fields */ }Expand description
Elevator dispatch using the SCAN (elevator) algorithm.
Serves all requests in the current direction of travel before reversing.
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 decide(
&mut self,
elevator: EntityId,
elevator_position: f64,
group: &ElevatorGroup,
manifest: &DispatchManifest,
world: &World,
) -> DispatchDecision
fn decide( &mut self, elevator: EntityId, elevator_position: f64, group: &ElevatorGroup, manifest: &DispatchManifest, world: &World, ) -> DispatchDecision
Decide for a single elevator.
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 decide_all(
&mut self,
elevators: &[(EntityId, f64)],
group: &ElevatorGroup,
manifest: &DispatchManifest,
world: &World,
) -> Vec<(EntityId, DispatchDecision)>
fn decide_all( &mut self, elevators: &[(EntityId, f64)], group: &ElevatorGroup, manifest: &DispatchManifest, world: &World, ) -> Vec<(EntityId, DispatchDecision)>
Decide for all idle elevators in a group.
Default: calls
decide() per elevator.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