![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Helper methods for HBEFA3-based emission computation. More...
#include <HelpersHBEFA3.h>
Public Member Functions | |
void | addAllClassesInto (std::vector< SUMOEmissionClass > &list) const |
Add all known emission classes of this model to the given container. More... | |
double | compute (const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope, const std::map< int, double > *param) const |
Computes the emitted pollutant amount using the given speed and acceleration. More... | |
std::string | getAmitranVehicleClass (const SUMOEmissionClass c) const |
Returns the vehicle class described by this emission class as described in the Amitran interface (Passenger, ...) More... | |
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. 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... | |
int | getEuroClass (const SUMOEmissionClass c) const |
Returns the Euro emission class described by this emission class as described in the Amitran interface (0, ..., 6) More... | |
std::string | getFuel (const SUMOEmissionClass c) const |
Returns the fuel type described by this emission class as described in the Amitran interface (Gasoline, Diesel, ...) More... | |
virtual double | getModifiedAccel (const SUMOEmissionClass c, const double v, const double a, const double slope) const |
Returns the adapted acceleration value, useful for comparing with external PHEMlight references. Default implementation returns always the input accel. More... | |
const std::string & | getName () const |
Returns the name of the model. More... | |
HelpersHBEFA3 () | |
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 double | 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... | |
Static Public Attributes | |
static const int | HBEFA3_BASE = 1 << 16 |
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 [45][6][6] |
The function parameter. More... | |
Helper methods for HBEFA3-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 47 of file HelpersHBEFA3.h.
HelpersHBEFA3::HelpersHBEFA3 | ( | ) |
Constructor (initializes myEmissionClassStrings)
Definition at line 448 of file HelpersHBEFA3.cpp.
References StringBijection< T >::addAlias(), StringBijection< T >::get(), HBEFA3_BASE, PollutantsInterface::HEAVY_BIT, StringBijection< T >::insert(), and PollutantsInterface::Helper::myEmissionClassStrings.
|
inlineinherited |
Add all known emission classes of this model to the given container.
[in] | list | the vector to add to |
Definition at line 245 of file PollutantsInterface.h.
Referenced by PollutantsInterface::getAllClasses(), and PollutantsInterface::getAllClassesStr().
|
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 [deg] |
Implements PollutantsInterface::Helper.
Definition at line 101 of file HelpersHBEFA3.h.
References PollutantsInterface::ELEC, PollutantsInterface::FUEL, getFuel(), MAX2(), myFunctionParameter, and UNUSED_PARAMETER.
|
virtual |
Returns the vehicle class described by this emission class as described in the Amitran interface (Passenger, ...)
[in] | c | the emission class |
Reimplemented from PollutantsInterface::Helper.
Definition at line 517 of file HelpersHBEFA3.cpp.
References StringBijection< T >::getString(), and PollutantsInterface::Helper::myEmissionClassStrings.
|
virtual |
Returns the emission class described by the given parameters.
[in] | base | the base class giving 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 from PollutantsInterface::Helper.
Definition at line 474 of file HelpersHBEFA3.cpp.
References StringBijection< T >::get(), StringBijection< T >::hasString(), and PollutantsInterface::Helper::myEmissionClassStrings.
|
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 126 of file PollutantsInterface.h.
References 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 140 of file PollutantsInterface.h.
Referenced by PollutantsInterface::getName().
|
virtual |
Returns the Euro emission class described by this emission class as described in the Amitran interface (0, ..., 6)
[in] | c | the emission class |
Reimplemented from PollutantsInterface::Helper.
Definition at line 544 of file HelpersHBEFA3.cpp.
References StringBijection< T >::getString(), and PollutantsInterface::Helper::myEmissionClassStrings.
|
virtual |
Returns the fuel type described by this emission class as described in the Amitran interface (Gasoline, Diesel, ...)
[in] | c | the emission class |
Reimplemented from PollutantsInterface::Helper.
Definition at line 533 of file HelpersHBEFA3.cpp.
References StringBijection< T >::getString(), and PollutantsInterface::Helper::myEmissionClassStrings.
Referenced by compute().
|
inlinevirtualinherited |
Returns the adapted acceleration value, useful for comparing with external PHEMlight references. Default implementation returns always the input accel.
[in] | c | the emission class |
[in] | v | the speed value |
[in] | a | the acceleration value |
[in] | slope | The road's slope at vehicle's position [deg] |
Reimplemented in HelpersPHEMlight.
Definition at line 235 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getModifiedAccel().
|
inlineinherited |
Returns the name of the model.
Definition at line 113 of file PollutantsInterface.h.
|
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 211 of file PollutantsInterface.h.
References PollutantsInterface::compute(), and 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 149 of file PollutantsInterface.h.
References PollutantsInterface::HEAVY_BIT.
Referenced by PollutantsInterface::isSilent().
|
static |
Definition at line 51 of file HelpersHBEFA3.h.
Referenced by HelpersHBEFA3().
|
protectedinherited |
Mapping between emission class names and integer representations.
Definition at line 254 of file PollutantsInterface.h.
Referenced by getAmitranVehicleClass(), HelpersPHEMlight::getAmitranVehicleClass(), getClass(), HelpersPHEMlight::getClass(), HelpersPHEMlight::getClassByName(), getEuroClass(), HelpersPHEMlight::getEuroClass(), getFuel(), HelpersPHEMlight::getFuel(), HelpersPHEMlight::getWeight(), HelpersEnergy::HelpersEnergy(), HelpersHBEFA::HelpersHBEFA(), HelpersHBEFA3(), and HelpersPHEMlight::HelpersPHEMlight().
|
staticprivate |
|
protectedinherited |
the name of the model
Definition at line 251 of file PollutantsInterface.h.