SUMO - Simulation of Urban MObility
HelpersEnergy.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // Helper methods for HBEFA-based emission computation
19 /****************************************************************************/
20 #ifndef HelpersEnergy_h
21 #define HelpersEnergy_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <vector>
34 #include <limits>
35 #include <cmath>
36 #include <utils/common/StdDefs.h>
37 #include <utils/geom/GeomHelper.h>
39 #include "PollutantsInterface.h"
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
50 public:
51  static const int ENERGY_BASE = 3 << 16;
52 
55  HelpersEnergy();
56 
57 
69  double compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope, const std::map<int, double>* param) const;
70 
71  double getDefaultParam(int paramKey) const {
72  return myDefaultParameter.find(paramKey)->second;
73  }
74 
75 
76 private:
78  std::map<int, double> myDefaultParameter;
79 
80 };
81 
82 
83 #endif
84 
85 /****************************************************************************/
86 
static const int ENERGY_BASE
Definition: HelpersEnergy.h:51
EmissionType
Enumerating all emission types, including fuel.
HelpersEnergy()
Constructor (initializes myEmissionClassStrings)
Helper methods for energy-based electricity consumption computation based on the battery device...
Definition: HelpersEnergy.h:49
std::map< int, double > myDefaultParameter
The default parameter.
Definition: HelpersEnergy.h:78
abstract superclass for the model helpers
int SUMOEmissionClass
double getDefaultParam(int paramKey) const
Definition: HelpersEnergy.h:71
double compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope, const std::map< int, double > *param) const
Computes the emitted pollutant amount using the given speed and acceleration.