Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Question regarding E3 detector filtering and nextEdges behavior for overlapping routes

As an example, our own tests that return data when using nextEdge with an internal edge can be found here: https://sumo.dlr.de/extractTest.php?path=sumo/output/e3/nextEdges/20s_10r_5l_internal

If you think that your own inputs are valid according to the updated documentation and the example respectively, please provide a minimal scenario that replicates missing output (zip all files and send them per mail or attach them to a github issue) and I will investigate.

regards,
Jakob

Am Fr., 28. Aug. 2026 um 09:30 Uhr schrieb 郭松庭 <sungting.tw@xxxxxxxxx>:
Dear Jakob and Pedro,

Thank you both for your helpful suggestions regarding the E3 detector configuration.

I have been trying to use the nextEdges attribute to filter for specific left-turn internal edges, but I have not been able to achieve the expected results. Specifically, my goal is to track only the vehicles following the orange arrow path, but vehicles that drive further ahead and make a U-turn (the green arrow path) are still being captured.

I also tested various configuration combinations—such as placing the E3 entry points on the intersection's FROM EDGE or its upstream adjacent edge, and the exit points on the TO EDGE or its downstream adjacent edge. However, whenever I include the nextEdges setting, the output returns "-1" or no valid data.

image.png

Below are the various scenarios I have tried so far. Since this is my first time using the nextEdges parameter, I suspect I might be misinterpreting the manual instructions, which is why I am unable to get the expected data. I would greatly appreciate any further guidance or assistance you could provide. Thank you very much!

1. Network Basic Information & References

  • 231702832#14: FROM EDGE of the intersection

  • 231702832#13: The upstream adjacent EDGE of the FROM EDGE

  • 232862248#8: TO EDGE of the intersection

  • 232862248#9: The next downstream EDGE following the TO EDGE

  • :cluster_1504989302_1504990224_16: The internal EDGE of this intersection, which corresponds to the left-turn path.
The original XML source code for this internal EDGE and its connections is as follows:

    <edge id=":cluster_1504989302_1504990224_16" function="internal">
        <lane id=":cluster_1504989302_1504990224_16_0" index="0" speed="10.55" length="32.20" shape="3482.43,1994.71 3484.94,1987.58 3490.82,1980.80 3498.21,1976.30 3505.22,1976.01"/>
        <lane id=":cluster_1504989302_1504990224_16_1" index="1" speed="9.75" length="27.32" shape="3485.62,1995.33 3487.52,1988.89 3492.05,1982.94 3497.97,1979.10 3504.04,1978.98"/>
    </edge>
    <connection from="231702832#14" to="232862248#8" fromLane="1" toLane="0" via=":cluster_1504989302_1504990224_16_0" tl="cluster_1504989302_1504990224" linkIndex="16" dir="l" state="o"/>
    <connection from="231702832#14" to="232862248#8" fromLane="2" toLane="1" via=":cluster_1504989302_1504990224_16_1" tl="cluster_1504989302_1504990224" linkIndex="17" dir="l" state="o"/>
    <connection from=":cluster_1504989302_1504990224_16" to="232862248#8" fromLane="0" toLane="0" dir="l" state="M"/>
    <connection from=":cluster_1504989302_1504990224_16" to="232862248#8" fromLane="1" toLane="1" dir="l" state="M"/>
