Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSE3Collector::MSE3EntryReminder Class Reference

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

#include <MSE3Collector.h>

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

Public Types

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

Public Member Functions

const std::string & getDescription () const
const MSLanegetLane () const
 Returns the lane the reminder works on.
double getPosition () const
virtual bool isParkingRerouter () const
void loadReminderState (long long int numID, SUMOTime time, double pos)
 MSE3EntryReminder (const MSCrossSection &crossSection, MSE3Collector &collector)
 Constructor.
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.
void saveReminderState (OutputDevice &out, const SUMOTrafficObject &veh)
 Saves the current state into the given stream.
void setDescription (const std::string &description)
Methods inherited from MSMoveReminder.
bool notifyEnter (SUMOTrafficObject &veh, Notification reason, const MSLane *enteredLane)
 Checks whether the reminder is activated by a vehicle entering the lane.
bool notifyMove (SUMOTrafficObject &veh, double, double newPos, double)
 Checks whether the vehicle enters.
bool notifyLeave (SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
 Processes state changes of a vehicle.
Interface methods, to be derived by subclasses
virtual bool notifyIdle (SUMOTrafficObject &veh)
 Computes idling emission values and adds them to the emission sums.
virtual void notifyParking ()
 called to update state for parking vehicles
virtual void notifyStopEnded ()
 called to update state for stopped vehicles
virtual bool notifyLeaveBack (SUMOTrafficObject &veh, Notification reason, const MSLane *leftLane)
 Called if the vehicle's back leaves the reminder's lane.
virtual bool notifyReroute (SUMOTrafficObject &veh)
 Called if the vehicle change it's route.
void updateDetector (SUMOTrafficObject &veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp)

Static Public Attributes

static StringBijection< NotificationNotifications

Protected Member Functions

void removeFromVehicleUpdateValues (SUMOTrafficObject &veh)

Protected Attributes

std::string myDescription
 a description of this moveReminder
MSLanemyLane
 Lane on which the reminder works.

Private Member Functions

 MSE3EntryReminder (const MSE3EntryReminder &)
 Invalidated copy constructor.
MSE3EntryReminderoperator= (const MSE3EntryReminder &)
 Invalidated assignment operator.

Private Attributes

MSE3CollectormyCollector
 The parent collector.
std::map< long long int, std::pair< SUMOTime, double > > myLastVehicleUpdateValues
double myPosition
 The position on the lane.

Static Private Attributes

static StringBijection< Notification >::Entry NotificationValues []

Detailed Description

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

Definition at line 65 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_LOAD_STATE 

The vehicle has been loaded from a state file.

NOTIFICATION_TELEPORT 

The vehicle is being teleported.

NOTIFICATION_TELEPORT_CONTINUATION 

The vehicle continues being teleported past an edge.

NOTIFICATION_PARKING 

The vehicle starts or ends parking.

NOTIFICATION_REROUTE 

The vehicle changed it's route.

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.

NOTIFICATION_VAPORIZED_BREAKDOWN 

The vehicle got removed via stationfinder device.

NOTIFICATION_NONE 

must be the last one

Definition at line 91 of file MSMoveReminder.h.

Constructor & Destructor Documentation

◆ MSE3EntryReminder() [1/2]

MSE3Collector::MSE3EntryReminder::MSE3EntryReminder ( const MSCrossSection & crossSection,
MSE3Collector & collector )

Constructor.

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

Definition at line 56 of file MSE3Collector.cpp.

References Named::getID(), MSE3Collector::MSE3Collector(), MSMoveReminder::MSMoveReminder(), myCollector, MSMoveReminder::myLane, and myPosition.

Referenced by MSE3EntryReminder(), and operator=().

Here is the caller graph for this function:

◆ MSE3EntryReminder() [2/2]

MSE3Collector::MSE3EntryReminder::MSE3EntryReminder ( const MSE3EntryReminder & )
private

Invalidated copy constructor.

References MSE3EntryReminder().

Member Function Documentation

◆ getDescription()

◆ getLane()

◆ getPosition()

double MSE3Collector::MSE3EntryReminder::getPosition ( ) const
inline

Definition at line 121 of file MSE3Collector.h.

References myPosition.

◆ isParkingRerouter()

virtual bool MSMoveReminder::isParkingRerouter ( ) const
inlinevirtualinherited

Reimplemented in MSTriggeredRerouter.

Definition at line 300 of file MSMoveReminder.h.

◆ loadReminderState()

void MSMoveReminder::loadReminderState ( long long int numID,
SUMOTime time,
double pos )
inherited

Definition at line 125 of file MSMoveReminder.cpp.

References myLastVehicleUpdateValues.

◆ notifyEnter()

bool MSE3Collector::MSE3EntryReminder::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 64 of file MSE3Collector.cpp.

References DEBUG_COND, SUMOTrafficObject::getBackPositionOnLane(), MSMoveReminder::getDescription(), Named::getID(), MSVehicleType::getLength(), SUMOTrafficObject::getVehicleType(), MSGlobals::gNumSimThreads, myCollector, MSMoveReminder::myLane, myPosition, MSMoveReminder::NOTIFICATION_JUNCTION, 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 MSDevice_Emissions, MSDevice_StationFinder, MSDevice_Tripinfo, and MSMeanData_Emissions::MSLaneMeanDataValues.

Definition at line 189 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

◆ notifyLeave()

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

Processes state changes of a vehicle.

If the reported vehicle is known, and the reason indicates a removal from the network (permanent or temporary), the vehicle is removed from the list of vehicles to regard.

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

Reimplemented from MSMoveReminder.

Definition at line 151 of file MSE3Collector.cpp.

References DEBUG_COND, MSMoveReminder::getDescription(), Named::getID(), MSGlobals::gNumSimThreads, myCollector, MSMoveReminder::myLane, MSMoveReminder::NOTIFICATION_ARRIVED, SIMSTEP, SIMTIME, SUMO_TAG_E3DETECTOR, time2string(), toString(), and WRITE_WARNINGF.

◆ notifyLeaveBack()

virtual bool MSMoveReminder::notifyLeaveBack ( SUMOTrafficObject & veh,
Notification reason,
const MSLane * leftLane )
inlinevirtualinherited

Called if the vehicle's back leaves the reminder's lane.

Informs if vehicle back leaves reminder lane (due to lane change, removal from the network, or leaving to the next lane). The default is to do nothing.

Parameters
[in]vehThe leaving vehicle.
[in]reasonhow the vehicle leaves the lane
[in]leftLaneThe lane that the vehicle's back left
See also
Notification
Returns
True if the reminder wants to receive further info.

Reimplemented in MSDriveWay.

Definition at line 234 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

◆ notifyMove()

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

Checks whether the vehicle enters.

As soon as the reported vehicle enters the detector area (position>myPosition) the entering time is computed and both are added to the parent detector using "enter".

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 entierly, else true.
See also
MSMoveReminder
MSMoveReminder::notifyMove
MSE3Collector::enter

Reimplemented from MSMoveReminder.

Definition at line 99 of file MSE3Collector.cpp.

References DEBUG_COND, MSPModel::FORWARD, MSMoveReminder::getDescription(), MSTransportable::getDirection(), MSLane::getEdge(), Named::getID(), MSNet::getInstance(), SUMOTrafficObject::getLane(), SUMOTrafficObject::getPreviousSpeed(), MSGlobals::gNumSimThreads, MSGlobals::gSemiImplicitEulerUpdate, SUMOTrafficObject::isPerson(), SUMOTrafficObject::isVehicle(), myCollector, MSMoveReminder::myLane, myPosition, MSCFModel::passingTime(), SIMTIME, STEPS2TIME, 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 its 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 MSDevice_ElecHybrid, MSDevice_Emissions, MSDevice_StationFinder, MSDevice_Taxi, MSDevice_Transportable, MSDevice_Tripinfo, MSMeanData::MeanDataValueTracker, MSMeanData_Amitran::MSLaneMeanDataValues, MSMeanData_Emissions::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, and MSMeanData_Net::MSLaneMeanDataValues.

Definition at line 273 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

Referenced by MSMeanData::MeanDataValues::notifyMove(), and updateDetector().

Here is the caller graph for this function:

◆ notifyParking()

virtual void MSMoveReminder::notifyParking ( )
inlinevirtualinherited

called to update state for parking vehicles

Reimplemented in MSDevice_Battery.

Definition at line 195 of file MSMoveReminder.h.

◆ notifyReroute()

virtual bool MSMoveReminder::notifyReroute ( SUMOTrafficObject & veh)
inlinevirtualinherited

Called if the vehicle change it's route.

Parameters
[in]vehThe rerouted vehicle.
Returns
True if the reminder wants to receive further info.

Reimplemented in MSDriveWay.

Definition at line 245 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

◆ notifyStopEnded()

virtual void MSMoveReminder::notifyStopEnded ( )
inlinevirtualinherited

called to update state for stopped vehicles

Reimplemented in MSDevice_Routing, and MSDevice_Vehroutes.

Definition at line 198 of file MSMoveReminder.h.

◆ operator=()

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

Invalidated assignment operator.

References MSE3EntryReminder().

◆ removeFromVehicleUpdateValues()

void MSMoveReminder::removeFromVehicleUpdateValues ( SUMOTrafficObject & veh)
protectedinherited

Definition at line 131 of file MSMoveReminder.cpp.

References SUMOTrafficObject::getNumericalID(), and myLastVehicleUpdateValues.

Referenced by MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(), and updateDetector().

Here is the caller graph for this function:

◆ saveReminderState()

void MSMoveReminder::saveReminderState ( OutputDevice & out,
const SUMOTrafficObject & veh )
inherited

◆ setDescription()

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

Definition at line 291 of file MSMoveReminder.h.

References myDescription.

Referenced by MSMeanData::init(), 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 71 of file MSMoveReminder.cpp.

References SUMOTrafficObject::getNumericalID(), myLastVehicleUpdateValues, notifyMoveInternal(), removeFromVehicleUpdateValues(), and STEPS2TIME.

Referenced by MEVehicle::updateDetectorForWriting().

Here is the caller graph for this function:

Field Documentation

◆ myCollector

MSE3Collector& MSE3Collector::MSE3EntryReminder::myCollector
private

The parent collector.

Definition at line 127 of file MSE3Collector.h.

Referenced by MSE3EntryReminder(), notifyEnter(), notifyLeave(), and notifyMove().

◆ myDescription

std::string MSMoveReminder::myDescription
protectedinherited

a description of this moveReminder

Definition at line 319 of file MSMoveReminder.h.

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

◆ myLane

◆ myLastVehicleUpdateValues

std::map<long long int, std::pair<SUMOTime, double> > MSMoveReminder::myLastVehicleUpdateValues
privateinherited

◆ myPosition

double MSE3Collector::MSE3EntryReminder::myPosition
private

The position on the lane.

Definition at line 130 of file MSE3Collector.h.

Referenced by getPosition(), MSE3EntryReminder(), notifyEnter(), and notifyMove().

◆ Notifications

StringBijection< MSMoveReminder::Notification > MSMoveReminder::Notifications
staticinherited

Definition at line 309 of file MSMoveReminder.h.

Referenced by MSDriveWay::writeBlockVehicles().

◆ NotificationValues

StringBijection< MSMoveReminder::Notification >::Entry MSMoveReminder::NotificationValues
staticprivateinherited
Initial value:
= {
{"departed", NOTIFICATION_DEPARTED},
{"junction", NOTIFICATION_JUNCTION},
{"segment", NOTIFICATION_SEGMENT},
{"laneChange", NOTIFICATION_LANE_CHANGE},
{"loadState", NOTIFICATION_LOAD_STATE},
{"teleport", NOTIFICATION_TELEPORT},
{"teleportContinuation", NOTIFICATION_TELEPORT_CONTINUATION},
{"parking", NOTIFICATION_PARKING},
{"reroute", NOTIFICATION_REROUTE},
{"parkingReroute", NOTIFICATION_PARKING_REROUTE},
{"arrived", NOTIFICATION_ARRIVED},
{"teleportArrived", NOTIFICATION_TELEPORT_ARRIVED},
{"vaporizedCalibrator", NOTIFICATION_VAPORIZED_CALIBRATOR},
{"vaporizedCollision", NOTIFICATION_VAPORIZED_COLLISION},
{"vaporizedTraCI", NOTIFICATION_VAPORIZED_TRACI},
{"vaporizedGUI", NOTIFICATION_VAPORIZED_GUI},
{"vaporizedBreakdown", NOTIFICATION_VAPORIZED_BREAKDOWN},
}
@ NOTIFICATION_VAPORIZED_TRACI
The vehicle got removed via TraCI.
@ NOTIFICATION_ARRIVED
The vehicle arrived at its destination (is deleted).
@ NOTIFICATION_TELEPORT_ARRIVED
The vehicle was teleported out of the net.
@ NOTIFICATION_PARKING_REROUTE
The vehicle needs another parking area.
@ NOTIFICATION_VAPORIZED_CALIBRATOR
The vehicle got removed by a calibrator.
@ NOTIFICATION_VAPORIZED_GUI
The vehicle got removed via the GUI.
@ NOTIFICATION_DEPARTED
The vehicle has departed (was inserted into the network).
@ NOTIFICATION_REROUTE
The vehicle changed it's route.
@ NOTIFICATION_SEGMENT
The vehicle changes the segment (meso only).
@ NOTIFICATION_LANE_CHANGE
The vehicle changes lanes (micro only).
@ NOTIFICATION_VAPORIZED_VAPORIZER
The vehicle got vaporized with a vaporizer.
@ NOTIFICATION_JUNCTION
The vehicle arrived at a junction.
@ NOTIFICATION_VAPORIZED_BREAKDOWN
The vehicle got removed via stationfinder device.
@ NOTIFICATION_PARKING
The vehicle starts or ends parking.
@ NOTIFICATION_VAPORIZED_COLLISION
The vehicle got removed by a collision.
@ NOTIFICATION_LOAD_STATE
The vehicle has been loaded from a state file.
@ NOTIFICATION_TELEPORT
The vehicle is being teleported.
@ NOTIFICATION_NONE
must be the last one
@ NOTIFICATION_TELEPORT_CONTINUATION
The vehicle continues being teleported past an edge.

Definition at line 28 of file MSMoveReminder.h.


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