Eclipse SUMO - Simulation of Urban MObility
|
#include <FirstOrderLagModel.h>
Public Member Functions | |
FirstOrderLagModel () | |
virtual double | getRealAcceleration (double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep=0) |
virtual void | loadParameters (const Parameterised::Map ¶meters) |
void | setMaximumAcceleration (double maxAcc) |
void | setMaximumDeceleration (double maxDec) |
virtual void | setParameter (const std::string parameter, const std::string &value) |
virtual void | setParameter (const std::string parameter, double value) |
virtual void | setParameter (const std::string parameter, int value) |
virtual | ~FirstOrderLagModel () |
Protected Member Functions | |
void | computeParameters () |
void | parseParameter (const Parameterised::Map ¶meters, std::string parameter, double &value) |
void | parseParameter (const Parameterised::Map ¶meters, std::string parameter, int &value) |
void | parseParameter (const Parameterised::Map ¶meters, std::string parameter, std::string &value) |
void | printParameterError (std::string parameter, std::string value) |
Protected Attributes | |
double | alpha |
std::string | className |
double | dt_s |
double | maxAcceleration_mpsps |
double | maxDeceleration_mpsps |
double | oneMinusAlpha |
double | tau_s |
This model models actuation lags using a first order lag, i.e., a first order low pass filter with a time constant tau
Definition at line 30 of file FirstOrderLagModel.h.
FirstOrderLagModel::FirstOrderLagModel | ( | ) |
Definition at line 26 of file FirstOrderLagModel.cpp.
References GenericEngineModel::className, and computeParameters().
|
virtual |
Definition at line 31 of file FirstOrderLagModel.cpp.
|
protected |
Recomputes helper variables after loading parameters
Definition at line 33 of file FirstOrderLagModel.cpp.
References alpha, dt_s, oneMinusAlpha, and tau_s.
Referenced by FirstOrderLagModel(), loadParameters(), and setParameter().
|
virtual |
Computes real vehicle acceleration given current speed, current acceleration, and requested acceleration. Acceleration can be negative as well. The model should handle decelerations as well
[in] | speed_mps | current speed in meters per second |
[in] | accel_mps2 | current acceleration in meters per squared second |
[in] | reqAccel_mps2 | requested acceleration in meters per squared second |
[in] | timeStep | current simulation timestep |
Implements GenericEngineModel.
Definition at line 38 of file FirstOrderLagModel.cpp.
References alpha, GenericEngineModel::maxAcceleration_mpsps, GenericEngineModel::maxDeceleration_mpsps, oneMinusAlpha, and UNUSED_PARAMETER.
|
virtual |
Load model parameters. This method requires a map of strings to be as flexible as possible, independently from the actual model implementation
[in] | parameters | a map of strings (from parameter name to parameter value) including configuration parameters |
Definition at line 50 of file FirstOrderLagModel.cpp.
References computeParameters(), dt_s, FOLM_PAR_DT, FOLM_PAR_TAU, GenericEngineModel::parseParameter(), and tau_s.
|
protectedinherited |
Parses a value from the parameter map
Definition at line 32 of file GenericEngineModel.cpp.
References GenericEngineModel::printParameterError(), and StringUtils::toDouble().
Referenced by loadParameters().
|
protectedinherited |
Definition at line 42 of file GenericEngineModel.cpp.
References GenericEngineModel::printParameterError(), and StringUtils::toInt().
|
protectedinherited |
Definition at line 52 of file GenericEngineModel.cpp.
|
protectedinherited |
Prints a parameter error
Definition at line 28 of file GenericEngineModel.cpp.
References GenericEngineModel::className.
Referenced by GenericEngineModel::parseParameter(), and GenericEngineModel::parseParameter().
|
inherited |
Sets maximum acceleration value
[in] | maximum | acceleration in meters per second squared |
Definition at line 58 of file GenericEngineModel.cpp.
References GenericEngineModel::maxAcceleration_mpsps.
Referenced by MSCFModel_CC::createVehicleVariables(), and MSCFModel_CC::setParameter().
|
inherited |
Sets maximum deceleration value
[in] | maximum | deceleration (positive value) in meters per second squared |
Definition at line 61 of file GenericEngineModel.cpp.
References GenericEngineModel::maxDeceleration_mpsps.
Referenced by MSCFModel_CC::createVehicleVariables(), and MSCFModel_CC::setParameter().
|
virtual |
Sets a single parameter value
[in] | parameter | the name of the parameter |
[in] | value | the value for the parameter |
Implements GenericEngineModel.
Definition at line 56 of file FirstOrderLagModel.cpp.
References UNUSED_PARAMETER.
|
virtual |
Implements GenericEngineModel.
Definition at line 60 of file FirstOrderLagModel.cpp.
References computeParameters(), dt_s, FOLM_PAR_DT, FOLM_PAR_TAU, and tau_s.
|
virtual |
Implements GenericEngineModel.
Definition at line 69 of file FirstOrderLagModel.cpp.
References UNUSED_PARAMETER.
|
protected |
Definition at line 39 of file FirstOrderLagModel.h.
Referenced by computeParameters(), and getRealAcceleration().
|
protectedinherited |
Definition at line 83 of file GenericEngineModel.h.
Referenced by FirstOrderLagModel(), GenericEngineModel::printParameterError(), and RealisticEngineModel::RealisticEngineModel().
|
protected |
Definition at line 37 of file FirstOrderLagModel.h.
Referenced by computeParameters(), loadParameters(), and setParameter().
|
protectedinherited |
Definition at line 86 of file GenericEngineModel.h.
Referenced by getRealAcceleration(), and GenericEngineModel::setMaximumAcceleration().
|
protectedinherited |
Definition at line 86 of file GenericEngineModel.h.
Referenced by getRealAcceleration(), and GenericEngineModel::setMaximumDeceleration().
|
protected |
Definition at line 39 of file FirstOrderLagModel.h.
Referenced by computeParameters(), and getRealAcceleration().
|
protected |
Definition at line 35 of file FirstOrderLagModel.h.
Referenced by computeParameters(), loadParameters(), and setParameter().