Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] emergency lane, sometimes vehicle doesn't want to form it - SL2015

Hi,
I mentioned before in some topic, but here I will describe it more precisely as this behavior happened to my simulation more times.

Due to that subline model is not working with overtaking I decided that one-lane streets in my simulation will be wider - to allow forming emergency lane and that ambulance can pass by.
In most of the cases it is working, but sometimes (especially when there are more vehicles) some of them ignore the ambulance and don't want to let it go...
Below on screenshots, there are examples which show described situation:
ambulance2.png

am4.png
And in the last example, I set the reaction distance for the approaching ambulance as 100m so we can see that two cars didn't move at all to the left. (In this case, the street is also not wide enough to let it go)
am1.png
I guess it can be a problem with SL2015 which I am using, I started to look into the code from dev side, but for now I have no idea what can be the problem.
As it would take probably long I thought about some workaround, for example:

-get the vehicle which is in front of the ambulance

neighboring vehicles (0x13)

byte , see below

stringList see below

Returns a list of IDs for neighboring vehicle relevant to lane changing (>1 elements only possible for sublane model)

getNeighbors, getLeftFollowers, getLeftLeaders, getRightFollowers,





-if it is the same vehicle in front of in 2-3 simulation steps, check the speed of it

speed (0x40)

double

Returns the speed of the named vehicle within the last step [m/s]; error value: -2^30

getSpeed

-if speed is 0 then wait for a few seconds and remove this vehicle

This way I could measure more probable time for the ambulance than when it is stuck behind one vehicle for 15 min.

I would be really grateful for some help and tips if there is some easier way than applying my workaround idea.

best regards,
Weronika

Back to the top