SUMO - Simulation of Urban MObility
HelpersEnergy.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Helper methods for HBEFA-based emission computation
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2017 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 HelpersEnergy_h
22 #define HelpersEnergy_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 <utils/geom/GeomHelper.h>
40 #include "PollutantsInterface.h"
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
51 public:
52  static const int ENERGY_BASE = 3 << 16;
53 
56  HelpersEnergy();
57 
58 
70  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;
71 
72  double getDefaultParam(int paramKey) const {
73  return myDefaultParameter.find(paramKey)->second;
74  }
75 
76 
77 private:
79  std::map<int, double> myDefaultParameter;
80 
81 };
82 
83 
84 #endif
85 
86 /****************************************************************************/
87 
static const int ENERGY_BASE
Definition: HelpersEnergy.h:52
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:50
std::map< int, double > myDefaultParameter
The default parameter.
Definition: HelpersEnergy.h:79
abstract superclass for the model helpers
int SUMOEmissionClass
double getDefaultParam(int paramKey) const
Definition: HelpersEnergy.h:72
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.