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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
18 // Helper singleton class for PHEM Light, holds CEP data for emission computation
19 /****************************************************************************/
20 #ifndef PHEMCEPHandler_h
21 #define PHEMCEPHandler_h
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <vector>
30 #include "PHEMCEP.h"
31 
32 
33 // ===========================================================================
34 // class definitions
35 // ===========================================================================
41 public:
44 
45 
50 
51 
56  PHEMCEP* GetCep(SUMOEmissionClass emissionClass);
57 
58 
63  bool Load(SUMOEmissionClass emissionClass, const std::string& emissionClassIdentifier);
64 
65 
66 private:
89  bool ReadVehicleFile(const std::vector<std::string>& path, const std::string& emissionClass,
90  double& vehicleMass,
91  double& vehicleLoading,
92  double& vehicleMassRot,
93  double& crossArea,
94  double& cWValue,
95  double& f0,
96  double& f1,
97  double& f2,
98  double& f3,
99  double& f4,
100  double& axleRatio,
101  double& ratedPower,
102  double& engineIdlingSpeed,
103  double& engineRatedSpeed,
104  double& effectiveWheelDiameter,
105  std::string& vehicleMassType,
106  std::string& vehicleFuelType,
107  double& pNormV0,
108  double& pNormP0,
109  double& pNormV1,
110  double& pNormP1,
111  std::vector< std::vector<double> >& matrixSpeedInertiaTable,
112  std::vector< std::vector<double> >& normedDragTable);
113 
114 
115 
123  bool ReadEmissionData(bool readFC, const std::vector<std::string>& path, const std::string& emissionClass,
124  std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues);
125 
126 
127 private:
129  std::map<SUMOEmissionClass, PHEMCEP*> _ceps;
130 // StringBijection<PHEMEmissionClass> _stringRepsPhemEmissionClass;
131 
132 
133 private:
137  PHEMCEPHandler();
139  void operator=(PHEMCEPHandler const&);
140 
141 };
142 
143 #endif
Data Handler for a single CEP emission data set.
Definition: PHEMCEP.h:52
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.