89 void setParameter(
const std::string& key,
const std::string& value);
102 MSDevice_Battery(
SUMOVehicle& holder,
const std::string&
id,
const double actualBatteryCapacity,
const double maximumBatteryCapacity,
103 const double powerMax,
const double stoppingTreshold,
const std::map<int, double>& param);
105 void checkParam(
const SumoXMLAttr paramKey,
const double lower = 0.,
const double upper = std::numeric_limits<double>::infinity());
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Battery device for electric vehicles.
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)
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
double getActualBatteryCapacity() const
Get the actual vehicle's Battery Capacity in kWh.
int getVehicleStopped() const
Get number of timestep that vehicle is stopped.
double myMaximumBatteryCapacity
Parameter, The total vehicles's Battery Capacity in kWh, [myMaximumBatteryCapacity >= 0].
void increaseVehicleStoppedTimer()
Increase myVehicleStopped.
double myChargingStartTime
Parameter, Moment, wich the vehicle has beging to charging.
void setStoppingTreshold(const double stoppingTreshold)
Set vehicle's stopping treshold.
double myActualBatteryCapacity
Parameter, The actual vehicles's Battery Capacity in kWh, [myActualBatteryCapacity <= myMaximumBatter...
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.
double getChargingStartTime() const
Get charging start time.
std::map< int, double > myParam
Parameter collection.
void increaseChargingStartTime()
Increase Charging Start time.
MSChargingStation * myPreviousNeighbouringChargingStation
Parameter, Pointer to charging station neighbouring with myActChargingStation in which vehicle was pl...
MSDevice_Battery & operator=(const MSDevice_Battery &)
Invalidated assignment operator.
double getMaximumBatteryCapacity() const
Get the total vehicle's Battery Capacity in kWh.
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.
void checkParam(const SumoXMLAttr paramKey, const double lower=0., const double upper=std::numeric_limits< double >::infinity())
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.
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.
const std::string deviceName() const
return the name for this type of device
MSDevice_Battery(SUMOVehicle &holder, const std::string &id, const double actualBatteryCapacity, const double maximumBatteryCapacity, const double powerMax, const double stoppingTreshold, const std::map< int, double > ¶m)
Constructor.
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
const std::map< int, double > & getEnergyParams() const
retrieve parameters for the energy consumption model
MSChargingStation * myActChargingStation
Parameter, Pointer to current charging station in which vehicle is placed (by default is NULL)
~MSDevice_Battery()
Destructor.
double myStoppingTreshold
Parameter, stopping vehicle treshold [myStoppingTreshold >= 0].
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.
double getStoppingTreshold() const
Get stopping treshold.
bool isChargingStopped() const
Get true if Vehicle is charging, false if not.
MSDevice_Battery(const MSDevice_Battery &)
Invalidated copy constructor.
Abstract in-vehicle device.
A storage for options typed value containers)
Representation of a vehicle, person, or container.
Representation of a vehicle.