[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[sumo-user] new vehicle created with traci.vehicle.addFull but not detected by getIDList() or getIDCount()
|
Hi,
I am new with sumo and TraCI
At some point, I would like to create a new vehicle using
traci.vehicle.addFull()
Here is my function:
def add_new_vehicle():
print("vehicle list BEFORE{}".format(traci.vehicle.getIDList()))
traci.vehicle.addFull(
vehID="new_veh",
typeID="passenger",
routeID="route0"
)
print("vehicle list AFTER={}".format(traci.vehicle.getIDList()))
When running my function "add_new_vehicle()", the same list is printed
twice. In other words, the ID of the new vehicle does not appear in the
second getIDList(). No error is prompted.
It seems "new_veh" has successfully be created: I can then retrieve some
values such as its speed. In addition, when I try to call my function a
second time, it prompts "traci.exceptions.TraCIException: The vehicle
new_veh to add already exists."
As I understand, I managed to create a new vehicle.
---> But why cannot I see it when calling getIDList() or getIDCount()?
---> Should I reload something?
In the wiki + mail-list, I could not find any reason for that. Any further
help with this would be greatly appreciated.
Thanks for your time!
Cheers,
Simon
------------------------------------------------------------------------------
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
sumo-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sumo-user