[−][src]Struct sim::mechanics::queue::Queue
Fields
id: Traversable
cars: VecDeque<CarID>
laggy_head: Option<CarID>
geom_len: Distance
reserved_length: Distance
Implementations
impl Queue
[src]
pub fn new(id: Traversable, map: &Map) -> Queue
[src]
pub fn get_car_positions(
&self,
now: Time,
cars: &BTreeMap<CarID, Car>,
queues: &BTreeMap<Traversable, Queue>
) -> Vec<(CarID, Distance)>
[src]
&self,
now: Time,
cars: &BTreeMap<CarID, Car>,
queues: &BTreeMap<Traversable, Queue>
) -> Vec<(CarID, Distance)>
fn inner_get_car_positions(
&self,
now: Time,
cars: &BTreeMap<CarID, Car>,
queues: &BTreeMap<Traversable, Queue>,
recursed_queues: &mut BTreeSet<Traversable>
) -> Vec<(CarID, Distance)>
[src]
&self,
now: Time,
cars: &BTreeMap<CarID, Car>,
queues: &BTreeMap<Traversable, Queue>,
recursed_queues: &mut BTreeSet<Traversable>
) -> Vec<(CarID, Distance)>
pub fn get_idx_to_insert_car(
&self,
start_dist: Distance,
vehicle_len: Distance,
now: Time,
cars: &BTreeMap<CarID, Car>,
queues: &BTreeMap<Traversable, Queue>
) -> Option<usize>
[src]
&self,
start_dist: Distance,
vehicle_len: Distance,
now: Time,
cars: &BTreeMap<CarID, Car>,
queues: &BTreeMap<Traversable, Queue>
) -> Option<usize>
pub fn try_to_reserve_entry(&mut self, car: &Car, force_entry: bool) -> bool
[src]
pub fn room_for_car(&self, car: &Car) -> bool
[src]
pub fn free_reserved_space(&mut self, car: &Car)
[src]
pub fn target_lane_penalty(&self) -> (usize, usize)
[src]
Trait Implementations
impl Clone for Queue
[src]
impl<'de> Deserialize<'de> for Queue
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Queue
[src]
Auto Trait Implementations
impl RefUnwindSafe for Queue
impl Send for Queue
impl Sync for Queue
impl Unpin for Queue
impl UnwindSafe for Queue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,