47 const bool scaled = oc.
getBool(
"emission-output.step-scaled");
48 const bool useGeo = oc.
getBool(
"emission-output.geo");
49 if ((period > 0 && (timestep - begin) % period != 0) || timestep < begin) {
62 fclass = fclass.substr(0, fclass.find_first_of(
"@"));
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
std::bitset< 96 > SumoXMLAttrMask
@ SUMO_ATTR_NOISE
MSMeanData_Harmonoise.
int gPrecision
the precision for floating point outputs
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
static double naviDegree(const double angle)
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.
A vehicle from the mesoscopic point of view.
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
A device which collects vehicular emissions.
static SumoXMLAttrMask getWrittenAttributes()
static void write(OutputDevice &of, SUMOTime timestep, int precision)
Writes the complete network state of the given edges into the given device.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
The class responsible for building and deletion of vehicles.
std::map< std::string, SUMOVehicle * >::const_iterator constVehIt
Definition of the internal vehicles map iterator.
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
Representation of a vehicle in the micro simulation.
const MSLane * getLane() const
Returns the lane the vehicle is on.
const std::string & getID() const
Returns the name of the vehicle type.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
const std::string & getID() const
Returns the id.
A storage for options typed value containers)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
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, long long int attributeMask)
writes a named attribute unless filtered
static std::string getName(const SUMOEmissionClass c)
Checks whether the string describes a known vehicle class.
static Emissions computeAll(const SUMOEmissionClass c, const double v, const double a, const double slope, const EnergyParams *param)
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fu...
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
double z() const
Returns the z-position.
double y() const
Returns the y-position.
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.
virtual MSDevice * getDevice(const std::type_info &type) const =0
Returns a device of the given type if it exists or nullptr if not.
virtual double getSpeed() const =0
Returns the object's current speed.
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
virtual const MSEdge * getEdge() const =0
Returns the edge the object is currently at.
virtual double getPositionOnLane() const =0
Get the object's position along the lane.
Representation of a vehicle.
virtual bool isOnRoad() const =0
Returns the information whether the vehicle is on a road (is simulated)
virtual bool isIdling() const =0
Returns whether the vehicle is idling (waiting to re-enter the net.
virtual EnergyParams * getEmissionParameters() const =0
Returns the vehicle's emission model parameter.
virtual double getAngle() const =0
Get the vehicle's angle.
virtual const MSRoute & getRoute() const =0
Returns the current route.
Storage for collected values of all emission types.
void addScaled(const Emissions &a, const double scale=1.)
Add the values of the other struct to this one, scaling the values if needed.