Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Ego vehicle route loop


I'm try to make an ego vehicle loop over a route. For this I seem to need a rerouter.
My .sumocfg file looks like this:

    <net-file value=""/>
    <route-files value="my_world.rou.xml"/>
    <begin value="0"/>
    <end value="-1"/>
    <step-length value="0.01"/>

The .rou.xml contains the ego vehicle:

    <route id="r_1" edges="-41304#0 -41304#1 41299...-41304#0"  />
    <vehicle id="ego" type="Ego_Car" route="r_1" depart="0.00" departLane="free" color="blue"/>

Then according to I need to add a rerouter in an 'additional' file. So I added '--additional-files additional.xml' to my startup and put this in the XML file to restart route 'r_1':

  <rerouter id="r_1_loop" edges="-41304#0" probability="1">
    <interval begin="0" end="0">
      <routeProbReroute id="r_1" probability="1"/>

However, SUMO reads the additional file before the route file (by design according to ). I get this in the log file:

***Starting server on port 50485 ***
Loading net-file from '' ... done (323ms).
Loading additional-files from 'additional.xml' ...
Error: MSTriggeredRerouter r_1_loop: Route 'r_1' does not exist.
Loading of additional-files failed.
Quitting (on error).

- can I add additional files in the .sumocfg file as well?
- must I forget about the .rou.xml and put all the information in the .rou.xml in the additional file (to get the ordering correct)?
- can I load additional files in sumo-gui to check errors there without going through my own startup procedure? (I'm spawning sumo-gui from a C++ app with libtraci)


Back to the top