Eclipse SUMO - Simulation of Urban MObility
MSE3Collector::MSE3LeaveReminder Class Reference

A place on the road net (at a certain lane and position on it) where the E3 area ends. More...

#include <MSE3Collector.h>

Inheritance diagram for MSE3Collector::MSE3LeaveReminder:
[legend]
Collaboration diagram for MSE3Collector::MSE3LeaveReminder:
[legend]

Public Types

enum  Notification {
  NOTIFICATION_DEPARTED , NOTIFICATION_JUNCTION , NOTIFICATION_SEGMENT , NOTIFICATION_LANE_CHANGE ,
  NOTIFICATION_TELEPORT , NOTIFICATION_PARKING , NOTIFICATION_PARKING_REROUTE , NOTIFICATION_ARRIVED ,
  NOTIFICATION_TELEPORT_ARRIVED , NOTIFICATION_VAPORIZED_CALIBRATOR , NOTIFICATION_VAPORIZED_COLLISION , NOTIFICATION_VAPORIZED_TRACI ,
  NOTIFICATION_VAPORIZED_GUI , NOTIFICATION_VAPORIZED_VAPORIZER
}
 Definition of a vehicle state. More...
 

Public Member Functions

const std::string & getDescription () const
 
const MSLanegetLane () const
 Returns the lane the reminder works on. More...
 
 MSE3LeaveReminder (const MSCrossSection &crossSection, MSE3Collector &collector)
 Constructor. More...
 
virtual void notifyMoveInternal (const SUMOTrafficObject &veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane)
 Internal notification about the vehicle moves. More...
 
void setDescription (const std::string &description)
 
Interface methods, to be derived by subclasses
virtual bool notifyIdle (SUMOTrafficObject &veh)
 Computes idling emission values and adds them to the emission sums. More...
 
void updateDetector (SUMOTrafficObject &veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp)
 

Protected Member Functions

void removeFromVehicleUpdateValues (SUMOTrafficObject &veh)
 

Protected Attributes

std::string myDescription
 a description of this moveReminder More...
 
MSLane *const myLane
 Lane on which the reminder works. More...
 

Private Attributes

std::map< SUMOTrafficObject *, std::pair< SUMOTime, double > > myLastVehicleUpdateValues
 

methods from MSMoveReminder

MSE3CollectormyCollector
 The parent collector. More...
 
double myPosition
 The position on the lane. More...
 
bool notifyEnter (SUMOTrafficObject &veh, Notification reason, const MSLane *enteredLane)
 Checks whether the reminder is activated by a vehicle entering the lane. More...
 
bool notifyMove (SUMOTrafficObject &veh, double oldPos, double newPos, double)
 Checks whether the vehicle leaves. More...
 
