 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
54 const std::string::size_type sep = eClass.find(
"/");
55 if (sep != std::string::npos) {
56 const std::string model = eClass.substr(0, sep);
57 const std::string subClass = eClass.substr(sep + 1);
58 for (
int i = 0; i < 4; i++) {
71 const std::vector<SUMOEmissionClass>
73 std::vector<SUMOEmissionClass> result;
74 for (
int i = 0; i < 3; i++) {
81 const std::vector<std::string>&
86 std::vector<SUMOEmissionClass> emissionClasses;
87 for (
int i = 0; i < 3; i++) {
91 for (
const auto& i : emissionClasses) {
118 const std::string& fuel,
const std::string& eClass,
const double weight) {
156 return Emissions(h->
compute(c,
CO2, v, a, slope, param), h->
compute(c,
CO, v, a, slope, param), h->
compute(c,
HC, v, a, slope, param),
157 h->
compute(c,
FUEL, v, a, slope, param), h->
compute(c,
NO_X, v, a, slope, param), h->
compute(c,
PM_X, v, a, slope, param),
165 return (h->
compute(c, e, v, 0, slope, param) + h->
compute(c, e, v - a, a, slope, param)) * tt / 2.;
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
static HelpersEnergy myEnergyHelper
Instance of EnergyHelper which gets cleaned up automatically.
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 fue...
static bool isSilent(const SUMOEmissionClass c)
Checks whether the emission class describes an electric or similar silent vehicle.
static bool isHeavy(const SUMOEmissionClass c)
Checks whether the emission class describes a bus, truck or similar vehicle.
virtual bool isSilent(const SUMOEmissionClass c)
Returns whether the class denotes a silent vehicle for interfacing with the noise model....
void addAllClassesInto(std::vector< SUMOEmissionClass > &list) const
Add all known emission classes of this model to the given container.
EmissionType
Enumerating all emission types, including fuel.
static int getEuroClass(const SUMOEmissionClass c)
Returns the Euro norm described by the given emission class.
virtual std::string getAmitranVehicleClass(const SUMOEmissionClass c) const
Returns the vehicle class described by this emission class as described in the Amitran interface (Pas...
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....
abstract superclass for the model helpers
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...
static const int HEAVY_BIT
the bit to set for denoting heavy vehicles
static std::string getName(const SUMOEmissionClass c)
Checks whether the string describes a known vehicle class.
Helper methods for PHEMlight-based emission computation.
virtual double getWeight(const SUMOEmissionClass c) const
Returns a reference weight in kg described by this emission class as described in the Amitran interfa...
virtual std::string getFuel(const SUMOEmissionClass c) const
Returns the fuel type described by this emission class as described in the Amitran interface (Gasolin...
const std::string getClassName(const SUMOEmissionClass c) const
Returns the complete name of the emission class including the model.
static double getModifiedAccel(const SUMOEmissionClass c, const double v, const double a, const double slope)
Returns the adapted acceleration value, useful for comparing with external PHEMlight references.
static SUMOEmissionClass getClass(const SUMOEmissionClass base, const std::string &vClass, const std::string &fuel, const std::string &eClass, const double weight)
Returns the emission class fittig the given parameters.
Helper methods for energy-based electricity consumption computation based on the battery device.
static const std::vector< SUMOEmissionClass > getAllClasses()
Checks whether the string describes a known vehicle class.
Helper methods for HBEFA3-based emission computation.
static std::string getAmitranVehicleClass(const SUMOEmissionClass c)
Returns the vehicle class described by the given emission class.
static Emissions computeAll(const SUMOEmissionClass c, const double v, const double a, const double slope, const std::map< int, double > *param=0)
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fu...
static double computeDefault(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const double tt, const std::map< int, double > *param=0)
Returns the amount of emitted pollutant given the vehicle type and default values for the state (in m...
static double getWeight(const SUMOEmissionClass c)
Returns a representative weight for the given emission class see http://colombo-fp7....
static SUMOEmissionClass getClassByName(const std::string &eClass, const SUMOVehicleClass vc=SVC_IGNORING)
Checks whether the string describes a known vehicle class.
static std::string getFuel(const SUMOEmissionClass c)
Returns the fuel type of the given emission class.
static HelpersHBEFA myHBEFA2Helper
Instance of HBEFA2Helper which gets cleaned up automatically.
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 ask...
Helper methods for HBEFA-based emission computation.
static HelpersHBEFA3 myHBEFA3Helper
Instance of HBEFA3Helper which gets cleaned up automatically.
Storage for collected values of all emission types.
static double compute(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const std::map< int, double > *param=0)
Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fue...
static const std::vector< std::string > & getAllClassesStr()
Get all SUMOEmissionClass in string format.
static Helper * myHelpers[]
the known model helpers
virtual int getEuroClass(const SUMOEmissionClass c) const
Returns the Euro emission class described by this emission class as described in the Amitran interfac...
static HelpersPHEMlight myPHEMlightHelper
Instance of PHEMlightHelper which gets cleaned up automatically.
static std::vector< std::string > myAllClassesStr
get all emission classes in strin format