105 void setParameter(
const std::string& key,
const std::string& value);
125 MSDevice_Battery(
SUMOVehicle& holder,
const std::string&
id,
const double actualBatteryCapacity,
const double maximumBatteryCapacity,
126 const double stoppingThreshold,
const double maximumChargeRate,
const std::string& chargeLevelTable,
const std::string& chargeCurveTable);
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::map< double, double > LinearApproxMap
Battery device for electric vehicles.
SUMOTime getChargingStartTime() const
Get charging start time.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_Example-options.
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)
LinearApproxHelpers::LinearApproxMap myChargeCurve
Charge curve data points storage.
double getActualBatteryCapacity() const
Get the actual vehicle's Battery Capacity in Wh.
int getVehicleStopped() const
Get number of timestep that vehicle is stopped.
void setChargeLimit(const double limit)
Set (temporary) charge limit.
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...
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks for waiting steps when the vehicle moves.
double getMaximumChargeRate() const
Get current charge rate in W depending on the state of charge.
void saveState(OutputDevice &out) const
Saves the state of the device.
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.
SUMOTime estimateChargingDuration(const double toCharge, const double csPower) const
Estimate the charging duration given the current battery state.
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
double getMaximumPower() const
Get the maximum power when accelerating.
double myEnergyCharged
Parameter, Energy charged in each timestep.
double myLastAngle
Parameter, Vehicle's last angle.
void setMaximumChargeRate(const double chargeRate)
Set vehicle's stopping threshold.
double getStoppingThreshold() const
Get stopping threshold.
double myTotalRegenerated
Parameter, total vehicle energy regeneration.
double myMaximumChargeRate
Parameter, maximum charge rate in W.
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.
MSDevice_Battery & operator=(const MSDevice_Battery &)
Invalidated assignment operator.
const std::string deviceName() const
return the name for this type of device
void resetVehicleStoppedTimer()
Reset myVehicleStopped.
void loadState(const SUMOSAXAttributes &attrs)
Loads the state of the device from the given description.
void setParameter(const std::string &key, const std::string &value)
try to set the given parameter for this device. Throw exception for unsupported key
int myDepletedCount
Count how many times the vehicle experienced a depleted battery.
double myChargeLimit
(Temporary) limitation in W of the maximum charge rate = charging strategy result
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)
void generateOutput(OutputDevice *tripinfoOut) const
Called on vehicle deletion to extend tripinfo.
~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.
static double readParameterValue(SUMOVehicle &v, const SumoXMLAttr &attr, const std::string ¶mName, double defaultVal)
Read device parameters from input.
double myStoppingThreshold
Parameter, stopping vehicle threshold [myStoppingThreshold >= 0].
bool isChargingStopped() const
Get true if Vehicle is charging, false if not.
MSDevice_Battery(const MSDevice_Battery &)
Invalidated copy constructor.
A device which collects vehicular emissions.
A device which triggers rerouting to nearby charging stations.
Abstract in-vehicle device.
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
Encapsulated SAX-Attributes.
Representation of a vehicle, person, or container.
Representation of a vehicle.