Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Driving in the opposite direction

> So for me to understand: currently, it is not possible to "manipulate"
individual vehicles with parameters like jmIgnoreFoeProb, only the
entire vehicle type can be configured?

Correct. For reference, see
https://github.com/eclipse-sumo/sumo/issues/10430
https://github.com/eclipse-sumo/sumo/issues/17121

Am Mi., 24. Sept. 2025 um 15:21 Uhr schrieb Sasan Amini <aminissn@xxxxxxxxx>:
Yes, sorry, I don't' know why I said accelerate earlier instead of decelerate.
So for me to understand: currently, it is not possible to "manipulate"
individual vehicles with parameters like jmIgnoreFoeProb, only the
entire vehicle type can be configured?
and thanks for the quick fixes. I will run another test and report any
further issues I may face.

Cheers,
Sasan

P.S. Somehow the rest of the maillist was excluded from the
conversation, so I added the Email back.


On Wed, Sep 24, 2025 at 2:57 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
>
> Now that you flipped the sign on question 1 it makes more sense (you were first asking "how can I force this emergency
> vehicle to not accelerate as it approaches the intersection").
> There are a couple of things going on:
>
> - The calls
>         traci.vehicle.setParameter('0', 'jmDriveRedSpeed', 32)
>         traci.vehicle.setParameter('0', 'jmIgnoreFoeProb', 1)
>     take no effect. The only way to set these values via TraCI at the moment is with
>          traci.vehicletype.setParameter('rescue', 'junctionModel.jmDriveRedSpeed', 32)
>         traci.vehicletype.setParameter('rescue', 'junctionModel.jmIgnoreFoeProb', 1)
>    or just set them in xml!
>
> - The driveRedSpeed was ignored when using the bluelight device: https://github.com/eclipse-sumo/sumo/issues/17120
> - Speed mode on the vehicle was ignored when using the bluelight device: https://github.com/eclipse-sumo/sumo/issues/17122 (the current solution doesn't require setSpeedMode however)
> - The old mechanism for continuing from the wrong turn lane required a full stop. This is no longer the case: https://github.com/eclipse-sumo/sumo/issues/17123
>
> cheers,
> Jakob
>
> Am Mi., 24. Sept. 2025 um 11:25 Uhr schrieb Sasan Amini <aminissn@xxxxxxxxx>:
>>
>> Regarding 1. how can I make sure the emergency vehicle doesn't
>> decelerate at all as it approaches the intersection and keeps cruising
>> at 150% speed? Or maybe decelerates to only x% of its max speed?
>> Coming to a full halt is a bit unrealistic especially when the tls is
>> in the green phase for that approach when the vehicle arrives.
>> Regarding 2. thanks. I guess I am not able to find out what is going on there
>> and on 3. I understand from a traffic engineering perspective it is
>> not that important, but for analyzing intersection geometries etc.
>> with non traffic experts, such a teleport will raise complex
>> questions.
>>
>> Thanks
>>
>> On Tue, Sep 23, 2025 at 10:36 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
>> >
>> > 1. As expected, the emergency vehicle decelerates on approach to the stop line (after accelerating to 150% of the speed limit (due to speedFactor 1.5) it brakes and reaches the stop line with 5m/s in the non-sublane case. (with lateral-resolution active, it stops in the queue)
>> > 2. the sublane behavior is more than a bit strange (i'll investigate)
>> > 3. the sudden lane-change in the end is harder to resolve. It's basically a teleport from the wrong turning lane onto the correct internal lane but I'll think about it
>> >
>> > Am Di., 23. Sept. 2025 um 13:23 Uhr schrieb Sasan Amini <aminissn@xxxxxxxxx>:
>> >>
>> >> with sublanes it behaves a bit strange. see the video. The sudden lane
>> >> change at the end, before the white vehicles leave the intersection,
>> >> can that also be resolved? For a general audience.
>> >> Attached are my scenario files, and I run the test.py code to start the sim.
>> >>
>> >>
>> >> On Tue, Sep 23, 2025 at 12:33 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
>> >> >
>> >> > I would expect the vehicle to slow down at the end of the wrong turning lane. This is what happens in my tests as well. You you provide your scenario?
>> >> > Yes, lane-changing will be smoother with the sublane model. Also, the sublane model will permit rescue lane formation.
>> >> >
>> >> > Am Di., 23. Sept. 2025 um 10:47 Uhr schrieb Sasan Amini <aminissn@xxxxxxxxx>:
>> >> >>
>> >> >> I will try it. One other question: how can I force this emergency
>> >> >> vehicle to not accelerate as it approaches the intersection? the light
>> >> >> is green, so not sure which parameters can control the speed behavior
>> >> >> for that "lane changing" right at the stop line. Also, will the lane
>> >> >> changing be smoother if I use sublanes?
>> >> >>
>> >> >> On Tue, Sep 23, 2025 at 10:34 AM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
>> >> >> >
>> >> >> > 1. That network isn't prepared for opposite direction driving. See https://sumo.dlr.de/docs/Simulation/OppositeDirectionDriving.html
>> >> >> > 2. You always specify the route in forward direction. Driving on the opposite side happens dynamically as needed (mostly in reaction to slow or stopped vehicles).
>> >> >> >
>> >> >> > Am Di., 23. Sept. 2025 um 10:13 Uhr schrieb Sasan Amini <aminissn@xxxxxxxxx>:
>> >> >> >>
>> >> >> >> I am running a test on
>> >> >> >> docs/examples/sumo/simple_nets/cross/cross3ltl/test.sumocfg.
>> >> >> >>
>> >> >> >> I am adding an emergency vehicle to the simulation as following:
>> >> >> >>
>> >> >> >> <vType id="rescue" vClass="emergency" speedFactor="1.5">
>> >> >> >> <param key="has.bluelight.device" value="true"/>
>> >> >> >> </vType>
>> >> >> >>
>> >> >> >> <vehicle id="0" type="rescue" depart="169">
>> >> >> >> <route edges="3si 2si 2o"/>
>> >> >> >> </vehicle>
>> >> >> >>
>> >> >> >> but I get an error: Error: Vehicle '0' has no valid route. No
>> >> >> >> connection between edge '3si' and edge '2si'.
>> >> >> >> I am expecting the emergency vehicle to bypass this collision and
>> >> >> >> drive the opposite road as indicated in the screenshot. Is there
>> >> >> >> something I am doing wrong?
>> >> >> >>
>> >> >> >> On Tue, Sep 23, 2025 at 8:44 AM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
>> >> >> >> >
>> >> >> >> > Emergency vehicles (https://sumo.dlr.de/docs/Simulation/Emergency.html) enjoy special privileges when driving on the opposite side and they may also ignore turning lanes.
>> >> >> >> > The current state of the simulation allows a wide range of emergency scenarios. Feel free to open up an issue if you find something that doesn't work as expected.
>> >> >> >> >
>> >> >> >> > cheers,
>> >> >> >> > Jakob
>> >> >> >> >
>> >> >> >> > PS: Note, that opposite-direction driving is an exclusive microsim feature at the moment and doesn't work in meso.
>> >> >> >> >
>> >> >> >> > Am Di., 23. Sept. 2025 um 01:41 Uhr schrieb Sasan Amini via sumo-user <sumo-user@xxxxxxxxxxx>:
>> >> >> >> >>
>> >> >> >> >> Hi,
>> >> >> >> >>
>> >> >> >> >> I know that driving in the opposite direction for overtaking is
>> >> >> >> >> possible, but I was thinking if it is possible for cars to drive in
>> >> >> >> >> the opposite direction of roads in general? For example, emergency
>> >> >> >> >> vehicles that may switch to the opposite side of a road at an
>> >> >> >> >> intersection and try to avoid collision with cars driving in towards
>> >> >> >> >> that vehicle. Can such a scenario be modeled? Because connections are
>> >> >> >> >> also something that should be considered here.
>> >> >> >> >>
>> >> >> >> >> Best,
>> >> >> >> >> Sasan
>> >> >> >> >> _______________________________________________
>> >> >> >> >> 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