29 {
"departed", NOTIFICATION_DEPARTED},
30 {
"junction", NOTIFICATION_JUNCTION},
31 {
"segment", NOTIFICATION_SEGMENT},
32 {
"laneChange", NOTIFICATION_LANE_CHANGE},
33 {
"loadState", NOTIFICATION_LOAD_STATE},
34 {
"teleport", NOTIFICATION_TELEPORT},
35 {
"teleportContinuation", NOTIFICATION_TELEPORT_CONTINUATION},
36 {
"parking", NOTIFICATION_PARKING},
37 {
"reroute", NOTIFICATION_REROUTE},
38 {
"parkingReroute", NOTIFICATION_PARKING_REROUTE},
39 {
"arrived", NOTIFICATION_ARRIVED},
40 {
"teleportArrived", NOTIFICATION_TELEPORT_ARRIVED},
41 {
"vaporizedCalibrator", NOTIFICATION_VAPORIZED_CALIBRATOR},
42 {
"vaporizedCollision", NOTIFICATION_VAPORIZED_COLLISION},
43 {
"vaporizedTraCI", NOTIFICATION_VAPORIZED_TRACI},
44 {
"vaporizedGUI", NOTIFICATION_VAPORIZED_GUI},
45 {
"vaporizer", NOTIFICATION_VAPORIZED_VAPORIZER},
46 {
"vaporizedBreakdown", NOTIFICATION_VAPORIZED_BREAKDOWN},
47 {
"none", NOTIFICATION_NONE}
58 myDescription(description)
60 , myNotificationMutex(true)
63 if (
myLane !=
nullptr && doAdd) {
77 if (entryTime > currentTime) {
85 const SUMOTime previousEntryTime = j->second.first;
86 if (previousEntryTime <= currentTime) {
87 entryTime = previousEntryTime;
88 entryPos = j->second.second;
91 assert(entryTime <= currentTime);
92 if ((entryTime < leaveTime) && (entryPos <= leavePos)) {
93 const double timeOnLane =
STEPS2TIME(currentTime - entryTime);
94 const double speed = (leavePos - entryPos) /
STEPS2TIME(leaveTime - entryTime);
96 assert(timeOnLane >= 0);
97 notifyMoveInternal(veh, timeOnLane, timeOnLane, speed, speed, speed * timeOnLane, speed * timeOnLane, 0.);
@ SUMO_ATTR_TIME
trigger: the time of the step
Representation of a lane in the micro simulation.
virtual void addMoveReminder(MSMoveReminder *rem, bool addToVehicles=true)
Add a move-reminder to move-reminder container.
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.
std::map< long long int, std::pair< SUMOTime, double > > myLastVehicleUpdateValues
const std::string & getDescription() const
void loadReminderState(long long int numID, SUMOTime time, double pos)
static StringBijection< Notification >::Entry NotificationValues[]
void saveReminderState(OutputDevice &out, const SUMOTrafficObject &veh)
Saves the current state into the given stream.
@ NOTIFICATION_NONE
must be the last one
static StringBijection< Notification > Notifications
MSMoveReminder(const std::string &description, MSLane *const lane=nullptr, const bool doAdd=true)
Constructor.
MSLane * myLane
Lane on which the reminder works.
void removeFromVehicleUpdateValues(SUMOTrafficObject &veh)
void updateDetector(SUMOTrafficObject &veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp)
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
Representation of a vehicle, person, or container.
virtual NumericalID getNumericalID() const =0
return the numerical ID which is only for internal usage