59 nVehDeparted(0), nVehArrived(0), nVehEntered(0), nVehLeft(0),
60 nVehVaporized(0), waitSeconds(0),
61 nVehLaneChangeFrom(0), nVehLaneChangeTo(0),
62 frontSampleSeconds(0), frontTravelledDistance(0),
63 vehLengthSum(0), myParent(parent) {}
172 const double numLanes,
const double defaultTravelTime,
const int numVehicles)
const {
193 if (numVehicles > 0) {
200 }
else if (defaultTravelTime >= 0.) {
201 dev.
writeAttr(
"traveltime", defaultTravelTime);
203 dev.
writeAttr(
"overlapTraveltime", overlapTraveltime)
208 }
else if (defaultTravelTime >= 0.) {
224 const SUMOTime dumpEnd,
const bool useLanes,
225 const bool withEmpty,
const bool printDefaults,
226 const bool withInternal,
227 const bool trackVehicles,
228 const double maxTravelTime,
229 const double minSamples,
230 const double haltSpeed,
231 const std::string& vTypes)
232 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
233 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
double vehLengthSum
The sum of the lengths the vehicles had.
int nVehEntered
The number of vehicles that entered this lane within the sample interval.
virtual ~MSLaneMeanDataValues()
Destructor.
Representation of a vehicle in the micro simulation.
bool notifyLeave(SUMOVehicle &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Called if the vehicle leaves the reminder's lane.
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.
double frontSampleSeconds
The number of vehicle probes regarding the vehicle front.
const double myMaxTravelTime
the maximum travel time to write
The vehicle arrived at a junction.
void removeFromVehicleUpdateValues(SUMOVehicle &veh)
Notification
Definition of a vehicle state.
const MSMeanData_Net * myParent
The meandata parent.
const double myHaltSpeed
the minimum sample seconds
void notifyMoveInternal(const SUMOVehicle &veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane)
Internal notification about the vehicle moves.
The vehicle got vaporized.
The vehicle changes the segment (meso only)
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const double length, const bool doAdd) const
Create an instance of MeanDataValues.
MSLaneMeanDataValues(MSLane *const lane, const double length, const bool doAdd, const MSMeanData_Net *parent)
Constructor.
Data structure for mean (aggregated) edge/lane values.
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.
The vehicle changes lanes (micro only)
int nVehLaneChangeTo
The number of vehicles that changed to this lane.
double travelledDistance
The sum of the distances the vehicles travelled.
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 double myLaneLength
The length of the lane / edge the data collector is on.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Computes current values and adds them to their sums.
const double myMinSamples
the minimum sample seconds
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 double maxTravelTime, const double minSamples, const double haltSpeed, const std::string &vTypes)
Constructor.
double waitSeconds
The number of vehicle probes with small speed.
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.
The vehicle has departed (was inserted into the network)
double frontTravelledDistance
The travelled distance regarding the vehicle front.
int nVehLaneChangeFrom
The number of vehicles that changed from this lane.
double getLength() const
Get vehicle's length [m].
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 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.