47 #ifdef CHECK_MEMORY_LEAKS 49 #endif // CHECK_MEMORY_LEAKS 61 const std::set<std::string>*
const vTypes,
64 nVehDeparted(0), nVehArrived(0), nVehEntered(0), nVehLeft(0),
65 nVehVaporized(0), waitSeconds(0),
66 nVehLaneChangeFrom(0), nVehLaneChangeTo(0),
67 vehLengthSum(0), myParent(parent) {}
169 const SUMOReal numLanes,
const SUMOReal defaultTravelTime,
const int numVehicles)
const {
188 if (numVehicles > 0) {
196 }
else if (defaultTravelTime >= 0.) {
212 const SUMOTime dumpEnd,
const bool useLanes,
213 const bool withEmpty,
const bool printDefaults,
214 const bool withInternal,
215 const bool trackVehicles,
219 const std::set<std::string> vTypes)
220 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
221 withInternal, trackVehicles, maxTravelTime, minSamples, vTypes),
Data collector for edges/lanes.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
virtual ~MSLaneMeanDataValues()
Destructor.
const SUMOReal myLaneLength
The length of the lane / edge the data collector is on.
MSLaneMeanDataValues(MSLane *const lane, const SUMOReal length, const bool doAdd, const std::set< std::string > *const vTypes=0, const MSMeanData_Net *parent=0)
Constructor.
void write(OutputDevice &dev, const SUMOTime period, const SUMOReal numLanes, const SUMOReal defaultTravelTime, const int numVehicles=-1) const
Writes output values into the given stream.
unsigned nVehVaporized
The number of vehicles that left this lane within the sample interval.
The vehicle arrived at a junction.
SUMOReal travelledDistance
The sum of the distances the vehicles travelled.
void removeFromVehicleUpdateValues(SUMOVehicle &veh)
const SUMOReal myMaxTravelTime
the maximum travel time to write
void addTo(MSMeanData::MeanDataValues &val) const
Add the values of this to the given one and store them there.
Notification
Definition of a vehicle state.
const MSMeanData_Net * myParent
The meandata parent.
SUMOReal getLength() const
Get vehicle's length [m].
MSMeanData_Net(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 SUMOReal maxTravelTime, const SUMOReal minSamples, const SUMOReal haltSpeed, const std::set< std::string > vTypes)
Constructor.
The vehicle got vaporized.
The vehicle changes the segment (meso only)
unsigned nVehLaneChangeFrom
The number of vehicles that changed from this lane.
const std::set< std::string > myVehicleTypes
The vehicle types to look for (empty means all)
Data structure for mean (aggregated) edge/lane values.
const MSLane * getLane() const
Returns the lane the reminder works on.
SUMOReal waitSeconds
The number of vehicle probes with small speed.
The vehicle changes lanes (micro only)
SUMOReal vehLengthSum
The sum of the lengths the vehicles had.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Computes current values and adds them to their sums.
Representation of a vehicle.
Data structure for mean (aggregated) edge/lane values.
void notifyMoveInternal(SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed)
Internal notification about the vehicle moves.
unsigned nVehArrived
The number of vehicles that finished on the lane.
unsigned nVehLaneChangeTo
The number of vehicles that changed to this lane.
unsigned nVehEntered
The number of vehicles that entered this lane within the sample interval.
virtual ~MSMeanData_Net()
Destructor.
The vehicle arrived at its destination (is deleted)
bool isEmpty() const
Returns whether any data was collected.
const SUMOReal myHaltSpeed
the minimum sample seconds
const SUMOReal myMinSamples
the minimum sample seconds
bool notifyLeave(SUMOVehicle &veh, SUMOReal lastPos, MSMoveReminder::Notification reason)
Called if the vehicle leaves the reminder's lane.
The vehicle has departed (was inserted into the network)
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const SUMOReal length, const bool doAdd) const
Create an instance of MeanDataValues.
unsigned nVehLeft
The number of vehicles that left this lane within the sample interval.
Static storage of an output device and its base (abstract) implementation.
Network state mean data collector for edges/lanes.
bool closeTag()
Closes the most recently opened tag.
void reset(bool afterWrite=false)
Resets values so they may be used for the next interval.
bool vehicleApplies(const SUMOVehicle &veh) const
Tests whether the vehicles type is to be regarded.
Representation of a lane in the micro simulation.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.