SUMO - Simulation of Urban MObility
|
Helper methods for HBEFA-based emission computation. More...
#include <HelpersHBEFA.h>
Public Member Functions | |
void | addAllClassesInto (std::vector< SUMOEmissionClass > &list) const |
Add all known emission classes of this model to the given container. More... | |
SUMOReal | compute (const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope) const |
Computes the emitted pollutant amount using the given speed and acceleration. More... | |
virtual SUMOEmissionClass | getClassByName (const std::string &eClass, const SUMOVehicleClass vc) |
Returns the emission class associated with the given name, aliases are possible If this method is asked for the "unknown" class it should return the default (possibly depending on the given vehicle class). The class name is case insensitive. More... | |
const std::string | getClassName (const SUMOEmissionClass c) const |
Returns the complete name of the emission class including the model. More... | |
virtual SUMOReal | getMaxAccel (SUMOEmissionClass c, double v, double a, double slope) const |
Returns the maximum possible acceleration or -1. if the model cannot determine the maximum acceleration. Default implementation returns always -1. More... | |
const std::string & | getName () const |
Returns the name of the model. More... | |
HelpersHBEFA () | |
Constructor (initializes myEmissionClassStrings) More... | |
virtual bool | isSilent (const SUMOEmissionClass c) |
Returns whether the class denotes a silent vehicle for interfacing with the noise model. By default the first class in each model is the silent class. More... | |
Methods for Amitran interfaces | |
virtual SUMOEmissionClass | getClass (const SUMOEmissionClass base, const std::string &vClass, const std::string &fuel, const std::string &eClass, const double weight) const |
Returns the emission class described by the given parameters. The base is used to determine the model to use and as default return values. Default implementation returns always base. More... | |
virtual std::string | getAmitranVehicleClass (const SUMOEmissionClass c) const |
Returns the vehicle class described by this emission class as described in the Amitran interface (Passenger, ...) Default implementation returns always "Passenger". More... | |
virtual std::string | getFuel (const SUMOEmissionClass c) const |
Returns the fuel type described by this emission class as described in the Amitran interface (Gasoline, Diesel, ...) Default implementation returns always "Gasoline". More... | |
virtual int | getEuroClass (const SUMOEmissionClass c) const |
Returns the Euro emission class described by this emission class as described in the Amitran interface (0, ..., 6) Default implementation returns always 0. More... | |
virtual SUMOReal | getWeight (const SUMOEmissionClass c) const |
Returns a reference weight in kg described by this emission class as described in the Amitran interface It might return -1, if the weight is not important to distinguish different emission classes. Default implementation returns always -1. More... | |
Protected Attributes | |
StringBijection < SUMOEmissionClass > | myEmissionClassStrings |
Mapping between emission class names and integer representations. More... | |
const std::string | myName |
the name of the model More... | |
Static Private Attributes | |
static double | myFunctionParameter [42][36] |
The function parameter. More... | |
Helper methods for HBEFA-based emission computation.
The parameter are stored per vehicle class; 6*6 parameter are used, sorted by the pollutant (CO2, CO, HC, fuel, NOx, PMx), and the function part (c0, cav1, cav2, c1, c2, c3).
Definition at line 54 of file HelpersHBEFA.h.
HelpersHBEFA::HelpersHBEFA | ( | ) |
Constructor (initializes myEmissionClassStrings)
Definition at line 147 of file HelpersHBEFA.cpp.
References PollutantsInterface::HEAVY_BIT, PollutantsInterface::Helper::myEmissionClassStrings, toString(), and PollutantsInterface::ZERO_EMISSIONS.
|
inlineinherited |
Add all known emission classes of this model to the given container.
[in] | list | the vector to add to |
Definition at line 251 of file PollutantsInterface.h.
References PollutantsInterface::Helper::myEmissionClassStrings.
Referenced by PollutantsInterface::getAllClasses().
|
inlinevirtual |
Computes the emitted pollutant amount using the given speed and acceleration.
As the functions are defining emissions in g/hour, the function's result is normed by 3.6 (seconds in an hour/1000) yielding mg/s. For fuel ml/s is returned. Negative acceleration results directly in zero emission.
[in] | c | emission class for the function parameters to use |
[in] | e | the type of emission (CO, CO2, ...) |
[in] | v | The vehicle's current velocity |
[in] | a | The vehicle's current acceleration |
[in] | slope | The road's slope at vehicle's position [°] |
Implements PollutantsInterface::Helper.
Definition at line 74 of file HelpersHBEFA.h.
References PollutantsInterface::FUEL, M_PI, MAX2(), myFunctionParameter, SUMOReal, UNUSED_PARAMETER, and PollutantsInterface::ZERO_EMISSIONS.
|
inlinevirtualinherited |
Returns the vehicle class described by this emission class as described in the Amitran interface (Passenger, ...) Default implementation returns always "Passenger".
[in] | c | the emission class |
Reimplemented in HelpersHBEFA3, and HelpersPHEMlight.
Definition at line 185 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getAmitranVehicleClass().
|
inlinevirtualinherited |
Returns the emission class described by the given parameters. The base is used to determine the model to use and as default return values. Default implementation returns always base.
[in] | base | the base class giving the model and the default |
[in] | vClass | the vehicle class as described in the Amitran interface (Passenger, ...) |
[in] | fuel | the fuel type as described in the Amitran interface (Gasoline, Diesel, ...) |
[in] | eClass | the emission class as described in the Amitran interface (Euro0, ...) |
[in] | weight | the vehicle weight in kg as described in the Amitran interface |
Reimplemented in HelpersHBEFA3, and HelpersPHEMlight.
Definition at line 171 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getClass().
|
inlinevirtualinherited |
Returns the emission class associated with the given name, aliases are possible If this method is asked for the "unknown" class it should return the default (possibly depending on the given vehicle class). The class name is case insensitive.
[in] | eClass | the name of the emission class (string after the '/' in the emission class attribute) |
[in] | vc | the vehicle class to use when determining default class |
Reimplemented in HelpersPHEMlight.
Definition at line 131 of file PollutantsInterface.h.
References PollutantsInterface::Helper::myEmissionClassStrings, and UNUSED_PARAMETER.
Referenced by PollutantsInterface::getClassByName().
|
inlineinherited |
Returns the complete name of the emission class including the model.
[in] | c | the emission class |
Definition at line 145 of file PollutantsInterface.h.
References PollutantsInterface::Helper::myEmissionClassStrings, and PollutantsInterface::Helper::myName.
Referenced by PollutantsInterface::getName().
|
inlinevirtualinherited |
Returns the Euro emission class described by this emission class as described in the Amitran interface (0, ..., 6) Default implementation returns always 0.
[in] | c | the emission class |
Reimplemented in HelpersHBEFA3, and HelpersPHEMlight.
Definition at line 205 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getEuroClass().
|
inlinevirtualinherited |
Returns the fuel type described by this emission class as described in the Amitran interface (Gasoline, Diesel, ...) Default implementation returns always "Gasoline".
[in] | c | the emission class |
Reimplemented in HelpersHBEFA3, and HelpersPHEMlight.
Definition at line 195 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getFuel().
|
inlinevirtualinherited |
Returns the maximum possible acceleration or -1. if the model cannot determine the maximum acceleration. Default implementation returns always -1.
[in] | c | The vehicle emission class |
[in] | v | The vehicle's current velocity |
[in] | a | The vehicle's current acceleration |
[in] | slope | The road's slope at vehicle's position [°] |
Definition at line 240 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getMaxAccel().
|
inlineinherited |
Returns the name of the model.
Definition at line 118 of file PollutantsInterface.h.
References PollutantsInterface::Helper::myName.
|
inlinevirtualinherited |
Returns a reference weight in kg described by this emission class as described in the Amitran interface It might return -1, if the weight is not important to distinguish different emission classes. Default implementation returns always -1.
[in] | c | the emission class |
Reimplemented in HelpersPHEMlight.
Definition at line 216 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getWeight().
|
inlinevirtualinherited |
Returns whether the class denotes a silent vehicle for interfacing with the noise model. By default the first class in each model is the silent class.
[in] | c | the emission class |
Definition at line 154 of file PollutantsInterface.h.
References PollutantsInterface::HEAVY_BIT.
Referenced by PollutantsInterface::isSilent().
|
protectedinherited |
Mapping between emission class names and integer representations.
Definition at line 261 of file PollutantsInterface.h.
Referenced by PollutantsInterface::Helper::addAllClassesInto(), HelpersHBEFA3::getAmitranVehicleClass(), HelpersPHEMlight::getAmitranVehicleClass(), HelpersPHEMlight::getClass(), HelpersHBEFA3::getClass(), HelpersPHEMlight::getClassByName(), PollutantsInterface::Helper::getClassByName(), PollutantsInterface::Helper::getClassName(), HelpersHBEFA3::getEuroClass(), HelpersPHEMlight::getEuroClass(), HelpersHBEFA3::getFuel(), HelpersPHEMlight::getFuel(), HelpersPHEMlight::getWeight(), HelpersHBEFA(), HelpersHBEFA3::HelpersHBEFA3(), and HelpersPHEMlight::HelpersPHEMlight().
|
staticprivate |
|
protectedinherited |
the name of the model
Definition at line 258 of file PollutantsInterface.h.
Referenced by PollutantsInterface::Helper::getClassName(), and PollutantsInterface::Helper::getName().