![]() |
Eclipse SUMO - Simulation of Urban MObility
|
An upper class for objects with additional parameters. More...
#include <EnergyParams.h>
Public Member Functions | |
EnergyParams (const SUMOVTypeParameter *typeParams=nullptr) | |
Default constructor. More... | |
const CharacteristicMap & | getCharacteristicMap (SumoXMLAttr attr) const |
Return the CharacteristicMap that belongs to a given attribute. More... | |
double | getDouble (SumoXMLAttr attr) const |
const std::vector< double > & | getDoubles (SumoXMLAttr attr) const |
Returns the value for a given key. More... | |
bool | knowsParameter (SumoXMLAttr attr) const |
void | setDouble (SumoXMLAttr attr, double value) |
Sets a parameter. More... | |
~EnergyParams () | |
Destructor. More... | |
Private Attributes | |
std::map< SumoXMLAttr, CharacteristicMap > | myCharacteristicMapMap |
std::map< SumoXMLAttr, double > | myMap |
The key->value maps. More... | |
std::map< SumoXMLAttr, std::vector< double > > | myVecMap |
An upper class for objects with additional parameters.
Definition at line 41 of file EnergyParams.h.
EnergyParams::EnergyParams | ( | const SUMOVTypeParameter * | typeParams = nullptr | ) |
Default constructor.
Definition at line 32 of file EnergyParams.cpp.
References Parameterised::getDouble(), Parameterised::getDoubles(), Parameterised::getParameter(), myCharacteristicMapMap, myMap, myVecMap, SUMO_ATTR_AIRDRAGCOEFFICIENT, SUMO_ATTR_ANGLE, SUMO_ATTR_CONSTANTPOWERINTAKE, SUMO_ATTR_FRONTSURFACEAREA, SUMO_ATTR_GEAREFFICIENCY, SUMO_ATTR_GEARRATIO, SUMO_ATTR_INTERNALBATTERYRESISTANCE, SUMO_ATTR_INTERNALMOMENTOFINERTIA, SUMO_ATTR_MAXIMUMPOWER, SUMO_ATTR_MAXIMUMRECUPERATIONPOWER, SUMO_ATTR_MAXIMUMRECUPERATIONTORQUE, SUMO_ATTR_MAXIMUMTORQUE, SUMO_ATTR_NOMINALBATTERYVOLTAGE, SUMO_ATTR_POWERLOSSMAP, SUMO_ATTR_PROPULSIONEFFICIENCY, SUMO_ATTR_RADIALDRAGCOEFFICIENT, SUMO_ATTR_RECUPERATIONEFFICIENCY, SUMO_ATTR_RECUPERATIONEFFICIENCY_BY_DECELERATION, SUMO_ATTR_ROLLDRAGCOEFFICIENT, SUMO_ATTR_VEHICLEMASS, SUMO_ATTR_WHEELRADIUS, and toString().
EnergyParams::~EnergyParams | ( | ) |
Destructor.
Definition at line 81 of file EnergyParams.cpp.
const CharacteristicMap & EnergyParams::getCharacteristicMap | ( | SumoXMLAttr | attr | ) | const |
Return the CharacteristicMap that belongs to a given attribute.
[in] | attr | Name of an attribute |
Definition at line 110 of file EnergyParams.cpp.
References myCharacteristicMapMap, and toString().
Referenced by HelpersMMPEVEM::compute().
double EnergyParams::getDouble | ( | SumoXMLAttr | attr | ) | const |
Definition at line 90 of file EnergyParams.cpp.
References myMap, and toString().
Referenced by HelpersEnergy::acceleration(), MSDevice_Battery::checkParam(), MSDevice_ElecHybrid::checkParam(), HelpersEnergy::compute(), HelpersMMPEVEM::compute(), MSDevice_ElecHybrid::computeChargedEnergy(), HelpersEnergy::getDefaultParam(), MSDevice_Battery::getParameter(), MSDevice_ElecHybrid::getParameter(), and MSDevice_ElecHybrid::getParameterDouble().
const std::vector< double > & EnergyParams::getDoubles | ( | SumoXMLAttr | attr | ) | const |
Returns the value for a given key.
[in] | key | The key to ask for |
Definition at line 100 of file EnergyParams.cpp.
References myVecMap, and toString().
bool EnergyParams::knowsParameter | ( | SumoXMLAttr | attr | ) | const |
Definition at line 120 of file EnergyParams.cpp.
References myCharacteristicMapMap, myMap, and myVecMap.
Referenced by MSDevice_Battery::checkParam(), and MSDevice_ElecHybrid::checkParam().
void EnergyParams::setDouble | ( | SumoXMLAttr | attr, |
double | value | ||
) |
Sets a parameter.
[in] | key | The parameter's name |
[in] | value | The parameter's value |
Definition at line 85 of file EnergyParams.cpp.
References myMap.
Referenced by MSDevice_ElecHybrid::acceleration(), MSDevice_ElecHybrid::buildVehicleDevices(), MSDevice_Battery::checkParam(), MSDevice_ElecHybrid::checkParam(), MSDevice_ElecHybrid::consumption(), MSDevice_Battery::notifyMove(), MSDevice_Battery::setParameter(), and MSDevice_ElecHybrid::setParameter().
|
private |
Definition at line 79 of file EnergyParams.h.
Referenced by EnergyParams(), getCharacteristicMap(), and knowsParameter().
|
private |
The key->value maps.
Definition at line 77 of file EnergyParams.h.
Referenced by EnergyParams(), getDouble(), knowsParameter(), and setDouble().
|
private |
Definition at line 78 of file EnergyParams.h.
Referenced by EnergyParams(), getDoubles(), and knowsParameter().