Hi all, 
I am trying to add a vehicle using traci. 
I want to add a vehicle using the code below and then operate on that vehicle 
right below it. 
 
traci.vehicle.add('veh1', "route_0", depart = 'now', departLane = 'allowed')

When I wrote the code just below the vehicle add code above, the problem arises 
in two operations. 
 
1. 
vehicle_n = traci.vehicle.getIDConunt()
vehicle_id = traci.vehicle.getIDList()
print(vehicle_n, vehicle_id)
 
When the above code is executed, the added vehicle does not appear. 
 
2. 
ind = traci.vehicle.getLaneIndex('veh1')
print(ind)
 
When the above code is executed, garbage values are output. 
 
It's a little different from the actual code, but I have the same problem as 
above. 
May I know in some cases where the above problem occurs? 
Will the added vehicle be available in the next step of the simulation? 
 
Thanks.
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to