 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
80 virtual void reset(
bool afterWrite =
false) = 0;
114 double newPos,
double newSpeed);
148 const double numLanes,
const double defaultTravelTime,
149 const int numVehicles = -1)
const = 0;
197 void reset(
bool afterWrite);
211 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);
250 const double numLanes,
const double defaultTravelTime,
251 const int numVehicles = -1)
const;
308 const bool useLanes,
const bool withEmpty,
309 const bool printDefaults,
const bool withInternal,
311 const double minSamples,
312 const double maxTravelTime,
313 const std::string& vTypes);
420 const SumoXMLTag tag,
const std::string
id)
const;
Representation of a vehicle or person.
void writeEdge(OutputDevice &dev, const std::vector< MeanDataValues * > &edgeValues, MSEdge *edge, SUMOTime startTime, SUMOTime stopTime)
Writes edge values into the given stream.
virtual ~TrackerEntry()
Constructor.
const bool myDumpEmpty
Whether empty lanes/edges shall be written.
Base of value-generating classes (detectors)
Representation of a lane in the micro simulation.
double getMaxTravelTime() const
const bool myAmEdgeBased
Information whether the output shall be edge-based (not lane-based)
Static storage of an output device and its base (abstract) implementation.
MSMeanData(const std::string &id, const SUMOTime dumpBegin, const SUMOTime dumpEnd, const bool useLanes, const bool withEmpty, const bool printDefaults, const bool withInternal, const bool trackVehicles, const int detectPersons, const double minSamples, const double maxTravelTime, const std::string &vTypes)
Constructor.
virtual void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using "netstats" as root element.
double getSamples() const
Returns the number of collected sample seconds.
virtual bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Called if the vehicle enters the reminder's lane.
virtual bool isEmpty() const
Returns whether any data was collected.
MeanDataValueTracker(MSLane *const lane, const double length, const MSMeanData *const parent)
Constructor.
std::vector< std::vector< MeanDataValues * > > myMeasures
Value collectors; sorted by edge, then by lane.
const bool myPrintDefaults
Whether empty lanes/edges shall be written.
virtual void write(OutputDevice &dev, const SUMOTime period, const double numLanes, const double defaultTravelTime, const int numVehicles=-1) const =0
Writes output values into the given stream.
void resetOnly(SUMOTime stopTime)
Resets network value in order to allow processing of the next interval.
SumoXMLTag
Numbers representing SUMO-XML - element names.
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
Writes collected values into the given stream.
Something on a lane to be noticed about vehicle movement.
MSEdgeVector myEdges
The corresponding first edges.
const bool myDumpInternal
Whether internal lanes/edges shall be written.
const double myMinSamples
the minimum sample seconds
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Computes current values and adds them to their sums.
Data collector for edges/lanes.
virtual ~MeanDataValueTracker()
Destructor.
virtual void openInterval(OutputDevice &dev, const SUMOTime startTime, const SUMOTime stopTime)
Writes the interval opener.
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks whether the reminder still has to be notified about the vehicle moves.
void addTo(MSMeanData::MeanDataValues &val) const
Add the values of this to the given one and store them there.
std::list< std::pair< SUMOTime, SUMOTime > > myPendingIntervals
The intervals for which output still has to be generated (only in the tracking case)
virtual ~MSMeanData()
Destructor.
virtual bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Called if the vehicle leaves the reminder's lane.
double travelledDistance
The sum of the distances the vehicles travelled.
const double myMaxTravelTime
the maximum travel time to write
double getTravelledDistance() const
Returns the total travelled distance.
MSMeanData & operator=(const MSMeanData &)
Invalidated assignment operator.
A road/street connecting two junctions.
int myNumVehicleLeft
The number of vehicles which left in the current interval.
const MSMeanData *const myParent
The meandata parent.
bool isEmpty() const
Returns whether any data was collected.
void init()
Adds the value collectors to all relevant edges.
virtual void update()
Called if a per timestep update is needed. Default does nothing.
Data structure for mean (aggregated) edge/lane values.
bool detectPersons() const
const double myLaneLength
The length of the lane / edge the data collector is on.
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.
virtual ~MeanDataValues()
Destructor.
std::list< TrackerEntry * > myCurrentData
The currently active meandata "intervals".
Data structure for mean (aggregated) edge/lane values for tracked vehicles.
const bool myTrackVehicles
Whether vehicles are tracked.
virtual double getSamples() const
Returns the number of collected sample seconds.
void reset(bool afterWrite)
Resets values so they may be used for the next interval.
int myNumVehicleEntered
The number of vehicles which entered in the current interval.
std::vector< MSEdge * > MSEdgeVector
const SUMOTime myDumpBegin
The first and the last time step to write information (-1 indicates always)
std::vector< MSEdge * > MSEdgeVector
virtual void reset(bool afterWrite=false)=0
Resets values so they may be used for the next interval.
virtual MSMeanData::MeanDataValues * createValues(MSLane *const lane, const double length, const bool doAdd) const =0
Create an instance of MeanDataValues.
virtual void addTo(MeanDataValues &val) const =0
Add the values of this to the given one and store them there.
virtual std::string getEdgeID(const MSEdge *const edge)
Return the relevant edge id.
double getMinSamples() const
void write(OutputDevice &dev, const SUMOTime period, const double numLanes, const double defaultTravelTime, const int numVehicles=-1) const
Writes output values into the given stream.
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Called if the vehicle leaves the reminder's lane.
MeanDataValues * myValues
The number of vehicles which left in the current interval.
TrackerEntry(MeanDataValues *const values)
Constructor.
Notification
Definition of a vehicle state.
std::map< const SUMOTrafficObject *, TrackerEntry * > myTrackedData
The map of vehicles to data entries.
virtual bool writePrefix(OutputDevice &dev, const MeanDataValues &values, const SumoXMLTag tag, const std::string id) const
Checks for emptiness and writes prefix into the given stream.
MeanDataValues(MSLane *const lane, const double length, const bool doAdd, const MSMeanData *const parent)
Constructor.
virtual void detectorUpdate(const SUMOTime step)
Updates the detector.