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?
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
Do you actually have a vehicle type with ID "type1" which is equipped with the battery device? Otherwise this won't work.
您是否真的有ID为“type1”的车辆类型配备了电池装置?否则这将不起作用。
I did the above Settings but it is true that the initial charge is still half the maximum charge
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".