Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSE2Collector::VehicleInfo Struct Reference

A VehicleInfo stores values that are tracked for the individual vehicles on the detector, e.g., accumulated timeloss. These infos are stored in myVehicles. If a vehicle leaves the detector (may it be temporarily), the entry in myVehicles is discarded, i.e. all information on the vehicle is reset. More...

#include <MSE2Collector.h>

Collaboration diagram for MSE2Collector::VehicleInfo:
[legend]

Public Member Functions

 VehicleInfo (std::string id, std::string type, double length, double minGap, const MSLane *entryLane, double entryOffset, std::size_t currentOffsetIndex, double exitOffset, double distToDetectorEnd, bool onDetector)
 
virtual ~VehicleInfo ()
 

Data Fields

double accumulatedTimeLoss
 Accumulated time loss that this vehicle suffered since it entered the detector.
 
const MSLanecurrentLane
 Lane, on which the vehicle currently resides (always the one for which the last notifyEnter was received)
 
std::size_t currentOffsetIndex
 Index of currentLane in the detector's myLanes vector.
 
double distToDetectorEnd
 Distance left till the detector end after the last integration step (may become negative if the vehicle passes beyond the detector end)
 
std::string entryLaneID
 ID of the lane, on which the vehicle entered the detector.
 
double entryOffset
 
double exitOffset
 
bool hasEntered
 Whether the vehicle has already entered the detector (don't count twice!)
 
std::string id
 vehicle's ID
 
double lastAccel
 Last value of the acceleration.
 
double lastPos
 
double lastSpeed
 Last value of the speed.
 
double length
 vehicle's length
 
double minGap
 vehicle's minGap
 
bool onDetector
 whether the vehicle is on the detector at the end of the current timestep
 
double totalTimeOnDetector
 Accumulated time that this vehicle has spent on the detector since its last entry.
 
std::string type
 vehicle's type
 

Detailed Description

A VehicleInfo stores values that are tracked for the individual vehicles on the detector, e.g., accumulated timeloss. These infos are stored in myVehicles. If a vehicle leaves the detector (may it be temporarily), the entry in myVehicles is discarded, i.e. all information on the vehicle is reset.

Definition at line 85 of file MSE2Collector.h.

Constructor & Destructor Documentation

◆ VehicleInfo()

MSE2Collector::VehicleInfo::VehicleInfo ( std::string  id,
std::string  type,
double  length,
double  minGap,
const MSLane entryLane,
double  entryOffset,
std::size_t  currentOffsetIndex,
double  exitOffset,
double  distToDetectorEnd,
bool  onDetector 
)
inline
Note
Constructor expects an entryLane argument corresponding to a lane, which is part of the detector.

Definition at line 88 of file MSE2Collector.h.

References exitOffset.

◆ ~VehicleInfo()

virtual MSE2Collector::VehicleInfo::~VehicleInfo ( )
inlinevirtual

Definition at line 109 of file MSE2Collector.h.

Field Documentation

◆ accumulatedTimeLoss

double MSE2Collector::VehicleInfo::accumulatedTimeLoss

Accumulated time loss that this vehicle suffered since it entered the detector.

Definition at line 136 of file MSE2Collector.h.

Referenced by MSE2Collector::integrateMoveNotification().

◆ currentLane

const MSLane* MSE2Collector::VehicleInfo::currentLane

Lane, on which the vehicle currently resides (always the one for which the last notifyEnter was received)

Definition at line 125 of file MSE2Collector.h.

◆ currentOffsetIndex

std::size_t MSE2Collector::VehicleInfo::currentOffsetIndex

Index of currentLane in the detector's myLanes vector.

Definition at line 127 of file MSE2Collector.h.

◆ distToDetectorEnd

double MSE2Collector::VehicleInfo::distToDetectorEnd

Distance left till the detector end after the last integration step (may become negative if the vehicle passes beyond the detector end)

Definition at line 132 of file MSE2Collector.h.

Referenced by MSE2Collector::notifyMove().

◆ entryLaneID

std::string MSE2Collector::VehicleInfo::entryLaneID

ID of the lane, on which the vehicle entered the detector.

Definition at line 119 of file MSE2Collector.h.

◆ entryOffset

double MSE2Collector::VehicleInfo::entryOffset

Distance of the vehicle's entry lane's beginning to the detector start (can be negative for the first lane) In notifyMove(), the positional input arguments are relative to that position (since the vehicle picks up the MoveReminder on the entry lane)

Definition at line 123 of file MSE2Collector.h.

Referenced by MSE2Collector::calculateTimeLossAndTimeOnDetector(), MSE2Collector::integrateMoveNotification(), MSE2Collector::makeMoveNotification(), and MSE2Collector::notifyMove().

◆ exitOffset

double MSE2Collector::VehicleInfo::exitOffset

Offset from the detector start, where the vehicle has leaves the detector (defaults to detector length and is updated if the vehicle leaves the detector via a junction before reaching its end, i.e. enters a lane not part of the detector)

Definition at line 130 of file MSE2Collector.h.

Referenced by MSE2Collector::calculateTimeLossAndTimeOnDetector(), MSE2Collector::makeMoveNotification(), MSE2Collector::notifyMove(), and VehicleInfo().

◆ hasEntered

bool MSE2Collector::VehicleInfo::hasEntered

Whether the vehicle has already entered the detector (don't count twice!)

Definition at line 141 of file MSE2Collector.h.

Referenced by MSE2Collector::notifyMove().

◆ id

std::string MSE2Collector::VehicleInfo::id

vehicle's ID

Definition at line 111 of file MSE2Collector.h.

Referenced by MSE2Collector::calculateTimeLossAndTimeOnDetector().

◆ lastAccel

double MSE2Collector::VehicleInfo::lastAccel

Last value of the acceleration.

Definition at line 143 of file MSE2Collector.h.

Referenced by MSE2Collector::integrateMoveNotification().

◆ lastPos

double MSE2Collector::VehicleInfo::lastPos

Last value of the vehicle position in reference to the start lane

Note
NOT in reference to the entry lane as newPos argument in notifyMove()!

Definition at line 148 of file MSE2Collector.h.

Referenced by MSE2Collector::integrateMoveNotification().

◆ lastSpeed

double MSE2Collector::VehicleInfo::lastSpeed

Last value of the speed.

Definition at line 145 of file MSE2Collector.h.

Referenced by MSE2Collector::integrateMoveNotification().

◆ length

double MSE2Collector::VehicleInfo::length

◆ minGap

double MSE2Collector::VehicleInfo::minGap

vehicle's minGap

Definition at line 117 of file MSE2Collector.h.

◆ onDetector

bool MSE2Collector::VehicleInfo::onDetector

whether the vehicle is on the detector at the end of the current timestep

Definition at line 139 of file MSE2Collector.h.

Referenced by MSE2Collector::integrateMoveNotification().

◆ totalTimeOnDetector

double MSE2Collector::VehicleInfo::totalTimeOnDetector

Accumulated time that this vehicle has spent on the detector since its last entry.

Definition at line 134 of file MSE2Collector.h.

Referenced by MSE2Collector::integrateMoveNotification().

◆ type

std::string MSE2Collector::VehicleInfo::type

vehicle's type

Definition at line 113 of file MSE2Collector.h.


The documentation for this struct was generated from the following file: