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
27
class
FirstOrderLagModel
:
public
GenericEngineModel
{
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
36
double
alpha
,
oneMinusAlpha
;
37
41
void
computeParameters
();
42
43
public
:
44
FirstOrderLagModel
();
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_ */
FirstOrderLagModel::~FirstOrderLagModel
virtual ~FirstOrderLagModel()
Definition:
FirstOrderLagModel.cpp:28
FirstOrderLagModel::oneMinusAlpha
double oneMinusAlpha
Definition:
FirstOrderLagModel.h:36
FirstOrderLagModel::loadParameters
virtual void loadParameters(const ParMap ¶meters)
Definition:
FirstOrderLagModel.cpp:47
SUMOTime
long long int SUMOTime
Definition:
SUMOTime.h:35
FirstOrderLagModel::setParameter
virtual void setParameter(const std::string parameter, const std::string &value)
Definition:
FirstOrderLagModel.cpp:53
FirstOrderLagModel::getRealAcceleration
virtual double getRealAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep=0)
Definition:
FirstOrderLagModel.cpp:35
FirstOrderLagModel::dt_s
double dt_s
Definition:
FirstOrderLagModel.h:34
FirstOrderLagModel::alpha
double alpha
Definition:
FirstOrderLagModel.h:36
FirstOrderLagModel::tau_s
double tau_s
Definition:
FirstOrderLagModel.h:32
GenericEngineModel::ParMap
std::map< std::string, std::string > ParMap
Definition:
GenericEngineModel.h:34
FirstOrderLagModel::FirstOrderLagModel
FirstOrderLagModel()
Definition:
FirstOrderLagModel.cpp:23
GenericEngineModel
Definition:
GenericEngineModel.h:30
FirstOrderLagModel
Definition:
FirstOrderLagModel.h:27
GenericEngineModel.h
FirstOrderLagModel::computeParameters
void computeParameters()
Definition:
FirstOrderLagModel.cpp:30
src
microsim
engine
FirstOrderLagModel.h
Generated on Wed Jan 15 2020 15:04:13 for Eclipse SUMO - Simulation of Urban MObility by
1.8.16