Eclipse SUMO - Simulation of Urban MObility
MSCalibrator::VehicleRemover Class Reference

#include <MSCalibrator.h>

Inheritance diagram for MSCalibrator::VehicleRemover:
[legend]
Collaboration diagram for MSCalibrator::VehicleRemover:
[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_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
}
 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...
 
virtual bool isParkingRerouter () const
 
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)
 
 VehicleRemover (MSLane *lane, MSCalibrator *parent)
 
Interface methods, to be derived by subclasses
virtual bool notifyMove (SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
 Checks whether the reminder still has to be notified about the vehicle moves. More...
 
virtual bool notifyIdle (SUMOTrafficObject &veh)
 Computes idling emission values and adds them to the emission sums. More...
 
virtual void notifyParking ()
 called to update state for parking vehicles More...
 
virtual void notifyStopEnded ()
 called to update state for stopped vehicles More...
 
virtual bool notifyLeave (SUMOTrafficObject &veh, double lastPos, Notification reason, const MSLane *enteredLane=0)
 Called if the vehicle leaves the reminder's lane. 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
 

inherited from MSMoveReminder

MSCalibratormyParent
 
virtual bool notifyEnter (SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
 Checks whether the reminder is activated by a vehicle entering the lane. More...
 
void disable ()
 

Detailed Description

Definition at line 190 of file MSCalibrator.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_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.

Definition at line 89 of file MSMoveReminder.h.

Constructor & Destructor Documentation

◆ VehicleRemover()

MSCalibrator::VehicleRemover::VehicleRemover ( MSLane lane,
MSCalibrator parent 
)
inline

Definition at line 192 of file MSCalibrator.h.

Member Function Documentation

◆ disable()

void MSCalibrator::VehicleRemover::disable ( )
inline

Definition at line 210 of file MSCalibrator.h.

References myParent.

◆ getDescription()

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

Definition at line 261 of file MSMoveReminder.h.

References MSMoveReminder::myDescription.

◆ getLane()

const MSLane* MSMoveReminder::getLane ( ) const
inlineinherited

Returns the lane the reminder works on.

Returns
The lane the reminder is anchored on.

Definition at line 83 of file MSMoveReminder.h.

References MSMoveReminder::myLane.

Referenced by LIBSUMO_NAMESPACE::InductionLoop::getTree(), GUIInductLoop::MyWrapper::MyWrapper(), GUIInstantInductLoop::MyWrapper::MyWrapper(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), LIBSUMO_NAMESPACE::InductionLoop::storeShape(), and MSMeanData::writeEdge().

Here is the caller graph for this function:

◆ isParkingRerouter()

virtual bool MSMoveReminder::isParkingRerouter ( ) const
inlinevirtualinherited

Reimplemented in MSTriggeredRerouter.

Definition at line 266 of file MSMoveReminder.h.

◆ notifyEnter()

◆ 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, MSDevice_StationFinder, and MSDevice_Emissions.

Definition at line 183 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

◆ notifyLeave()

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

Called if the vehicle leaves the reminder's lane.

Informs if vehicle 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]lastPosPosition on the lane when leaving.
[in]reasonhow the vehicle leaves the lane
See also
Notification
Returns
True if the reminder wants to receive further info.

Reimplemented in MSDevice_Vehroutes, MSVehicleDevice_BTsender, MSVehicleDevice_BTreceiver, MSTriggeredRerouter, MSMeanData_Net::MSLaneMeanDataValues, MSMeanData::MeanDataValueTracker, MSMeanData::MeanDataValues, MSInstantInductLoop, MSInductLoop, MSE3Collector::MSE3LeaveReminder, MSE3Collector::MSE3EntryReminder, MSE2Collector, MSDevice_Tripinfo, MSDevice_Transportable, MSDevice_SSM, MSDevice_Example, MSTransportableDevice_BTsender, MSTransportableDevice_BTreceiver, MSDevice_Bluelight, and MSDevice_ElecHybrid.

Definition at line 207 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

◆ notifyMove()

virtual bool MSMoveReminder::notifyMove ( SUMOTrafficObject veh,
double  oldPos,
double  newPos,
double  newSpeed 
)
inlinevirtualinherited

Checks whether the reminder still has to be notified about the vehicle moves.

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]oldPosPosition before move.
[in]newPosPosition after move with newSpeed.
[in]newSpeedMoving speed.
Returns
True if vehicle hasn't passed the reminder completely.

Reimplemented in MSE3Collector::MSE3EntryReminder, MSE3Collector::MSE3LeaveReminder, MSDevice_ToC, MSTriggeredRerouter, MSMeanData::MeanDataValues, MSInstantInductLoop, MSInductLoop, MSE2Collector, MSDevice_Tripinfo, MSDevice_Transportable, MSDevice_Taxi, MSDevice_StationFinder, MSDevice_SSM, MSDevice_GLOSA, MSDevice_Friction, MSDevice_Example, MSDevice_Emissions, MSTransportableDevice_BTsender, MSVehicleDevice_BTsender, MSTransportableDevice_BTreceiver, MSVehicleDevice_BTreceiver, MSDevice_Bluelight, MSDevice_Battery, and MSDevice_ElecHybrid.

Definition at line 163 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

Referenced by MSE3Collector::notifyMovePerson().

Here is the caller graph for this function:

◆ 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 MSMeanData_Emissions::MSLaneMeanDataValues, MSMeanData_Amitran::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_Net::MSLaneMeanDataValues, MSMeanData::MeanDataValueTracker, MSDevice_Tripinfo, MSDevice_Transportable, MSDevice_Taxi, MSDevice_StationFinder, MSDevice_Emissions, and MSDevice_ElecHybrid.

Definition at line 239 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

Referenced by MSMoveReminder::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 189 of file MSMoveReminder.h.

◆ notifyStopEnded()

virtual void MSMoveReminder::notifyStopEnded ( )
inlinevirtualinherited

called to update state for stopped vehicles

Reimplemented in MSDevice_Vehroutes, and MSDevice_Routing.

Definition at line 192 of file MSMoveReminder.h.

◆ 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 257 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

◆ myDescription

std::string MSMoveReminder::myDescription
protectedinherited

a description of this moveReminder

Definition at line 278 of file MSMoveReminder.h.

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

◆ myLane

◆ myLastVehicleUpdateValues

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

◆ myParent

MSCalibrator* MSCalibrator::VehicleRemover::myParent
private

Definition at line 215 of file MSCalibrator.h.

Referenced by disable(), and notifyEnter().


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