![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Data Handler for all CEP emission and vehicle Data. More...
#include <PHEMCEPHandler.h>
Public Member Functions | |
| PHEMCEP * | GetCep (SUMOEmissionClass emissionClass) |
| Returns the CEP data for a PHEM emission class. | |
| bool | Load (SUMOEmissionClass emissionClass, const std::string &emissionClassIdentifier) |
| Helper method to load CEP and vehicle files from file system. | |
| ~PHEMCEPHandler () | |
| Destructor. | |
Static Public Member Functions | |
| static PHEMCEPHandler & | getHandlerInstance () |
| Implementatio of Singelton pattern. | |
Private Member Functions | |
| void | operator= (PHEMCEPHandler const &) |
| PHEMCEPHandler () | |
| Implementation of Singelton pattern private (copy) constructor and =operator to avoid more than one instances. | |
| PHEMCEPHandler (PHEMCEPHandler const &) | |
| bool | ReadEmissionData (bool readFC, const std::vector< std::string > &path, const std::string &emissionClass, std::vector< std::string > &header, std::vector< std::vector< double > > &matrix, std::vector< double > &idlingValues) |
| Helper method to read a CEP file from file system. | |
| bool | ReadVehicleFile (const std::vector< std::string > &path, const std::string &emissionClass, double &vehicleMass, double &vehicleLoading, double &vehicleMassRot, double &crossArea, double &cWValue, double &f0, double &f1, double &f2, double &f3, double &f4, double &axleRatio, double &ratedPower, double &engineIdlingSpeed, double &engineRatedSpeed, double &effectiveWheelDiameter, std::string &vehicleMassType, std::string &vehicleFuelType, double &pNormV0, double &pNormP0, double &pNormV1, double &pNormP1, std::vector< std::vector< double > > &matrixSpeedInertiaTable, std::vector< std::vector< double > > &normedDragTable) |
| Helper method to read a vehicle file from file system. | |
Private Attributes | |
| std::map< SUMOEmissionClass, PHEMCEP * > | _ceps |
| bijection between PHEMEmissionClass and CEPs | |
Data Handler for all CEP emission and vehicle Data.
Definition at line 38 of file PHEMCEPHandler.h.
| PHEMCEPHandler::~PHEMCEPHandler | ( | ) |
|
private |
Implementation of Singelton pattern private (copy) constructor and =operator to avoid more than one instances.
Definition at line 38 of file PHEMCEPHandler.cpp.
|
private |
| PHEMCEP * PHEMCEPHandler::GetCep | ( | SUMOEmissionClass | emissionClass | ) |
Returns the CEP data for a PHEM emission class.
| [in] | emissionClass | desired PHEM emission class |
Definition at line 173 of file PHEMCEPHandler.cpp.
References _ceps.
Referenced by HelpersPHEMlight::compute().
|
static |
Implementatio of Singelton pattern.
Definition at line 53 of file PHEMCEPHandler.cpp.
Referenced by HelpersPHEMlight::compute(), and HelpersPHEMlight::getClassByName().
| bool PHEMCEPHandler::Load | ( | SUMOEmissionClass | emissionClass, |
| const std::string & | emissionClassIdentifier | ||
| ) |
Helper method to load CEP and vehicle files from file system.
| [in] | emissionClass | desired PHEM emission class |
Definition at line 60 of file PHEMCEPHandler.cpp.
References _ceps, OptionsCont::getOptions(), OptionsCont::getString(), ReadEmissionData(), and ReadVehicleFile().
|
private |
|
private |
Helper method to read a CEP file from file system.
| [in] | path | The possible paths to PHEMlight data files |
| [in] | emissionClass | desired PHEM emission class |
| [in] | header | vector of pollutant identifiers |
| [in] | matrix | matrix holding power pattern and CEP curves |
Definition at line 384 of file PHEMCEPHandler.cpp.
Referenced by Load().
|
private |
Helper method to read a vehicle file from file system.
| [in] | path | The possible paths to PHEMlight data files |
| [in] | emissionClass | desired PHEM emission class |
| [in] | vehicleMass | out variable for vehicle mass |
| [in] | vehivleLoading | out variable for vehicle loading |
| [in] | crossArea | out variable for crosssectional area of vehicle |
| [in] | cwValue | dout variable for cd value of vehivle |
| [in] | f0 | out variable for rolling resistance coefficient f0 |
| [in] | f1 | out variable for rolling resistance coefficient f1 |
| [in] | f2 | out variable for rolling resistance coefficient f2 |
| [in] | f3 | out variable for rolling resistance coefficient f3 |
| [in] | f4 | out variable for rolling resistance coefficient f4 |
| [in] | ratedPower | out variable for rated power of vehicle |
| [in] | vehicleMassType | out variable for mass tyepe of vehicle, light (LV) or heavy (HV) |
| [in] | vehicleFuelType | out variable for fuel type (D, G) of vehicle, needed for density of fuel |
| [in] | pNormV0 | out variable for step function to get maximum normalized rated power over speed |
| [in] | pNormP0 | out variable for step function to get maximum normalized rated power over speed |
| [in] | pNormV1 | out variable for step function to get maximum normalized rated power over speed |
| [in] | pNormP1 | out variable for step function to get maximum normalized rated power over speed |
| [in] | matrixRotFactor | out variable for rotational factors over speed for more accurate power calculation |
Definition at line 184 of file PHEMCEPHandler.cpp.
Referenced by Load().
|
private |
bijection between PHEMEmissionClass and CEPs
Definition at line 127 of file PHEMCEPHandler.h.
Referenced by GetCep(), Load(), and ~PHEMCEPHandler().