[−][src]Struct sim::transit::TransitSimState
Fields
buses: BTreeMap<CarID, Bus>
routes: BTreeMap<BusRouteID, Route>
peds_waiting: BTreeMap<BusStopID, Vec<(PedestrianID, BusRouteID, Option<BusStopID>, Time)>>
events: Vec<Event>
Implementations
impl TransitSimState
[src]
pub fn new(map: &Map) -> TransitSimState
[src]
pub fn create_empty_route(
&mut self,
bus_route: &BusRoute,
map: &Map
) -> (PathRequest, Path)
[src]
&mut self,
bus_route: &BusRoute,
map: &Map
) -> (PathRequest, Path)
pub fn bus_created(&mut self, bus: CarID, r: BusRouteID)
[src]
pub fn bus_arrived_at_stop(
&mut self,
now: Time,
id: CarID,
trips: &mut TripManager,
walking: &mut WalkingSimState,
ctx: &mut Ctx<'_>
) -> bool
[src]
&mut self,
now: Time,
id: CarID,
trips: &mut TripManager,
walking: &mut WalkingSimState,
ctx: &mut Ctx<'_>
) -> bool
pub fn bus_departed_from_stop(&mut self, id: CarID, map: &Map) -> Router
[src]
pub fn ped_waiting_for_bus(
&mut self,
now: Time,
ped: PedestrianID,
trip: TripID,
person: PersonID,
stop1: BusStopID,
route_id: BusRouteID,
maybe_stop2: Option<BusStopID>,
map: &Map
) -> Option<CarID>
[src]
&mut self,
now: Time,
ped: PedestrianID,
trip: TripID,
person: PersonID,
stop1: BusStopID,
route_id: BusRouteID,
maybe_stop2: Option<BusStopID>,
map: &Map
) -> Option<CarID>
pub fn collect_events(&mut self) -> Vec<Event>
[src]
pub fn get_passengers(&self, bus: CarID) -> &Vec<(PersonID, Option<BusStopID>)>
[src]
pub fn bus_route(&self, bus: CarID) -> BusRouteID
[src]
pub fn buses_for_route(&self, route: BusRouteID) -> Vec<(CarID, Option<usize>)>
[src]
pub fn active_vehicles(&self) -> (usize, usize)
[src]
pub fn get_people_waiting_at_stop(
&self,
at: BusStopID
) -> &Vec<(PedestrianID, BusRouteID, Option<BusStopID>, Time)>
[src]
&self,
at: BusStopID
) -> &Vec<(PedestrianID, BusRouteID, Option<BusStopID>, Time)>
Trait Implementations
impl Clone for TransitSimState
[src]
fn clone(&self) -> TransitSimState
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for TransitSimState
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for TransitSimState
[src]
Auto Trait Implementations
impl RefUnwindSafe for TransitSimState
impl Send for TransitSimState
impl Sync for TransitSimState
impl Unpin for TransitSimState
impl UnwindSafe for TransitSimState
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>,