62 if (typeParams !=
nullptr) {
63 for (
auto item :
myMap) {
71 if (characteristicMapString !=
"") {
91 auto it =
myMap.find(attr);
92 if (it !=
myMap.end()) {
99 const std::vector<double>&
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_GEAREFFICIENCY
Gear efficiency.
@ SUMO_ATTR_MAXIMUMPOWER
Maximum Power.
@ SUMO_ATTR_INTERNALBATTERYRESISTANCE
Internal battery resistance.
@ SUMO_ATTR_MAXIMUMTORQUE
Maximum torque.
@ SUMO_ATTR_ROLLDRAGCOEFFICIENT
Roll Drag coefficient.
@ SUMO_ATTR_CONSTANTPOWERINTAKE
Constant Power Intake.
@ SUMO_ATTR_RECUPERATIONEFFICIENCY_BY_DECELERATION
Recuperation efficiency (by deceleration)
@ SUMO_ATTR_RECUPERATIONEFFICIENCY
Recuperation efficiency (constant)
@ SUMO_ATTR_AIRDRAGCOEFFICIENT
Air drag coefficient.
@ SUMO_ATTR_POWERLOSSMAP
A string encoding the power loss map.
@ SUMO_ATTR_MAXIMUMRECUPERATIONPOWER
Maximum recuperation power.
@ SUMO_ATTR_MAXIMUMRECUPERATIONTORQUE
Maximum recuperation torque.
@ SUMO_ATTR_VEHICLEMASS
Vehicle mass.
@ SUMO_ATTR_RADIALDRAGCOEFFICIENT
Radial drag coefficient.
@ SUMO_ATTR_GEARRATIO
Gear ratio.
@ SUMO_ATTR_PROPULSIONEFFICIENCY
Propulsion efficiency.
@ SUMO_ATTR_INTERNALMOMENTOFINERTIA
Internal moment of inertia.
@ SUMO_ATTR_NOMINALBATTERYVOLTAGE
Nominal battery voltage.
@ SUMO_ATTR_FRONTSURFACEAREA
Front surface area.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
The purpose of this class is to store a characteristic map (German: Kennfeld) of arbitrary dimensions...
double getDouble(SumoXMLAttr attr) const
bool knowsParameter(SumoXMLAttr attr) const
void setDouble(SumoXMLAttr attr, double value)
Sets a parameter.
std::map< SumoXMLAttr, double > myMap
The key->value maps.
EnergyParams(const SUMOVTypeParameter *typeParams=nullptr)
Default constructor.
std::map< SumoXMLAttr, std::vector< double > > myVecMap
std::map< SumoXMLAttr, CharacteristicMap > myCharacteristicMapMap
const CharacteristicMap & getCharacteristicMap(SumoXMLAttr attr) const
Return the CharacteristicMap that belongs to a given attribute.
~EnergyParams()
Destructor.
const std::vector< double > & getDoubles(SumoXMLAttr attr) const
Returns the value for a given key.
std::vector< double > getDoubles(const std::string &key, std::vector< double > defaultValue=std::vector< double >()) const
Returns the value for a given key converted to a list of doubles.
double getDouble(const std::string &key, const double defaultValue) const
Returns the value for a given key converted to a double.
virtual const std::string getParameter(const std::string &key, const std::string defaultValue="") const
Returns the value for a given key.
Structure representing possible vehicle parameter.