SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CEPHandler.h
Go to the documentation of this file.
1 #ifndef PHEMlightCEPHANDLER
2 #define PHEMlightCEPHANDLER
3 
4 #include <string>
5 #include <map>
6 #include <vector>
7 #include <utility>
8 
9 //C# TO C++ CONVERTER NOTE: Forward class declarations:
10 namespace PHEMlightdll { class CEP; }
11 namespace PHEMlightdll { class Helpers; }
12 
13 
14 namespace PHEMlightdll {
15  class CEPHandler {
16  //--------------------------------------------------------------------------------------------------
17  // Constructors
18  //--------------------------------------------------------------------------------------------------
19 
20  public:
21  CEPHandler();
22 
23  //--------------------------------------------------------------------------------------------------
24  // Members
25  //--------------------------------------------------------------------------------------------------
26 
27  private:
28  std::map<std::string, CEP*> _ceps;
29  public:
30  const std::map<std::string, CEP*>& getCEPS() const;
31 
32 
33  //--------------------------------------------------------------------------------------------------
34  // Methods
35  //--------------------------------------------------------------------------------------------------
36 
37  bool GetCEP(const std::vector<std::string>& DataPath, Helpers* Helper);
38 
39 
40  //--------------------------------------------------------------------------------------------------
41  // Methods
42  //--------------------------------------------------------------------------------------------------
43 
44  private:
45  bool Load(const std::vector<std::string>& DataPath, Helpers* Helper);
46 
47  bool ReadVehicleFile(const std::vector<std::string>& DataPath, const std::string& emissionClass, Helpers* Helper, double& vehicleMass, double& vehicleLoading, double& vehicleMassRot, double& crossArea, double& cWValue, double& f0, double& f1, double& f2, double& f3, double& f4, double& axleRatio, double& auxPower, double& ratedPower, double& engineIdlingSpeed, double& engineRatedSpeed, double& effectiveWheelDiameter, std::vector<double>& transmissionGearRatios, 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);
48 
49  bool ReadEmissionData(bool readFC, const std::vector<std::string>& DataPath, const std::string& emissionClass, Helpers* Helper, std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues);
50 
51 
52  //--------------------------------------------------------------------------------------------------
53  // Functions
54  //--------------------------------------------------------------------------------------------------
55 
56  //Split the string
57  std::vector<std::string> split(const std::string& s, char delim);
58 
59  //Convert string to double
60  double todouble(const std::string& s);
61 
62  //Convert string to double list
63  std::vector<double> todoubleList(const std::vector<std::string>& s);
64 
65  //Read a line from file
66  std::string ReadLine(std::ifstream& s);
67  };
68 }
69 
70 
71 #endif //#ifndef PHEMlightCEPHANDLER
std::vector< double > todoubleList(const std::vector< std::string > &s)
Definition: CEPHandler.cpp:345
std::map< std::string, CEP * > _ceps
Definition: CEPHandler.h:28
bool Load(const std::vector< std::string > &DataPath, Helpers *Helper)
Definition: CEPHandler.cpp:28
std::string ReadLine(std::ifstream &s)
Definition: CEPHandler.cpp:353
bool GetCEP(const std::vector< std::string > &DataPath, Helpers *Helper)
Definition: CEPHandler.cpp:19
double todouble(const std::string &s)
Definition: CEPHandler.cpp:338
std::vector< std::string > split(const std::string &s, char delim)
Definition: CEPHandler.cpp:328
const std::map< std::string, CEP * > & getCEPS() const
Definition: CEPHandler.cpp:15
bool ReadEmissionData(bool readFC, const std::vector< std::string > &DataPath, const std::string &emissionClass, Helpers *Helper, std::vector< std::string > &header, std::vector< std::vector< double > > &matrix, std::vector< double > &idlingValues)
Definition: CEPHandler.cpp:275
bool ReadVehicleFile(const std::vector< std::string > &DataPath, const std::string &emissionClass, Helpers *Helper, double &vehicleMass, double &vehicleLoading, double &vehicleMassRot, double &crossArea, double &cWValue, double &f0, double &f1, double &f2, double &f3, double &f4, double &axleRatio, double &auxPower, double &ratedPower, double &engineIdlingSpeed, double &engineRatedSpeed, double &effectiveWheelDiameter, std::vector< double > &transmissionGearRatios, 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)
Definition: CEPHandler.cpp:85