42 #ifdef CHECK_MEMORY_LEAKS 44 #endif // CHECK_MEMORY_LEAKS 56 currentTimeN(0), meanNTemp(0), myParent(parent) {}
114 }
else if (defaultTravelTime >= 0.) {
116 dev.
writeAttr(
"traveltime", defaultTravelTime);
128 const bool useLanes,
const bool withEmpty,
129 const bool printDefaults,
const bool withInternal,
130 const bool trackVehicles,
132 const std::set<std::string> vTypes)
133 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
134 withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) {
150 for (std::vector<std::vector<MeanDataValues*> >::const_iterator i =
myMeasures.begin(); i !=
myMeasures.end(); ++i) {
151 const std::vector<MeanDataValues*>& lm = *i;
152 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.
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.
std::vector< std::vector< MeanDataValues * > > myMeasures
Value collectors; sorted by edge, then by lane.
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::set< std::string > vTypes)
Constructor.
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.
void notifyMoveInternal(SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed)
Internal notification about the vehicle moves.
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.)))
Notification
Definition of a vehicle state.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Computes current emission values and adds them to their sums.
const std::set< std::string > myVehicleTypes
The vehicle types to look for (empty means all)
virtual ~MSMeanData_Harmonoise()
Destructor.
Noise data collector for edges/lanes.
MSLaneMeanDataValues(MSLane *const lane, const SUMOReal length, const bool doAdd, const std::set< std::string > *const vTypes=0, const MSMeanData_Harmonoise *parent=0)
Constructor.
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.
virtual void detectorUpdate(const SUMOTime step)
Updates the detector.
const SUMOReal myMinSamples
the minimum sample seconds
void addTo(MSMeanData::MeanDataValues &val) const
Add the values to this meanData.
virtual ~MSLaneMeanDataValues()
Destructor.
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const SUMOReal length, const bool doAdd) const
Create an instance of MeanDataValues.
virtual SUMOReal getAcceleration() const =0
Returns the vehicle's acceleration.
static SUMOReal sum(SUMOReal val)
Computes the resulting noise.
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.
bool vehicleApplies(const SUMOVehicle &veh) const
Tests whether the vehicles type is to be regarded.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
Representation of a lane in the micro simulation.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.