![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSRailSignalConstraint.h>
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 MSLane * | getLane () const |
Returns the lane the reminder works on. 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... | |
PassedTracker (MSLane *lane) | |
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. More... | |
virtual bool | notifyIdle (SUMOTrafficObject &veh) |
Computes idling emission values and adds them to the emission sums. 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 | |
std::vector< std::string > | myPassed |
passed tripIds More... | |
int | myLastIndex |
index of the last passed object More... | |
bool | notifyEnter (SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0) |
tracks vehicles that passed this link (entered the next lane) More... | |
void | raiseLimit (int limit) |
bool | hasPassed (const std::string &tripId, int limit) const |
void | clearState () |
Clear all passed states before quick-loading state. More... | |
void | saveState (OutputDevice &out) |
Saves the current passed states into the given stream. More... | |
void | loadState (int index, const std::vector< std::string > &tripIDs) |
loads the current passed states into the given stream More... | |
Definition at line 94 of file MSRailSignalConstraint.h.
|
inherited |
Definition of a vehicle state.
Definition at line 89 of file MSMoveReminder.h.
MSRailSignalConstraint_Predecessor::PassedTracker::PassedTracker | ( | MSLane * | lane | ) |
Definition at line 176 of file MSRailSignalConstraint.cpp.
void MSRailSignalConstraint_Predecessor::PassedTracker::clearState | ( | ) |
Clear all passed states before quick-loading state.
Definition at line 227 of file MSRailSignalConstraint.cpp.
|
inlineinherited |
Definition at line 249 of file MSMoveReminder.h.
References MSMoveReminder::myDescription.
|
inlineinherited |
Returns the lane the reminder works 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_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), LIBSUMO_NAMESPACE::InductionLoop::storeShape(), and MSMeanData::writeEdge().
bool MSRailSignalConstraint_Predecessor::PassedTracker::hasPassed | ( | const std::string & | tripId, |
int | limit | ||
) | const |
Definition at line 207 of file MSRailSignalConstraint.cpp.
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 249 of file MSRailSignalConstraint.cpp.
Referenced by MSRailSignalConstraint_Predecessor::loadState().
|
virtual |
tracks vehicles that passed this link (entered the next lane)
Reimplemented from MSMoveReminder.
Definition at line 183 of file MSRailSignalConstraint.cpp.
References Named::getID(), SUMOTrafficObject::getParameter(), Parameterised::getParameter(), 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 MSMeanData_Emissions::MSLaneMeanDataValues, MSDevice_Tripinfo, and MSDevice_Emissions.
Definition at line 177 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 MSDevice_Vehroutes, MSDevice_BTsender, MSDevice_BTreceiver, MSTriggeredRerouter, MSMeanData_Net::MSLaneMeanDataValues, MSMeanData::MeanDataValueTracker, MSMeanData::MeanDataValues, MSInstantInductLoop, MSInductLoop, MSE3Collector::MSE3LeaveReminder, MSE3Collector::MSE3EntryReminder, MSE2Collector, MSDevice_Tripinfo, MSDevice_Transportable, MSDevice_Taxi, MSDevice_SSM, MSDevice_Example, MSDevice_Bluelight, and MSDevice_ElecHybrid.
Definition at line 195 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 it's 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 MSE3Collector::MSE3EntryReminder, MSE3Collector::MSE3LeaveReminder, MSDevice_ToC, MSTriggeredRerouter, MSMeanData::MeanDataValues, MSInstantInductLoop, MSInductLoop, MSE2Collector, MSDevice_Tripinfo, MSDevice_Transportable, MSDevice_Taxi, MSDevice_SSM, MSDevice_Example, MSDevice_Emissions, MSDevice_BTsender, MSDevice_BTreceiver, MSDevice_Bluelight, MSDevice_Battery, and MSDevice_ElecHybrid.
Definition at line 157 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
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 it's 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 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().
void MSRailSignalConstraint_Predecessor::PassedTracker::raiseLimit | ( | int | limit | ) |
Definition at line 195 of file MSRailSignalConstraint.cpp.
Referenced by MSRailSignalConstraint_Predecessor::MSRailSignalConstraint_Predecessor().
|
protectedinherited |
Definition at line 89 of file MSMoveReminder.cpp.
References MSMoveReminder::myLastVehicleUpdateValues.
Referenced by MSMoveReminder::updateDetector().
void MSRailSignalConstraint_Predecessor::PassedTracker::saveState | ( | OutputDevice & | out | ) |
Saves the current passed states into the given stream.
Definition at line 233 of file MSRailSignalConstraint.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), SUMO_ATTR_INDEX, SUMO_ATTR_LANE, SUMO_ATTR_STATE, SUMO_TAG_RAILSIGNAL_CONSTRAINT_TRACKER, toString(), and OutputDevice::writeAttr().
|
inlineinherited |
Definition at line 245 of file MSMoveReminder.h.
References MSMoveReminder::myDescription.
Referenced by MSMeanData::init(), MEInductLoop::MEInductLoop(), METriggeredCalibrator::METriggeredCalibrator(), and MSCalibrator::MSCalibrator().
|
inherited |
Definition at line 47 of file MSMoveReminder.cpp.
References MSMoveReminder::myLastVehicleUpdateValues, MSMoveReminder::notifyMoveInternal(), MSMoveReminder::removeFromVehicleUpdateValues(), and STEPS2TIME.
Referenced by MEVehicle::updateDetectorForWriting().
|
protectedinherited |
a description of this moveReminder
Definition at line 261 of file MSMoveReminder.h.
Referenced by MSMoveReminder::getDescription(), and MSMoveReminder::setDescription().
|
protectedinherited |
Lane on which the reminder works.
Definition at line 259 of file MSMoveReminder.h.
Referenced by MSE2Collector::getEstimatedCurrentVehicleNumber(), MSE2Collector::getEstimateQueueLength(), MSMoveReminder::getLane(), MSMoveReminder::MSMoveReminder(), MSE2Collector::notifyEnter(), MSInductLoop::notifyEnter(), MSE2Collector::notifyLeave(), and MSE2Collector::notifyMove().
int MSRailSignalConstraint_Predecessor::PassedTracker::myLastIndex |
index of the last passed object
Definition at line 121 of file MSRailSignalConstraint.h.
|
privateinherited |
Definition at line 269 of file MSMoveReminder.h.
Referenced by MSMoveReminder::removeFromVehicleUpdateValues(), and MSMoveReminder::updateDetector().
std::vector<std::string> MSRailSignalConstraint_Predecessor::PassedTracker::myPassed |
passed tripIds
Definition at line 118 of file MSRailSignalConstraint.h.