pub struct LookDispatch { /* private fields */ }Expand description
Elevator dispatch using the LOOK algorithm. See module docs.
Implementations§
Source§impl LookDispatch
impl LookDispatch
Trait Implementations§
Source§impl Default for LookDispatch
impl Default for LookDispatch
Source§impl<'de> Deserialize<'de> for LookDispatch
impl<'de> Deserialize<'de> for LookDispatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DispatchStrategy for LookDispatch
impl DispatchStrategy for LookDispatch
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 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 builtin_id(&self) -> Option<BuiltinStrategy>
fn builtin_id(&self) -> Option<BuiltinStrategy>
If this strategy is a known built-in variant, return it so
Simulation::new can stamp the
correct BuiltinStrategy into the group’s snapshot identity. Read moreSource§fn snapshot_config(&self) -> Option<String>
fn snapshot_config(&self) -> Option<String>
Serialize this strategy’s tunable configuration to a string
that
restore_config can apply to a
freshly-instantiated instance. Read moreSource§fn restore_config(&mut self, serialized: &str) -> Result<(), String>
fn restore_config(&mut self, serialized: &str) -> Result<(), String>
Restore tunable configuration from a string previously produced
by
snapshot_config on the same
strategy variant. Called by
crate::snapshot::WorldSnapshot::restore immediately after
BuiltinStrategy::instantiate builds the default instance,
so the restore writes over the defaults. Read moreSource§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 LookDispatch
impl RefUnwindSafe for LookDispatch
impl Send for LookDispatch
impl Sync for LookDispatch
impl Unpin for LookDispatch
impl UnsafeUnpin for LookDispatch
impl UnwindSafe for LookDispatch
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