Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Dynamically controlling edge access

Possible solutions
- use traci.lane.setAllow / setDisallow to prevent vehicles other than the EV (i.e. set vClass=custom for the EV and only allow that)
- use traci.edge.adaptTravelTime  + vehicle.rerouteTraveltime. Bonus: you can set a time range for the adaptation and it will only affect vehicles that pass the edge in that time range

Am Sa., 13. Aug. 2022 um 22:53 Uhr schrieb Devon Fazekas <thomas-d@xxxxxxxxxx>:

I'm trying to create the following scenario:

Two types of vehicles make up a flow of traffic: normal pedestrians (NP) and connected pedestrians (CP). By default, they follow the fastest route from origin to destination. However, once an emergency vehicle (CV) enters the network, its optimal route is computed. The only vehicles that must be rerouted so that they won't obstruct the CV during its commute are CP vehicles.


I would be very grateful for any advice. I've been having trouble for a while.


The two technical problems are:

(1) How can one (roughly) predict when an EV will share an edge with a CP?

(2) What is the best approach for dynamically rerouting the CP vehicles such that they never share the same edge as an EV (if rerouting is possible)? TraCI appears to be the preferred tool, but its drawbacks are difficult to work around.


My current approach to question 1 involves a lengthy Python script:

Utilize TraCI to retrieve all CP routes, and then filter out those that have an edge in common with the EV. Then, estimate the arrival time to the shared edge (addressing the question "Will they be on the same edge at the same time?") using the current positions and speeds of these vehicles and the maximum speed of each edge along their routes. Then, block that edge (somehow) for any vehicles that are anticipated to be close to the EV and initiate a reroute. It would unblock all previously blocked edges.


For question 2, I don't have a working approach, but these were my first thoughts:

  • Set the `allow` edge attribute, but this isn't supported by TraCI.
  • Set the `maxSpeed` edge attribute, but this would affect all vehicles, not just the CP.
  • Set a `closingReroute` element to an edge, but this isn't supported by TraCI.




sumo-user mailing list
To unsubscribe from this list, visit

Back to the top