Please consider this scenario:
1. I establish the TraCI interface. 2. I add 200 vehicles with different departure time 3. calling ‘simulationGetLoadedVehiclesIDList’ correctly shows all 200 vehicles. 4. I remove two of the vehicles. 5. I call ‘simulationGetLoadedVehiclesIDList’ again and it returns all 200 vehicles again! So this is where the confusion comes in. It seems that removing a vehicle asks SUMO to remove it from the departure list only. But the removed vehicle is still loaded! 6. I iterate over the vehicle lists that I got in step 5. For each vehicle, I get more information (such as type, angle, etc.). When I ask for the deleted vehicle info, SUMO gives me error saying that the vehicle id does not exist. I cannot use the ‘departedVehIDList’, because none of the vehicles has departed at t=0. Do you have any suggestion? Thanks! - Mani From: Jakob Erdmann [mailto:[email protected]] Sent: Wednesday, February 15, 2017 12:17 AM To: Mani Amoozadeh <[email protected]> Cc: sumo-user <[email protected]> Subject: Re: [sumo-user] Questions about C++ TraCI I would argue that this is working as intended since the vehicle was indeed loaded. Loading is a distinct event from departure so you may want to check getDepartedIDList() instead regards, Jakob 2017-02-14 20:29 GMT+01:00 Mani Amoozadeh <[email protected] <mailto:[email protected]> >: Hello, Regarding this ticket: http://sumo.dlr.de/trac.wsgi/ticket/2803 Removing the vehicle right after TraCI establishment is now working as expected. But the removed vehicle is still listed in the output of ‘simulationGetLoadedVehiclesIDList’. - Mani From: Jakob Erdmann [mailto:[email protected] <mailto:[email protected]> ] Sent: Sunday, January 22, 2017 11:47 PM To: Mani Amoozadeh <[email protected] <mailto:[email protected]> > Cc: [email protected] <mailto:[email protected]> ; sumo-user <[email protected] <mailto:[email protected]> > Subject: Re: [sumo-user] Questions about C++ TraCI Hello, 1) you are correct. I have updated the ticket 2) Thank you for pointing this out. It has been fixed in the latest development version regards, Jakob 2017-01-20 3:21 GMT+01:00 Mani Amoozadeh <[email protected] <mailto:[email protected]> >: 5. see http://sumo.dlr.de/trac.wsgi/ticket/2524 I have two issues in applying the workaround (last two bullets): 1. How can I delete a route using TraCI ? There is no such command right now. 2. I remove the vehicle, but the vehicle still exists in the simulation environment. So basically at time zero, I create a vehicle, do some processing, and then delete it. But I can still see the vehicle being inserted. - Mani ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
