89 const int ,
const double ,
const double defaultTravelTime,
const int )
const {
93 double traveltime =
myParent->myMaxTravelTime;
98 }
else if (defaultTravelTime >= 0.) {
112 const bool useLanes,
const std::string& excludeEmpty,
const bool withInternal,
113 const bool trackVehicles,
114 const double maxTravelTime,
const double minSamples,
115 const std::string& vTypes,
116 const std::string& writeAttributes,
117 const std::vector<MSEdge*>& edges,
119 MSMeanData(id, dumpBegin, dumpEnd, useLanes, excludeEmpty,
120 withInternal, trackVehicles, 0, maxTravelTime, minSamples, vTypes, writeAttributes, edges, aggregate) {
136 for (std::vector<std::vector<MeanDataValues*> >::const_iterator i =
myMeasures.begin(); i !=
myMeasures.end(); ++i) {
137 const std::vector<MeanDataValues*>& lm = *i;
138 for (std::vector<MeanDataValues*>::const_iterator j = lm.begin(); j != lm.end(); ++j) {
std::bitset< 96 > SumoXMLAttrMask
AggregateType
Numbers representing special SUMO-XML-attribute values Information on edgeData/laneData output should...
@ SUMO_ATTR_NOISE
MSMeanData_Harmonoise.
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.
Representation of a lane in the micro simulation.
Data structure for mean (aggregated) edge/lane values.
MeanDataValues(MSLane *const lane, const double length, const bool doAdd, const MSMeanData *const parent)
Constructor.
double travelledDistance
The sum of the distances the vehicles travelled.
const double myLaneLength
The length of the lane / edge the data collector is on.
SUMOTime resetTime
time at which collection was reset;
Data structure for mean (aggregated) edge/lane values.
void notifyMoveInternal(const SUMOTrafficObject &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.
void reset(bool afterWrite=false)
Resets values so they may be used for the next interval.
MSLaneMeanDataValues(MSLane *const lane, const double length, const bool doAdd, const MSMeanData_Harmonoise *parent)
Constructor.
virtual ~MSLaneMeanDataValues()
Destructor.
double currentTimeN
Sum of produced noise at this time step(pow(10, (<NOISE>/10.))).
double meanNTemp
Sum of produced noise over time (pow(10, (<NOISE>/10.))).
void update()
Computes the noise in the last time step.
void addTo(MSMeanData::MeanDataValues &val) const
Add the values to this meanData.
void write(OutputDevice &dev, const SumoXMLAttrMask &attributeMask, const SUMOTime period, const int numLanes, const double speedLimit, const double defaultTravelTime, const int numVehicles=-1) const
Writes output values into the given stream.
const MSMeanData_Harmonoise * myParent
The meandata parent.
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const double length, const bool doAdd) const
Create an instance of MeanDataValues.
MSMeanData_Harmonoise(const std::string &id, const SUMOTime dumpBegin, const SUMOTime dumpEnd, const bool useLanes, const std::string &excludeEmpty, const bool withInternal, const bool trackVehicles, const double minSamples, const double maxTravelTime, const std::string &vTypes, const std::string &writeAttributes, const std::vector< MSEdge * > &edges, AggregateType aggregate)
Constructor.
virtual void detectorUpdate(const SUMOTime step)
Updates the detector.
virtual ~MSMeanData_Harmonoise()
Destructor.
virtual void detectorUpdate(const SUMOTime step)
Updates the detector.
MSMeanData(const std::string &id, const SUMOTime dumpBegin, const SUMOTime dumpEnd, const bool useLanes, const std::string &excludeEmpty, const bool withInternal, const bool trackVehicles, const int detectPersons, const double minSamples, const double maxTravelTime, const std::string &vTypes, const std::string &writeAttributes, const std::vector< MSEdge * > &edges, AggregateType aggregate)
Constructor.
std::vector< std::vector< MeanDataValues * > > myMeasures
Value collectors; sorted by edge, then by lane.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
Static storage of an output device and its base (abstract) implementation.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
OutputDevice & writeOptionalAttr(const SumoXMLAttr attr, const T &val, const SumoXMLAttrMask &attributeMask, const bool isNull=false)
writes a named attribute unless filtered
Representation of a vehicle, person, or container.
virtual double getAcceleration() const =0
Returns the object's acceleration.
virtual const MSVehicleType & getVehicleType() const =0
Returns the object's "vehicle" type.