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 /****************************************************************************/
15 // Helper methods for HBEFA-based emission computation
16 /****************************************************************************/
17 #ifndef HelpersEnergy_h
18 #define HelpersEnergy_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <vector>
27 #include <limits>
28 #include <cmath>
29 #include <utils/common/StdDefs.h>
30 #include <utils/geom/GeomHelper.h>
32 #include "PollutantsInterface.h"
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
43 public:
44  static const int ENERGY_BASE = 3 << 16;
45 
48  HelpersEnergy();
49 
50 
62  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;
63 
64  double getDefaultParam(int paramKey) const {
65  return myDefaultParameter.find(paramKey)->second;
66  }
67 
68 
69 private:
71  std::map<int, double> myDefaultParameter;
72 
73 };
74 
75 
76 #endif
77 
78 /****************************************************************************/
79 
HelpersEnergy::HelpersEnergy
HelpersEnergy()
Constructor (initializes myEmissionClassStrings)
Definition: HelpersEnergy.cpp:33
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:53
HelpersEnergy::myDefaultParameter
std::map< int, double > myDefaultParameter
The default parameter.
Definition: HelpersEnergy.h:71
PollutantsInterface::EmissionType
EmissionType
Enumerating all emission types, including fuel.
Definition: PollutantsInterface.h:55
PollutantsInterface::Helper
abstract superclass for the model helpers
Definition: PollutantsInterface.h:102
SUMOEmissionClass
int SUMOEmissionClass
Definition: SUMOVehicleClass.h:231
HelpersEnergy::getDefaultParam
double getDefaultParam(int paramKey) const
Definition: HelpersEnergy.h:64
HelpersEnergy::ENERGY_BASE
static const int ENERGY_BASE
Definition: HelpersEnergy.h:44
HelpersEnergy
Helper methods for energy-based electricity consumption computation based on the battery device.
Definition: HelpersEnergy.h:42
PollutantsInterface.h
SUMOVehicleClass.h
config.h
GeomHelper.h
StdDefs.h