bool notifyLeave (SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
 Processes state changes of a vehicle. More...
 
 MSE3LeaveReminder (const MSE3LeaveReminder &)
 Invalidated copy constructor. More...
 
MSE3LeaveReminderoperator= (const MSE3LeaveReminder &)
 Invalidated assignment operator. More...
 

Detailed Description

A place on the road net (at a certain lane and position on it) where the E3 area ends.

Definition at line 142 of file MSE3Collector.h.

Member Enumeration Documentation

◆ Notification

Definition of a vehicle state.

Enumerator
NOTIFICATION_DEPARTED 

The vehicle has departed (was inserted into the network)

NOTIFICATION_JUNCTION 

The vehicle arrived at a junction.

NOTIFICATION_SEGMENT 

The vehicle changes the segment (meso only)

NOTIFICATION_LANE_CHANGE 

The vehicle changes lanes (micro only)

NOTIFICATION_TELEPORT 

The vehicle is being teleported.

NOTIFICATION_PARKING 

The vehicle starts or ends parking.

NOTIFICATION_PARKING_REROUTE 

The vehicle needs another parking area.

NOTIFICATION_ARRIVED 

The vehicle arrived at its destination (is deleted)

NOTIFICATION_TELEPORT_ARRIVED 

The vehicle was teleported out of the net.

NOTIFICATION_VAPORIZED_CALIBRATOR 

The vehicle got removed by a calibrator.

NOTIFICATION_VAPORIZED_COLLISION 

The vehicle got removed by a collision.

NOTIFICATION_VAPORIZED_TRACI 

The vehicle got removed via TraCI.

NOTIFICATION_VAPORIZED_GUI 

The vehicle got removed via the GUI.

NOTIFICATION_VAPORIZED_VAPORIZER 

The vehicle got vaporized with a vaporizer.

Definition at line 89 of file MSMoveReminder.h.

Constructor & Destructor Documentation

◆ MSE3LeaveReminder() [1/2]

MSE3Collector::MSE3LeaveReminder::MSE3LeaveReminder ( const MSCrossSection crossSection,
MSE3Collector collector 
)

Constructor.

Parameters
[in]crossSectionThe position at which the exit lies
[in]collectorThe detector the exit belongs to

Definition at line 163 of file MSE3Collector.cpp.

◆ MSE3LeaveReminder() [2/2]

MSE3Collector::MSE3LeaveReminder::MSE3LeaveReminder ( const MSE3LeaveReminder )
private

Invalidated copy constructor.

Member Function Documentation

◆ getDescription()

const std::string& MSMoveReminder::getDescription ( ) const
inlineinherited

Definition at line 249 of file MSMoveReminder.h.

References MSMoveReminder::myDescription.

◆ getLane()

const MSLane* MSMoveReminder::getLane ( ) const
inlineinherited

◆ notifyEnter()

bool MSE3Collector::MSE3LeaveReminder::notifyEnter ( SUMOTrafficObject veh,
Notification  reason,
const MSLane enteredLane 
)
virtual

Checks whether the reminder is activated by a vehicle entering the lane.

Lane change means in this case that the vehicle changes to the lane the reminder is placed at.

Parameters
[in]vehThe entering vehicle.
[in]reasonhow the vehicle enters the lane
Returns
True if vehicle enters the reminder.
See also
Notification

Reimplemented from MSMoveReminder.

Definition at line 170 of file MSE3Collector.cpp.

References DEBUG_COND, SUMOTrafficObject::getBackPositionOnLane(), Named::getID(), and SIMTIME.

◆ notifyIdle()

virtual bool MSMoveReminder::notifyIdle ( SUMOTrafficObject veh)
inlinevirtualinherited

Computes idling emission values and adds them to the emission sums.

Idling implied by zero velocity, acceleration and slope

Parameters
[in]vehThe vehicle
See also
MSMoveReminder::notifyMove
PollutantsInterface

Reimplemented in MSMeanData_Emissions::MSLaneMeanDataValues, MSDevice_Tripinfo, and MSDevice_Emissions.

Definition at line 177 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

◆ notifyLeave()

bool MSE3Collector::MSE3LeaveReminder::notifyLeave ( SUMOTrafficObject veh,
double  lastPos,
MSMoveReminder::Notification  reason,
const MSLane enteredLane = 0 
)
virtual

Processes state changes of a vehicle.

Checks whether the vehicle has changed lanes and this reminder needs to be removed

Parameters
[in]vehThe leaving vehicle (unused).
[in]lastPosPosition on the lane when leaving (unused).
[in]reasonThe reason for the state change
See also
MSMoveReminder::notifyLeave

Reimplemented from MSMoveReminder.

Definition at line 253 of file MSE3Collector.cpp.

References DEBUG_COND, MSLane::getEdge(), Named::getID(), MSGlobals::gNumSimThreads, MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_LANE_CHANGE, MSMoveReminder::NOTIFICATION_TELEPORT, SIMTIME, SUMO_TAG_E3DETECTOR, toString(), and WRITE_WARNING.

◆ notifyMove()

bool MSE3Collector::MSE3LeaveReminder::notifyMove ( SUMOTrafficObject veh,
double  oldPos,
double  newPos,
double  newSpeed 
)
virtual

Checks whether the vehicle leaves.

As soon as the reported vehicle leaves the detector area (position-length>myPosition) the leaving time is computed and both are made known to the parent detector using "leave".

Parameters
[in]vehThe vehicle in question.
[in]oldPosPosition before the move-micro-timestep.
[in]newPosPosition after the move-micro-timestep.
[in]newSpeedUnused here.
Returns
False, if vehicle passed the detector entirely, else true.
See also
MSMoveReminder
MSMoveReminder::notifyMove
MSE3Collector::leave

Reimplemented from MSMoveReminder.

Definition at line 200 of file MSE3Collector.cpp.

References DEBUG_COND, Named::getID(), MSVehicleType::getLength(), SUMOTrafficObject::getPreviousSpeed(), SUMOTrafficObject::getVehicleType(), MSGlobals::gNumSimThreads, MSGlobals::gSemiImplicitEulerUpdate, MSCFModel::passingTime(), SIMTIME, and TS.

◆ notifyMoveInternal()

virtual void MSMoveReminder::notifyMoveInternal ( const SUMOTrafficObject veh,
const double  frontOnLane,
const double  timeOnLane,
const double  meanSpeedFrontOnLane,
const double  meanSpeedVehicleOnLane,
const double  travelledDistanceFrontOnLane,
const double  travelledDistanceVehicleOnLane,
const double  meanLengthOnLane 
)
inlinevirtualinherited

Internal notification about the vehicle moves.

Note
meso uses this though it never calls notifyMove()

Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.

Parameters
[in]vehVehicle that asks this reminder.
[in]frontOnLanetime the front of the vehicle spent on the lane.
[in]timeOnLanetime some part of the vehicle spent on the lane.
[in]meanSpeedFrontOnLaneAverage speed for the time that the front is on the lane.
[in]meanSpeedVehicleOnLaneAverage speed for the time that the vehicle is on the lane (with front or back).
[in]travelledDistanceFrontOnLanedistance travelled while overlapping with the lane.
[in]travelledDistanceVehicleOnLanedistance travelled while front was on the lane.
[in]meanLengthOnLanethe average length of the vehicle's part on the lane during the last step (==complete length in meso case)

Reimplemented in MSMeanData_Emissions::MSLaneMeanDataValues, MSMeanData_Amitran::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_Net::MSLaneMeanDataValues, MSDevice_Tripinfo, MSDevice_Transportable, MSMeanData::MeanDataValueTracker, MSDevice_Emissions, and MSDevice_ElecHybrid.

Definition at line 227 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

Referenced by MSMoveReminder::updateDetector().

Here is the caller graph for this function:

◆ operator=()

MSE3LeaveReminder& MSE3Collector::MSE3LeaveReminder::operator= ( const MSE3LeaveReminder )
private

Invalidated assignment operator.

◆ removeFromVehicleUpdateValues()

void MSMoveReminder::removeFromVehicleUpdateValues ( SUMOTrafficObject veh)
protectedinherited

Definition at line 89 of file MSMoveReminder.cpp.

References MSMoveReminder::myLastVehicleUpdateValues.

Referenced by MSMoveReminder::updateDetector().

Here is the caller graph for this function:

◆ setDescription()

void MSMoveReminder::setDescription ( const std::string &  description)
inlineinherited

Definition at line 245 of file MSMoveReminder.h.

References MSMoveReminder::myDescription.

Referenced by MSMeanData::init(), MEInductLoop::MEInductLoop(), METriggeredCalibrator::METriggeredCalibrator(), and MSCalibrator::MSCalibrator().

Here is the caller graph for this function:

◆ updateDetector()

void MSMoveReminder::updateDetector ( SUMOTrafficObject veh,
double  entryPos,
double  leavePos,
SUMOTime  entryTime,
SUMOTime  currentTime,
SUMOTime  leaveTime,
bool  cleanUp 
)
inherited

Definition at line 47 of file MSMoveReminder.cpp.

References MSMoveReminder::myLastVehicleUpdateValues, MSMoveReminder::notifyMoveInternal(), MSMoveReminder::removeFromVehicleUpdateValues(), and STEPS2TIME.

Referenced by MEVehicle::updateDetectorForWriting().

Here is the caller graph for this function:

Field Documentation

◆ myCollector

MSE3Collector& MSE3Collector::MSE3LeaveReminder::myCollector
private

The parent collector.

Definition at line 198 of file MSE3Collector.h.

◆ myDescription

std::string MSMoveReminder::myDescription
protectedinherited

a description of this moveReminder

Definition at line 261 of file MSMoveReminder.h.

Referenced by MSMoveReminder::getDescription(), and MSMoveReminder::setDescription().

◆ myLane

◆ myLastVehicleUpdateValues

std::map<SUMOTrafficObject*, std::pair<SUMOTime, double> > MSMoveReminder::myLastVehicleUpdateValues
privateinherited

◆ myPosition

double MSE3Collector::MSE3LeaveReminder::myPosition
private

The position on the lane.

Definition at line 201 of file MSE3Collector.h.


The documentation for this class was generated from the following files: