42 #ifdef CHECK_MEMORY_LEAKS 44 #endif // CHECK_MEMORY_LEAKS 56 currentTimeN(0), meanNTemp(0), myParent(parent) {}
109 }
else if (defaultTravelTime >= 0.) {
111 dev.
writeAttr(
"traveltime", defaultTravelTime);
123 const bool useLanes,
const bool withEmpty,
124 const bool printDefaults,
const bool withInternal,
125 const bool trackVehicles,
127 const std::string& vTypes)
128 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
129 withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) {
145 for (std::vector<std::vector<MeanDataValues*> >::const_iterator i =
myMeasures.begin(); i !=
myMeasures.end(); ++i) {
146 const std::vector<MeanDataValues*>& lm = *i;
147 for (std::vector<MeanDataValues*>::const_iterator j = lm.begin(); j != lm.end(); ++j) {
const MSMeanData_Harmonoise * myParent
The meandata parent.
Data collector for edges/lanes.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
const SUMOReal myLaneLength
The length of the lane / edge the data collector is on.
std::vector< std::vector< MeanDataValues * > > myMeasures
Value collectors; sorted by edge, then by lane.
SUMOReal currentTimeN
Sum of produced noise at this time step(pow(10, (<NOISE>/10.)))
void reset(bool afterWrite=false)
Resets values so they may be used for the next interval.
SUMOReal travelledDistance
The sum of the distances the vehicles travelled.
const SUMOReal myMaxTravelTime
the maximum travel time to write
SUMOReal meanNTemp
Sum of produced noise over time (pow(10, (<NOISE>/10.)))
virtual ~MSMeanData_Harmonoise()
Destructor.
Noise data collector for edges/lanes.
void update()
Computes the noise in the last time step.
static SUMOReal computeNoise(SUMOEmissionClass c, double v, double a)
Returns the noise produced by the a vehicle of the given type at the given speed. ...
Representation of a vehicle.
Data structure for mean (aggregated) edge/lane values.
Data structure for mean (aggregated) edge/lane values.
void notifyMoveInternal(const SUMOVehicle &veh, const SUMOReal, const SUMOReal timeOnLane, const SUMOReal meanSpeedFrontOnLane, const SUMOReal meanSpeedVehicleOnLane, const SUMOReal travelledDistanceFrontOnLane, const SUMOReal travelledDistanceVehicleOnLane)
Internal notification about the vehicle moves.
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const SUMOReal length, const bool doAdd) const
Create an instance of MeanDataValues.
virtual void detectorUpdate(const SUMOTime step)
Updates the detector.
const SUMOReal myMinSamples
the minimum sample seconds
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.
virtual ~MSLaneMeanDataValues()
Destructor.
virtual SUMOReal getAcceleration() const =0
Returns the vehicle's acceleration.
static SUMOReal sum(SUMOReal val)
Computes the resulting noise.
void addTo(MSMeanData::MeanDataValues &val) const
Add the values to this meanData.
virtual void detectorUpdate(const SUMOTime step)
Updates the detector.
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
MSLaneMeanDataValues(MSLane *const lane, const SUMOReal length, const bool doAdd, const MSMeanData_Harmonoise *parent)
Constructor.
Representation of a lane in the micro simulation.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
MSMeanData_Harmonoise(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 minSamples, const SUMOReal maxTravelTime, const std::string &vTypes)
Constructor.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.