Struct headless::AgentPosition [−][src]
pub(crate) struct AgentPosition { id: AgentID, trip: Option<TripID>, person: Option<PersonID>, vehicle_type: Option<VehicleType>, pos: LonLat, distance_crossed: Distance, }
Fields
id: AgentID
The agent’s ID
trip: Option<TripID>
None for buses
person: Option<PersonID>
None for buses
vehicle_type: Option<VehicleType>
None for pedestrians
pos: LonLat
The agent’s current position. For pedestrians, this is their center. For vehicles, this represents the front of the vehicle.
distance_crossed: Distance
The distance crossed so far by the agent, in meters. There are some caveats to this value:
- The distance along driveways between buildings/parking lots and the road doesn’t count here.
- The distance only represents the current leg of the trip. If somebody walks to a car, the distance will reset when they begin driving, and also vehicle_type will change.
- No meaning for bus passengers currently.
- For buses and trains, the value will reset every time the vehicle reaches the next transit stop.
- At the very end of a driving trip, the agent may wind up crossing slightly more or less than the total path length, due to where they park along that last road.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AgentPosition
impl Send for AgentPosition
impl Sync for AgentPosition
impl Unpin for AgentPosition
impl UnwindSafe for AgentPosition
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self