SUMO - Simulation of Urban MObility
PHEMCEPHandler.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2013-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
20 // Helper singleton class for PHEM Light, holds CEP data for emission computation
21 /****************************************************************************/
22 #ifndef PHEMCEPHandler_h
23 #define PHEMCEPHandler_h
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <vector>
36 #include "PHEMCEP.h"
37 
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
47 public:
50 
51 
56 
57 
62  PHEMCEP* GetCep(SUMOEmissionClass emissionClass);
63 
64 
69  bool Load(SUMOEmissionClass emissionClass, const std::string& emissionClassIdentifier);
70 
71 
72 private:
95  bool ReadVehicleFile(const std::vector<std::string>& path, const std::string& emissionClass,
96  double& vehicleMass,
97  double& vehicleLoading,
98  double& vehicleMassRot,
99  double& crossArea,
100  double& cWValue,
101  double& f0,
102  double& f1,
103  double& f2,
104  double& f3,
105  double& f4,
106  double& axleRatio,
107  double& ratedPower,
108  double& engineIdlingSpeed,
109  double& engineRatedSpeed,
110  double& effectiveWheelDiameter,
111  std::string& vehicleMassType,
112  std::string& vehicleFuelType,
113  double& pNormV0,
114  double& pNormP0,
115  double& pNormV1,
116  double& pNormP1,
117  std::vector< std::vector<double> >& matrixSpeedInertiaTable,
118  std::vector< std::vector<double> >& normedDragTable);
119 
120 
121 
129  bool ReadEmissionData(bool readFC, const std::vector<std::string>& path, const std::string& emissionClass,
130  std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues);
131 
132 
133 private:
135  std::map<SUMOEmissionClass, PHEMCEP*> _ceps;
136 // StringBijection<PHEMEmissionClass> _stringRepsPhemEmissionClass;
137 
138 
139 private:
143  PHEMCEPHandler();
145  void operator=(PHEMCEPHandler const&);
146 
147 };
148 
149 #endif
Data Handler for a single CEP emission data set.
Definition: PHEMCEP.h:58
std::map< SUMOEmissionClass, PHEMCEP * > _ceps
bijection between PHEMEmissionClass and CEPs
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.
Data Handler for all CEP emission and vehicle Data.
bool Load(SUMOEmissionClass emissionClass, const std::string &emissionClassIdentifier)
Helper method to load CEP and vehicle files from file system.
static PHEMCEPHandler & getHandlerInstance()
Implementatio of Singelton pattern.
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.
int SUMOEmissionClass
~PHEMCEPHandler()
Destructor.
void operator=(PHEMCEPHandler const &)
PHEMCEPHandler()
Implementation of Singelton pattern private (copy) constructor and =operator to avoid more than one i...
PHEMCEP * GetCep(SUMOEmissionClass emissionClass)
Returns the CEP data for a PHEM emission class.