0

I am trying to use TraCI commands in "runner.py" file and in the wiki for TraCI the commands are presented in octal format or so. How to configure the behavior of vehicle in "runner.py" file ?

Can we change the parameters of the vehicle dynamically (change in speed during simulation) ?

  1. Change the speed of the specified vehicle(s) to the given value over the given amount of time in milliseconds (increase/decrease to decrease/increase speed). I guess that would happen only using TraCI commands.If so, in what format i can use those commands?

  2. If there is traffic on the current lane, the vehicle should be able to switch to next lane accordingly.

  3. How to control the vehicles not to undergo random lane change ?

I would really appreciate if someone could help me to sort out this. Thanks in advance

egofer
  • 103
  • 3
charan
  • 11
  • 3

1 Answers1

1
  1. It is possible to adapt the vehicle speed. In the python client the function is called traci.vehicle.slowDown and needs the vehicle id, the new speed and the duration as parameter. For a somewhat better documentation of the traci python commands look here: http://sumo.dlr.de/pydoc/traci.vehicle.html

  2. Lane changing is not affected by this call and happens as usual. Note however that you will not be able to increase the speed by this function because the vehicle already drives at the safest maximum speed. If this is limited by the vehicle's own maximum speed you may adapt this one using traci.vehicle.setMaxSpeed.

  3. Vehicles do not change lanes randomly, they have always a reason to do so. You have limited control over this behavior using the http://sumo.dlr.de/pydoc/traci.vehicle.html#-setLaneChangeMode function. An explanation of the bits is here: http://sumo.dlr.de/wiki/TraCI/Change_Vehicle_State#lane_change_mode_.280xb6.29

Michael
  • 3,510
  • 1
  • 11
  • 23