Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Difference between my rule-based simulation vs. default SUMO behaviour

- lane changing decisions aren't random (cars sort themselves onto the lanes based on desired speed)
- successful execution of a lane changing maneuver often requires some form of speed adjustment over multiple steps which fails if you randomly change the desired wish each step.

Am Sa., 17. Sept. 2022 um 20:43 Uhr schrieb Hriday Sanghvi via sumo-user <sumo-user@xxxxxxxxxxx>:
Hello,

I am trying to recreate the same vehicle lane-changing behaviour that SUMO displays when a flow with the following definition:

<flow arrivalLane="current" arrivalPosLat="center" begin="0" departLane="random" departPosLat="center" departSpeed="random" id="f" number="100" route="r0" type="veh" vehsPerHour="10000" />

is allowed to complete their route on a single 1000 m, 3-lane road (edge).

The rolling average of number of vehicles on each lane is almost identical (which is what I would expect) from this simulation:

number vs lanes.png


To recreate the same type of behaviour in my rule-based simulation, I chose left, right or stay with equal probability for each car at every step.

import numpy as np
.
.
.
prob = np.array([1/3, 1/3, 1/3]) # equal probability
action = "" 0, +1], p=prob) # -1 = right, 0 = stay, +1 = left
.
.
traci.vehicle.changeLaneRelative(vehID=veh_id, indexOffset=action, duration=5) # for each vehicle
.
.

...but the behaviour seems to avoid the last lane (lane 2):
number vs lanes.png
 
I tried adding one more lane and I observed the same behaviour - the last lane seems to be avoided: 
number vs lanes.png

My lane change mode is set to LC_MODE = 1557. Is there any possible reason for this? Maybe some interaction of changeLaneRelative with SUMO that is causing this? Please advise.

Thank you.

Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top