42 const double length,
const bool doAdd,
81 meanSpeedFrontOnLane, a, veh.
getSlope(),
99 const int ,
const double ,
const double defaultTravelTime,
const int )
const {
109 if (attributeMask == 0) {
122 double traveltime =
myParent->getMaxTravelTime();
127 if (attributeMask == 0) {
140 }
else if (defaultTravelTime >= 0.) {
144 if (attributeMask == 0) {
170 const bool useLanes,
const bool withEmpty,
171 const bool printDefaults,
172 const bool withInternal,
173 const bool trackVehicles,
174 const double maxTravelTime,
175 const double minSamples,
176 const std::string& vTypes,
177 const std::string& writeAttributes,
178 const std::vector<MSEdge*>& edges,
180 MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
181 withInternal, trackVehicles, 0, maxTravelTime, minSamples, vTypes, writeAttributes, edges, aggregate)
std::bitset< 96 > SumoXMLAttrMask
@ SUMO_ATTR_ELECTRICITY_ABS
@ SUMO_ATTR_ELECTRICITY_PERVEH
@ SUMO_ATTR_CO_ABS
MSMeanData_Emissions.
@ SUMO_ATTR_ELECTRICITY_NORMED
int gPrecision
the precision for floating point outputs
double getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
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;
const MSMeanData *const myParent
The meandata parent.
Data structure for mean (aggregated) edge/lane values.
MSLaneMeanDataValues(MSLane *const lane, const double length, const bool doAdd, const MSMeanData_Emissions *parent)
Constructor.
bool notifyIdle(SUMOTrafficObject &veh)
Computes idling emission values and adds them to the aggregate emission sums.
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.
PollutantsInterface::Emissions myEmissions
Collected values.
void reset(bool afterWrite=false)
Resets values so they may be used for the next interval.
virtual ~MSLaneMeanDataValues()
Destructor.
void addTo(MSMeanData::MeanDataValues &val) const
Add the values of this to the given one and store them there.
void notifyMoveInternal(const SUMOTrafficObject &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.
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const double length, const bool doAdd) const
Create an instance of MeanDataValues.
virtual ~MSMeanData_Emissions()
Destructor.
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, const std::string &writeAttributes, const std::vector< MSEdge * > &edges, bool aggregate)
Constructor.
MSMeanData(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 int detectPersons, const double minSamples, const double maxTravelTime, const std::string &vTypes, const std::string &writeAttributes, const std::vector< MSEdge * > &edges, bool aggregate)
Constructor.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
MSVehicleType * getVType(const std::string &id=DEFAULT_VTYPE_ID, SumoRNG *rng=nullptr, bool readOnly=false)
Returns the named vehicle type or a sample from the named distribution.
The car-following model and parameter.
const EnergyParams * getEmissionParameters() const
retrieve parameters for the energy consumption model
double getMaxSpeed() const
Get vehicle's (technical) maximum speed [m/s].
const MSCFModel & getCarFollowModel() const
Returns the vehicle type's car following model definition (const version).
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writePadding(const std::string &val)
writes padding (ignored for binary output)
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
void setPrecision(int precision=gPrecision)
Sets the precision or resets it to default.
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 bool isVehicle() const
Whether it is a vehicle.
virtual double getAcceleration() const =0
Returns the object's acceleration.
virtual const MSVehicleType & getVehicleType() const =0
Returns the object's "vehicle" type.
virtual double getSlope() const =0
Returns the slope of the road at object's position in degrees.
Representation of a vehicle.
virtual EnergyParams * getEmissionParameters() const =0
Returns the vehicle's emission model parameter.