SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHEMCEPHandler.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // Helper singelton class for PHEM Light, holds CEP data for emission computation
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
10 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef PHEMCEPHandler_h
21 #define PHEMCEPHandler_h
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <vector>
34 #include "PHEMCEP.h"
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
45 public:
48 
49 
54 
55 
60  PHEMCEP* GetCep(SUMOEmissionClass emissionClass);
61 
62 
63 private:
68  bool Load(SUMOEmissionClass emissionClass);
69 
70 
93  bool ReadVehicleFile(const std::string& path, const std::string& emissionClass,
94  double& vehicleMass, double& vehicleLoading, double& vehicleMassRot,
95  double& crossArea, double& cWValue,
96  double& f0, double& f1, double& f2, double& f3, double& f4, double& ratedPower, std::string& vehicleMassType, std::string& vehicleFuelType,
97  double& pNormV0, double& pNormP0, double& pNormV1, double& pNormP1, std::vector< std::vector<double> >& matrixRotFactor);
98 
99 
107  bool ReadEmissionData(bool readFC, const std::string& path, const std::string& emissionClass,
108  std::vector<std::string>& header, std::vector<std::vector<double> >& matrix);
109 
110 
111 private:
113  std::map<SUMOEmissionClass, PHEMCEP*> _ceps;
114 
115 
116 private:
120  PHEMCEPHandler();
122  void operator=(PHEMCEPHandler const&);
123 
124 };
125 
126 #endif
Data Handler for a single CEP emission data set.
Definition: PHEMCEP.h:46
std::map< SUMOEmissionClass, PHEMCEP * > _ceps
bijection between PHEMEmissionClass and CEPs
bool ReadEmissionData(bool readFC, const std::string &path, const std::string &emissionClass, std::vector< std::string > &header, std::vector< std::vector< double > > &matrix)
Helper method to read a CEP file from file system.
bool Load(SUMOEmissionClass emissionClass)
Helper method to load CEP and vehicle files from file system.
Data Handler for all CEP emission and vehicle Data.
bool ReadVehicleFile(const 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 &ratedPower, std::string &vehicleMassType, std::string &vehicleFuelType, double &pNormV0, double &pNormP0, double &pNormV1, double &pNormP1, std::vector< std::vector< double > > &matrixRotFactor)
Helper method to read a vehicle file from file system.
static PHEMCEPHandler & getHandlerInstance()
Implementatio of Singelton pattern.
SUMOEmissionClass
Definition of vehicle emission classes.
~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.