![]() |
SUMO - Simulation of Urban MObility
|
abstract superclass for the model helpers More...
#include <PollutantsInterface.h>
Public Member Functions | |
void | addAllClassesInto (std::vector< SUMOEmissionClass > &list) const |
Add all known emission classes of this model to the given container. More... | |
virtual double | compute (const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const std::map< int, double > *param) const =0 |
Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fuel) 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 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... | |
Helper (std::string name) | |
Constructor, intializes the name. 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 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... | |
Protected Attributes | |
StringBijection< SUMOEmissionClass > | myEmissionClassStrings |
Mapping between emission class names and integer representations. More... | |
const std::string | myName |
the name of the model More... | |
Private Member Functions | |
Helper & | operator= (const Helper &) |
abstract superclass for the model helpers
Definition at line 105 of file PollutantsInterface.h.
|
inline |
Constructor, intializes the name.
[in] | name | the name of the model (string before the '/' in the emission class attribute) |
Definition at line 110 of file PollutantsInterface.h.
|
inline |
Add all known emission classes of this model to the given container.
[in] | list | the vector to add to |
Definition at line 247 of file PollutantsInterface.h.
Referenced by PollutantsInterface::getAllClasses().
|
pure virtual |
Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fuel)
[in] | c | The vehicle emission class |
[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] |
Implemented in HelpersPHEMlight, HelpersHBEFA3, HelpersHBEFA, and HelpersEnergy.
Referenced by PollutantsInterface::compute(), PollutantsInterface::computeAll(), and PollutantsInterface::computeDefault().
|
inlinevirtual |
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 HelpersPHEMlight, and HelpersHBEFA3.
Definition at line 182 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getAmitranVehicleClass().
|
inlinevirtual |
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 HelpersPHEMlight, and HelpersHBEFA3.
Definition at line 168 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getClass().
|
inlinevirtual |
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 128 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getClassByName().
|
inline |
Returns the complete name of the emission class including the model.
[in] | c | the emission class |
Definition at line 142 of file PollutantsInterface.h.
Referenced by PollutantsInterface::getName().
|
inlinevirtual |
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 HelpersPHEMlight, and HelpersHBEFA3.
Definition at line 202 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getEuroClass().
|
inlinevirtual |
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 HelpersPHEMlight, and HelpersHBEFA3.
Definition at line 192 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getFuel().
|
inlinevirtual |
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 237 of file PollutantsInterface.h.
References UNUSED_PARAMETER.
Referenced by PollutantsInterface::getModifiedAccel().
|
inline |
Returns the name of the model.
Definition at line 115 of file PollutantsInterface.h.
|
inlinevirtual |
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 213 of file PollutantsInterface.h.
References PollutantsInterface::compute(), and UNUSED_PARAMETER.
Referenced by PollutantsInterface::getWeight().
|
inlinevirtual |
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 151 of file PollutantsInterface.h.
References PollutantsInterface::HEAVY_BIT.
Referenced by PollutantsInterface::isSilent().
|
protected |
Mapping between emission class names and integer representations.
Definition at line 257 of file PollutantsInterface.h.
Referenced by HelpersHBEFA3::getAmitranVehicleClass(), HelpersPHEMlight::getAmitranVehicleClass(), HelpersHBEFA3::getClass(), HelpersPHEMlight::getClass(), HelpersPHEMlight::getClassByName(), HelpersHBEFA3::getEuroClass(), HelpersPHEMlight::getEuroClass(), HelpersHBEFA3::getFuel(), HelpersPHEMlight::getFuel(), HelpersPHEMlight::getWeight(), HelpersEnergy::HelpersEnergy(), HelpersHBEFA::HelpersHBEFA(), HelpersHBEFA3::HelpersHBEFA3(), and HelpersPHEMlight::HelpersPHEMlight().
|
protected |
the name of the model
Definition at line 254 of file PollutantsInterface.h.