eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.51k stars 1.42k forks source link

Car violates lane permission in sublane mode #15006

Open lindsaymorgan opened 3 months ago

lindsaymorgan commented 3 months ago

I am working on a highway tollstation simulation currently. Here I have one disallow='all' lane in each of 2 lanes to represent a toll booth. But when I ran the simulation with --lateral-resolution 0.5, cars sometimes just drive through this closed lane directly or partially over the close lane. Is there any method to avoid this? image test-park2

**SUMO-version:1.20.0

**operating system: win10

namdre commented 3 months ago

looks like a bug. please provide the scenario files.

lindsaymorgan commented 3 months ago

looks like a bug. please provide the scenario files.

sublane-example.zip Here is the scenario files.

By the way, I also saw other behavior differences with and without --sublane option. When without --sublane option. the number of vehicles passing through the 4 lanes is almost equal. test-park5 When with --sublane option, most of them are on 1th and 3th lane. test-park2

Would it possible to make them pass 4 lanes equally while with --sublane option? Or could I turn off --sublane option just for one edge?

namdre commented 3 months ago

I'll look into the bias as well.

lindsaymorgan commented 3 months ago

I'll look into the bias as well.

Thank you so much~

namdre commented 3 months ago

In the default model, lanechange is instant regardless of lane width. In contrast, vehicles take ~1s per meter of lateral distance in the sublane model. Your vehicles move at ~10m/s on edge '2' which gives them ~2.5 seconds to complete a lane change that takes ~5s (since your lanes are quite wide). As a work-around you can either increase lateral speed or the length of edge 2:

   <vType id="t0" maxSpeedLat="2" lcAccelLat="2"/>
    <flow id="v" type="t0" .../>

Since the decision to change lanes isn't instant on entering edge 2 it helps to combine both approaches.

namdre commented 3 months ago

The bug of driving between lanes partly arises because changing lane widths (and intermediate forbidden lanes) are not considered when evaluating the safety of a lane change. If both the current lane and the target lane continue the route, the change is always assumed to be safe.

namdre commented 3 months ago

somewhat unrelated: your simulation will run much faster if you don't try to feed much more vehicles than the network can handle or set option --max-depart-delay 3. Otherwise all the extra vehicles will create effort from repeated insertion attempts.

lindsaymorgan commented 3 months ago

somewhat unrelated: your simulation will run much faster if you don't try to feed much more vehicles than the network can handle or set option --max-depart-delay 3. Otherwise all the extra vehicles will create effort from repeated insertion attempts.

Thank you for your advice~ I have modified my road network and set the option, it works~