SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PHEMCEPHandler.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // Helper singleton class for PHEM Light, holds CEP data for emission computation
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef PHEMCEPHandler_h
24 #define PHEMCEPHandler_h
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <vector>
37 #include "PHEMCEP.h"
38 
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
48 public:
51 
52 
57 
58 
63  PHEMCEP* GetCep(SUMOEmissionClass emissionClass);
64 
65 
70  bool Load(SUMOEmissionClass emissionClass, const std::string& emissionClassIdentifier);
71 
72 
73 private:
96  bool ReadVehicleFile(const std::vector<std::string>& path, const std::string& emissionClass,
97  double& vehicleMass,
98  double& vehicleLoading,
99  double& vehicleMassRot,
100  double& crossArea,
101  double& cWValue,
102  double& f0,
103  double& f1,
104  double& f2,
105  double& f3,
106  double& f4,
107  double& axleRatio,
108  double& ratedPower,
109  double& engineIdlingSpeed,
110  double& engineRatedSpeed,
111  double& effectiveWheelDiameter,
112  std::string& vehicleMassType,
113  std::string& vehicleFuelType,
114  double& pNormV0,
115  double& pNormP0,
116  double& pNormV1,
117  double& pNormP1,
118  std::vector< std::vector<double> >& matrixSpeedInertiaTable,
119  std::vector< std::vector<double> >& normedDragTable);
120 
121 
122 
130  bool ReadEmissionData(bool readFC, const std::vector<std::string>& path, const std::string& emissionClass,
131  std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues);
132 
133 
134 private:
136  std::map<SUMOEmissionClass, PHEMCEP*> _ceps;
137 // StringBijection<PHEMEmissionClass> _stringRepsPhemEmissionClass;
138 
139 
140 private:
144  PHEMCEPHandler();
146  void operator=(PHEMCEPHandler const&);
147 
148 };
149 
150 #endif
Data Handler for a single CEP emission data set.
Definition: PHEMCEP.h:59
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.