SUMO - Simulation of Urban MObility
HelpersPHEMlight.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Helper methods for PHEMlight-based emission computation
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2013-2012 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef HelpersPHEMlight_h
22 #define HelpersPHEMlight_h
23 
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>
35 #include <limits>
36 #include <cmath>
37 #include <utils/common/StdDefs.h>
38 #include "PollutantsInterface.h"
39 #include "PHEMCEPHandler.h"
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
50 public:
51  static const int PHEMLIGHT_BASE = 2 << 16;
52 
53 
57 
58 
63  SUMOEmissionClass getClassByName(const std::string& eClass, const SUMOVehicleClass vc);
64 
65 
74  SUMOEmissionClass getClass(const SUMOEmissionClass base, const std::string& vClass, const std::string& fuel, const std::string& eClass, const double weight) const;
75 
80  std::string getAmitranVehicleClass(const SUMOEmissionClass c) const;
81 
86  std::string getFuel(const SUMOEmissionClass c) const;
87 
92  int getEuroClass(const SUMOEmissionClass c) const;
93 
99  SUMOReal getWeight(const SUMOEmissionClass c) const;
100 
108  SUMOReal getMaxAccel(SUMOEmissionClass c, double v, double a, double slope) const;
109 
110 
118  SUMOReal compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope) const;
119 
120 private:
122  int myIndex;
123 };
124 
125 
126 #endif
127 
128 /****************************************************************************/
129 
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
int myIndex
the index of the next class
HelpersPHEMlight()
Constructor.
int getEuroClass(const SUMOEmissionClass c) const
Returns the Euro emission class described by this emission class as described in the Amitran interfac...
EmissionType
Enumerating all emission types, including fuel.
SUMOReal compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope) const
Returns the amount of emitted pollutant given the vehicle type and state (in mg/s or in ml/s for fuel...
SUMOReal getWeight(const SUMOEmissionClass c) const
Returns a reference weight in kg described by this emission class as described in the Amitran interfa...
Helper methods for PHEMlight-based emission computation.
abstract superclass for the model helpers
std::string getFuel(const SUMOEmissionClass c) const
Returns the fuel type described by this emission class as described in the Amitran interface (Gasolin...
int SUMOEmissionClass
static const int PHEMLIGHT_BASE
SUMOReal getMaxAccel(SUMOEmissionClass c, double v, double a, double slope) const
Returns the maximum possible acceleration.
std::string getAmitranVehicleClass(const SUMOEmissionClass c) const
Returns the vehicle class described by this emission class as described in the Amitran interface (Pas...
SUMOEmissionClass getClassByName(const std::string &eClass, const SUMOVehicleClass vc)
Checks whether the string describes a known vehicle class.
#define SUMOReal
Definition: config.h:218
SUMOEmissionClass getClass(const SUMOEmissionClass base, const std::string &vClass, const std::string &fuel, const std::string &eClass, const double weight) const
Returns the emission class described by the given parameters.