Thanks! The 'repeat' attribute is what I needed indeed (had trouble finding it with Google but for reference it's at https://sumo.dlr.de/docs/Definition_of_Vehicles%2C_Vehicle_Types%2C_and_Routes.html#repeated_routes ). I can skip the additional files now and just use a repeat of 10,000 which is good enough.
Cheers, Ruud On Mon, Feb 20, 2023 at 12:48 PM Jakob Erdmann <[email protected]> wrote: > Hi, > - if you don't need an "infinite" loop you can also use the 'repeat' > attribute within a route > - you can add the additional file with <additional-files value="FILE"/> > - the <route> should go into the same file as the rerouter that references > it. The vehicle can go into either file > - to load additional files either put them into the sumocfg or add option > --additional-file when starting sumo-gui (you cannot load them separately > after the simulation has launched). > > Am Mo., 20. Feb. 2023 um 12:23 Uhr schrieb Ruud van Gaal < > [email protected]>: > >> Hi, >> >> 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: >> >> >> >> >> >> >> >> >> >> >> >> >> *<configuration> <input> <net-file value="my_world.net.xml"/> >> <route-files value="my_world.rou.xml"/> </input> <time> <begin >> value="0"/> <end value="-1"/> <step-length value="0.01"/> >> </time></configuration>* >> >> 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 https://sumo.dlr.de/docs/Simulation/Rerouter.html 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': >> >> >> >> >> >> >> >> >> *<additional> <rerouter id="r_1_loop" edges="-41304#0" probability="1"> >> <interval begin="0" end="0"> <routeProbReroute id="r_1" >> probability="1"/> </interval> </rerouter></additional>* >> >> However, SUMO reads the additional file before the route file (by design >> according to https://sumo.dlr.de/docs/sumo.html ). I get this in the log >> file: >> >> >> >> >> >> >> >> ****Starting server on port 50485 ***Loading net-file from >> 'my_world.net.xml' ... 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).* >> >> So: >> - 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) >> >> Thanks, >> Ruud >> >> >> >> _______________________________________________ >> sumo-user mailing list >> [email protected] >> To unsubscribe from this list, visit >> https://www.eclipse.org/mailman/listinfo/sumo-user >> > _______________________________________________ > sumo-user mailing list > [email protected] > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/sumo-user >
_______________________________________________ sumo-user mailing list [email protected] To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
