Enum sim::events::Event [−][src]
pub enum Event {}Show variants
CarReachedParkingSpot(CarID, ParkingSpot), CarLeftParkingSpot(CarID, ParkingSpot), BusArrivedAtStop(CarID, BusRouteID, BusStopID), BusDepartedFromStop(CarID, BusRouteID, BusStopID), PassengerBoardsTransit(PersonID, CarID, BusRouteID, BusStopID, Duration), PassengerAlightsTransit(PersonID, CarID, BusRouteID, BusStopID), PersonEntersBuilding(PersonID, BuildingID), PersonLeavesBuilding(PersonID, BuildingID), PersonLeavesMap(PersonID, Option<AgentID>, IntersectionID), PersonEntersMap(PersonID, AgentID, IntersectionID), PedReachedParkingSpot(PedestrianID, ParkingSpot), BikeStoppedAtSidewalk(CarID, LaneID), ProblemEncountered(TripID, Problem), AgentEntersTraversable(AgentID, Option<TripID>, Traversable, Option<usize>), IntersectionDelayMeasured(TripID, TurnID, AgentID, Duration), TripFinished { trip: TripID, mode: TripMode, total_time: Duration, blocked_time: Duration, }, TripCancelled(TripID, TripMode), TripPhaseStarting(TripID, PersonID, Option<PathRequest>, TripPhaseType), PathAmended(Path), Alert(AlertLocation, String),
As a simulation runs, different systems emit Events. This cleanly separates the internal mechanics of the simulation from consumers that just want to know what’s happening.
An Event always occurs at a particular time, plumbed separately to consumers.
Many of these were created for a test framework that’s been abandoned. They could be removed or have their API adjusted, but it’s not urgent; publishing an event that’s not used by Analytics has no performance impact.
Variants
CarReachedParkingSpot(CarID, ParkingSpot)
CarLeftParkingSpot(CarID, ParkingSpot)
BusArrivedAtStop(CarID, BusRouteID, BusStopID)
BusDepartedFromStop(CarID, BusRouteID, BusStopID)
PassengerBoardsTransit(PersonID, CarID, BusRouteID, BusStopID, Duration)
How long waiting at the stop?
PassengerAlightsTransit(PersonID, CarID, BusRouteID, BusStopID)
PersonEntersBuilding(PersonID, BuildingID)
PersonLeavesBuilding(PersonID, BuildingID)
PersonLeavesMap(PersonID, Option<AgentID>, IntersectionID)
None if cancelled
PersonEntersMap(PersonID, AgentID, IntersectionID)
PedReachedParkingSpot(PedestrianID, ParkingSpot)
If the agent is a transit vehicle, then include a count of how many passengers are on board.
TripID, TurnID (Where the delay was encountered), Time spent waiting at that turn
Show fields
TripPhaseStarting(TripID, PersonID, Option<PathRequest>, TripPhaseType)
PathAmended(Path)
Just use for parking replanning. Not happy about copying the full path in here, but the way to plumb info into Analytics is Event.
Alert(AlertLocation, String)
Trait Implementations
impl<'de> Deserialize<'de> for Event
[src]
impl<'de> Deserialize<'de> for Event
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl StructuralPartialEq for Event
[src]
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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>,