42 #ifdef CHECK_MEMORY_LEAKS 44 #endif // CHECK_MEMORY_LEAKS 54 const SUMOReal length,
const bool doAdd,
88 meanSpeedVehicleOnLane, a, veh.
getSlope()), timeOnLane);
125 }
else if (defaultTravelTime >= 0.) {
149 const bool useLanes,
const bool withEmpty,
150 const bool printDefaults,
151 const bool withInternal,
152 const bool trackVehicles,
155 const std::string& vTypes)
156 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
157 withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) {
Data collector for edges/lanes.
const SUMOReal myLaneLength
The length of the lane / edge the data collector is on.
void addScaled(const Emissions &a, const SUMOReal scale=1.)
Add the values of the other struct to this one, scaling the values if needed.
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.
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.
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).
PollutantsInterface::Emissions myEmissions
Collected values.
MSLaneMeanDataValues(MSLane *const lane, const SUMOReal length, const bool doAdd, const MSMeanData_Emissions *parent)
Constructor.
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.
SUMOReal getMaxTravelTime() const
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.
void addTo(MSMeanData::MeanDataValues &val) const
Add the values of this to the given one and store them there.
SUMOReal getMinSamples() const
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const SUMOReal length, const bool doAdd) const
Create an instance of MeanDataValues.
SUMOReal getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
Emission data collector for edges/lanes.
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::string &vTypes)
Constructor.
const MSMeanData *const myParent
The meandata parent.
virtual SUMOReal getAcceleration() const =0
Returns the vehicle's acceleration.
SUMOReal getMaxSpeed() const
Get vehicle's maximum speed [m/s].
static std::string realString(const SUMOReal v, const int precision=OUTPUT_ACCURACY)
Helper method for string formatting.
virtual ~MSMeanData_Emissions()
Destructor.
void notifyMoveInternal(const SUMOVehicle &veh, const SUMOReal, const SUMOReal timeOnLane, const SUMOReal, const SUMOReal meanSpeedVehicleOnLane, const SUMOReal travelledDistanceFrontOnLane, const SUMOReal travelledDistanceVehicleOnLane)
Internal notification about the vehicle moves.
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.
MSVehicleType * getVType(const std::string &id=DEFAULT_VTYPE_ID, MTRand *rng=0)
Returns the named vehicle type or a sample from the named distribution.
Representation of a lane in the micro simulation.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
Data structure for mean (aggregated) edge/lane values.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.