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

Yes, sorry, I realized that SUMO's lane changes are based on 4 reasons (strategic, speed gain,... etc.) as explained before, and my rule-based scenario would not be the same because decisions were based on equal probabilities of the actions taken. But even after that, the results seemed to not make sense. I think it was because I was adding in a condition for lane change that made sure the vehicle was laterally positioned at the center of a lane before actually executing the decision of any lane change. I removed that condition and now the behaviour seems more reasonable, but still don't prefer lane 2 as much as lane 0. Lane 1 (the centre lane) is expected to have higher vehicle densities because vehicles have to pass through it to get to either of the end lanes.

number vs lanes.png

Wondering if there is something off about the vehicle definition causing this slight bias between lanes?:

<vType carFollowModel="Krauss" color="0,1,0" id="veh" latAlignment="center" lcCooperative="1" lcKeepRight="0" lcLookaheadLeft="1" lcOvertakeRight="1" lcSpeedGain="0" lcSpeedGainRight="1" lcStrategic="-1" lcSublane="1" length="5" sigma="0" speedDev="0" speedFactor="1.0" />

Please advise.

Thank you.

Sincerely,
Hriday


On Sun, 18 Sept 2022 at 14:13, Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
- 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
_______________________________________________
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