51 const double length,
const bool doAdd,
85 meanSpeedVehicleOnLane, a, veh.
getSlope()), timeOnLane);
91 const double ,
const double defaultTravelTime,
const int )
const {
122 }
else if (defaultTravelTime >= 0.) {
146 const bool useLanes,
const bool withEmpty,
147 const bool printDefaults,
148 const bool withInternal,
149 const bool trackVehicles,
150 const double maxTravelTime,
151 const double minSamples,
152 const std::string& vTypes)
153 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
154 withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) {
Data collector for edges/lanes.
static Emissions computeAll(const SUMOEmissionClass c, const double v, const double a, const double slope, const std::map< int, double > *param=0)
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fu...
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 double minSamples, const double maxTravelTime, const std::string &vTypes)
Constructor.
virtual double getSlope() const =0
Returns the slope of the road at vehicle's position.
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).
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
PollutantsInterface::Emissions myEmissions
Collected values.
static std::string realString(const double v, const int precision=gPrecision)
Helper method for string formatting.
MSLaneMeanDataValues(MSLane *const lane, const double length, const bool doAdd, const MSMeanData_Emissions *parent)
Constructor.
double getMinSamples() const
The car-following model and parameter.
const MSCFModel & getCarFollowModel() const
Returns the vehicle type's car following model definition (const version)
virtual double getAcceleration() const =0
Returns the vehicle's acceleration.
double travelledDistance
The sum of the distances the vehicles travelled.
Representation of a vehicle.
Data structure for mean (aggregated) edge/lane values.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const double length, const bool doAdd) const
Create an instance of MeanDataValues.
const double myLaneLength
The length of the lane / edge the data collector is on.
Emission data collector for edges/lanes.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.
MSVehicleType * getVType(const std::string &id=DEFAULT_VTYPE_ID, std::mt19937 *rng=0)
Returns the named vehicle type or a sample from the named distribution.
double getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
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.
const MSMeanData *const myParent
The meandata parent.
void notifyMoveInternal(const SUMOVehicle &veh, const double, const double timeOnLane, const double, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double)
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 ~MSLaneMeanDataValues()
Destructor.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
static double computeDefault(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const double tt, const std::map< int, double > *param=0)
Returns the amount of emitted pollutant given the vehicle type and default values for the state (in m...
Representation of a lane in the micro simulation.
void addScaled(const Emissions &a, const double scale=1.)
Add the values of the other struct to this one, scaling the values if needed.
Data structure for mean (aggregated) edge/lane values.
double getMaxTravelTime() const