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 new() -> Self
pub const fn new() -> Self
Create a new DestinationDispatch with defaults (immediate sticky,
no commitment window).
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).
Sourcepub const fn with_commitment_window_ticks(self, window: u64) -> Self
pub const fn with_commitment_window_ticks(self, window: u64) -> Self
Enable deferred commitment: riders’ sticky assignments are
re-evaluated each pass until the currently-assigned car is
within window ticks of the rider’s origin. At that point the
commitment latches and later ticks leave the assignment alone.