SUMO - Simulation of Urban MObility
HelpersHBEFA Class Reference

Helper methods for HBEFA-based emission computation. More...

#include <HelpersHBEFA.h>

Inheritance diagram for HelpersHBEFA:
Inheritance graph
Collaboration diagram for HelpersHBEFA:
Collaboration graph

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...
 
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< SUMOEmissionClassmyEmissionClassStrings
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

§ HelpersHBEFA()

Member Function Documentation

§ addAllClassesInto()

void PollutantsInterface::Helper::addAllClassesInto ( std::vector< SUMOEmissionClass > &  list) const
inlineinherited

Add all known emission classes of this model to the given container.

Parameters
[in]listthe vector to add to

Definition at line 238 of file PollutantsInterface.h.

Referenced by PollutantsInterface::getAllClasses().

§ compute()

SUMOReal HelpersHBEFA::compute ( const SUMOEmissionClass  c,
const PollutantsInterface::EmissionType  e,
const double  v,
const double  a,
const double  slope 
) const
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.

Parameters
[in]cemission class for the function parameters to use
[in]ethe type of emission (CO, CO2, ...)
[in]vThe vehicle's current velocity
[in]aThe vehicle's current acceleration
[in]slopeThe road's slope at vehicle's position [deg]
Returns
The amount emitted by the given emission class when moving with the given velocity and acceleration [mg/s or ml/s]

Implements PollutantsInterface::Helper.

Definition at line 74 of file HelpersHBEFA.h.

References PollutantsInterface::ELEC, PollutantsInterface::FUEL, M_PI, MAX2(), myFunctionParameter, SUMOReal, UNUSED_PARAMETER, and PollutantsInterface::ZERO_EMISSIONS.

§ getAmitranVehicleClass()

virtual std::string PollutantsInterface::Helper::getAmitranVehicleClass ( const SUMOEmissionClass  c) const
inlinevirtualinherited

Returns the vehicle class described by this emission class as described in the Amitran interface (Passenger, ...) Default implementation returns always "Passenger".

Parameters
[in]cthe emission class
Returns
the name of the vehicle class

Reimplemented in HelpersPHEMlight, and HelpersHBEFA3.

Definition at line 188 of file PollutantsInterface.h.

References UNUSED_PARAMETER.

Referenced by PollutantsInterface::getAmitranVehicleClass().

§ getClass()

virtual SUMOEmissionClass PollutantsInterface::Helper::getClass ( const SUMOEmissionClass  base,
const std::string &  vClass,
const std::string &  fuel,
const std::string &  eClass,
const double  weight 
) const
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.

Parameters
[in]basethe base class giving the model and the default
[in]vClassthe vehicle class as described in the Amitran interface (Passenger, ...)
[in]fuelthe fuel type as described in the Amitran interface (Gasoline, Diesel, ...)
[in]eClassthe emission class as described in the Amitran interface (Euro0, ...)
[in]weightthe vehicle weight in kg as described in the Amitran interface
Returns
the class described by the parameters

Reimplemented in HelpersPHEMlight, and HelpersHBEFA3.

Definition at line 174 of file PollutantsInterface.h.

References UNUSED_PARAMETER.

Referenced by PollutantsInterface::getClass().

§ getClassByName()

virtual SUMOEmissionClass PollutantsInterface::Helper::getClassByName ( const std::string &  eClass,
const SUMOVehicleClass  vc 
)
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.

Parameters
[in]eClassthe name of the emission class (string after the '/' in the emission class attribute)
[in]vcthe vehicle class to use when determining default class
Returns
the name of the model (string before the '/' in the emission class)

Reimplemented in HelpersPHEMlight.

Definition at line 134 of file PollutantsInterface.h.

References UNUSED_PARAMETER.

Referenced by PollutantsInterface::getClassByName().

§ getClassName()

const std::string PollutantsInterface::Helper::getClassName ( const SUMOEmissionClass  c) const
inlineinherited

Returns the complete name of the emission class including the model.

Parameters
[in]cthe emission class
Returns
the name of the class (the complete emission class attribute)

Definition at line 148 of file PollutantsInterface.h.

Referenced by PollutantsInterface::getName().

§ getEuroClass()

virtual int PollutantsInterface::Helper::getEuroClass ( const SUMOEmissionClass  c) const
inlinevirtualinherited

Returns the Euro emission class described by this emission class as described in the Amitran interface (0, ..., 6) Default implementation returns always 0.

Parameters
[in]cthe emission class
Returns
the Euro class

Reimplemented in HelpersPHEMlight, and HelpersHBEFA3.

Definition at line 208 of file PollutantsInterface.h.

References UNUSED_PARAMETER.

Referenced by PollutantsInterface::getEuroClass().

§ getFuel()

virtual std::string PollutantsInterface::Helper::getFuel ( const SUMOEmissionClass  c) const
inlinevirtualinherited

Returns the fuel type described by this emission class as described in the Amitran interface (Gasoline, Diesel, ...) Default implementation returns always "Gasoline".

Parameters
[in]cthe emission class
Returns
the fuel type

Reimplemented in HelpersPHEMlight, and HelpersHBEFA3.

Definition at line 198 of file PollutantsInterface.h.

References UNUSED_PARAMETER.

Referenced by PollutantsInterface::getFuel().

§ getName()

const std::string& PollutantsInterface::Helper::getName ( ) const
inlineinherited

Returns the name of the model.

Returns
the name of the model (string before the '/' in the emission class attribute)

Definition at line 121 of file PollutantsInterface.h.

§ getWeight()

virtual SUMOReal PollutantsInterface::Helper::getWeight ( const SUMOEmissionClass  c) const
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.

Parameters
[in]cthe emission class
Returns
a reference weight

Reimplemented in HelpersPHEMlight.

Definition at line 219 of file PollutantsInterface.h.

References PollutantsInterface::compute(), SUMOReal, and UNUSED_PARAMETER.

Referenced by PollutantsInterface::getWeight().

§ isSilent()

virtual bool PollutantsInterface::Helper::isSilent ( const SUMOEmissionClass  c)
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.

Parameters
[in]cthe emission class
Returns
whether the class denotes a silent vehicle

Definition at line 157 of file PollutantsInterface.h.

References PollutantsInterface::HEAVY_BIT.

Referenced by PollutantsInterface::isSilent().

Field Documentation

§ myEmissionClassStrings

§ myFunctionParameter

double HelpersHBEFA::myFunctionParameter
staticprivate

The function parameter.

Definition at line 97 of file HelpersHBEFA.h.

Referenced by compute().

§ myName

const std::string PollutantsInterface::Helper::myName
protectedinherited

the name of the model

Definition at line 245 of file PollutantsInterface.h.


The documentation for this class was generated from the following files: