Eclipse SUMO - Simulation of Urban MObility
FirstOrderLagModel.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 /****************************************************************************/
14 // An engine model using a first order lag
15 /****************************************************************************/
16 
17 #ifndef FIRSTORDERLAGMODEL_H_
18 #define FIRSTORDERLAGMODEL_H_
19 
20 #include "GenericEngineModel.h"
21 
27 
28 protected:
29 
30  //engine lag time constant in seconds
31  double tau_s;
32  //simulation sampling time
33  double dt_s;
34  //helper variables
36 
40  void computeParameters();
41 
42 public:
44  virtual ~FirstOrderLagModel();
45 
58  virtual double getRealAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep = 0);
59 
67  virtual void loadParameters(const ParMap& parameters);
68 
75  virtual void setParameter(const std::string parameter, const std::string& value);
76  virtual void setParameter(const std::string parameter, double value);
77  virtual void setParameter(const std::string parameter, int value);
78 
79 };
80 
81 #endif /* FIRSTORDERLAGMODEL_H_ */
FirstOrderLagModel::~FirstOrderLagModel
virtual ~FirstOrderLagModel()
Definition: FirstOrderLagModel.cpp:27
FirstOrderLagModel::oneMinusAlpha
double oneMinusAlpha
Definition: FirstOrderLagModel.h:35
FirstOrderLagModel::loadParameters
virtual void loadParameters(const ParMap &parameters)
Definition: FirstOrderLagModel.cpp:46
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
FirstOrderLagModel::setParameter
virtual void setParameter(const std::string parameter, const std::string &value)
Definition: FirstOrderLagModel.cpp:52
FirstOrderLagModel::getRealAcceleration
virtual double getRealAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep=0)
Definition: FirstOrderLagModel.cpp:34
FirstOrderLagModel::dt_s
double dt_s
Definition: FirstOrderLagModel.h:33
FirstOrderLagModel::alpha
double alpha
Definition: FirstOrderLagModel.h:35
FirstOrderLagModel::tau_s
double tau_s
Definition: FirstOrderLagModel.h:31
GenericEngineModel::ParMap
std::map< std::string, std::string > ParMap
Definition: GenericEngineModel.h:33
FirstOrderLagModel::FirstOrderLagModel
FirstOrderLagModel()
Definition: FirstOrderLagModel.cpp:22
GenericEngineModel
Definition: GenericEngineModel.h:29
FirstOrderLagModel
Definition: FirstOrderLagModel.h:26
GenericEngineModel.h
FirstOrderLagModel::computeParameters
void computeParameters()
Definition: FirstOrderLagModel.cpp:29