Eclipse SUMO - Simulation of Urban MObility
|
#include <GenericEngineModel.h>
Public Member Functions | |
GenericEngineModel () | |
constructor | |
virtual double | getRealAcceleration (double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep=0)=0 |
void | setMaximumAcceleration (double maxAcc) |
void | setMaximumDeceleration (double maxDec) |
virtual void | setParameter (const std::string parameter, const std::string &value)=0 |
virtual void | setParameter (const std::string parameter, double value)=0 |
virtual void | setParameter (const std::string parameter, int value)=0 |
virtual | ~GenericEngineModel () |
destructor | |
Protected Member Functions | |
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 | |
std::string | className |
double | maxAcceleration_mpsps |
double | maxDeceleration_mpsps |
This is an interface for plexe engine models. It provides two virtual methods that should be overridden by implementing classes: getRealAcceleration and loadParameters
Definition at line 34 of file GenericEngineModel.h.
|
inline |
constructor
Definition at line 38 of file GenericEngineModel.h.
|
inlinevirtual |
destructor
Definition at line 41 of file GenericEngineModel.h.
|
pure 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 |
Implemented in FirstOrderLagModel, and RealisticEngineModel.
Referenced by MSCFModel_CC::finalizeSpeed().
|
protected |
Parses a value from the parameter map
Definition at line 32 of file GenericEngineModel.cpp.
References printParameterError(), and StringUtils::toDouble().
Referenced by FirstOrderLagModel::loadParameters().
|
protected |
Definition at line 42 of file GenericEngineModel.cpp.
References printParameterError(), and StringUtils::toInt().
|
protected |
Definition at line 52 of file GenericEngineModel.cpp.
|
protected |
Prints a parameter error
Definition at line 28 of file GenericEngineModel.cpp.
References className.
Referenced by parseParameter(), and parseParameter().
void GenericEngineModel::setMaximumAcceleration | ( | double | maxAcc | ) |
Sets maximum acceleration value
[in] | maximum | acceleration in meters per second squared |
Definition at line 58 of file GenericEngineModel.cpp.
References maxAcceleration_mpsps.
Referenced by MSCFModel_CC::createVehicleVariables(), and MSCFModel_CC::setParameter().
void GenericEngineModel::setMaximumDeceleration | ( | double | maxDec | ) |
Sets maximum deceleration value
[in] | maximum | deceleration (positive value) in meters per second squared |
Definition at line 61 of file GenericEngineModel.cpp.
References maxDeceleration_mpsps.
Referenced by MSCFModel_CC::createVehicleVariables(), and MSCFModel_CC::setParameter().
|
pure virtual |
Sets a single parameter value
[in] | parameter | the name of the parameter |
[in] | value | the value for the parameter |
Implemented in FirstOrderLagModel, and RealisticEngineModel.
Referenced by MSCFModel_CC::createVehicleVariables(), and MSCFModel_CC::setParameter().
|
pure virtual |
Implemented in FirstOrderLagModel, and RealisticEngineModel.
|
pure virtual |
Implemented in FirstOrderLagModel, and RealisticEngineModel.
|
protected |
Definition at line 83 of file GenericEngineModel.h.
Referenced by FirstOrderLagModel::FirstOrderLagModel(), printParameterError(), and RealisticEngineModel::RealisticEngineModel().
|
protected |
Definition at line 86 of file GenericEngineModel.h.
Referenced by FirstOrderLagModel::getRealAcceleration(), and setMaximumAcceleration().
|
protected |
Definition at line 86 of file GenericEngineModel.h.
Referenced by FirstOrderLagModel::getRealAcceleration(), and setMaximumDeceleration().