Eclipse 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 |
zero emission model, used as superclass for the other model helpers More... | |
Public Types | |
enum | EmissionType { CO2 , CO , HC , FUEL , NO_X , PM_X , ELEC } |
Enumerating all emission types, including fuel. More... | |
Static Public Member Functions | |
static double | compute (const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const EnergyParams *param) |
Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fuel) | |
static Emissions | computeAll (const SUMOEmissionClass c, const double v, const double a, const double slope, const EnergyParams *param) |
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fuel) | |
static double | computeDefault (const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const double tt, const EnergyParams *param) |
Returns the amount of emitted pollutant given the vehicle type and default values for the state (in mg) | |
static const std::vector< SUMOEmissionClass > | getAllClasses () |
Checks whether the string describes a known vehicle class. | |
static const std::vector< std::string > & | getAllClassesStr () |
Get all SUMOEmissionClass in string format. | |
static std::string | getAmitranVehicleClass (const SUMOEmissionClass c) |
Returns the vehicle class described by the given emission class. | |
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. | |
static SUMOEmissionClass | getClassByName (const std::string &eClass, const SUMOVehicleClass vc=SVC_IGNORING) |
Checks whether the string describes a known vehicle class. | |
static double | getCoastingDecel (const SUMOEmissionClass c, const double v, const double a, const double slope, const EnergyParams *param) |
Returns the coasting deceleration value, useful for comparing with external PHEMlight references. | |
static const HelpersEnergy & | getEnergyHelper () |
get energy helper | |
static int | getEuroClass (const SUMOEmissionClass c) |
Returns the Euro norm described by the given emission class. | |
static std::string | getFuel (const SUMOEmissionClass c) |
Returns the fuel type of the given emission class. | |
static double | getModifiedAccel (const SUMOEmissionClass c, const double v, const double a, const double slope, const EnergyParams *param) |
Returns the adapted acceleration value, useful for comparing with external PHEMlight references. | |
static std::string | getName (const SUMOEmissionClass c) |
Checks whether the string describes a known vehicle class. | |
static std::string | getPollutantName (const EmissionType e) |
return the name for the given emission type | |
static double | 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. | |
static bool | isHeavy (const SUMOEmissionClass c) |
Checks whether the emission class describes a bus, truck or similar vehicle. | |
static bool | isSilent (const SUMOEmissionClass c) |
Checks whether the emission class describes an electric or similar silent vehicle. | |
Static Public Attributes | |
static const int | HEAVY_BIT = 1 << 15 |
the bit to set for denoting heavy vehicles | |
static const int | ZERO_EMISSIONS = 0 |
the first class in each model representing a zero emission vehicle | |
Static Private Attributes | |
static std::vector< std::string > | myAllClassesStr |
get all emission classes in string format | |
static HelpersEnergy | myEnergyHelper |
Instance of EnergyHelper which gets cleaned up automatically. | |
static HelpersHBEFA | myHBEFA2Helper |
Instance of HBEFA2Helper which gets cleaned up automatically. | |
static HelpersHBEFA3 | myHBEFA3Helper |
Instance of HBEFA3Helper which gets cleaned up automatically. | |
static HelpersHBEFA4 | myHBEFA4Helper |
Instance of HBEFA4Helper which gets cleaned up automatically. | |
static Helper * | myHelpers [] |
the known model helpers | |
static HelpersMMPEVEM | myMMPEVEMHelper |
Instance of HelpersMMPEVEM which gets cleaned up automatically. | |
static HelpersPHEMlight5 | myPHEMlight5Helper |
Instance of PHEMlight5Helper which gets cleaned up automatically. | |
static HelpersPHEMlight | myPHEMlightHelper |
Instance of PHEMlightHelper which gets cleaned up automatically. | |
static Helper | myZeroHelper |
Instance of Helper which gets cleaned up automatically. | |
Helper methods for PHEMlight-based emission computation.
Definition at line 52 of file PollutantsInterface.h.
Enumerating all emission types, including fuel.
Enumerator | |
---|---|
CO2 | |
CO | |
HC | |
FUEL | |
NO_X | |
PM_X | |
ELEC |
Definition at line 56 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 [deg] |
Definition at line 353 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::compute(), and myHelpers.
Referenced by ROEdge::buildTimeLines(), MSDevice_StationFinder::estimateConsumption(), MSBaseVehicle::getEmissions(), and MSDevice_Battery::notifyMove().
|
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 [deg] |
Definition at line 359 of file PollutantsInterface.cpp.
References CO, CO2, PollutantsInterface::Helper::compute(), ELEC, FUEL, HC, myHelpers, NO_X, and PM_X.
Referenced by TrajectoriesHandler::computeEmissions(), MSDevice_Emissions::notifyIdle(), MSMeanData_Emissions::MSLaneMeanDataValues::notifyIdle(), MSDevice_Emissions::notifyMove(), MSDevice_Emissions::notifyMoveInternal(), 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 [deg] |
{in] | tt the time the vehicle travels | |
[in] | param | parameter of the emission model affecting the computation |
Definition at line 368 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 255 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::addAllClassesInto(), and myHelpers.
Referenced by main().
|
static |
Get all SUMOEmissionClass in string format.
Definition at line 265 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::addAllClassesInto(), getName(), myAllClassesStr, and myHelpers.
Referenced by GNEVehicleTypeDialog::VTypeAttributes::buildAttributesA(), GNEAttributeCarrier::fillDemandElements(), and GNEVType::isValid().
|
static |
Returns the vehicle class described by the given emission class.
[in] | c | The vehicle emission class |
Definition at line 329 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 322 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 228 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getClassByName(), getName(), myHBEFA2Helper, myHelpers, and myZeroHelper.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), ROEdge::buildTimeLines(), MSVehicleType::check(), main(), GNEVType::setAttribute(), and SUMOVTypeParameter::VClassDefaultValues::VClassDefaultValues().
|
static |
Returns the coasting deceleration value, useful for comparing with external PHEMlight references.
[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] |
[in] | param | parameter of the emission model affecting the computation |
Definition at line 381 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getCoastingDecel(), and myHelpers.
Referenced by PollutantsInterface::Helper::getCoastingDecel(), and TrajectoriesHandler::writeEmissions().
|
static |
get energy helper
Definition at line 387 of file PollutantsInterface.cpp.
References myEnergyHelper.
Referenced by MSDevice_ElecHybrid::acceleration(), MSDevice_ElecHybrid::consumption(), and MSDevice_Battery::notifyMove().
|
static |
Returns the Euro norm described by the given emission class.
[in] | c | The vehicle emission class |
Definition at line 341 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getEuroClass(), and myHelpers.
Referenced by MSAmitranTrajectories::writeVehicle().
|
static |
Returns the fuel type of the given emission class.
[in] | c | The vehicle emission class |
Definition at line 335 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getFuel(), and myHelpers.
Referenced by MSDevice_Battery::MSDevice_Battery(), and MSAmitranTrajectories::writeVehicle().
|
static |
Returns the adapted acceleration value, useful for comparing with external PHEMlight references.
[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] |
Definition at line 375 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getModifiedAccel(), and myHelpers.
Referenced by TrajectoriesHandler::computeEmissions().
|
static |
Checks whether the string describes a known vehicle class.
[in] | eClass | The string describing the vehicle emission class |
Definition at line 282 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getClassName(), and myHelpers.
Referenced by EnergyParams::EnergyParams(), getAllClassesStr(), GNEVType::getAttribute(), getClassByName(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), main(), GNEVType::overwriteVType(), SUMOVTypeParameter::write(), MSEmissionExport::write(), MSFullExport::writeVehicles(), and TrajectoriesHandler::writeXMLEmissions().
|
static |
return the name for the given emission type
Definition at line 288 of file PollutantsInterface.cpp.
References CO, CO2, ELEC, FUEL, HC, NO_X, PM_X, and toString().
|
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 347 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::getWeight(), and myHelpers.
Referenced by EnergyParams::EnergyParams(), and MSAmitranTrajectories::writeVehicle().
|
static |
Checks whether the emission class describes a bus, truck or similar vehicle.
[in] | c | The vehicle emission class |
Definition at line 310 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 316 of file PollutantsInterface.cpp.
References PollutantsInterface::Helper::isSilent(), and myHelpers.
Referenced by HelpersHarmonoise::computeNoise().
|
static |
the bit to set for denoting heavy vehicles
Definition at line 245 of file PollutantsInterface.h.
Referenced by HelpersPHEMlight::getClassByName(), HelpersPHEMlight5::getClassByName(), HelpersHBEFA::HelpersHBEFA(), HelpersHBEFA3::HelpersHBEFA3(), HelpersHBEFA4::HelpersHBEFA4(), isHeavy(), and PollutantsInterface::Helper::isSilent().
|
staticprivate |
get all emission classes in string format
Definition at line 400 of file PollutantsInterface.h.
Referenced by getAllClassesStr().
|
staticprivate |
Instance of EnergyHelper which gets cleaned up automatically.
Definition at line 385 of file PollutantsInterface.h.
Referenced by getEnergyHelper().
|
staticprivate |
Instance of HBEFA2Helper which gets cleaned up automatically.
Definition at line 376 of file PollutantsInterface.h.
Referenced by getClassByName().
|
staticprivate |
Instance of HBEFA3Helper which gets cleaned up automatically.
Definition at line 379 of file PollutantsInterface.h.
|
staticprivate |
Instance of HBEFA4Helper which gets cleaned up automatically.
Definition at line 394 of file PollutantsInterface.h.
|
staticprivate |
the known model helpers
Definition at line 53 of file PollutantsInterface.h.
Referenced by compute(), computeAll(), computeDefault(), getAllClasses(), getAllClassesStr(), getAmitranVehicleClass(), getClass(), getClassByName(), getCoastingDecel(), getEuroClass(), getFuel(), getModifiedAccel(), getName(), getWeight(), and isSilent().
|
staticprivate |
Instance of HelpersMMPEVEM which gets cleaned up automatically.
Definition at line 388 of file PollutantsInterface.h.
|
staticprivate |
Instance of PHEMlight5Helper which gets cleaned up automatically.
Definition at line 391 of file PollutantsInterface.h.
|
staticprivate |
Instance of PHEMlightHelper which gets cleaned up automatically.
Definition at line 382 of file PollutantsInterface.h.
|
staticprivate |
Instance of Helper which gets cleaned up automatically.
Definition at line 373 of file PollutantsInterface.h.
Referenced by getClassByName().
|
static |
the first class in each model representing a zero emission vehicle
Definition at line 242 of file PollutantsInterface.h.