How to disable lane changes in SuMO?

假如想象 提交于 2019-12-12 19:48:47

问题


I am using a TraCI call to set the lane change mode of a vehicle to 0 to disable all lane changing:

TraCICommandInterface::setLaneChangeMode(0b000000000000);

However, the vehicle still does a lane change afterwards. I also tried 256 (i.e. 0b000100000000 and 512 (i.e. 0b001000000000) as indicated in the wiki or in this post.

It seems that the executed lane change action was queued earlier (i.e. before the TraCI call), because the vehicle is flashing its turn light, and could not be executed due to a blocked lane. After the target lane is free, the vehicle executes the lane change, even though I set the lane change mode to 0.

  • Is there a way to abort already queued lane changes?
  • Or is this a bug in SuMO?
  • Or am I doing it completely wrong?

回答1:


i have disabled lane change mode by this code and it worked but after i have specified the location where i want lane change mode to be 0.

traciVehicle->setLaneChangeMode(0b001000000000);



回答2:


it works by setting setLaneChangeMode(0b000000000000) for example traci.vehicle.setLaneChangeMode("rear", 0b001000000000)



来源:https://stackoverflow.com/questions/50875773/how-to-disable-lane-changes-in-sumo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!