#include <MSE3Collector.h>

Definition at line 134 of file MSE3Collector.h.
Public Member Functions | |
| const MSLane *const | getLane () const throw () |
| Returns the lane the reminder works on. | |
| MSE3LeaveReminder (const MSCrossSection &crossSection, MSE3Collector &collector) throw () | |
| Constructor. | |
methods from MSMoveReminder | |
| bool | isStillActive (MSVehicle &veh, SUMOReal, SUMOReal newPos, SUMOReal) throw () |
| Checks whether the vehicle leaves. | |
| 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 | |
| MSE3LeaveReminder (const MSE3LeaveReminder &) | |
| Invalidated copy constructor. | |
| MSE3LeaveReminder & | operator= (const MSE3LeaveReminder &) |
| Invalidated assignment operator. | |
Private Attributes | |
| MSE3Collector & | myCollector |
| The parent collector. | |
| SUMOReal | myPosition |
| The position on the lane. | |
| MSE3Collector::MSE3LeaveReminder::MSE3LeaveReminder | ( | const MSCrossSection & | crossSection, | |
| MSE3Collector & | collector | |||
| ) | throw () |
Constructor.
| [in] | crossSection | The position at which the exit lies |
| [in] | collector | The detector the exit belongs to |
Definition at line 82 of file MSE3Collector.cpp.
Referenced by MSE3Collector::MSE3Collector().
00084 : MSMoveReminder(crossSection.myLane), 00085 myCollector(collector), myPosition(crossSection.myPosition) {}
| MSE3Collector::MSE3LeaveReminder::MSE3LeaveReminder | ( | const MSE3LeaveReminder & | ) | [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::MSE3LeaveReminder::isStillActive | ( | MSVehicle & | veh, | |
| SUMOReal | oldPos, | |||
| SUMOReal | newPos, | |||
| SUMOReal | newSpeed | |||
| ) | throw () [virtual] |
Checks whether the vehicle leaves.
As soon as the reported vehicle leaves the detector area (position-length>myPosition) the leaving time is computed and both are made known to the parent detector using "leave".
| [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 89 of file MSE3Collector.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSE3Collector::leave(), MSE3Collector::MSE3EntryReminder::myCollector, MSE3Collector::MSE3EntryReminder::myPosition, and SUMOReal.
00090 { 00091 if (newPos <= myPosition) { 00092 // crossSection not yet reached 00093 return true; 00094 } 00095 if (oldPos > myPosition) { 00096 // crossSection was not passed 00097 return false; 00098 } 00099 // crossSection left 00100 SUMOReal leaveTimestep = (SUMOReal) MSNet::getInstance()->getCurrentTimeStep(); 00101 leaveTimestep += (((myPosition - oldPos) / newSpeed) * (SUMOReal) 1000.); 00102 myCollector.leave(veh, leaveTimestep / (SUMOReal) 1000.); 00103 return false; 00104 }
| bool MSE3Collector::MSE3LeaveReminder::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 exit, 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 108 of file MSE3Collector.cpp.
References MSVehicleType::getLength(), MSVehicle::getPositionOnLane(), MSVehicle::getVehicleType(), and myPosition.
00108 { 00109 return veh.getPositionOnLane() - veh.getVehicleType().getLength() <= myPosition; 00110 }
| 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.
| MSE3LeaveReminder& MSE3Collector::MSE3LeaveReminder::operator= | ( | const MSE3LeaveReminder & | ) | [private] |
Invalidated assignment operator.
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::MSE3LeaveReminder::myPosition [private] |
The position on the lane.
Definition at line 185 of file MSE3Collector.h.
Referenced by notifyEnter().
1.5.6