42 #ifdef CHECK_MEMORY_LEAKS 44 #endif // CHECK_MEMORY_LEAKS 54 const SUMOReal length,
const bool doAdd,
55 const std::set<std::string>*
const vTypes,
58 myEmissions(), myParent(parent) {}
121 }
else if (defaultTravelTime >= 0.) {
144 const bool useLanes,
const bool withEmpty,
145 const bool printDefaults,
146 const bool withInternal,
147 const bool trackVehicles,
150 const std::set<std::string> vTypes)
151 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
152 withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) {
Data collector for edges/lanes.
const SUMOReal myLaneLength
The length of the lane / edge the data collector is on.
SUMOReal getMaxSpeed() const
Get vehicle's maximum speed [m/s].
void addScaled(const Emissions &a, const SUMOReal scale=1.)
Add the values of the other struct to this one, scaling the values if needed.
MSMeanData_Emissions(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.
static Emissions computeAll(const SUMOEmissionClass c, const double v, const double a, const double slope)
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fu...
SUMOReal travelledDistance
The sum of the distances the vehicles travelled.
const SUMOReal myMaxTravelTime
the maximum travel time to write
void reset(bool afterWrite=false)
Resets values so they may be used for the next interval.
Storage for collected values of all emission types.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
const std::set< std::string > myVehicleTypes
The vehicle types to look for (empty means all)
PollutantsInterface::Emissions myEmissions
Collected values.
The car-following model and parameter.
const MSCFModel & getCarFollowModel() const
Returns the vehicle type's car following model definition (const version)
Representation of a vehicle.
Data structure for mean (aggregated) edge/lane values.
static SUMOReal computeDefault(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const SUMOReal tt)
Returns the amount of emitted pollutant given the vehicle type and default values for the state (in m...
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
const MSMeanData_Emissions * myParent
The meandata parent.
Emission data collector for edges/lanes.
const SUMOReal myMinSamples
the minimum sample seconds
SUMOReal getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
virtual SUMOReal getAcceleration() const =0
Returns the vehicle's acceleration.
static std::string realString(const SUMOReal v, const int precision=OUTPUT_ACCURACY)
Helper method for string formatting.
void notifyMoveInternal(SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed)
Internal notification about the vehicle moves.
void addTo(MSMeanData::MeanDataValues &val) const
Add the values of this to the given one and store them there.
virtual ~MSMeanData_Emissions()
Destructor.
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
virtual SUMOReal getSlope() const =0
Returns the slope of the road at vehicle's position.
virtual ~MSLaneMeanDataValues()
Destructor.
MSLaneMeanDataValues(MSLane *const lane, const SUMOReal length, const bool doAdd, const std::set< std::string > *const vTypes=0, const MSMeanData_Emissions *parent=0)
Constructor.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
MSVehicleType * getVType(const std::string &id=DEFAULT_VTYPE_ID, MTRand *rng=0)
Returns the named vehicle type or a sample from the named distribution.
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const SUMOReal length, const bool doAdd) const
Create an instance of MeanDataValues.
Representation of a lane in the micro simulation.
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.
Data structure for mean (aggregated) edge/lane values.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.