66 return "battery-exchange";
70 WRITE_WARNING(
TL(
"Encountered an unknown charge type. Assuming charge type 'normal'."));
79 if (repr ==
"normal") {
81 }
else if (repr ==
"battery-exchange") {
83 }
else if (repr ==
"fuel") {
86 WRITE_WARNINGF(
"Encountered an unknown charge type string '%'. Assuming charge type 'normal'.", repr);
95 const std::string& name,
double chargingPower,
double totalPower,
double efficency,
bool chargeInTransit,
99 double totalPower,
double efficency,
bool chargeInTransit,
SUMOTime chargeDelay,
const std::string& chargeType,
173 Charge(
SUMOTime _timeStep, std::string _vehicleID, std::string _vehicleType, std::string _status,
174 double _WCharged,
double _actualBatteryCapacity,
double _maxBatteryCapacity,
double _chargingPower,
175 double _chargingEfficiency,
double _totalEnergyCharged) :
209 static void writeVehicle(
OutputDevice& out,
const std::vector<Charge>& chargeSteps,
int iStart,
int iEnd,
double charged);
#define WRITE_WARNINGF(...)
#define WRITE_WARNING(msg)
ChargeType
Charging types of charging stations.
Base (microsim) event class.
@ CHARGETYPE_BATTERYEXCHANGE
MSChargingStation & operator=(const MSChargingStation &)=delete
Invalidated assignment operator.
void setChargeInTransit(bool value)
set charging in transit
void writeChargingStationOutput(OutputDevice &output)
write charging station values
double myTotalCharge
total energy charged by this charging station
static void writeVehicle(OutputDevice &out, const std::vector< Charge > &chargeSteps, int iStart, int iEnd, double charged)
std::map< std::string, MSDevice_Battery * > myChargedBatteries
map with the Batteries charged by this charging station (key = vehicleID)
double getChargingPower(bool usingFuel) const
Get charging station's charging power.
const ChargeType myChargeType
charge type
bool getChargeInTransit() const
Get chargeInTransit.
void setChargingVehicle(bool value)
enable or disable charging vehicle
std::vector< std::string > myChargedVehicles
order vehicles by time of first charge
double myEfficiency
Efficiency of the charging station.
void setEfficiency(double efficiency)
set efficiency of the charging station
void setChargingPower(double chargingPower)
set charging station's charging power
Command * myTotalPowerCheckEvent
Event for checking at every time-step if myTotalPower has been exceeded.
double myTotalChargingPower
The maximal charging power available to serve all charging vehicles (value <= 0 take no effect)
SUMOTime myWaitingTime
waiting time
static std::string chargeTypeToString(ChargeType type)
Get the string representation of a charge type.
double myNominalChargingPower
Charging station's nominal charging power per vehicle.
bool myChargeInTransit
Allow charge in transit.
bool vehicleIsInside(const double position) const
Check if a vehicle is inside in the Charge Station.
const MSParkingArea * myParkingArea
parkingArea the charging station is placed on
MSChargingStation(const MSChargingStation &)=delete
Invalidated copy constructor.
double getTotalCharged() const
std::map< std::string, std::vector< Charge > > myChargeValues
map with the charges of this charging station (key = vehicleID)
void addChargeValueForOutput(double WCharged, MSDevice_Battery *battery)
add charge value for output
SUMOTime getChargeDelay() const
Get Charge Delay.
void writeAggregatedChargingStationOutput(OutputDevice &output, bool includeUnfinished=false)
write ungrouped output (flush data after writing)
void setChargeDelay(SUMOTime delay)
set charging delay of the charging station
double getEfficency() const
Get efficiency of the charging station.
ChargeType getChargeType() const
Get charge type.
SUMOTime myChargeDelay
Charge Delay.
~MSChargingStation()
destructor
bool myChargingVehicle
Check if in the current TimeStep chargingStation is charging a vehicle.
bool isCharging() const
Return true if in the current time step charging station is charging a vehicle.
SUMOTime getWaitingTime() const
Get waiting time.
SUMOTime checkTotalPower(SUMOTime currentTime)
update the delivered power to all charging vehicles after all requests are known
static ChargeType stringToChargeType(const std::string &repr)
Get the charge type from its string representation.
const MSParkingArea * getParkingArea() const
Get the parking area the charging station is placed on.
Battery device for electric vehicles.
Representation of a lane in the micro simulation.
A lane area vehicles can halt at.
A lane area vehicles can halt at.
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
struct to save information for the chargingStation output
double totalEnergyCharged
double maxBatteryCapacity
double actualBatteryCapacity
Charge(SUMOTime _timeStep, std::string _vehicleID, std::string _vehicleType, std::string _status, double _WCharged, double _actualBatteryCapacity, double _maxBatteryCapacity, double _chargingPower, double _chargingEfficiency, double _totalEnergyCharged)
constructor
double chargingEfficiency