As shown above, :cluster_1504989302_1504990224_16 is listed under intLanes for this junction.

    <junction id="cluster_1504989302_1504990224" type="traffic_light" x="3490.37" y="1979.15" incLanes="137195191#6_0 137195191#6_1 137195191#6_2 -E0.108_0 -E0.108_1 232862248#7_0 232862248#7_1 231702832#14_0 231702832#14_1 231702832#14_2" intLanes=":cluster_1504989302_1504990224_0_0 :cluster_1504989302_1504990224_1_0 :cluster_1504989302_1504990224_1_1 :cluster_1504989302_1504990224_3_0 :cluster_1504989302_1504990224_4_0 :cluster_1504989302_1504990224_5_0 :cluster_1504989302_1504990224_5_1 :cluster_1504989302_1504990224_18_0 :cluster_1504989302_1504990224_8_0 :cluster_1504989302_1504990224_9_0 :cluster_1504989302_1504990224_9_1 :cluster_1504989302_1504990224_11_0 :cluster_1504989302_1504990224_12_0 :cluster_1504989302_1504990224_13_0 :cluster_1504989302_1504990224_13_1 :cluster_1504989302_1504990224_13_2 :cluster_1504989302_1504990224_16_0 :cluster_1504989302_1504990224_16_1" shape="3497.95,1994.31 3505.81,1974.52 3502.75,1972.83 3501.83,1971.87 3501.31,1970.82 3501.20,1969.70 3501.49,1968.50 3489.59,1963.77 3488.10,1965.75 3487.01,1966.26 3485.69,1966.44 3484.15,1966.30 3482.38,1965.84 3475.53,1984.40 3477.44,1986.06 3477.95,1987.44 3478.17,1989.19 3478.09,1991.31 3477.72,1993.79 3493.57,1996.89 3494.11,1994.77 3494.73,1994.18 3495.57,1993.91 3496.64,1993.95">
        <request index="0"  response="000000000000000000" foes="000000000001100000" cont="0"/>
        <request index="1"  response="000000000000000000" foes="111111100011100000" cont="0"/>
        <request index="2"  response="000000000010000000" foes="111111100011100000" cont="0"/>
        <request index="3"  response="000000011010000000" foes="111110011011100000" cont="0"/>
        <request index="4"  response="000000011000000000" foes="110000011000000000" cont="0"/>
        <request index="5"  response="000000111000001111" foes="110000111000001111" cont="0"/>
        <request index="6"  response="000000111000001111" foes="110000111000001111" cont="0"/>
        <request index="7"  response="001110111000001110" foes="001110111000001110" cont="1"/>
        <request index="8"  response="000000000000000000" foes="001110000000000000" cont="0"/>
        <request index="9"  response="000000000010000000" foes="111110000011111000" cont="0"/>
        <request index="10" response="000000000010000000" foes="111110000011111000" cont="0"/>
        <request index="11" response="000000000010000110" foes="111110000011100110" cont="0"/>
        <request index="12" response="000000000000000110" foes="000000000000000110" cont="0"/>
        <request index="13" response="000000111100001110" foes="000000111110001110" cont="0"/>
        <request index="14" response="001000111100001110" foes="001000111110001110" cont="0"/>
        <request index="15" response="000000111100001110" foes="000100111110001110" cont="0"/>
        <request index="16" response="000000111001111110" foes="000000111001111110" cont="0"/>
        <request index="17" response="000000111001111110" foes="000000111001111110" cont="0"/>
        <param key="origEdgeIds" value="-231702832#15 231702832#15"/>
        <param key="origId" value="1504989302 1504990224"/>
    </junction>



2. E3 Detector Configurations Tested

Currently, only the configurations without nextEdges successfully return standard data, but they inadvertently include vehicles performing U-turns or right turns past the intersection.

<additional>
  <!-- 14-8 Scenarios -->
  <entryExitDetector id="14-8-0" freq="60" file="AAe3_output.xml">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>
  <entryExitDetector id="14-8-1" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>
  <entryExitDetector id="14-8-2" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="14-8-3" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="14-8-4" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>  

  <!-- 13-8 Scenarios -->
  <entryExitDetector id="13-8-0" freq="60" file="AAe3_output.xml">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>
  <entryExitDetector id="13-8-1" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>
  <entryExitDetector id="13-8-2" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-8-3" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-8-4" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-8-5" freq="60" file="AAe3_output.xml" nextEdges="231702832#13 231702832#14 :cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#8_0" pos="15"/>
    <detExit  lane="232862248#8_1" pos="15"/>
  </entryExitDetector>  
  
  <!-- 13-9 Scenarios -->
  <entryExitDetector id="13-9-0" freq="60" file="AAe3_output.xml">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-9-1" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>
  <entryExitDetector id="13-9-2" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-9-3" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-9-4" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-9-5" freq="60" file="AAe3_output.xml" nextEdges="231702832#13 231702832#14 :cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-9-6" freq="60" file="AAe3_output.xml" nextEdges="231702832#13 231702832#14 :cluster_1504989302_1504990224_16 232862248#8 232862248#9">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-9-7" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-9-8" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16 232862248#8 232862248#9">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="13-9-9" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16 232862248#8 232862248#9">
    <detEntry lane="231702832#13_0" pos="5"/>
    <detEntry lane="231702832#13_1" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  

  <!-- 14-9 Scenarios -->
  <entryExitDetector id="14-9-0" freq="60" file="AAe3_output.xml">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>
  <entryExitDetector id="14-9-1" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>
  <entryExitDetector id="14-9-2" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="14-9-3" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="149-4" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16 232862248#8">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
  <entryExitDetector id="14-9-5" freq="60" file="AAe3_output.xml" nextEdges="231702832#14 :cluster_1504989302_1504990224_16 232862248#8 232862248#9">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector> 
  <entryExitDetector id="14-9-6" freq="60" file="AAe3_output.xml" nextEdges=":cluster_1504989302_1504990224_16 232862248#8 232862248#9">
    <detEntry lane="231702832#14_0" pos="5"/>
    <detEntry lane="231702832#14_1" pos="5"/>
    <detEntry lane="231702832#14_2" pos="5"/>
    <detExit  lane="232862248#9_0" pos="15"/>
    <detExit  lane="232862248#9_1" pos="15"/>
  </entryExitDetector>  
