Eclipse SUMO - Simulation of Urban MObility
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:

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

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 87 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 90 of file MSE2Collector.h.

◆ ~VehicleInfo()

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

Definition at line 111 of file MSE2Collector.h.

References id.

Field Documentation

◆ accumulatedTimeLoss

double MSE2Collector::VehicleInfo::accumulatedTimeLoss

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

Definition at line 138 of file MSE2Collector.h.

Referenced by MSE2Collector::integrateMoveNotification(), and MSDelayBasedTrafficLightLogic::proposeProlongation().

◆ 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 127 of file MSE2Collector.h.

◆ currentOffsetIndex

std::size_t MSE2Collector::VehicleInfo::currentOffsetIndex

Index of currentLane in the detector's myLanes vector.

Definition at line 129 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 134 of file MSE2Collector.h.

Referenced by MSE2Collector::notifyMove(), and MSDelayBasedTrafficLightLogic::proposeProlongation().

◆ entryLaneID

std::string MSE2Collector::VehicleInfo::entryLaneID

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

Definition at line 121 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 125 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 132 of file MSE2Collector.h.

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

◆ hasEntered

bool MSE2Collector::VehicleInfo::hasEntered

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

Definition at line 143 of file MSE2Collector.h.

Referenced by MSE2Collector::notifyMove().

◆ id

◆ lastAccel

double MSE2Collector::VehicleInfo::lastAccel

Last value of the acceleration.

Definition at line 145 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 150 of file MSE2Collector.h.

Referenced by MSE2Collector::getUsageType(), and MSE2Collector::integrateMoveNotification().

◆ lastSpeed

double MSE2Collector::VehicleInfo::lastSpeed

Last value of the speed.

Definition at line 147 of file MSE2Collector.h.

Referenced by MSE2Collector::integrateMoveNotification().

◆ length

double MSE2Collector::VehicleInfo::length

◆ minGap

double MSE2Collector::VehicleInfo::minGap

vehicle's minGap

Definition at line 119 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 141 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 136 of file MSE2Collector.h.

Referenced by MSE2Collector::integrateMoveNotification().

◆ type

std::string MSE2Collector::VehicleInfo::type

vehicle's type

Definition at line 115 of file MSE2Collector.h.


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