[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Enquiry about charging stations and stationfinder device
|
Hi,
Is there any chance of getting some help with this question?
Thanks in advance
Hello,
I'm using libsumo in a project that requires collecting some statistics about charging stations. These statistics include the amount of energy consumed from a station during a time interval.
I couldn't find a function to do this directly. Therefore, I do the following in every simulation step and calculate the sum over the user-defined interval:
1- get the vehicle IDs currently stopping at the station
vehicle_ids = libsumo.chargingstation.getVehicleIDs(cs_id)
2- loop over the list to calculate the sum of energy transferred into the vehicle at the current simulation step
for vehicle in vehicle_ids:
total_energy += float(libsumo.vehicle.getParameter(vehicle, "device.battery.energyCharged"))
3- repeat this until the end of the interval and calculate the sum
My questions are:
1- is there an alternative function to directly retrieve the total energy consumed by a station?
2- Is the parameter "device.battery.energyCharged" the correct one to read the energy transferred from the charging station to the vehicle at the current time step?
3- I'm confused about the following charging station parameters:
- libsumo.vehicle.getParameter(vehicle, "device.battery.actualBatteryCapacity")
- libsumo.vehicle.getParameter(vehicle,"device.battery.capacity")
- device.battery.chargeLevel
- device.battery.maximumBatteryCapacity
I can't figure out which parameter is used to get/set the current battery level? the max battery capacity in both libsumo and route files.
The scenario also requires that vehicles are equipped with a stationfinder device. Some charging stations will be set as out-of-service; which means that vehicles equipped with a stationfinder device should choose an alternative station. my questions here are:
1- should I enable rerouting so that vehicle routes to the nearest station once it needs charging?
2- what is the parameter I can use to set the station as out of service and prevent the car from routing to it? I set the max power to zero but apparently this will not prevent the car from going there. Is there a specific configuration (maybe in the target function?) to let the vehicles avoid specific stations with specific attributes?
Thanks