Struct sim::mechanics::walking::WalkingSimState [−][src]
pub(crate) struct WalkingSimState { peds: FixedMap<PedestrianID, Pedestrian>, peds_per_traversable: MultiMap<Traversable, PedestrianID>, events: Vec<Event>, }
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]
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]
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]
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]
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> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Instrument 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> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,