Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSDevice_Battery.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2013-2023 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
19// The Battery parameters for the vehicle
20/****************************************************************************/
21#include <config.h>
22
29#include <microsim/MSNet.h>
30#include <microsim/MSLane.h>
31#include <microsim/MSEdge.h>
32#include <microsim/MSVehicle.h>
34#include "MSDevice_Emissions.h"
35#include "MSDevice_Battery.h"
36
37#define DEFAULT_MAX_CAPACITY 35000
38#define DEFAULT_CHARGE_RATIO 0.5
39
40
41// ===========================================================================
42// method definitions
43// ===========================================================================
44// ---------------------------------------------------------------------------
45// static initialisation methods
46// ---------------------------------------------------------------------------
47void
49 insertDefaultAssignmentOptions("battery", "Battery", oc);
50 // custom options
51 oc.doRegister("device.battery.track-fuel", new Option_Bool(false));
52 oc.addDescription("device.battery.track-fuel", "Battery", TL("Track fuel consumption for non-electric vehicles"));
53}
54
55
56void
57MSDevice_Battery::buildVehicleDevices(SUMOVehicle& v, std::vector<MSVehicleDevice*>& into, MSDevice_StationFinder* sf) {
58 // Check if vehicle should get a battery
59 if (sf != nullptr || equippedByDefaultAssignmentOptions(OptionsCont::getOptions(), "battery", v, false)) {
60 const SUMOVTypeParameter& typeParams = v.getVehicleType().getParameter();
61 // obtain maximumBatteryCapacity
62 const double maximumBatteryCapacity = typeParams.getDouble(toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY), DEFAULT_MAX_CAPACITY);
63
64 // obtain actualBatteryCapacity
65 double actualBatteryCapacity = 0;
67 actualBatteryCapacity = typeParams.getDouble(toString(SUMO_ATTR_ACTUALBATTERYCAPACITY),
68 maximumBatteryCapacity * DEFAULT_CHARGE_RATIO);
69 } else {
71 }
72
73 const double powerMax = typeParams.getDouble(toString(SUMO_ATTR_MAXIMUMPOWER), 150000.);
74 const double stoppingThreshold = typeParams.getDouble(toString(SUMO_ATTR_STOPPINGTHRESHOLD), 0.1);
75
76 // battery constructor
77 MSDevice_Battery* device = new MSDevice_Battery(v, "battery_" + v.getID(),
78 actualBatteryCapacity, maximumBatteryCapacity, powerMax, stoppingThreshold);
79
80 // Add device to vehicle
81 into.push_back(device);
82
83 if (sf != nullptr) {
84 sf->setBattery(device);
85 }
86 }
87}
88
89
90// ---------------------------------------------------------------------------
91// MSDevice_Battery-methods
92// ---------------------------------------------------------------------------
93MSDevice_Battery::MSDevice_Battery(SUMOVehicle& holder, const std::string& id, const double actualBatteryCapacity, const double maximumBatteryCapacity,
94 const double powerMax, const double stoppingThreshold) :
95 MSVehicleDevice(holder, id),
96 myActualBatteryCapacity(0), // [actualBatteryCapacity <= maximumBatteryCapacity]
97 myMaximumBatteryCapacity(0), // [maximumBatteryCapacity >= 0]
98 myPowerMax(0), // [maximumPower >= 0]
99 myStoppingThreshold(0), // [stoppingThreshold >= 0]
100 myLastAngle(std::numeric_limits<double>::infinity()),
101 myChargingStopped(false), // Initially vehicle don't charge stopped
102 myChargingInTransit(false), // Initially vehicle don't charge in transit
103 myChargingStartTime(0), // Initially charging start time (must be if the vehicle was launched at the charging station)
104 myConsum(0), // Initially the vehicle is stopped and therefore the consum is zero.
105 myTotalConsumption(0.0),
106 myTotalRegenerated(0.0),
107 myActChargingStation(nullptr), // Initially the vehicle isn't over a Charging Station
108 myPreviousNeighbouringChargingStation(nullptr), // Initially the vehicle wasn't over a Charging Station
109 myEnergyCharged(0), // Initially the energy charged is zero
110 myVehicleStopped(0) { // Initially the vehicle is stopped and the corresponding variable is 0
111
112 if (maximumBatteryCapacity < 0) {
113 WRITE_WARNINGF(TL("Battery builder: Vehicle '%' doesn't have a valid value for parameter % (%)."), getID(), toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY), toString(maximumBatteryCapacity));
114 } else {
115 myMaximumBatteryCapacity = maximumBatteryCapacity;
116 }
117
118 if (actualBatteryCapacity > maximumBatteryCapacity) {
119 WRITE_WARNING("Battery builder: Vehicle '" + getID() + "' has a " + toString(SUMO_ATTR_ACTUALBATTERYCAPACITY) + " (" + toString(actualBatteryCapacity) + ") greater than it's " + toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY) + " (" + toString(maximumBatteryCapacity) + "). A max battery capacity value will be asigned");
121 } else {
122 myActualBatteryCapacity = actualBatteryCapacity;
123 }
124
125 if (powerMax < 0) {
126 WRITE_WARNINGF(TL("Battery builder: Vehicle '%' doesn't have a valid value for parameter % (%)."), getID(), toString(SUMO_ATTR_MAXIMUMPOWER), toString(powerMax));
127 } else {
128 myPowerMax = powerMax;
129 }
130
131 if (stoppingThreshold < 0) {
132 WRITE_WARNINGF(TL("Battery builder: Vehicle '%' doesn't have a valid value for parameter % (%)."), getID(), toString(SUMO_ATTR_STOPPINGTHRESHOLD), toString(stoppingThreshold));
133 } else {
134 myStoppingThreshold = stoppingThreshold;
135 }
136
148
150}
151
152
155
156
157bool MSDevice_Battery::notifyMove(SUMOTrafficObject& tObject, double /* oldPos */, double /* newPos */, double /* newSpeed */) {
158 if (!tObject.isVehicle()) {
159 return false;
160 }
161 SUMOVehicle& veh = static_cast<SUMOVehicle&>(tObject);
162 // Start vehicleStoppedTimer if the vehicle is stopped. In other case reset timer
163 if (veh.getSpeed() < myStoppingThreshold) {
164 // Increase vehicle stopped timer
166 } else {
167 // Reset vehicle Stopped
169 }
170
171 // Update Energy from the battery
173 if (getMaximumBatteryCapacity() != 0) {
174 params->setDouble(SUMO_ATTR_ANGLE, myLastAngle == std::numeric_limits<double>::infinity() ? 0. : GeomHelper::angleDiff(myLastAngle, veh.getAngle()));
175 if (myTrackFuel) {
176 // [ml]
178 veh.getSlope(), params) * TS;
179 } else {
180 // [Wh]
182 veh.getSlope(), params) * TS;
183 }
184 if (veh.isParking()) {
185 // recuperation from last braking step is ok but further consumption should cease
186 myConsum = MIN2(myConsum, 0.0);
187 }
188
189 // Energy lost/gained from vehicle movement (via vehicle energy model) [Wh]
191
192 // Track total energy consumption and regeneration
193 if (myConsum > 0.0) {
195 } else {
197 }
198
199 // saturate between 0 and myMaximumBatteryCapacity [Wh]
200 if (getActualBatteryCapacity() < 0) {
202 if (getMaximumBatteryCapacity() > 0) {
203 WRITE_WARNINGF(TL("Battery of vehicle '%' is depleted."), veh.getID());
204 }
207 }
208 myLastAngle = veh.getAngle();
209 }
210
211 // Check if vehicle has under their position one charge Station
212 const std::string chargingStationID = MSNet::getInstance()->getStoppingPlaceID(veh.getLane(), veh.getPositionOnLane(), SUMO_TAG_CHARGING_STATION);
213
214 // If vehicle is over a charging station
215 if (chargingStationID != "") {
216 // if the vehicle is almost stopped, or charge in transit is enabled, then charge vehicle
218 if ((veh.getSpeed() < myStoppingThreshold) || cs->getChargeInTransit()) {
219 // Set Flags Stopped/intransit to
220 if (veh.getSpeed() < myStoppingThreshold) {
221 // vehicle ist almost stopped, then is charging stopped
222 myChargingStopped = true;
223
224 // therefore isn't charging in transit
225 myChargingInTransit = false;
226 } else {
227 // vehicle is moving, and the Charging station allow charge in transit
228 myChargingStopped = false;
229
230 // Therefore charge in transit
231 myChargingInTransit = true;
232 }
233
234 // get pointer to charging station
236
237 // Only update charging start time if vehicle allow charge in transit, or in other case
238 // if the vehicle not allow charge in transit but it's stopped.
240 // Update Charging start time
242 }
243
244 // time it takes the vehicle at the station < charging station time delay?
246 // Enable charging vehicle
248
249 // Calulate energy charged
251
252 // Update Battery charge
255 } else {
257 }
258 }
259 // add charge value for output to myActChargingStation
261 }
262 // else disable charging vehicle
263 else {
264 cs->setChargingVehicle(false);
265 }
266 // disable charging vehicle from previous (not current) ChargingStation (reason: if there is no gap between two different chargingStations = the vehicle switches from used charging station to other one in a single timestap)
269 }
271 }
272 // In other case, vehicle will be not charged
273 else {
274 // Disable flags
275 myChargingInTransit = false;
276 myChargingStopped = false;
277
278 // Disable charging vehicle
279 if (myActChargingStation != nullptr) {
281 }
282
283 // Set charging station pointer to NULL
284 myActChargingStation = nullptr;
285
286 // Set energy charged to 0
287 myEnergyCharged = 0.00;
288
289 // Reset timer
291 }
292
293 // Always return true.
294 return true;
295}
296
297
298void
299MSDevice_Battery::setActualBatteryCapacity(const double actualBatteryCapacity) {
300 if (actualBatteryCapacity < 0) {
302 } else if (actualBatteryCapacity > myMaximumBatteryCapacity) {
304 } else {
305 myActualBatteryCapacity = actualBatteryCapacity;
306 }
307}
308
309
310void
311MSDevice_Battery::setMaximumBatteryCapacity(const double maximumBatteryCapacity) {
312 if (myMaximumBatteryCapacity < 0) {
313 WRITE_WARNINGF(TL("Trying to set into the battery device of vehicle '%' an invalid % (%)."), getID(), toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY), toString(maximumBatteryCapacity));
314 } else {
315 myMaximumBatteryCapacity = maximumBatteryCapacity;
316 }
317}
318
319
320void
321MSDevice_Battery::setPowerMax(const double powerMax) {
322 if (myPowerMax < 0) {
323 WRITE_WARNINGF(TL("Trying to set into the battery device of vehicle '%' an invalid % (%)."), getID(), toString(SUMO_ATTR_MAXIMUMPOWER), toString(powerMax));
324 } else {
325 myPowerMax = powerMax;
326 }
327}
328
329
330void
331MSDevice_Battery::setStoppingThreshold(const double stoppingThreshold) {
332 if (stoppingThreshold < 0) {
333 WRITE_WARNINGF(TL("Trying to set into the battery device of vehicle '%' an invalid % (%)."), getID(), toString(SUMO_ATTR_STOPPINGTHRESHOLD), toString(stoppingThreshold));
334 } else {
335 myStoppingThreshold = stoppingThreshold;
336 }
337}
338
339
340void
344
345
346void
350
351
352void
356
357
358void
362
363
364double
368
369
370double
374
375
376double
380
381
382double
384 return myConsum;
385}
386
387double
391
392
393double
397
398
399bool
403
404
405bool
409
410
415
416
417std::string
419 if (myActChargingStation != nullptr) {
420 return myActChargingStation->getID();
421 } else {
422 return "NULL";
423 }
424}
425
426double
430
431
432int
436
437
438double
442
443
444std::string
445MSDevice_Battery::getParameter(const std::string& key) const {
448 } else if (key == toString(SUMO_ATTR_ENERGYCONSUMED)) {
449 return toString(getConsum());
450 } else if (key == toString(SUMO_ATTR_TOTALENERGYCONSUMED)) {
452 } else if (key == toString(SUMO_ATTR_TOTALENERGYREGENERATED)) {
454 } else if (key == toString(SUMO_ATTR_ENERGYCHARGED)) {
455 return toString(getEnergyCharged());
456 } else if (key == toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY)) {
458 } else if (key == toString(SUMO_ATTR_CHARGINGSTATIONID)) {
459 return getChargingStationID();
460 } else if (key == toString(SUMO_ATTR_VEHICLEMASS)) {
462 }
463 throw InvalidArgument("Parameter '" + key + "' is not supported for device of type '" + deviceName() + "'");
464}
465
466
467void
468MSDevice_Battery::setParameter(const std::string& key, const std::string& value) {
469 double doubleValue;
470 try {
471 doubleValue = StringUtils::toDouble(value);
472 } catch (NumberFormatException&) {
473 throw InvalidArgument("Setting parameter '" + key + "' requires a number for device of type '" + deviceName() + "'");
474 }
476 setActualBatteryCapacity(doubleValue);
477 } else if (key == toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY)) {
478 setMaximumBatteryCapacity(doubleValue);
479 } else if (key == toString(SUMO_ATTR_VEHICLEMASS)) {
481 } else {
482 throw InvalidArgument("Setting parameter '" + key + "' is not supported for device of type '" + deviceName() + "'");
483 }
484}
485
486
487void
489 // @note: only charing is performed but no energy is consumed
491 myConsum = 0;
492}
493
494
495/****************************************************************************/
long long int SUMOTime
Definition GUI.h:36
#define DEFAULT_CHARGE_RATIO
#define DEFAULT_MAX_CAPACITY
#define WRITE_WARNINGF(...)
Definition MsgHandler.h:271
#define WRITE_WARNING(msg)
Definition MsgHandler.h:270
#define TL(string)
Definition MsgHandler.h:287
SUMOTime DELTA_T
Definition SUMOTime.cpp:38
#define TS
Definition SUMOTime.h:42
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_ATTR_MAXIMUMPOWER
Maximum Power.
@ SUMO_ATTR_ENERGYCONSUMED
Energy consumed.
@ SUMO_ATTR_MAXIMUMBATTERYCAPACITY
Maxium battery capacity.
@ SUMO_ATTR_ROLLDRAGCOEFFICIENT
Roll Drag coefficient.
@ SUMO_ATTR_CONSTANTPOWERINTAKE
Constant Power Intake.
@ SUMO_ATTR_RECUPERATIONEFFICIENCY_BY_DECELERATION
Recuperation efficiency (by deceleration)
@ SUMO_ATTR_STOPPINGTHRESHOLD
Stopping threshold.
@ SUMO_ATTR_RECUPERATIONEFFICIENCY
Recuperation efficiency (constant)
@ SUMO_ATTR_AIRDRAGCOEFFICIENT
Air drag coefficient.
@ SUMO_ATTR_CHARGINGSTATIONID
Charging Station ID.
@ SUMO_ATTR_ANGLE
@ SUMO_ATTR_ACTUALBATTERYCAPACITY
@ SUMO_ATTR_VEHICLEMASS
Vehicle mass.
@ SUMO_ATTR_RADIALDRAGCOEFFICIENT
Radial drag coefficient.
@ SUMO_ATTR_ENERGYCHARGED
tgotal of Energy charged
@ SUMO_ATTR_TOTALENERGYREGENERATED
Total energy regenerated.
@ SUMO_ATTR_PROPULSIONEFFICIENCY
Propulsion efficiency.
@ SUMO_ATTR_TOTALENERGYCONSUMED
Total energy consumed.
@ SUMO_ATTR_INTERNALMOMENTOFINERTIA
Internal moment of inertia.
@ SUMO_ATTR_FRONTSURFACEAREA
Front surface area.
T MIN2(T a, T b)
Definition StdDefs.h:76
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
An upper class for objects with additional parameters.
double getDouble(SumoXMLAttr attr) const
void setDouble(SumoXMLAttr attr, double value)
Sets a parameter.
void checkParam(const SumoXMLAttr paramKey, const std::string &id, const double lower=0., const double upper=std::numeric_limits< double >::infinity())
static double angleDiff(const double angle1, const double angle2)
Returns the difference of the second angle to the first angle in radiants.
double compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope, const EnergyParams *param) const
Computes the emitted pollutant amount using the given speed and acceleration.
double getChargingPower(bool usingFuel) const
Get charging station's charging power in the.
bool getChargeInTransit() const
Get chargeInTransit.
void setChargingVehicle(bool value)
enable or disable charging vehicle
void addChargeValueForOutput(double WCharged, MSDevice_Battery *battery)
add charge value for output
SUMOTime getChargeDelay() const
Get Charge Delay.
double getEfficency() const
Get efficiency of the charging station.
Battery device for electric vehicles.
SUMOTime getChargingStartTime() const
Get charging start time.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_Example-options.
MSDevice_Battery(SUMOVehicle &holder, const std::string &id, const double actualBatteryCapacity, const double maximumBatteryCapacity, const double powerMax, const double stoppingThreshold)
Constructor.
void notifyParking()
called to update state for parking vehicles
int myVehicleStopped
Parameter, How many timestep the vehicle is stopped.
bool myChargingInTransit
Parameter, Flag: Vehicles it's charging in transit (by default is false)
double getActualBatteryCapacity() const
Get the actual vehicle's Battery Capacity in Wh.
int getVehicleStopped() const
Get number of timestep that vehicle is stopped.
double myMaximumBatteryCapacity
Parameter, The total vehicles's Battery Capacity in Wh, [myMaximumBatteryCapacity >= 0].
void increaseVehicleStoppedTimer()
Increase myVehicleStopped.
double myActualBatteryCapacity
Parameter, The actual vehicles's Battery Capacity in Wh, [myActualBatteryCapacity <= myMaximumBattery...
double myPowerMax
Parameter, The Maximum Power when accelerating, [myPowerMax >= 0].
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks for waiting steps when the vehicle moves.
void increaseChargingStartTime()
Increase Charging Start time.
MSChargingStation * myPreviousNeighbouringChargingStation
Parameter, Pointer to charging station neighbouring with myActChargingStation in which vehicle was pl...
void setStoppingThreshold(const double stoppingThreshold)
Set vehicle's stopping threshold.
double getMaximumBatteryCapacity() const
Get the total vehicle's Battery Capacity in Wh.
bool myChargingStopped
Parameter, Flag: Vehicles it's charging stopped (by default is false)
double getConsum() const
Get consum.
void setActualBatteryCapacity(const double actualBatteryCapacity)
Set actual vehicle's Battery Capacity in kWh.
bool myTrackFuel
whether to track fuel consumption instead of electricity
void setPowerMax(const double new_Pmax)
Set maximum power when accelerating.
double getMaximumPower() const
Get the maximum power when accelerating.
double myEnergyCharged
Parameter, Energy charged in each timestep.
double myLastAngle
Parameter, Vehicle's last angle.
double getStoppingThreshold() const
Get stopping threshold.
double myTotalRegenerated
Parameter, total vehicle energy regeneration.
SUMOTime myChargingStartTime
Parameter, Moment, wich the vehicle has beging to charging.
bool isChargingInTransit() const
Get true if Vehicle it's charging, false if not.
std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key
void resetChargingStartTime()
Reset charging start time.
double myTotalConsumption
Parameter, total vehicle energy consumption.
const std::string deviceName() const
return the name for this type of device
void resetVehicleStoppedTimer()
Reset myVehicleStopped.
void setParameter(const std::string &key, const std::string &value)
try to set the given parameter for this device. Throw exception for unsupported key
double getTotalRegenerated() const
Get total regenerated.
double getTotalConsumption() const
Get total consumption.
MSChargingStation * myActChargingStation
Parameter, Pointer to current charging station in which vehicle is placed (by default is NULL)
~MSDevice_Battery()
Destructor.
double myConsum
Parameter, Vehicle consum during a time step (by default is 0.)
double getEnergyCharged() const
Get charged energy.
std::string getChargingStationID() const
Get current Charging Station ID.
void setMaximumBatteryCapacity(const double maximumBatteryCapacity)
Set total vehicle's Battery Capacity in kWh.
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into, MSDevice_StationFinder *sf)
Build devices for the given vehicle, if needed.
double myStoppingThreshold
Parameter, stopping vehicle threshold [myStoppingThreshold >= 0].
bool isChargingStopped() const
Get true if Vehicle is charging, false if not.
A device which triggers rerouting to nearby charging stations.
void setBattery(MSDevice_Battery *battery)
static void insertDefaultAssignmentOptions(const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc, const bool isPerson=false)
Adds common command options that allow to assign devices to vehicles.
Definition MSDevice.cpp:148
static bool equippedByDefaultAssignmentOptions(const OptionsCont &oc, const std::string &deviceName, DEVICEHOLDER &v, bool outputOptionSet, const bool isPerson=false)
Determines whether a vehicle should get a certain device.
Definition MSDevice.h:202
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition MSNet.cpp:183
std::string getStoppingPlaceID(const MSLane *lane, const double pos, const SumoXMLTag category) const
Returns the stop of the given category close to the given position.
Definition MSNet.cpp:1372
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
Definition MSNet.cpp:1363
Abstract in-vehicle device.
SUMOVehicle & myHolder
The vehicle that stores the device.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
const SUMOVTypeParameter & getParameter() const
const std::string & getID() const
Returns the id.
Definition Named.h:74
A storage for options typed value containers)
Definition OptionsCont.h:89
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
void doRegister(const std::string &name, Option *o)
Adds an option under the given name.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
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.
bool includesClass(const SUMOEmissionClass c) const
static const HelpersEnergy & getEnergyHelper()
get energy helper
static double compute(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const EnergyParams *param)
Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fue...
Representation of a vehicle, person, or container.
virtual bool isVehicle() const
Whether it is a vehicle.
virtual double getAcceleration() const =0
Returns the object's acceleration.
virtual const MSVehicleType & getVehicleType() const =0
Returns the object's "vehicle" type.
virtual double getSlope() const =0
Returns the slope of the road at object's position in degrees.
virtual const MSLane * getLane() const =0
Returns the lane the object is currently at.
virtual double getSpeed() const =0
Returns the object's current speed.
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle's parameter (including departure definition)
virtual double getPositionOnLane() const =0
Get the object's position along the lane.
Structure representing possible vehicle parameter.
Representation of a vehicle.
Definition SUMOVehicle.h:62
virtual bool isParking() const =0
Returns the information whether the vehicle is parked.
virtual EnergyParams * getEmissionParameters() const =0
Returns the vehicle's emission model parameter.
virtual double getAngle() const =0
Get the vehicle's angle.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
Definition json.hpp:4471