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