sumo icon indicating copy to clipboard operation
sumo copied to clipboard

closing a lane with traci does not update the choice of best lanes

Open ZhenYu112 opened this issue 1 year ago • 2 comments

Add your issue description here. I attempted to use Traci in the simulation to change the lane state and achieve a variable lane. I would prohibit vehicles from driving on that lane, but found that the vehicle would stop before the connection and would not automatically search for another available connection and lane; If possible, upload an example that shows your problem. 企业微信截图_17052887283192 When I use the "close lane" function again in sumo gui for lanes that have been banned in traci, the vehicle will not stop before the connection and will automatically search for available connections and lanes to reach the destination; sumo1

I want to know how to use Traci to achieve an effect similar to that in sumo gui: after closing the lane, other vehicles on the lane can leave normally, and subsequent vehicles no longer enter the lane, but can automatically find available connections and lanes to reach th e destination. 企业微信截图_1705297544579 this is i used traci api If you have time, could you please answer me? Thank you very much! SUMO-version: 1.19.0 operating system: windows 10

ZhenYu112 avatar Jan 15 '24 05:01 ZhenYu112

I can confirm the behavior and think this is some kind of performance optimization. You can always call traci.vehicle.updateBestLanes for all vehicles on the affected lane to work around this. But we should really check whether we could do this immediately (at least optionally). I would not expect large runtime effects.

behrisch avatar Jan 18 '24 09:01 behrisch

I will try this method, thank you very much!

I can confirm the behavior and think this is some kind of performance optimization. You can always call traci.vehicle.updateBestLanes for all vehicles on the affected lane to work around this. But we should really check whether we could do this immediately (at least optionally). I would not expect large runtime effects.

ZhenYu112 avatar Jan 19 '24 01:01 ZhenYu112