Please note, that added vehicles may not immdiatelly become visible in the simulation gui if the space for their insertion is occupied. Also, the function traci.vehicle.getIDList only contains visible vehicles. To obtain the list of all "defined" vehicles. you can use the function traci.vehicle.getLoadedIDList.
Am Fr., 10. März 2023 um 08:51 Uhr schrieb [email protected] < [email protected]>: > Hi, > > > > are you absolutely certain that there is no vehicle with the same ID? > Vehicle IDs have to be unique throughout the simulation. Some sources where > to look: > > - IDs of additional vehicles from route files > - check the active vehicle IDs repeatedly by calling > traci.vehicle.getIDList() > - if you wrap the traci.vehicle.call in a loop, be sure to generate > unique vehicle IDs (e.g. by adding a counter variable at the end of the ID) > > Best regards > > Mirko > > > > > > > > > > -----Original-Nachricht----- > > Betreff: [sumo-user] Clarification on the use of add fucntion > > Datum: 2023-03-10T05:26:45+0100 > > Von: "Zedric Banger II (zbanger)" <[email protected]> > > An: "[email protected]" <[email protected]> > > > > > > > Dear Mirko, > > Whenever I try to use the add function, I get the error, "The vehicle > 'name' to add already exists." even though that vehicle DOES NOT exist. I > know the routeID, but I can't figure out how to fix the error. > > Best Regards. > > > _______________________________________________ > 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
