Ankur Sarker
2016-10-18 01:28:15 UTC
Hi,
I am trying to change velocities of vehicles using TraCI. I have some
queries:
1. In my simulation, I am getting negative value from getDistance()
function. What would be the possible reason? Followings are my code:
------------------------------------------------------------------------------------
vehicles = traci.vehicle.getIDList()
for word in vehicles:
if word == "kang":
distance = traci.vehicle.getDistance("kang")
vel1 = traci.vehicle.getSpeed("kang")
print distance
--------------------------------------------------------------------------------------
2. How to let the vehicles stop at the final destination gradually?
3. If I use the TraCI in python, what is the simulation step in time? 1
second? or something else?
-----------------------------------------------------------------------------
step = 0
while traci.simulation.getMinExpectedNumber() > 0:
traci.simulationStep()
step+=1
--------------------------------------------------------------------------------
Thanks for your time!
A. Sarker
I am trying to change velocities of vehicles using TraCI. I have some
queries:
1. In my simulation, I am getting negative value from getDistance()
function. What would be the possible reason? Followings are my code:
------------------------------------------------------------------------------------
vehicles = traci.vehicle.getIDList()
for word in vehicles:
if word == "kang":
distance = traci.vehicle.getDistance("kang")
vel1 = traci.vehicle.getSpeed("kang")
print distance
--------------------------------------------------------------------------------------
2. How to let the vehicles stop at the final destination gradually?
3. If I use the TraCI in python, what is the simulation step in time? 1
second? or something else?
-----------------------------------------------------------------------------
step = 0
while traci.simulation.getMinExpectedNumber() > 0:
traci.simulationStep()
step+=1
--------------------------------------------------------------------------------
Thanks for your time!
A. Sarker