eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.58k stars 1.44k forks source link

station finder does not work #15476

Closed MahmoudRezaNateghi closed 2 months ago

MahmoudRezaNateghi commented 2 months ago

I have been trying for a few days to get the 'station finder' to work, but no matter what I do, electric vehicles don't go to the charging stations and continue their route without charging. Please guide me on this matter.

 <routes>
     <vType id="Electriccar" accel="1.0" decel="1.0" length="12" maxSpeed="100.0" sigma="0.0" minGap="2.5" 
        mass="10000" color="1,1,1">
    <param key="has.battery.device" value="true"/>
    <param key="device.battery.capacity" value="500"/>
    <param key="actualBatteryCapacit" value="450"/>
    <param key="device.stationfinder.needToChargeLevel"  value="0.4"/>
<param key="device.stationfinder.radius" value="180"/>
<param key="device.stationfinder.maxEuclideanDistance" value="-1"/>
<param key="device.stationfinder.repeat" value="60"/>
<param key="device.stationfinder.waitForCharge" value="600"/>
<param key="device.stationfinder.reserveFactor" value="1.1"/>
<param key="device.stationfinder.emptyThreshold" value="0.05"/>
<param key="device.stationfinder.rescueAction" value="remove"/> 
</vType>

<route id="route_0" edges="e1 e2 e3 e4 e5 e6 e7 e8" />
<vehicle id="0"   type="Electriccar" route="route_0" depart="1" />
<vehicle id="1"   type="Electriccar" route="route_0" depart="3" />
<vehicle id="2" type="Electriccar" route="route_0" depart="6"/>
<vehicle id="3" type="Electriccar" route="route_0" depart="9"/>
<vehicle id="4" type="Electriccar" route="route_0" depart="12"/>    

 </routes>

  add file:
  <additionals>
        <chargingStation  id="ch1" lane="e6_0" startPos="10" endPos="30"  power="200000" efficiency="0.95" />
   </additionals>

SUMO-version: 1.20

operating system: windows 11

m-kro commented 2 months ago

The stationfinder device has to be assigned to the vehicle / vehicle type (like any other device). You can add

<param key="has.stationfinder.device" value="true"/>

I added a note to the documentation of the stationfinder device.