Struct sim::mechanics::walking::WalkingSimState [−][src]
Simulates pedestrians. Unlike vehicles, pedestrians can move bidirectionally on sidewalks and just “ghost” through each other. There’s no queueing or slowdown when many people are overlapping. They’re simply grouped together into a DrawPedCrowdInput for rendering.
Fields
peds: FixedMap<PedestrianID, Pedestrian>
peds_per_traversable: MultiMap<Traversable, PedestrianID>
events: Vec<Event>
Implementations
impl WalkingSimState
[src]
pub fn new() -> WalkingSimState
[src]
pub fn spawn_ped(
&mut self,
now: Time,
params: CreatePedestrian,
map: &Map,
scheduler: &mut Scheduler
)
[src]
&mut self,
now: Time,
params: CreatePedestrian,
map: &Map,
scheduler: &mut Scheduler
)
pub fn get_draw_ped(
&self,
id: PedestrianID,
now: Time,
map: &Map
) -> Option<DrawPedestrianInput>
[src]
&self,
id: PedestrianID,
now: Time,
map: &Map
) -> Option<DrawPedestrianInput>
pub fn get_all_draw_peds(
&self,
now: Time,
map: &Map
) -> Vec<DrawPedestrianInput>
[src]
&self,
now: Time,
map: &Map
) -> Vec<DrawPedestrianInput>
pub fn update_ped(
&mut self,
id: PedestrianID,
now: Time,
ctx: &mut Ctx<'_>,
trips: &mut TripManager,
transit: &mut TransitSimState
)
[src]
&mut self,
id: PedestrianID,
now: Time,
ctx: &mut Ctx<'_>,
trips: &mut TripManager,
transit: &mut TransitSimState
)
pub fn ped_boarded_bus(&mut self, now: Time, id: PedestrianID)
[src]
pub fn delete_ped(&mut self, id: PedestrianID, ctx: &mut Ctx<'_>)
[src]
Abruptly remove a pedestrian from the simulation. They may be in any arbitrary state, like in the middle of a turn.
pub fn debug_ped(&self, id: PedestrianID)
[src]
pub fn agent_properties(
&self,
map: &Map,
id: PedestrianID,
now: Time
) -> AgentProperties
[src]
&self,
map: &Map,
id: PedestrianID,
now: Time
) -> AgentProperties
pub fn trace_route(
&self,
now: Time,
id: PedestrianID,
map: &Map
) -> Option<PolyLine>
[src]
&self,
now: Time,
id: PedestrianID,
map: &Map
) -> Option<PolyLine>
pub fn get_path(&self, id: PedestrianID) -> Option<&Path>
[src]
pub fn get_unzoomed_agents(&self, now: Time, map: &Map) -> Vec<UnzoomedAgent>
[src]
pub fn get_draw_peds_on(
&self,
now: Time,
on: Traversable,
map: &Map
) -> (Vec<DrawPedestrianInput>, Vec<DrawPedCrowdInput>)
[src]
&self,
now: Time,
on: Traversable,
map: &Map
) -> (Vec<DrawPedestrianInput>, Vec<DrawPedCrowdInput>)
pub fn collect_events(&mut self) -> Vec<Event>
[src]
pub fn find_trips_to_parking(
&self,
evicted_cars: Vec<ParkedCar>
) -> Vec<(AgentID, TripID)>
[src]
&self,
evicted_cars: Vec<ParkedCar>
) -> Vec<(AgentID, TripID)>
pub fn all_waiting_people(
&self,
now: Time,
delays: &mut BTreeMap<PersonID, Duration>
)
[src]
&self,
now: Time,
delays: &mut BTreeMap<PersonID, Duration>
)
pub fn populate_commuter_counts(&self, cnts: &mut CommutersVehiclesCounts)
[src]
Trait Implementations
impl Clone for WalkingSimState
[src]
fn clone(&self) -> WalkingSimState
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for WalkingSimState
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for WalkingSimState
[src]
Auto Trait Implementations
impl RefUnwindSafe for WalkingSimState
impl Send for WalkingSimState
impl Sync for WalkingSimState
impl Unpin for WalkingSimState
impl UnwindSafe for WalkingSimState
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,
pub 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,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub 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>,