47 #ifdef CHECK_MEMORY_LEAKS 49 #endif // CHECK_MEMORY_LEAKS 63 nVehDeparted(0), nVehArrived(0), nVehEntered(0), nVehLeft(0),
64 nVehVaporized(0), waitSeconds(0),
65 nVehLaneChangeFrom(0), nVehLaneChangeTo(0),
66 frontSampleSeconds(0), frontTravelledDistance(0),
67 vehLengthSum(0), myParent(parent) {}
176 const SUMOReal numLanes,
const SUMOReal defaultTravelTime,
const int numVehicles)
const {
197 if (numVehicles > 0) {
204 }
else if (defaultTravelTime >= 0.) {
205 dev.
writeAttr(
"traveltime", defaultTravelTime);
207 dev.
writeAttr(
"overlapTraveltime", overlapTraveltime)
212 }
else if (defaultTravelTime >= 0.) {
228 const SUMOTime dumpEnd,
const bool useLanes,
229 const bool withEmpty,
const bool printDefaults,
230 const bool withInternal,
231 const bool trackVehicles,
235 const std::string& vTypes)
236 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
237 withInternal, trackVehicles, maxTravelTime, minSamples, vTypes),
Data collector for edges/lanes.
const MSLane * getLane() const
Returns the lane the reminder works on.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
int nVehEntered
The number of vehicles that entered this lane within the sample interval.
virtual ~MSLaneMeanDataValues()
Destructor.
const SUMOReal myLaneLength
The length of the lane / edge the data collector is on.
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const SUMOReal length, const bool doAdd) const
Create an instance of MeanDataValues.
Representation of a vehicle in the micro simulation.
MSLaneMeanDataValues(MSLane *const lane, const SUMOReal length, const bool doAdd, const MSMeanData_Net *parent)
Constructor.
int nVehVaporized
The number of vehicles that left this lane within the sample interval.
bool vehicleApplies(const SUMOVehicle &veh) const
Checks whether the detector measures vehicles of the given type.
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
Notification
Definition of a vehicle state.
const MSMeanData_Net * myParent
The meandata parent.
SUMOReal getLength() const
Get vehicle's length [m].
The vehicle got vaporized.
The vehicle changes the segment (meso only)
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.
SUMOReal frontSampleSeconds
The number of vehicle probes regarding the vehicle front.
Data structure for mean (aggregated) edge/lane values.
SUMOReal waitSeconds
The number of vehicle probes with small speed.
The vehicle changes lanes (micro only) XXX: What if a vehicle changes lanes and passes a junction sim...
int nVehLaneChangeTo
The number of vehicles that changed to this lane.
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.
virtual ~MSMeanData_Net()
Destructor.
The vehicle arrived at its destination (is deleted)
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.
int nVehLeft
The number of vehicles that left this lane within the sample interval.
int nVehArrived
The number of vehicles that finished on the lane.
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::string &vTypes)
Constructor.
The vehicle has departed (was inserted into the network)
SUMOReal frontTravelledDistance
The travelled distance regarding the vehicle front.
int nVehLaneChangeFrom
The number of vehicles that changed from this lane.
void addTo(MSMeanData::MeanDataValues &val) const
Add the values of this to the given one and store them there.
bool isEmpty() const
Returns whether any data was collected.
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 notifyMoveInternal(const SUMOVehicle &veh, const SUMOReal frontOnLane, const SUMOReal timeOnLane, const SUMOReal meanSpeedFrontOnLane, const SUMOReal meanSpeedVehicleOnLane, const SUMOReal travelledDistanceFrontOnLane, const SUMOReal travelledDistanceVehicleOnLane)
Internal notification about the vehicle moves.
void reset(bool afterWrite=false)
Resets values so they may be used for the next interval.
Representation of a lane in the micro simulation.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.