51 currentTimeN(0), meanNTemp(0), myParent(parent) {}
96 const double ,
const double defaultTravelTime,
const int )
const {
104 }
else if (defaultTravelTime >= 0.) {
106 dev.
writeAttr(
"traveltime", defaultTravelTime);
118 const bool useLanes,
const bool withEmpty,
119 const bool printDefaults,
const bool withInternal,
120 const bool trackVehicles,
121 const double maxTravelTime,
const double minSamples,
122 const std::string& vTypes)
123 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
124 withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) {
140 for (std::vector<std::vector<MeanDataValues*> >::const_iterator i =
myMeasures.begin(); i !=
myMeasures.end(); ++i) {
141 const std::vector<MeanDataValues*>& lm = *i;
142 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
std::vector< std::vector< MeanDataValues * > > myMeasures
Value collectors; sorted by edge, then by lane.
const double myMaxTravelTime
the maximum travel time to write
void reset(bool afterWrite=false)
Resets values so they may be used for the next interval.
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.
static double computeNoise(SUMOEmissionClass c, double v, double a)
Returns the noise produced by the a vehicle of the given type at the given speed. ...
virtual ~MSMeanData_Harmonoise()
Destructor.
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 double minSamples, const double maxTravelTime, const std::string &vTypes)
Constructor.
Noise data collector for edges/lanes.
MSLaneMeanDataValues(MSLane *const lane, const double length, const bool doAdd, const MSMeanData_Harmonoise *parent)
Constructor.
void update()
Computes the noise in the last time step.
double travelledDistance
The sum of the distances the vehicles travelled.
Representation of a vehicle.
Data structure for mean (aggregated) edge/lane values.
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const double length, const bool doAdd) const
Create an instance of MeanDataValues.
Data structure for mean (aggregated) edge/lane values.
void notifyMoveInternal(const SUMOVehicle &veh, const double, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double)
Internal notification about the vehicle moves.
virtual void detectorUpdate(const SUMOTime step)
Updates the detector.
const double myLaneLength
The length of the lane / edge the data collector is on.
const double myMinSamples
the minimum sample seconds
virtual ~MSLaneMeanDataValues()
Destructor.
double meanNTemp
Sum of produced noise over time (pow(10, (<NOISE>/10.)))
void addTo(MSMeanData::MeanDataValues &val) const
Add the values to this meanData.
double currentTimeN
Sum of produced noise at this time step(pow(10, (<NOISE>/10.)))
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.
static double sum(double val)
Computes the resulting noise.
Representation of a lane in the micro simulation.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
virtual double getAcceleration() const =0
Returns the vehicle's acceleration.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.