</additional>


Best regards,
Tony






Jakob Erdmann via sumo-user <sumo-user@xxxxxxxxxxx> 於 2026年8月27日週四 下午4:55寫道:
Regarding your questions:

1. yes. nextEdges is the correct mechanism but it must be used very carefully to avoid matching the detour vehicles
2. the detector must be placed on an edge directly ahead of the junction and the nextEdges attribut must hold the id of the first left-turn internal edge (ahead of the internal junction if one exists). See the updated documentation at https://sumo.dlr.de/docs/Simulation/Output/Multi-Entry-Exit_Detectors_(E3).html#attributes
3. the data failure likely occured because you mixed normal and internal edges. This is not supported. Either normal edges or a single internal edge are permitted. In your case the internal edge is necessary (though there is an implementation idea to make this work with normal edges: https://github.com/eclipse-sumo/sumo/issues/18267

regards,
Jakob

Am Mi., 26. Aug. 2026 um 16:35 Uhr schrieb Pedro Oliveira via sumo-user <sumo-user@xxxxxxxxxxx>:
Good morning! The SUMO developers likely have a better answer than the solution I am about to propose. One alternative would be to use E1 detectors (instant induction loops). They will return the IDs of all vehicles that pass over them; you would place one at the entrance, one at the exit, and one at the return point. You can import the XML into Excel (that is the tool I am most familiar with, though there may be other methods). Using a pivot table, you can identify the entry-exit OD pair and filter for those that pass through the return point. Best regards, Pedro Oliveira.

Em qua, 26 de ago de 2026 10:12, 郭松庭 via sumo-user <sumo-user@xxxxxxxxxxx> escreveu:

Dear SUMO Development Team,

I am currently working on a traffic simulation project using Eclipse SUMO and have a question regarding the multi-entry-exit detector (E3) and how to properly filter specific vehicle paths.

Problem Description: At a specific intersection, I have two types of vehicles passing through a left-turn movement:

  1. Green Path (Target): Vehicles that make a direct left turn.

  2. Red Path (Unwanted): Vehicles that pass through the intersection, make a U-turn or detour down the road, and eventually merge into the same exit lanes, thereby triggering the same E3 detector.

image.png



Since both paths share the same entry and exit lanes (or end up at the same E3 exit), the E3 detector counts the red-path vehicles as part of the normal left-turn movement, which distorts my performance data (speed and travel time).

What I have tried: I attempted to use the nextEdges attribute to force the E3 detector to only capture vehicles following the exact sequence of the green path. However, whenever I define nextEdges, the E3 output consistently returns -1 (no data), even though the vehicles' routes in my .rou.xml file contain those exact edges.

My Questions:

  1. Is nextEdges the correct attribute to filter out detouring/U-turning vehicles (the red path) when their final exit lanes are identical?

  2. If so, what is the exact mechanism or syntax required for nextEdges when dealing with OSM-imported networks that consist of multiple sub-edges? Why does it usually result in -1?

  3. Is there a recommended best practice in SUMO to separate or filter out these overlapping/detouring trajectories within an E3 detector without causing data failure?

Any advice or guidance would be greatly appreciated. Thank you for your time and support!

Best regards,

Tony


_______________________________________________
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
_______________________________________________
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