![]() |
SUMO - Simulation of Urban MObility
|
Helper methods for PHEMlight-based emission computation. More...
#include <PollutantsInterface.h>
Data Structures | |
struct | Emissions |
Storage for collected values of all emission types. More... | |
class | Helper |
abstract superclass for the model helpers More... | |
Public Types | |
enum | EmissionType { CO2, CO, HC, FUEL, NO_X, PM_X } |
Enumerating all emission types, including fuel. More... | |
Static Public Member Functions | |
static SUMOReal | compute (const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope) |
Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fuel) More... | |
static Emissions | computeAll (const SUMOEmissionClass c, const double v, const double a, const double slope) |
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fuel) More... | |
static SUMOReal | computeDefault (const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const SUMOReal tt) |
Returns the amount of emitted pollutant given the vehicle type and default values for the state (in mg) More... | |
static const std::vector< SUMOEmissionClass > | getAllClasses () |
Checks whether the string describes a known vehicle class. More... | |
static std::string | getAmitranVehicleClass (const SUMOEmissionClass c) |
Returns the vehicle class described by the given emission class. More... | |
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. More... | |
static SUMOEmissionClass | getClassByName (const std::string &eClass, const SUMOVehicleClass vc=SVC_IGNORING) |
Checks whether the string describes a known vehicle class. More... | |
static int | getEuroClass (const SUMOEmissionClass c) |
Returns the Euro norm described by the given emission class. More... | |
static std::string | getFuel (const SUMOEmissionClass c) |
Returns the fuel type of the given emission class. More... | |
static SUMOReal | getMaxAccel (SUMOEmissionClass c, double v, double a, double slope) |
Returns the maximum possible acceleration. More... | |
static std::string | getName (const SUMOEmissionClass c) |
Checks whether the string describes a known vehicle class. More... | |
static SUMOReal | getWeight (const SUMOEmissionClass c) |
Returns a representative weight for the given emission class see http://colombo-fp7.eu/deliverables/COLOMBO_D4.2_ExtendedPHEMSUMO_v1.7.pdf. More... | |
static bool | isHeavy (const SUMOEmissionClass c) |
Checks whether the emission class describes a bus, truck or similar vehicle. More... | |
static bool | isSilent (const SUMOEmissionClass c) |
Checks whether the emission class describes an electric or similar silent vehicle. More... | |
Static Public Attributes | |
static const int | HEAVY_BIT = 1 << 15 |
the bit to set for denoting heavy vehicles More... | |
static Helper * | myHelpers [] = {&PollutantsInterface::myHBEFA2Helper, &PollutantsInterface::myHBEFA3Helper, &PollutantsInterface::myPHEMlightHelper} |
the known model helpers More... | |
static const int | ZERO_EMISSIONS = 0 |
the first class in each model representing a zero emission vehicle More... | |
Static Private Attributes | |
static HelpersHBEFA | myHBEFA2Helper |
Instance of HBEFA2Helper which gets cleaned up automatically. More... | |
static HelpersHBEFA3 | myHBEFA3Helper |
Instance of HBEFA3Helper which gets cleaned up automatically. More... | |
static HelpersPHEMlight | myPHEMlightHelper |
Instance of PHEMlightHelper which gets cleaned up automatically. More... | |
Helper methods for PHEMlight-based emission computation.
Definition at line 58 of file PollutantsInterface.h.
Enumerating all emission types, including fuel.
Enumerator | |
---|---|
CO2 | |
CO | |
HC | |
FUEL | |
NO_X | |
PM_X |
Definition at line 62 of file PollutantsInterface.h.
|
static |
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 [°] |
Definition at line 142 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::compute(), and myHelpers.
Referenced by ROEdge::buildTimeLines(), MSVehicle::getCO2Emissions(), MSVehicle::getCOEmissions(), MSVehicle::getFuelConsumption(), MSVehicle::getHCEmissions(), MSVehicle::getNOxEmissions(), MSVehicle::getPMxEmissions(), and PollutantsInterface::Helper::getWeight().
|
static |
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or 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 [°] |
Definition at line 148 of file PollutantsInterface.cpp.
References CO, CO2, PollutantsInterface::Helper::compute(), FUEL, HC, myHelpers, NO_X, PM_X, and SUMOReal.
Referenced by TrajectoriesHandler::computeEmissions(), MSDevice_Emissions::notifyMove(), MSMeanData_Emissions::MSLaneMeanDataValues::notifyMoveInternal(), single(), MSEmissionExport::write(), and MSFullExport::writeVehicles().
|
static |
Returns the amount of emitted pollutant given the vehicle type and default values for the state (in mg)
[in] | c | The vehicle emission class |
[in] | e | the type of emission (CO, CO2, ...) |
[in] | v | The vehicle's average velocity |
[in] | a | The vehicle's average acceleration |
[in] | slope | The road's slope at vehicle's position [°] |
Definition at line 156 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::compute(), and myHelpers.
Referenced by ROEdge::getEmissionEffort(), and MSMeanData_Emissions::MSLaneMeanDataValues::write().
|
static |
Checks whether the string describes a known vehicle class.
[in] | eClass | The string describing the vehicle emission class |
Definition at line 77 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::addAllClassesInto(), and myHelpers.
Referenced by main().
|
static |
Returns the vehicle class described by the given emission class.
[in] | c | The vehicle emission class |
Definition at line 118 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getAmitranVehicleClass(), and myHelpers.
Referenced by MSAmitranTrajectories::writeVehicle().
|
static |
Returns the emission class fittig the given parameters.
[in] | base | The base emission class to derive from |
[in] | vClass | The vehicle class description (like "truck") |
[in] | eClass | The emission class description (like "Euro5") |
[in] | fuel | The fuel type (like "Diesel") |
[in] | weight | The weight in kg |
Definition at line 111 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getClass(), and myHelpers.
Referenced by TrajectoriesHandler::myStartElement().
|
static |
Checks whether the string describes a known vehicle class.
[in] | eClass | The string describing the vehicle emission class |
Definition at line 58 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getClassByName(), getName(), and myHelpers.
Referenced by ROEdge::buildTimeLines(), main(), SUMOVehicleParserHelper::parseEmissionClass(), and TraCIServerAPI_VehicleType::setVariable().
|
static |
Returns the Euro norm described by the given emission class.
[in] | c | The vehicle emission class |
Definition at line 130 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getEuroClass(), myHelpers, and SUMOReal.
Referenced by MSAmitranTrajectories::writeVehicle().
|
static |
Returns the fuel type of the given emission class.
[in] | c | The vehicle emission class |
Definition at line 124 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getFuel(), and myHelpers.
Referenced by MSAmitranTrajectories::writeVehicle().
|
static |
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 [°] |
Definition at line 105 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getMaxAccel(), and myHelpers.
Referenced by MSCFModel_KraussAccelBound::maxNextSpeed().
|
static |
Checks whether the string describes a known vehicle class.
[in] | eClass | The string describing the vehicle emission class |
Definition at line 87 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getClassName(), and myHelpers.
Referenced by getClassByName(), GUIVehicle::getParameterWindow(), TraCIServerAPI_VehicleType::getVariable(), main(), MSEmissionExport::write(), SUMOVTypeParameter::write(), MSFullExport::writeVehicles(), and TrajectoriesHandler::writeXMLEmissions().
|
static |
Returns a representative weight for the given emission class see http://colombo-fp7.eu/deliverables/COLOMBO_D4.2_ExtendedPHEMSUMO_v1.7.pdf.
[in] | c | The vehicle emission class |
Definition at line 136 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getWeight(), myHelpers, and SUMOReal.
Referenced by MSAmitranTrajectories::writeVehicle().
|
static |
Checks whether the emission class describes a bus, truck or similar vehicle.
[in] | c | The vehicle emission class |
Definition at line 93 of file PollutantsInterface.cpp.
References HEAVY_BIT.
Referenced by HelpersHarmonoise::computeNoise().
|
static |
Checks whether the emission class describes an electric or similar silent vehicle.
[in] | c | The vehicle emission class |
Definition at line 99 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::isSilent(), myHelpers, and SUMOReal.
Referenced by HelpersHarmonoise::computeNoise().
|
static |
the bit to set for denoting heavy vehicles
Definition at line 277 of file PollutantsInterface.h.
Referenced by HelpersPHEMlight::getClassByName(), HelpersHBEFA::HelpersHBEFA(), HelpersHBEFA3::HelpersHBEFA3(), isHeavy(), and PollutantsInterface::Helper::isSilent().
|
staticprivate |
Instance of HBEFA2Helper which gets cleaned up automatically.
Definition at line 398 of file PollutantsInterface.h.
|
staticprivate |
Instance of HBEFA3Helper which gets cleaned up automatically.
Definition at line 400 of file PollutantsInterface.h.
|
static |
the known model helpers
Definition at line 271 of file PollutantsInterface.h.
Referenced by compute(), computeAll(), computeDefault(), getAllClasses(), getAmitranVehicleClass(), getClass(), getClassByName(), getEuroClass(), getFuel(), getMaxAccel(), getName(), getWeight(), and isSilent().
|
staticprivate |
Instance of PHEMlightHelper which gets cleaned up automatically.
Definition at line 402 of file PollutantsInterface.h.
|
static |
the first class in each model representing a zero emission vehicle
Definition at line 274 of file PollutantsInterface.h.
Referenced by HelpersHBEFA::compute(), and HelpersHBEFA::HelpersHBEFA().