sumo icon indicating copy to clipboard operation
sumo copied to clipboard

I would like to set different initial battery charge levels for electric vehicles. I want to achieve a randomized effect where each vehicle has a unique starting charge. How can I accomplish this?

Open just-wynot opened this issue 3 years ago • 3 comments

I gave each car a different starting power value, but found that their starting power value was always the same default MaxBatKap/2

If possible, upload an example that shows your problem.

<vehicle id="0" type="type1" depart="0" color="1,0,0">
    <param key="actualBatteryCapacity" value="500"/>
</vehicle>

I used the code above to define the initial power values for different vehicles

**SUMO-version:**1.16

**operating system:**Windows

just-wynot avatar Jul 13 '23 04:07 just-wynot

Do you actually have a vehicle type with ID "type1" which is equipped with the battery device? Otherwise this won't work.

m-kro avatar Jul 13 '23 06:07 m-kro

您是否真的有ID为“type1”的车辆类型配备了电池装置?否则这将不起作用。

1.txt

I did the above Settings but it is true that the initial charge is still half the maximum charge

just-wynot avatar Jul 13 '23 07:07 just-wynot

Your example works for me (after some XML cleaning and replacing "device.battery.actualBatteryCapacity" by "actualBatteryCapacity"). Remember you lowered the battery charge only for vehicle "9".

m-kro avatar Jul 13 '23 07:07 m-kro