![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSRailSignalConstraint.h>
Public Member Functions | |
| const std::string & | getDescription () const |
| const MSLane * | getLane () const |
| Returns the lane the reminder works on. | |
| virtual bool | isParkingRerouter () const |
| void | loadReminderState (long long int numID, SUMOTime time, double pos) |
| 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. | |
| PassedTracker (MSLane *lane) | |
| void | saveReminderState (OutputDevice &out, const SUMOTrafficObject &veh) |
| Saves the current state into the given stream. | |
| void | setDescription (const std::string &description) |
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. | |
| 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 | notifyLeave (SUMOTrafficObject &veh, double lastPos, Notification reason, const MSLane *enteredLane=nullptr) |
| Called if the vehicle leaves the reminder's lane. | |
| 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< Notification > | Notifications |
Protected Member Functions | |
| void | removeFromVehicleUpdateValues (SUMOTrafficObject &veh) |
Protected Attributes | |
| std::string | myDescription |
| a description of this moveReminder | |
| MSLane * | myLane |
| Lane on which the reminder works. | |
Private Attributes | |
| std::map< long long int, std::pair< SUMOTime, double > > | myLastVehicleUpdateValues |
Static Private Attributes | |
| static StringBijection< Notification >::Entry | NotificationValues [] |
inherited from MSMoveReminder | |
| std::vector< std::string > | myPassed |
| passed tripIds | |
| int | myLastIndex |
| index of the last passed object | |
| bool | notifyEnter (SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0) |
| tracks vehicles that passed this link (entered the next lane) | |
| void | raiseLimit (int limit) |
| bool | hasPassed (const std::string &tripId, int limit) const |
| void | clearState () |
| Clear all passed states before quick-loading state. | |
| void | saveState (OutputDevice &out) |
| Saves the current passed states into the given stream. | |
| void | loadState (int index, const std::vector< std::string > &tripIDs) |
| loads the current passed states into the given stream | |
Definition at line 172 of file MSRailSignalConstraint.h.
|
inherited |
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.
| MSRailSignalConstraint_Predecessor::PassedTracker::PassedTracker | ( | MSLane * | lane | ) |
Definition at line 236 of file MSRailSignalConstraint.cpp.
References MSMoveReminder::MSMoveReminder(), myLastIndex, and myPassed.
| void MSRailSignalConstraint_Predecessor::PassedTracker::clearState | ( | ) |
Clear all passed states before quick-loading state.
Definition at line 287 of file MSRailSignalConstraint.cpp.
References myLastIndex, and myPassed.
|
inlineinherited |
Definition at line 295 of file MSMoveReminder.h.
References myDescription.
Referenced by MSDriveWay::notifyEnter(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSDriveWay::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSDriveWay::notifyLeaveBack(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSE3Collector::MSE3LeaveReminder::notifyMove(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), MSDriveWay::notifyReroute(), saveReminderState(), and MSMeanData_Net::MSLaneMeanDataValues::write().
|
inlineinherited |
Returns the lane the reminder works on.
Definition at line 85 of file MSMoveReminder.h.
References myLane.
Referenced by MSBaseVehicle::activateReminders(), LIBSUMO_NAMESPACE::InductionLoop::getTree(), GUIInductLoop::MyWrapper::MyWrapper(), GUIInstantInductLoop::MyWrapper::MyWrapper(), MSDevice_Tripinfo::notifyEnter(), MSMeanData_Amitran::MSLaneMeanDataValues::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(), MSMeanData::MeanDataValues::notifyMove(), MSRailSignalConstraint_Predecessor::PassedTracker::saveState(), LIBSUMO_NAMESPACE::InductionLoop::storeShape(), and MSMeanData::writeEdge().
| bool MSRailSignalConstraint_Predecessor::PassedTracker::hasPassed | ( | const std::string & | tripId, |
| int | limit ) const |
Definition at line 267 of file MSRailSignalConstraint.cpp.
References myLastIndex, and myPassed.
|
inlinevirtualinherited |
Reimplemented in MSTriggeredRerouter.
Definition at line 300 of file MSMoveReminder.h.
|
inherited |
Definition at line 125 of file MSMoveReminder.cpp.
References myLastVehicleUpdateValues.
| void MSRailSignalConstraint_Predecessor::PassedTracker::loadState | ( | int | index, |
| const std::vector< std::string > & | tripIDs ) |
loads the current passed states into the given stream
Definition at line 309 of file MSRailSignalConstraint.cpp.
References MSMoveReminder::myLane, myLastIndex, myPassed, and raiseLimit().
Referenced by MSRailSignalConstraint_Predecessor::loadState().
|
virtual |
tracks vehicles that passed this link (entered the next lane)
Reimplemented from MSMoveReminder.
Definition at line 243 of file MSRailSignalConstraint.cpp.
References Named::getID(), Parameterised::getParameter(), SUMOTrafficObject::getParameter(), MSMoveReminder::myLane, myLastIndex, myPassed, and SIMTIME.
|
inlinevirtualinherited |
Computes idling emission values and adds them to the emission sums.
Idling implied by zero velocity, acceleration and slope
| [in] | veh | The vehicle |
Reimplemented in MSDevice_Emissions, MSDevice_StationFinder, MSDevice_Tripinfo, and MSMeanData_Emissions::MSLaneMeanDataValues.
Definition at line 189 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
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.
| [in] | veh | The leaving vehicle. |
| [in] | lastPos | Position on the lane when leaving. |
| [in] | reason | how the vehicle leaves the lane |
Reimplemented in MSCalibrator::VehicleRemover, MSDevice_Bluelight, MSDevice_ElecHybrid, MSDevice_Example, MSDevice_SSM, MSDevice_Transportable, MSDevice_Tripinfo, MSDevice_Vehroutes, MSDriveWay, MSE2Collector, MSE3Collector::MSE3EntryReminder, MSE3Collector::MSE3LeaveReminder, MSInductLoop, MSInstantInductLoop, MSMeanData::MeanDataValues, MSMeanData::MeanDataValueTracker, MSMeanData_Net::MSLaneMeanDataValues, MSTransportableDevice_BTreceiver, MSTransportableDevice_BTsender, MSTriggeredRerouter, MSVehicleDevice_BTreceiver, and MSVehicleDevice_BTsender.
Definition at line 213 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
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.
| [in] | veh | The leaving vehicle. |
| [in] | reason | how the vehicle leaves the lane |
| [in] | leftLane | The lane that the vehicle's back left |
Reimplemented in MSDriveWay.
Definition at line 234 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
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.
| [in] | veh | Vehicle that asks this reminder. |
| [in] | oldPos | Position before move. |
| [in] | newPos | Position after move with newSpeed. |
| [in] | newSpeed | Moving speed. |
Reimplemented in MSDevice_Battery, MSDevice_Bluelight, MSDevice_ElecHybrid, MSDevice_Emissions, MSDevice_Example, MSDevice_Friction, MSDevice_GLOSA, MSDevice_SSM, MSDevice_StationFinder, MSDevice_Taxi, MSDevice_ToC, MSDevice_Transportable, MSDevice_Tripinfo, MSE2Collector, MSE3Collector::MSE3EntryReminder, MSE3Collector::MSE3LeaveReminder, MSInductLoop, MSInstantInductLoop, MSMeanData::MeanDataValues, MSTransportableDevice_BTreceiver, MSTransportableDevice_BTsender, MSTriggeredRerouter, MSVehicleDevice_BTreceiver, and MSVehicleDevice_BTsender.
Definition at line 169 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
Referenced by MSE3Collector::notifyMovePerson().
|
inlinevirtualinherited |
Internal notification 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.
| [in] | veh | Vehicle that asks this reminder. |
| [in] | frontOnLane | time the front of the vehicle spent on the lane. |
| [in] | timeOnLane | time some part of the vehicle spent on the lane. |
| [in] | meanSpeedFrontOnLane | Average speed for the time that the front is on the lane. |
| [in] | meanSpeedVehicleOnLane | Average speed for the time that the vehicle is on the lane (with front or back). |
| [in] | travelledDistanceFrontOnLane | distance travelled while overlapping with the lane. |
| [in] | travelledDistanceVehicleOnLane | distance travelled while front was on the lane. |
| [in] | meanLengthOnLane | the 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().
|
inlinevirtualinherited |
called to update state for parking vehicles
Reimplemented in MSDevice_Battery.
Definition at line 195 of file MSMoveReminder.h.
|
inlinevirtualinherited |
Called if the vehicle change it's route.
| [in] | veh | The rerouted vehicle. |
Reimplemented in MSDriveWay.
Definition at line 245 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
inlinevirtualinherited |
called to update state for stopped vehicles
Reimplemented in MSDevice_Routing, and MSDevice_Vehroutes.
Definition at line 198 of file MSMoveReminder.h.
| void MSRailSignalConstraint_Predecessor::PassedTracker::raiseLimit | ( | int | limit | ) |
Definition at line 255 of file MSRailSignalConstraint.cpp.
References MSMoveReminder::myLane, myLastIndex, and myPassed.
Referenced by loadState().
|
protectedinherited |
Definition at line 131 of file MSMoveReminder.cpp.
References SUMOTrafficObject::getNumericalID(), and myLastVehicleUpdateValues.
Referenced by MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(), and updateDetector().
|
inherited |
Saves the current state into the given stream.
Definition at line 112 of file MSMoveReminder.cpp.
References OutputDevice::closeTag(), getDescription(), SUMOTrafficObject::getNumericalID(), myLastVehicleUpdateValues, OutputDevice::openTag(), SUMO_ATTR_ID, SUMO_ATTR_POSITION, SUMO_ATTR_TIME, SUMO_TAG_REMINDER, and OutputDevice::writeAttr().
| void MSRailSignalConstraint_Predecessor::PassedTracker::saveState | ( | OutputDevice & | out | ) |
Saves the current passed states into the given stream.
Definition at line 293 of file MSRailSignalConstraint.cpp.
References OutputDevice::closeTag(), MSMoveReminder::getLane(), myLastIndex, myPassed, OutputDevice::openTag(), SUMO_ATTR_INDEX, SUMO_ATTR_LANE, SUMO_ATTR_STATE, SUMO_TAG_RAILSIGNAL_CONSTRAINT_TRACKER, toString(), and OutputDevice::writeAttr().
|
inlineinherited |
Definition at line 291 of file MSMoveReminder.h.
References myDescription.
Referenced by MSMeanData::init(), and MSCalibrator::MSCalibrator().
|
inherited |
Definition at line 71 of file MSMoveReminder.cpp.
References SUMOTrafficObject::getNumericalID(), myLastVehicleUpdateValues, notifyMoveInternal(), removeFromVehicleUpdateValues(), and STEPS2TIME.
Referenced by MEVehicle::updateDetectorForWriting().
|
protectedinherited |
a description of this moveReminder
Definition at line 319 of file MSMoveReminder.h.
Referenced by getDescription(), MSMoveReminder(), and setDescription().
|
protectedinherited |
Lane on which the reminder works.
Definition at line 317 of file MSMoveReminder.h.
Referenced by MSDriveWay::buildRoute(), MSDriveWay::buildSubFoe(), MSE2Collector::detectorUpdate(), MSInductLoop::detectorUpdate(), MSE2Collector::getEstimatedCurrentVehicleNumber(), getLane(), MSRailSignalConstraint_Predecessor::PassedTracker::loadState(), MSDriveWay::matchesPastRoute(), MSE3Collector::MSE3EntryReminder::MSE3EntryReminder(), MSE3Collector::MSE3LeaveReminder::MSE3LeaveReminder(), MSMoveReminder(), MSDriveWay::notifyEnter(), MSE2Collector::notifyEnter(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSInductLoop::notifyEnter(), MSRailSignalConstraint_Predecessor::PassedTracker::notifyEnter(), MSE2Collector::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSE2Collector::notifyMove(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSE3Collector::MSE3LeaveReminder::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSRailSignalConstraint_Predecessor::PassedTracker::raiseLimit(), and MSMeanData::MeanDataValueTracker::reset().
| int MSRailSignalConstraint_Predecessor::PassedTracker::myLastIndex |
index of the last passed object
Definition at line 199 of file MSRailSignalConstraint.h.
Referenced by clearState(), hasPassed(), loadState(), notifyEnter(), PassedTracker(), raiseLimit(), and saveState().
|
privateinherited |
Definition at line 327 of file MSMoveReminder.h.
Referenced by loadReminderState(), removeFromVehicleUpdateValues(), saveReminderState(), and updateDetector().
| std::vector<std::string> MSRailSignalConstraint_Predecessor::PassedTracker::myPassed |
passed tripIds
Definition at line 196 of file MSRailSignalConstraint.h.
Referenced by clearState(), hasPassed(), loadState(), notifyEnter(), PassedTracker(), raiseLimit(), and saveState().
|
staticinherited |
Definition at line 309 of file MSMoveReminder.h.
Referenced by MSDriveWay::writeBlockVehicles().
|
staticprivateinherited |
Definition at line 28 of file MSMoveReminder.h.