pub struct DestinationDispatch { /* private fields */ }Expand description
Hall-call destination dispatch (DCS).
§API shape
Uses DispatchStrategy::pre_dispatch to write sticky
AssignedCar extensions and rebuild each car’s committed stop
queue during a &mut World phase. DispatchStrategy::rank then
routes each car to its own queue front and returns None for every
other stop, so the group-wide Hungarian assignment trivially pairs
each car with the stop it has already committed to.
Implementations§
Source§impl DestinationDispatch
impl DestinationDispatch
Sourcepub const fn with_stop_penalty(self, penalty: f64) -> Self
pub const fn with_stop_penalty(self, penalty: f64) -> Self
Override the fresh-stop penalty (ticks per new stop added to a car’s committed route when it picks this rider up).
Trait Implementations§
Source§impl Default for DestinationDispatch
impl Default for DestinationDispatch
Source§impl DispatchStrategy for DestinationDispatch
impl DispatchStrategy for DestinationDispatch
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 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 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 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
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
Auto Trait Implementations§
impl Freeze for DestinationDispatch
impl RefUnwindSafe for DestinationDispatch
impl Send for DestinationDispatch
impl Sync for DestinationDispatch
impl Unpin for DestinationDispatch
impl UnsafeUnpin for DestinationDispatch
impl UnwindSafe for DestinationDispatch
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