[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Close/open lanes with TraCI
|
Hi,
Thanks! updateBestLanes works as expected, but only if the first vehicle enters the simulation BEFORE closing the lanes. If the first vehicle
is added to the simulation AFTER closing the lanes, the vehicles do not enter the lanes anymore after opening them. This applies also for vehicles which are added to the simulation thereafter.
I added an example which reproduces the bug with the nightly snapshot. The lane is closed at simulation step 10, and opened at simulation
step 200. The first flow starts at simulation step 20 and its vehicles never enter the initially closed lanes.
Btw, since updateBestLanes is not available in SUMO 0.32.0, one can use “change route by id” and set the route of a vehicle to the same route
it already follows. This eventually triggers updateBestLanes internally.
J
Kind regards,
Karl
Von: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx>
Im Auftrag von Jakob Erdmann
Gesendet: Freitag, 31. August 2018 21:18
An: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Betreff: Re: [sumo-user] Close/open lanes with TraCI
It is working in my own test as expected. Are you using a custom traci client? If so, I recommend debugging whether the call to libsumo::Vehicle::updateBestLanes() is executed on the server side.
2018-08-31 20:53 GMT+02:00 Hübner, Karl <karl.huebner@xxxxxxxxxxxxxxxxxxx>:
Hi Jakob,
Thanks. However, this does not work for me L
I tried a TraCI call with command 0xc4 and variable 0x6a for each single vehicle in the simulation. They still stick on the left-most lane. I use a nightly build from last week.
Kind regards,
Karl
The vehicles have a stale internal state.
Vehicles only update their strategic lane preferences when changing from one edge to the next.
You should be able to fix this by calling traci.vehicle.updateBestLanes() for all upstream vehicles on the preceding edge immediately after re-opening (and further upstream if the preceding edge is short).
2018-08-31 16:57 GMT+02:00 Hübner, Karl <karl.huebner@xxxxxxxxxxxxxxxxxxx>:
Dear Sumo-Users,
I currently try to setup a scenario where a lane is initially closed and later opened for all vehicle classes. I close the lanes on scenario start with the TraCI command 0xc3 (Change lane State) by setting
disallowed vehicles to all vehicle classes, which works fine. Vehicles do not enter the lane anymore but try to change lanes beforehand accordingly.
However, when I open the lanes after a certain amount of time by allowing all vehicles classes, the vehicles do not drive on the re-opened lanes anymore. Instead, they stick to their previous made choice
and still try to change lanes before entering the edge, resulting in traffic jams. Any suggestions? Is this an error?
Before opening the lanes:
- Vehicles try to change lanes to the most-left beforehand.
After opening lanes:
- Vehicles still try to change to the left-most lanes before entering the next edge.
- Also, after driving onto the next edge on the left-most lane, they switch lanes to the right again (e.g. vehicles on the left side of the picture).
Kind regards,
Karl
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user
|
Attachment:
closeOpenLane_Bug2.zip
Description: closeOpenLane_Bug2.zip