![]() |
SUMO - Simulation of Urban MObility
|
Helper methods for PHEMlight-based emission computation. More...
#include <HelpersPHEMlight.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 |
Returns the amount of emitted pollutant given the vehicle type and state (in mg/s or in ml/s for fuel) 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... | |
SUMOEmissionClass | getClassByName (const std::string &eClass, const SUMOVehicleClass vc) |
Checks whether the string describes a known vehicle class. 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... | |
SUMOReal | getMaxAccel (SUMOEmissionClass c, double v, double a, double slope) const |
Returns the maximum possible acceleration. More... | |
const std::string & | getName () const |
Returns the name of the model. More... | |
SUMOReal | getWeight (const SUMOEmissionClass c) const |
Returns a reference weight in kg described by this emission class as described in the Amitran interface This implementation returns only meaningful values for Solo_LKW (truck without trailer) and LNF (light duty vehicles). More... | |
HelpersPHEMlight () | |
Constructor. 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... | |
Static Public Attributes | |
static const int | PHEMLIGHT_BASE = 2 << 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... | |
Private Attributes | |
int | myIndex |
the index of the next class More... | |
Helper methods for PHEMlight-based emission computation.
Definition at line 49 of file HelpersPHEMlight.h.
HelpersPHEMlight::HelpersPHEMlight | ( | ) |
Constructor.
Definition at line 47 of file HelpersPHEMlight.cpp.
References StringBijection< T >::insert(), PollutantsInterface::Helper::myEmissionClassStrings, and myIndex.
|
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.
Referenced by PollutantsInterface::getAllClasses().
|
virtual |
Returns the amount of emitted pollutant given the vehicle type and state (in mg/s or in ml/s for fuel)
[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 [°] |
Implements PollutantsInterface::Helper.
Definition at line 234 of file HelpersPHEMlight.cpp.
References PHEMCEP::CalcPower(), PollutantsInterface::CO, PollutantsInterface::CO2, PollutantsInterface::FUEL, PHEMCEPHandler::GetCep(), PHEMCEP::GetDecelCoast(), PHEMCEP::GetEmission(), PHEMCEPHandler::getHandlerInstance(), PHEMCEP::GetVehicleFuelType(), PollutantsInterface::HC, MAX2(), PollutantsInterface::NO_X, PHEMLIGHT_BASE, PollutantsInterface::PM_X, and SECONDS_PER_HOUR.
|
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 155 of file HelpersPHEMlight.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 92 of file HelpersPHEMlight.cpp.
References StringBijection< T >::get(), StringBijection< T >::hasString(), and PollutantsInterface::Helper::myEmissionClassStrings.
|
virtual |
Checks whether the string describes a known vehicle class.
[in] | eClass | The string describing the vehicle emission class |
Reimplemented from PollutantsInterface::Helper.
Definition at line 53 of file HelpersPHEMlight.cpp.
References StringBijection< T >::addAlias(), StringBijection< T >::get(), PHEMCEPHandler::getHandlerInstance(), StringBijection< T >::hasString(), PollutantsInterface::HEAVY_BIT, StringBijection< T >::insert(), PollutantsInterface::Helper::myEmissionClassStrings, myIndex, StringBijection< T >::remove(), and SUMOReal.
|
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.
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 191 of file HelpersPHEMlight.cpp.
References StringBijection< T >::getString(), PollutantsInterface::Helper::myEmissionClassStrings, and SUMOReal.
|
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 177 of file HelpersPHEMlight.cpp.
References StringBijection< T >::getString(), and PollutantsInterface::Helper::myEmissionClassStrings.
|
virtual |
Returns the maximum possible acceleration.
[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 [°] |
Reimplemented from PollutantsInterface::Helper.
Definition at line 82 of file HelpersPHEMlight.cpp.
References PHEMCEPHandler::GetCep(), PHEMCEPHandler::getHandlerInstance(), and PHEMCEP::GetMaxAccel().
|
inlineinherited |
Returns the name of the model.
Definition at line 118 of file PollutantsInterface.h.
|
virtual |
Returns a reference weight in kg described by this emission class as described in the Amitran interface This implementation returns only meaningful values for Solo_LKW (truck without trailer) and LNF (light duty vehicles).
[in] | c | the emission class |
Reimplemented from PollutantsInterface::Helper.
Definition at line 211 of file HelpersPHEMlight.cpp.
References StringBijection< T >::getString(), PollutantsInterface::Helper::myEmissionClassStrings, and SUMOReal.
|
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 HelpersHBEFA3::getAmitranVehicleClass(), getAmitranVehicleClass(), getClass(), HelpersHBEFA3::getClass(), getClassByName(), HelpersHBEFA3::getEuroClass(), getEuroClass(), getFuel(), HelpersHBEFA3::getFuel(), getWeight(), HelpersHBEFA::HelpersHBEFA(), HelpersHBEFA3::HelpersHBEFA3(), and HelpersPHEMlight().
|
private |
the index of the next class
Definition at line 122 of file HelpersPHEMlight.h.
Referenced by getClassByName(), and HelpersPHEMlight().
|
protectedinherited |
the name of the model
Definition at line 258 of file PollutantsInterface.h.
|
static |
Definition at line 51 of file HelpersPHEMlight.h.
Referenced by compute().