#include <MSMeanData.h>

Structure holding values that describe the emissions aggregated over some seconds.
Definition at line 74 of file MSMeanData.h.
Collected values | |
| The number of sampled vehicle movements (in s) | |
| SUMOReal | sampleSeconds |
| SUMOReal | travelledDistance |
| The sum of the distances the vehicles travelled. | |
Public Member Functions | |
| virtual void | addTo (MeanDataValues &val) const =0 throw () |
| Add the values of this to the given one and store them there. | |
| const MSLane *const | getLane () const throw () |
| Returns the lane the reminder works on. | |
| virtual SUMOReal | getSamples () const throw () |
| virtual bool | isEmpty () const throw () |
| Returns whether any data was collected. | |
| MeanDataValues (MSLane *const lane, const bool doAdd, const std::set< std::string > *const vTypes=0) throw () | |
| Constructor. | |
| virtual void | reset ()=0 throw () |
| Resets values so they may be used for the next interval. | |
| virtual void | update () throw () |
| Called if a per timestep update is needed. Default does nothing. | |
| virtual void | write (OutputDevice &dev, const SUMOTime period, const SUMOReal numLanes, const SUMOReal length, const int numVehicles=-1) const =0 throw (IOError) |
| Writes output values into the given stream. | |
| virtual | ~MeanDataValues () throw () |
| Destructor. | |
Interface methods, to be derived by subclasses | |
| virtual bool | isStillActive (MSVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) throw () |
| Checks whether the reminder still has to be notified about the vehicle moves. | |
| virtual bool | notifyEnter (MSVehicle &veh, bool isEmit, bool isLaneChange) throw () |
| Checks whether the reminder is activated by the vehicle's emission on lane change. | |
| virtual void | notifyLeave (MSVehicle &veh, bool isArrival, bool isLaneChange) throw () |
| Called if the vehicle leaves the reminder's lane. | |
Methods inherited from MSMoveReminder. | |
| bool | vehicleApplies (const SUMOVehicle &veh) const throw () |
| Tests whether the vehicles type is to be regarded. | |
Protected Attributes | |
| MSLane *const | myLane |
| Lane on which the reminder works. | |
Private Attributes | |
| const std::set< std::string > *const | myVehicleTypes |
| The vehicle types to look for (0 or empty means all). | |
| MSMeanData::MeanDataValues::MeanDataValues | ( | MSLane *const | lane, | |
| const bool | doAdd, | |||
| const std::set< std::string > *const | vTypes = 0 | |||
| ) | throw () |
Constructor.
Definition at line 57 of file MSMeanData.cpp.
00058 : MSMoveReminder(lane, doAdd), sampleSeconds(0), travelledDistance(0), myVehicleTypes(vTypes) {}
| MSMeanData::MeanDataValues::~MeanDataValues | ( | ) | throw () [virtual] |
| virtual void MSMeanData::MeanDataValues::addTo | ( | MeanDataValues & | val | ) | const throw () [pure virtual] |
Add the values of this to the given one and store them there.
| [in] | val | The meandata to add to |
Implemented in MSMeanData::MeanDataValueTracker, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_HBEFA::MSLaneMeanDataValues, and MSMeanData_Net::MSLaneMeanDataValues.
Referenced by MSMeanData::writeEdge().
| 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 }
| SUMOReal MSMeanData::MeanDataValues::getSamples | ( | ) | const throw () [virtual] |
Reimplemented in MSMeanData::MeanDataValueTracker.
Definition at line 84 of file MSMeanData.cpp.
References sampleSeconds.
00084 { 00085 return sampleSeconds; 00086 }
| bool MSMeanData::MeanDataValues::isEmpty | ( | ) | const throw () [virtual] |
Returns whether any data was collected.
Reimplemented in MSMeanData::MeanDataValueTracker, and MSMeanData_Net::MSLaneMeanDataValues.
Definition at line 73 of file MSMeanData.cpp.
References sampleSeconds.
00073 { 00074 return sampleSeconds == 0; 00075 }
| virtual bool MSMoveReminder::isStillActive | ( | MSVehicle & | veh, | |
| SUMOReal | oldPos, | |||
| SUMOReal | newPos, | |||
| SUMOReal | newSpeed | |||
| ) | throw () [inline, virtual, inherited] |
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.
| veh | Vehicle that asks this reminder. | |
| oldPos | Position before move. | |
| newPos | Position after move with newSpeed. | |
| newSpeed | Moving speed. |
Reimplemented in MSE2Collector, MSE3Collector::MSE3EntryReminder, MSE3Collector::MSE3LeaveReminder, MSInductLoop, MSMeanData::MeanDataValueTracker, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_HBEFA::MSLaneMeanDataValues, MSMeanData_Net::MSLaneMeanDataValues, and MSTriggeredRerouter::Setter.
Definition at line 101 of file MSMoveReminder.h.
| virtual bool MSMoveReminder::notifyEnter | ( | MSVehicle & | veh, | |
| bool | isEmit, | |||
| bool | isLaneChange | |||
| ) | throw () [inline, virtual, inherited] |
Checks whether the reminder is activated by the vehicle's emission on lane change.
Lane change means in this case that the vehicle changes to the lane the reminder is placed at.
| [in] | veh | The entering vehicle. |
| [in] | isEmit | whether the vehicle was just emitted into the net |
| [in] | isLaneChange | whether the vehicle changed to the lane |
Reimplemented in MSE2Collector, MSE3Collector::MSE3EntryReminder, MSE3Collector::MSE3LeaveReminder, MSInductLoop, MSMeanData::MeanDataValueTracker, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_Net::MSLaneMeanDataValues, MSRouteProbe::EntryReminder, and MSTriggeredRerouter::Setter.
Definition at line 133 of file MSMoveReminder.h.
| 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.
| virtual void MSMeanData::MeanDataValues::reset | ( | ) | throw () [pure virtual] |
Resets values so they may be used for the next interval.
Implemented in MSMeanData::MeanDataValueTracker, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_HBEFA::MSLaneMeanDataValues, and MSMeanData_Net::MSLaneMeanDataValues.
Referenced by MSMeanData::MeanDataValueTracker::TrackerEntry::reset(), and MSMeanData::writeEdge().
| void MSMeanData::MeanDataValues::update | ( | ) | throw () [virtual] |
Called if a per timestep update is needed. Default does nothing.
Reimplemented in MSMeanData_Harmonoise::MSLaneMeanDataValues.
Definition at line 79 of file MSMeanData.cpp.
| bool MSMeanData::MeanDataValues::vehicleApplies | ( | const SUMOVehicle & | veh | ) | const throw () |
Tests whether the vehicles type is to be regarded.
| [in] | veh | The regarded vehicle |
Definition at line 66 of file MSMeanData.cpp.
References myVehicleTypes.
Referenced by MSMeanData_Net::MSLaneMeanDataValues::isStillActive(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), MSMeanData_Harmonoise::MSLaneMeanDataValues::isStillActive(), MSMeanData::MeanDataValueTracker::isStillActive(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSMeanData_Harmonoise::MSLaneMeanDataValues::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(), and MSMeanData::MeanDataValueTracker::notifyLeave().
00066 { 00067 return myVehicleTypes == 0 || myVehicleTypes->empty() || 00068 myVehicleTypes->find(veh.getVehicleType().getID()) != myVehicleTypes->end(); 00069 }
| virtual void MSMeanData::MeanDataValues::write | ( | OutputDevice & | dev, | |
| const SUMOTime | period, | |||
| const SUMOReal | numLanes, | |||
| const SUMOReal | length, | |||
| const int | numVehicles = -1 | |||
| ) | const throw (IOError) [pure virtual] |
Writes output values into the given stream.
| [in] | dev | The output device to write the data into |
| [in] | period | Length of the period the data were gathered |
| [in] | numLanes | The total number of lanes for which the data was collected |
| [in] | length | The length of the object for which the data was collected |
| IOError | If an error on writing occurs (!!! not yet implemented) |
Implemented in MSMeanData::MeanDataValueTracker, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_HBEFA::MSLaneMeanDataValues, and MSMeanData_Net::MSLaneMeanDataValues.
Referenced by MSMeanData::writeEdge().
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().
const std::set<std::string>* const MSMeanData::MeanDataValues::myVehicleTypes [private] |
The vehicle types to look for (0 or empty means all).
Definition at line 142 of file MSMeanData.h.
Referenced by MSMeanData::init(), and vehicleApplies().
SUMOReal MSMeanData::MeanDataValues::sampleSeconds [protected] |
Definition at line 134 of file MSMeanData.h.
Referenced by MSMeanData_Net::MSLaneMeanDataValues::addTo(), MSMeanData_HBEFA::MSLaneMeanDataValues::addTo(), MSMeanData_Harmonoise::MSLaneMeanDataValues::addTo(), getSamples(), MSMeanData_Net::MSLaneMeanDataValues::isEmpty(), isEmpty(), MSMeanData_Net::MSLaneMeanDataValues::isStillActive(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), MSMeanData_Harmonoise::MSLaneMeanDataValues::isStillActive(), MSMeanData_Net::MSLaneMeanDataValues::reset(), MSMeanData_HBEFA::MSLaneMeanDataValues::reset(), MSMeanData_Harmonoise::MSLaneMeanDataValues::reset(), MSMeanData_Net::MSLaneMeanDataValues::write(), MSMeanData_HBEFA::MSLaneMeanDataValues::write(), and MSMeanData_Harmonoise::MSLaneMeanDataValues::write().
The sum of the distances the vehicles travelled.
Definition at line 137 of file MSMeanData.h.
Referenced by MSMeanData_Net::MSLaneMeanDataValues::addTo(), MSMeanData_HBEFA::MSLaneMeanDataValues::addTo(), MSMeanData_Harmonoise::MSLaneMeanDataValues::addTo(), MSMeanData_Net::MSLaneMeanDataValues::isStillActive(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), MSMeanData_Harmonoise::MSLaneMeanDataValues::isStillActive(), MSMeanData_Net::MSLaneMeanDataValues::reset(), MSMeanData_HBEFA::MSLaneMeanDataValues::reset(), MSMeanData_Harmonoise::MSLaneMeanDataValues::reset(), MSMeanData_Net::MSLaneMeanDataValues::write(), MSMeanData_HBEFA::MSLaneMeanDataValues::write(), and MSMeanData_Harmonoise::MSLaneMeanDataValues::write().
1.5.6