Eclipse 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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // Helper methods for HBEFA-based emission computation
17 /****************************************************************************/
18 #ifndef HelpersEnergy_h
19 #define HelpersEnergy_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <vector>
28 #include <limits>
29 #include <cmath>
30 #include <utils/common/StdDefs.h>
31 #include <utils/geom/GeomHelper.h>
33 #include "PollutantsInterface.h"
34 
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
44 public:
45  static const int ENERGY_BASE = 3 << 16;
46 
49  HelpersEnergy();
50 
51 
63  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;
64 
65  double getDefaultParam(int paramKey) const {
66  return myDefaultParameter.find(paramKey)->second;
67  }
68 
69 
70 private:
72  std::map<int, double> myDefaultParameter;
73 
74 };
75 
76 
77 #endif
78 
79 /****************************************************************************/
80 
HelpersEnergy::HelpersEnergy
HelpersEnergy()
Constructor (initializes myEmissionClassStrings)
Definition: HelpersEnergy.cpp:34
HelpersEnergy::compute
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.
Definition: HelpersEnergy.cpp:54
HelpersEnergy::myDefaultParameter
std::map< int, double > myDefaultParameter
The default parameter.
Definition: HelpersEnergy.h:72
PollutantsInterface::EmissionType
EmissionType
Enumerating all emission types, including fuel.
Definition: PollutantsInterface.h:56
PollutantsInterface::Helper
abstract superclass for the model helpers
Definition: PollutantsInterface.h:103
SUMOEmissionClass
int SUMOEmissionClass
Definition: SUMOVehicleClass.h:232
HelpersEnergy::getDefaultParam
double getDefaultParam(int paramKey) const
Definition: HelpersEnergy.h:65
HelpersEnergy::ENERGY_BASE
static const int ENERGY_BASE
Definition: HelpersEnergy.h:45
HelpersEnergy
Helper methods for energy-based electricity consumption computation based on the battery device.
Definition: HelpersEnergy.h:43
PollutantsInterface.h
SUMOVehicleClass.h
config.h
GeomHelper.h
StdDefs.h