75 void setMass(
const double mass);
92 double getTotalMass(
const double defaultEmptyMass,
const double defaultLoading)
const;
123 const std::string
dump()
const {
146 std::map<SumoXMLAttr, double>
myMap;
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
const double INVALID_DOUBLE
invalid double
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
The purpose of this class is to store a characteristic map (German: Kennfeld) of arbitrary dimensions...
An upper class for objects with additional parameters.
double getDouble(SumoXMLAttr attr) const
Returns the value for a given key.
static const std::vector< SumoXMLAttr > myParamAttrs
void setMass(const double mass)
Sets the empty mass of the vehicle (type) This is to be used by traci/libsumo.
bool isOff() const
Returns whether the vehicle is currently consuming any energy derived from the parking state.
double getTotalMass(const double defaultEmptyMass, const double defaultLoading) const
Returns the sum of the empty mass (SUMO_ATTR_MASS), tthe loading (SUMO_ATTR_LOADING) and the mass of ...
static const EnergyParams * myDefault
EnergyParams(const EnergyParams &s)=delete
invalidate copy constructor
bool myHaveDefaultFrontSurfaceArea
double getDoubleOptional(SumoXMLAttr attr, const double def) const
Returns the value for a given key with an optional default. SUMO_ATTR_MASS and SUMO_ATTR_FRONTSURFACE...
double myWaitingTimeSeconds
std::map< SumoXMLAttr, double > myMap
The key->value maps.
std::map< SumoXMLAttr, CharacteristicMap > myCharacteristicMapMap
double myTransportableMass
bool isEngineOff() const
Returns the state of the engine when the vehicle is not moving.
EnergyParams(const EnergyParams *secondaryParams)
Constructor.
const EnergyParams * mySecondaryParams
const CharacteristicMap & getCharacteristicMap(SumoXMLAttr attr) const
Return the CharacteristicMap that belongs to a given attribute.
double getTransportableMass() const
Returns the mass of all transportables in the vehicle.
double myStopDurationSeconds
void setSecondary(const EnergyParams *secondaryParams)
Set secondary params.
~EnergyParams()
Destructor.
static const EnergyParams * getDefault()
void setTransportableMass(const double mass)
Sets the mass of all transportables in the vehicle.
const std::string dump() const
Returns a complete inner description.
EnergyParams & operator=(const EnergyParams &s)=delete
invalidate assignment operator
double getAngleDiff() const
Returns the angle difference between the last two calls of setDynamicValues (usually the last two tim...
void setDynamicValues(const SUMOTime stopDuration, const bool parking, const SUMOTime waitingTime, const double angle)
Sets the values which change possibly in every simulation step and are relevant for emsssion calculat...
Structure representing possible vehicle parameter.