|
SUMO - Simulation of Urban MObility
|
The gui-version of a MS_E2_ZS_CollectorOverLanes. More...
#include <GUI_E2_ZS_CollectorOverLanes.h>
Data Structures | |
| class | MyWrapper |
Public Types | |
| typedef std::vector < MSE2Collector * > | CollectorCont |
| Definition of a E2 collector storage. | |
| typedef std::vector < GUI_E2_ZS_Collector * > | CollectorVector |
Public Member Functions | |
| virtual GUIDetectorWrapper * | buildDetectorGUIRepresentation () |
| Builds the graphical representation. | |
| const std::string & | getID () const throw () |
| Returns this detector's id. | |
| SUMOReal | getLength () const throw () |
| Returns this detector's length [m]. | |
| const std::string & | getStartLaneID () const throw () |
| Returns the id of the lane this detector starts at. | |
| GUI_E2_ZS_CollectorOverLanes (std::string id, DetectorUsage usage, MSLane *lane, SUMOReal startPos, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold) throw () | |
| Constructor. | |
| void | init (MSLane *lane, SUMOReal detLength) throw () |
| Builds the consecutive E2 detectors. | |
| void | setID (const std::string &newID) |
| resets the id | |
| ~GUI_E2_ZS_CollectorOverLanes () throw () | |
| Destructor. | |
Methods inherited from MSDetectorFileOutput. | |
| void | writeXMLOutput (OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime) throw (IOError) |
| Writes collected values into the given stream. | |
| void | writeXMLDetectorProlog (OutputDevice &dev) const throw (IOError) |
| Opens the XML-output using "detector" as root element. | |
Virtual methods to implement by derived classes | |
| virtual void | reset () throw () |
| Resets collected values. | |
| virtual void | detectorUpdate (const SUMOTime step) throw () |
| Updates the detector (computes values) | |
Protected Types | |
| typedef std::vector < MSE2Collector * > | DetectorVector |
| Definition of a detector storage. | |
| typedef std::vector < DetectorVector > | DetectorVectorVector |
| Definition of a storage for detector vectors. | |
| typedef std::vector< SUMOReal > | DoubleVector |
| Definition of a SUMOReal storage. | |
| typedef std::map< MSLane *, MSE2Collector * > | LaneDetMap |
| Definition of a map from a lane to the detector lying on it. | |
| typedef std::vector< MSLane * > | LaneVector |
| Definition of a lane storage. | |
| typedef std::vector< LaneVector > | LaneVectorVector |
| Definition of a storage for lane vectors. | |
| typedef DoubleVector | LengthVector |
| Definition of a storage for SUMOReal vectors. | |
Protected Member Functions | |
| MSE2Collector * | buildCollector (size_t c, size_t r, MSLane *l, SUMOReal start, SUMOReal end) throw () |
| Builds a single collector. | |
| void | extendTo (SUMOReal length) throw () |
| This method extends the current length up to the given. | |
| std::vector< MSLane * > | getLanePredeccessorLanes (MSLane *l) throw () |
| Returns the list of lanes predecessing the given one. | |
| std::string | makeID (const std::string &baseID, size_t c, size_t r) const throw () |
| Builds an id for one of the E2 collectors this detector uses. | |
Protected Attributes | |
| SUMOReal | haltingSpeedThresholdM |
| Describes how slow a vehicle must be before being assigned to a jam. | |
| SUMOTime | haltingTimeThresholdM |
| Describes how long a vehicle shall stay before being assigned to a jam. | |
| SUMOReal | jamDistThresholdM |
| Describes how long a jam must be before being recognized. | |
| LaneDetMap | myAlreadyBuild |
| Storage for detectors which already have been build for a single lane. | |
| DetectorVectorVector | myDetectorCombinations |
| Storage for detector combinations. | |
| std::string | myID |
| The id of this detector. | |
| LaneVectorVector | myLaneCombinations |
| Storage for lane combinations. | |
| SUMOReal | myLength |
| The length of the collector. | |
| LengthVector | myLengths |
| Storage for length combinations. | |
| std::string | myStartLaneID |
| The id of the lane this detector starts at. | |
| DetectorUsage | myUsage |
| Information about how this detector is used. | |
| SUMOReal | startPosM |
| The position the collector starts at. | |
The gui-version of a MS_E2_ZS_CollectorOverLanes.
Allows the building of a wrapper (also declared herein) which draws the detector on the gl-canvas. Beside this, the method "amVisible" is overridden to signalise that this detector is not used for simulation- -internal reasons, but is placed over the simulation by the user.
Definition at line 60 of file GUI_E2_ZS_CollectorOverLanes.h.
typedef std::vector< MSE2Collector* > MS_E2_ZS_CollectorOverLanes::CollectorCont [inherited] |
Definition of a E2 collector storage.
Definition at line 66 of file MS_E2_ZS_CollectorOverLanes.h.
| typedef std::vector<GUI_E2_ZS_Collector*> GUI_E2_ZS_CollectorOverLanes::CollectorVector |
Definition at line 62 of file GUI_E2_ZS_CollectorOverLanes.h.
typedef std::vector<MSE2Collector*> MS_E2_ZS_CollectorOverLanes::DetectorVector [protected, inherited] |
Definition of a detector storage.
Definition at line 212 of file MS_E2_ZS_CollectorOverLanes.h.
typedef std::vector<DetectorVector> MS_E2_ZS_CollectorOverLanes::DetectorVectorVector [protected, inherited] |
Definition of a storage for detector vectors.
Definition at line 215 of file MS_E2_ZS_CollectorOverLanes.h.
typedef std::vector<SUMOReal> MS_E2_ZS_CollectorOverLanes::DoubleVector [protected, inherited] |
Definition of a SUMOReal storage.
Definition at line 218 of file MS_E2_ZS_CollectorOverLanes.h.
typedef std::map<MSLane*, MSE2Collector*> MS_E2_ZS_CollectorOverLanes::LaneDetMap [protected, inherited] |
Definition of a map from a lane to the detector lying on it.
Definition at line 249 of file MS_E2_ZS_CollectorOverLanes.h.
typedef std::vector<MSLane*> MS_E2_ZS_CollectorOverLanes::LaneVector [protected, inherited] |
Definition of a lane storage.
Definition at line 206 of file MS_E2_ZS_CollectorOverLanes.h.
typedef std::vector<LaneVector> MS_E2_ZS_CollectorOverLanes::LaneVectorVector [protected, inherited] |
Definition of a storage for lane vectors.
Definition at line 209 of file MS_E2_ZS_CollectorOverLanes.h.
typedef DoubleVector MS_E2_ZS_CollectorOverLanes::LengthVector [protected, inherited] |
Definition of a storage for SUMOReal vectors.
Definition at line 221 of file MS_E2_ZS_CollectorOverLanes.h.
| GUI_E2_ZS_CollectorOverLanes::GUI_E2_ZS_CollectorOverLanes | ( | std::string | id, |
| DetectorUsage | usage, | ||
| MSLane * | lane, | ||
| SUMOReal | startPos, | ||
| SUMOTime | haltingTimeThreshold, | ||
| SUMOReal | haltingSpeedThreshold, | ||
| SUMOReal | jamDistThreshold | ||
| ) | throw () |
Constructor.
Definition at line 57 of file GUI_E2_ZS_CollectorOverLanes.cpp.
| GUI_E2_ZS_CollectorOverLanes::~GUI_E2_ZS_CollectorOverLanes | ( | ) | throw () |
Destructor.
Definition at line 67 of file GUI_E2_ZS_CollectorOverLanes.cpp.
| MSE2Collector * GUI_E2_ZS_CollectorOverLanes::buildCollector | ( | size_t | c, |
| size_t | r, | ||
| MSLane * | l, | ||
| SUMOReal | start, | ||
| SUMOReal | end | ||
| ) | throw () [protected, virtual] |
Builds a single collector.
| [in] | c | !!! |
| [in] | r | !!! |
| [in] | start | !!! |
| [in] | end | !!! |
Reimplemented from MS_E2_ZS_CollectorOverLanes.
Definition at line 77 of file GUI_E2_ZS_CollectorOverLanes.cpp.
References SUMOReal.
| GUIDetectorWrapper * GUI_E2_ZS_CollectorOverLanes::buildDetectorGUIRepresentation | ( | ) | [virtual] |
Builds the graphical representation.
Meant to be overridden by grahical versions of the detectors
Reimplemented from MSDetectorFileOutput.
Definition at line 71 of file GUI_E2_ZS_CollectorOverLanes.cpp.
References MS_E2_ZS_CollectorOverLanes::myAlreadyBuild.
| virtual void MSDetectorFileOutput::detectorUpdate | ( | const SUMOTime | step | ) | throw () [inline, virtual, inherited] |
Updates the detector (computes values)
| [in] | step | The current time step |
Reimplemented in MSE2Collector, MSE3Collector, MSMeanData, and MSMeanData_Harmonoise.
Definition at line 109 of file MSDetectorFileOutput.h.
| void MS_E2_ZS_CollectorOverLanes::extendTo | ( | SUMOReal | length | ) | throw () [protected, inherited] |
This method extends the current length up to the given.
This method is called consecutively until all paths have the desired length
| [in] | length | !!! |
Definition at line 82 of file MS_E2_ZS_CollectorOverLanes.cpp.
References MSLane::getEdge(), MSEdge::getLanes(), MSLane::getLength(), and SUMOReal.
| const std::string & MS_E2_ZS_CollectorOverLanes::getID | ( | ) | const throw () [inherited] |
Returns this detector's id.
Reimplemented from Named.
Definition at line 256 of file MS_E2_ZS_CollectorOverLanes.cpp.
References MS_E2_ZS_CollectorOverLanes::myID.
| std::vector< MSLane * > MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes | ( | MSLane * | l | ) | throw () [protected, inherited] |
Returns the list of lanes predecessing the given one.
| [in] | l | The lane to return predecessors of |
Definition at line 165 of file MS_E2_ZS_CollectorOverLanes.cpp.
References MSEdge::allowedLanes(), and SVC_UNKNOWN.
| SUMOReal MS_E2_ZS_CollectorOverLanes::getLength | ( | ) | const throw () [inline, inherited] |
Returns this detector's length [m].
Definition at line 145 of file MS_E2_ZS_CollectorOverLanes.h.
References MS_E2_ZS_CollectorOverLanes::myLength.
| const std::string & MS_E2_ZS_CollectorOverLanes::getStartLaneID | ( | ) | const throw () [inherited] |
Returns the id of the lane this detector starts at.
Definition at line 262 of file MS_E2_ZS_CollectorOverLanes.cpp.
References MS_E2_ZS_CollectorOverLanes::myStartLaneID.
| void MS_E2_ZS_CollectorOverLanes::init | ( | MSLane * | lane, |
| SUMOReal | detLength | ||
| ) | throw () [inherited] |
Builds the consecutive E2 detectors.
This is not done within the constructor to allow overriding of most functions but the building of detectors itself which in fact is depending on whether the normal or the gui-version is used
| [in] | lane | The lane the detector starts at |
| [in] | startPos | Begin position of the detector |
Definition at line 56 of file MS_E2_ZS_CollectorOverLanes.cpp.
References SUMOReal.
| std::string MS_E2_ZS_CollectorOverLanes::makeID | ( | const std::string & | baseID, |
| size_t | c, | ||
| size_t | r | ||
| ) | const throw () [protected, inherited] |
Builds an id for one of the E2 collectors this detector uses.
| [in] | baseID | The id of the parent detector |
| [in] | c | !!! |
| [in] | r | !!! |
Definition at line 234 of file MS_E2_ZS_CollectorOverLanes.cpp.
References DU_SUMO_INTERNAL, DU_TL_CONTROL, DU_USER_DEFINED, and MS_E2_ZS_CollectorOverLanes::myUsage.
| virtual void MSDetectorFileOutput::reset | ( | ) | throw () [inline, virtual, inherited] |
Resets collected values.
Please note that this is only a "hack" for coupled-tls-outputs.
Reimplemented in GUIInductLoop, MSE2Collector, MSE3Collector, and MSInductLoop.
Definition at line 102 of file MSDetectorFileOutput.h.
Referenced by Command_SaveTLCoupledLaneDet::execute().
| void Named::setID | ( | const std::string & | newID | ) | [inline, inherited] |
| void MS_E2_ZS_CollectorOverLanes::writeXMLDetectorProlog | ( | OutputDevice & | dev | ) | const throw (IOError) [virtual, inherited] |
Opens the XML-output using "detector" as root element.
| [in] | dev | The output device to write the root into |
| IOError | If an error on writing occurs (!!! not yet implemented) |
Implements MSDetectorFileOutput.
Definition at line 226 of file MS_E2_ZS_CollectorOverLanes.cpp.
| void MS_E2_ZS_CollectorOverLanes::writeXMLOutput | ( | OutputDevice & | dev, |
| SUMOTime | startTime, | ||
| SUMOTime | stopTime | ||
| ) | throw (IOError) [virtual, inherited] |
Writes collected values into the given stream.
| [in] | dev | The output device to write the data into |
| [in] | startTime | First time step the data were gathered |
| [in] | stopTime | Last time step the data were gathered |
| IOError | If an error on writing occurs (!!! not yet implemented) |
Implements MSDetectorFileOutput.
Definition at line 208 of file MS_E2_ZS_CollectorOverLanes.cpp.
SUMOReal MS_E2_ZS_CollectorOverLanes::haltingSpeedThresholdM [protected, inherited] |
Describes how slow a vehicle must be before being assigned to a jam.
Definition at line 200 of file MS_E2_ZS_CollectorOverLanes.h.
SUMOTime MS_E2_ZS_CollectorOverLanes::haltingTimeThresholdM [protected, inherited] |
Describes how long a vehicle shall stay before being assigned to a jam.
Definition at line 197 of file MS_E2_ZS_CollectorOverLanes.h.
SUMOReal MS_E2_ZS_CollectorOverLanes::jamDistThresholdM [protected, inherited] |
Describes how long a jam must be before being recognized.
Definition at line 203 of file MS_E2_ZS_CollectorOverLanes.h.
LaneDetMap MS_E2_ZS_CollectorOverLanes::myAlreadyBuild [protected, inherited] |
Storage for detectors which already have been build for a single lane.
Definition at line 252 of file MS_E2_ZS_CollectorOverLanes.h.
Referenced by buildDetectorGUIRepresentation().
DetectorVectorVector MS_E2_ZS_CollectorOverLanes::myDetectorCombinations [protected, inherited] |
Storage for detector combinations.
Each detector combination is a vector of consecutive lanes (backwards)
Definition at line 233 of file MS_E2_ZS_CollectorOverLanes.h.
std::string MS_E2_ZS_CollectorOverLanes::myID [protected, inherited] |
The id of this detector.
Reimplemented from Named.
Definition at line 243 of file MS_E2_ZS_CollectorOverLanes.h.
Referenced by MS_E2_ZS_CollectorOverLanes::getID().
LaneVectorVector MS_E2_ZS_CollectorOverLanes::myLaneCombinations [protected, inherited] |
Storage for lane combinations.
Each lane combination is a vector of consecutive lanes (backwards)
Definition at line 227 of file MS_E2_ZS_CollectorOverLanes.h.
SUMOReal MS_E2_ZS_CollectorOverLanes::myLength [protected, inherited] |
The length of the collector.
Definition at line 194 of file MS_E2_ZS_CollectorOverLanes.h.
Referenced by MS_E2_ZS_CollectorOverLanes::getLength().
LengthVector MS_E2_ZS_CollectorOverLanes::myLengths [protected, inherited] |
Storage for length combinations.
Each length combination is a vector of consecutive lanes (backwards)
Definition at line 239 of file MS_E2_ZS_CollectorOverLanes.h.
std::string MS_E2_ZS_CollectorOverLanes::myStartLaneID [protected, inherited] |
The id of the lane this detector starts at.
Definition at line 246 of file MS_E2_ZS_CollectorOverLanes.h.
Referenced by MS_E2_ZS_CollectorOverLanes::getStartLaneID().
DetectorUsage MS_E2_ZS_CollectorOverLanes::myUsage [protected, inherited] |
Information about how this detector is used.
Definition at line 255 of file MS_E2_ZS_CollectorOverLanes.h.
Referenced by MS_E2_ZS_CollectorOverLanes::makeID().
SUMOReal MS_E2_ZS_CollectorOverLanes::startPosM [protected, inherited] |
The position the collector starts at.
Definition at line 191 of file MS_E2_ZS_CollectorOverLanes.h.