1

I'm using Flow to create a traffic simulation and I should manage the speed of the vehicles using TraCi in a SUMO network designed by me. Unfortunately I cannot understand how to recall in my code the primitives of TraCi made available by FLOW. I found a similar method in flow.core.kernel.vehicle.base but it doesn't work.

Before setting the speed I tried to read it with code below.

veh_id = "human"  # name of the vehicle
speed = env.k.vehicle.get_speed(veh_id)
kalehmann
  • 4,821
  • 6
  • 26
  • 36
gi95
  • 11
  • 1
  • Hi! Great question. The method is self.k.vehicle.slowDown(vid, next_vel, 1e-3). You can also call self.k.vehicle.apply_acceleration with an acceleration to have it pick out the next speed that way. However, I see why this is confusing and we will add a method to set the speed directly. Additionally, we now have a slack channel for flow users that might be a little more helpful for these type of questions: https://join.slack.com/t/flow-users/shared_invite/enQtNzk5NzE1OTkyNTE0LTU0YmE5ZTVkZmJmNDg1Nzg2YThjOThmY2ZlYWE2ZjQ0NTE1NjE3Y2YwMTljY2U5M2Y3MDhmMWUzZDM3YWViNmE – Eugene Vinitsky Nov 10 '19 at 18:33

0 Answers0