[−][src]Enum sim::events::Event
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)
AgentEntersTraversable(AgentID, Traversable, Option<usize>)
If the agent is a transit vehicle, then include a count of how many passengers are on board.
IntersectionDelayMeasured(CompressedMovementID, Duration, AgentID)
TripPhaseStarting(TripID, PersonID, Option<PathRequest>, TripPhaseType)
TripID, TurnID (Where the delay was encountered), Time spent waiting at that turn
TripID, LaneID (Where the delay was encountered), Average Speed, Max Speed
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 Clone for Event
[src]
impl Debug 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 PartialEq<Event> for Event
[src]
impl Serialize for Event
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Event
[src]
Auto Trait Implementations
impl RefUnwindSafe for Event
[src]
impl Send for Event
[src]
impl Sync for Event
[src]
impl Unpin for Event
[src]
impl UnwindSafe for Event
[src]
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: 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> 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>,