[−][src]Struct sim::Sim
Fields
driving: DrivingSimState
parking: ParkingSimState
walking: WalkingSimState
intersections: IntersectionSimState
transit: TransitSimState
cap: CapSimState
trips: TripManager
pandemic: Option<PandemicModel>
scheduler: Scheduler
time: Time
map_name: String
edits_name: String
run_name: String
step_count: usize
analytics: Analytics
alerts: AlertHandler
Implementations
impl Sim
[src]
pub fn time(&self) -> Time
[src]
pub fn is_done(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn num_trips(&self) -> (usize, usize)
[src]
pub fn num_agents(&self) -> Counter<AgentType>
[src]
pub fn num_ppl(&self) -> (usize, usize, usize)
[src]
pub fn debug_ped(&self, id: PedestrianID)
[src]
pub fn debug_car(&self, id: CarID)
[src]
pub fn debug_intersection(&self, id: IntersectionID, map: &Map)
[src]
pub fn debug_lane(&self, id: LaneID)
[src]
pub fn agent_properties(&self, id: AgentID) -> AgentProperties
[src]
pub fn num_transit_passengers(&self, car: CarID) -> usize
[src]
pub fn bus_route_id(&self, maybe_bus: CarID) -> Option<BusRouteID>
[src]
pub fn active_agents(&self) -> Vec<AgentID>
[src]
pub fn agent_to_trip(&self, id: AgentID) -> Option<TripID>
[src]
pub fn trip_to_agent(&self, id: TripID) -> TripResult<AgentID>
[src]
pub fn trip_info(&self, id: TripID) -> TripInfo
[src]
pub fn all_trip_info(&self) -> Vec<(TripID, TripInfo)>
[src]
pub fn finished_trip_time(&self, id: TripID) -> Option<(Duration, Duration)>
[src]
pub fn trip_to_person(&self, id: TripID) -> PersonID
[src]
pub fn agent_to_person(&self, id: AgentID) -> Option<PersonID>
[src]
pub fn get_owner_of_car(&self, id: CarID) -> Option<PersonID>
[src]
pub fn lookup_parked_car(&self, id: CarID) -> Option<&ParkedCar>
[src]
pub fn all_parked_car_positions(&self, map: &Map) -> Vec<(Position, Position)>
[src]
pub fn lookup_person(&self, id: PersonID) -> Option<&Person>
[src]
pub fn get_person(&self, id: PersonID) -> &Person
[src]
pub fn find_person_by_orig_id(&self, id: OrigPersonID) -> Option<PersonID>
[src]
pub fn get_all_people(&self) -> &Vec<Person>
[src]
pub fn lookup_car_id(&self, idx: usize) -> Option<CarID>
[src]
pub fn get_path(&self, id: AgentID) -> Option<&Path>
[src]
pub fn get_all_driving_paths(&self) -> Vec<&Path>
[src]
pub fn trace_route(
&self,
id: AgentID,
map: &Map,
dist_ahead: Option<Distance>
) -> Option<PolyLine>
[src]
&self,
id: AgentID,
map: &Map,
dist_ahead: Option<Distance>
) -> Option<PolyLine>
pub fn get_canonical_pt_per_trip(
&self,
trip: TripID,
map: &Map
) -> TripResult<Pt2D>
[src]
&self,
trip: TripID,
map: &Map
) -> TripResult<Pt2D>
pub fn get_canonical_pt_per_person(
&self,
p: PersonID,
map: &Map
) -> Option<Pt2D>
[src]
&self,
p: PersonID,
map: &Map
) -> Option<Pt2D>
pub fn canonical_pt_for_agent(&self, id: AgentID, map: &Map) -> Option<Pt2D>
[src]
pub fn get_accepted_agents(&self, id: IntersectionID) -> HashSet<AgentID>
[src]
pub fn get_blocked_by(&self, a: AgentID) -> HashSet<AgentID>
[src]
pub fn status_of_buses(
&self,
route: BusRouteID,
map: &Map
) -> Vec<(CarID, Option<usize>, f64, Pt2D)>
[src]
&self,
route: BusRouteID,
map: &Map
) -> Vec<(CarID, Option<usize>, f64, Pt2D)>
pub fn get_analytics(&self) -> &Analytics
[src]
pub fn find_blockage_front(&self, car: CarID, map: &Map) -> String
[src]
pub fn delayed_intersections(
&self,
threshold: Duration
) -> Vec<(IntersectionID, Time)>
[src]
&self,
threshold: Duration
) -> Vec<(IntersectionID, Time)>
pub fn bldg_to_people(&self, b: BuildingID) -> Vec<PersonID>
[src]
pub fn worst_delay(
&self,
map: &Map
) -> (BTreeMap<RoadID, Duration>, BTreeMap<IntersectionID, Duration>)
[src]
&self,
map: &Map
) -> (BTreeMap<RoadID, Duration>, BTreeMap<IntersectionID, Duration>)
pub fn get_pandemic_model(&self) -> Option<&PandemicModel>
[src]
pub fn get_end_of_day(&self) -> Time
[src]
pub fn current_stage_and_remaining_time(
&self,
i: IntersectionID
) -> (usize, Duration)
[src]
&self,
i: IntersectionID
) -> (usize, Duration)
pub fn all_arrivals_at_border(
&self,
i: IntersectionID
) -> Vec<(AgentType, Vec<(Time, usize)>)>
[src]
&self,
i: IntersectionID
) -> Vec<(AgentType, Vec<(Time, usize)>)>
pub fn target_lane_penalty(&self, lane: &Lane) -> (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)>
pub fn generate_scenario(&self, map: &Map, name: String) -> Scenario
[src]
pub fn get_cap_counter(&self, l: LaneID) -> usize
[src]
pub fn infinite_parking(&self) -> bool
[src]
impl Sim
[src]
pub fn new(map: &Map, opts: SimOptions, timer: &mut Timer) -> Sim
[src]
pub fn make_spawner(&self) -> TripSpawner
[src]
pub fn flush_spawner(
&mut self,
spawner: TripSpawner,
map: &Map,
timer: &mut Timer
)
[src]
&mut self,
spawner: TripSpawner,
map: &Map,
timer: &mut Timer
)
pub fn get_free_onstreet_spots(&self, l: LaneID) -> Vec<ParkingSpot>
[src]
pub fn get_free_offstreet_spots(&self, b: BuildingID) -> Vec<ParkingSpot>
[src]
pub fn get_free_lot_spots(&self, pl: ParkingLotID) -> Vec<ParkingSpot>
[src]
pub fn get_all_parking_spots(&self) -> (Vec<ParkingSpot>, Vec<ParkingSpot>)
[src]
pub fn bldg_to_parked_cars(&self, b: BuildingID) -> Vec<CarID>
[src]
pub fn walking_path_to_nearest_parking_spot(
&self,
map: &Map,
b: BuildingID
) -> Option<(Path, Distance)>
[src]
&self,
map: &Map,
b: BuildingID
) -> Option<(Path, Distance)>
pub(crate) fn new_person(
&mut self,
p: PersonID,
orig_id: Option<OrigPersonID>,
ped_speed: Speed,
vehicle_specs: Vec<VehicleSpec>
)
[src]
&mut self,
p: PersonID,
orig_id: Option<OrigPersonID>,
ped_speed: Speed,
vehicle_specs: Vec<VehicleSpec>
)
pub fn random_person(
&mut self,
ped_speed: Speed,
vehicle_specs: Vec<VehicleSpec>
) -> &Person
[src]
&mut self,
ped_speed: Speed,
vehicle_specs: Vec<VehicleSpec>
) -> &Person
pub(crate) fn seed_parked_car(&mut self, vehicle: Vehicle, spot: ParkingSpot)
[src]
pub(crate) fn seed_bus_route(&mut self, route: &BusRoute)
[src]
fn start_bus(&mut self, route: &BusRoute, map: &Map)
[src]
pub fn set_name(&mut self, name: String)
[src]
impl Sim
[src]
fn minimal_step(
&mut self,
map: &Map,
max_dt: Duration,
maybe_cb: &mut Option<Box<dyn SimCallback>>
) -> bool
[src]
&mut self,
map: &Map,
max_dt: Duration,
maybe_cb: &mut Option<Box<dyn SimCallback>>
) -> bool
fn do_step(
&mut self,
map: &Map,
time: Time,
cmd: Command,
maybe_cb: &mut Option<Box<dyn SimCallback>>
) -> bool
[src]
&mut self,
map: &Map,
time: Time,
cmd: Command,
maybe_cb: &mut Option<Box<dyn SimCallback>>
) -> bool
fn dispatch_events(&mut self, events: Vec<Event>, map: &Map)
[src]
pub fn timed_step(
&mut self,
map: &Map,
dt: Duration,
maybe_cb: &mut Option<Box<dyn SimCallback>>,
timer: &mut Timer
)
[src]
&mut self,
map: &Map,
dt: Duration,
maybe_cb: &mut Option<Box<dyn SimCallback>>,
timer: &mut Timer
)
pub fn tiny_step(
&mut self,
map: &Map,
maybe_cb: &mut Option<Box<dyn SimCallback>>
)
[src]
&mut self,
map: &Map,
maybe_cb: &mut Option<Box<dyn SimCallback>>
)
pub fn time_limited_step(
&mut self,
map: &Map,
dt: Duration,
real_time_limit: Duration,
maybe_cb: &mut Option<Box<dyn SimCallback>>
)
[src]
&mut self,
map: &Map,
dt: Duration,
real_time_limit: Duration,
maybe_cb: &mut Option<Box<dyn SimCallback>>
)
pub fn dump_before_abort(&self)
[src]
impl Sim
[src]
pub fn run_until_done<F: Fn(&mut Sim, &Map)>(
&mut self,
map: &Map,
callback: F,
time_limit: Option<Duration>
)
[src]
&mut self,
map: &Map,
callback: F,
time_limit: Option<Duration>
)
impl Sim
[src]
pub fn save_dir(&self) -> String
[src]
fn save_path(&self, base_time: Time) -> String
[src]
pub fn save(&mut self) -> String
[src]
pub fn find_previous_savestate(&self, base_time: Time) -> Option<String>
[src]
pub fn find_next_savestate(&self, base_time: Time) -> Option<String>
[src]
pub fn load_savestate(
path: String,
map: &Map,
timer: &mut Timer
) -> Result<Sim, Error>
[src]
path: String,
map: &Map,
timer: &mut Timer
) -> Result<Sim, Error>
pub fn restore_paths(&mut self, map: &Map, timer: &mut Timer)
[src]
impl Sim
[src]
pub fn handle_live_edited_traffic_signals(&mut self, map: &Map)
[src]
pub fn handle_live_edits(&mut self, map: &Map)
[src]
fn find_trips_affected_by_live_edits(
&mut self,
map: &Map
) -> Vec<(AgentID, TripID)>
[src]
&mut self,
map: &Map
) -> Vec<(AgentID, TripID)>
impl Sim
[src]
pub fn delete_car(&mut self, id: CarID, map: &Map)
[src]
pub fn clear_alerts(&mut self) -> Vec<(Time, AlertLocation, String)>
[src]
impl Sim
[src]
pub fn set_periodic_callback(&mut self, frequency: Duration)
[src]
pub fn unset_periodic_callback(&mut self)
[src]
Trait Implementations
impl Clone for Sim
[src]
impl<'de> Deserialize<'de> for Sim
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl GetDrawAgents for Sim
[src]
fn time(&self) -> Time
[src]
fn step_count(&self) -> usize
[src]
fn get_draw_car(&self, id: CarID, map: &Map) -> Option<DrawCarInput>
[src]
fn get_draw_ped(
&self,
id: PedestrianID,
map: &Map
) -> Option<DrawPedestrianInput>
[src]
&self,
id: PedestrianID,
map: &Map
) -> Option<DrawPedestrianInput>
fn get_draw_cars(&self, on: Traversable, map: &Map) -> Vec<DrawCarInput>
[src]
fn get_draw_peds(
&self,
on: Traversable,
map: &Map
) -> (Vec<DrawPedestrianInput>, Vec<DrawPedCrowdInput>)
[src]
&self,
on: Traversable,
map: &Map
) -> (Vec<DrawPedestrianInput>, Vec<DrawPedCrowdInput>)
fn get_all_draw_cars(&self, map: &Map) -> Vec<DrawCarInput>
[src]
fn get_all_draw_peds(&self, map: &Map) -> Vec<DrawPedestrianInput>
[src]
fn get_unzoomed_agents(&self, map: &Map) -> Vec<UnzoomedAgent>
[src]
impl Serialize for Sim
[src]
Auto Trait Implementations
impl RefUnwindSafe for Sim
impl Send for Sim
impl Sync for Sim
impl Unpin for Sim
impl UnwindSafe for Sim
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>,