#include <MSE3Collector.h>

Definition at line 66 of file MSE3Collector.h.
Public Member Functions | |
| const MSLane *const | getLane () const throw () |
| Returns the lane the reminder works on. | |
| MSE3EntryReminder (const MSCrossSection &crossSection, MSE3Collector &collector) throw () | |
| Constructor. | |
Methods inherited from MSMoveReminder. | |
| bool | isStillActive (MSVehicle &veh, SUMOReal, SUMOReal newPos, SUMOReal) throw () |
| Checks whether the vehicle enters. | |
| bool | notifyEnter (MSVehicle &veh, bool isEmit, bool isLaneChange) throw () |
| Returns whether the vehicle shall be aware of this entry. | |
Interface methods, to be derived by subclasses | |
| virtual void | notifyLeave (MSVehicle &veh, bool isArrival, bool isLaneChange) throw () |
| Called if the vehicle leaves the reminder's lane. | |
Protected Attributes | |
| MSLane *const | myLane |
| Lane on which the reminder works. | |
Private Member Functions | |
| MSE3EntryReminder (const MSE3EntryReminder &) | |
| Invalidated copy constructor. | |
| MSE3EntryReminder & | operator= (const MSE3EntryReminder &) |
| Invalidated assignment operator. | |
Private Attributes | |
| MSE3Collector & | myCollector |
| The parent collector. | |
| SUMOReal | myPosition |
| The position on the lane. | |
| MSE3Collector::MSE3EntryReminder::MSE3EntryReminder | ( | const MSCrossSection & | crossSection, | |
| MSE3Collector & | collector | |||
| ) | throw () |
Constructor.
| [in] | crossSection | The position at which the entry lies |
| [in] | collector | The detector the entry belongs to |
Definition at line 46 of file MSE3Collector.cpp.
00048 : MSMoveReminder(crossSection.myLane), 00049 myCollector(collector), myPosition(crossSection.myPosition) {}
| MSE3Collector::MSE3EntryReminder::MSE3EntryReminder | ( | const MSE3EntryReminder & | ) | [private] |
Invalidated copy constructor.
| const MSLane* const MSMoveReminder::getLane | ( | ) | const throw () [inline, inherited] |
Returns the lane the reminder works on.
Definition at line 80 of file MSMoveReminder.h.
References MSMoveReminder::myLane.
Referenced by GUIInductLoop::MyWrapper::getParameterWindow(), GUI_E2_ZS_Collector::MyWrapper::getParameterWindow(), GUINet::initDetectors(), MSMeanData_Net::MSLaneMeanDataValues::isStillActive(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), MSMeanData_Harmonoise::MSLaneMeanDataValues::isStillActive(), MSE2Collector::update(), and MSMeanData::writeEdge().
00080 { 00081 return myLane; 00082 }
| bool MSE3Collector::MSE3EntryReminder::isStillActive | ( | MSVehicle & | veh, | |
| SUMOReal | oldPos, | |||
| SUMOReal | newPos, | |||
| SUMOReal | newSpeed | |||
| ) | throw () [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".
| [in] | veh | The vehicle in question. |
| [in] | oldPos | Position before the move-micro-timestep. |
| [in] | newPos | Position after the move-micro-timestep. |
| [in] | newSpeed | Unused here. |
Reimplemented from MSMoveReminder.
Definition at line 53 of file MSE3Collector.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and SUMOReal.
00054 { 00055 if (newPos <= myPosition) { 00056 // crossSection not yet reached 00057 return true; 00058 } 00059 if (oldPos > myPosition) { 00060 // crossSection was not passed 00061 return false; 00062 } 00063 SUMOReal entryTimestep = (SUMOReal) MSNet::getInstance()->getCurrentTimeStep(); 00064 if (newSpeed!=0) { 00065 entryTimestep += ((((myPosition - oldPos) / newSpeed)) * (SUMOReal) 1000.); 00066 } 00067 myCollector.enter(veh, entryTimestep / (SUMOReal) 1000.); 00068 return false; 00069 }
| bool MSE3Collector::MSE3EntryReminder::notifyEnter | ( | MSVehicle & | veh, | |
| bool | isEmit, | |||
| bool | isLaneChange | |||
| ) | throw () [virtual] |
Returns whether the vehicle shall be aware of this entry.
Returns true if the vehicle is in front of the entry, so that it may enter it in later steps.
| [in] | veh | The vehicle that enters the lane |
| [in] | isEmit | whether the vehicle was just emitted into the net |
| [in] | isLaneChange | whether the vehicle changed to the lane |
Reimplemented from MSMoveReminder.
Definition at line 73 of file MSE3Collector.cpp.
References MSVehicle::getPositionOnLane(), and myPosition.
00073 { 00074 return veh.getPositionOnLane() <= myPosition; 00075 }
| virtual void MSMoveReminder::notifyLeave | ( | MSVehicle & | veh, | |
| bool | isArrival, | |||
| bool | isLaneChange | |||
| ) | throw () [inline, virtual, inherited] |
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] | isArrival | whether the vehicle arrived at its destination |
| [in] | isLaneChange | whether the vehicle changed from the lane |
Reimplemented in MSE2Collector, MSInductLoop, MSMeanData::MeanDataValueTracker, and MSMeanData_Net::MSLaneMeanDataValues.
Definition at line 119 of file MSMoveReminder.h.
| MSE3EntryReminder& MSE3Collector::MSE3EntryReminder::operator= | ( | const MSE3EntryReminder & | ) | [private] |
Invalidated assignment operator.
The parent collector.
Definition at line 114 of file MSE3Collector.h.
Referenced by MSE3Collector::MSE3LeaveReminder::isStillActive().
MSLane* const MSMoveReminder::myLane [protected, inherited] |
Lane on which the reminder works.
Definition at line 141 of file MSMoveReminder.h.
Referenced by MSMoveReminder::getLane(), MSTriggeredRerouter::Setter::isStillActive(), MSTriggeredRerouter::Setter::notifyEnter(), and MSMeanData::MeanDataValueTracker::reset().
SUMOReal MSE3Collector::MSE3EntryReminder::myPosition [private] |
The position on the lane.
Definition at line 117 of file MSE3Collector.h.
Referenced by MSE3Collector::MSE3LeaveReminder::isStillActive(), and notifyEnter().
1.5.6