Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Detector ID for actuated TLS

The detector ids are assigned in two nested loops
- the outer loop runs over all linkIndex values in order starting at 0
- the inner loop runs over all incoming lanes that have a connection with the current linkIndex. These are in network order (clockwise around the intersection - just like the "link junction index")
Whenever a new edge shows up in the inner loop, the detEdgeIndex is increased and the detLaneIndex is reset to 0

Whenever the custom tls linkIndex values vary a lot with respect to the clockwise ordering, the same edge may occur multiple times and you will end up with more detEdgeIndex values than incoming edges.


Am Di., 9. Juli 2024 um 08:52 Uhr schrieb Sasan Amini via sumo-user <sumo-user@xxxxxxxxxxx>:
Dear all,

sorry for pushing this question again, but I can't decode the detector
indexing logic. As soon as linkIndex are manually changed in NETEDIT,
E1 detectors of educated traffic signal do not follow the expected
indexing logic and sometimes are indexed for lanes from left to right,
and sometimes are just indexed 0 after the linkIndex.

Thank you for your support
Sasan

On Wed, Jul 3, 2024 at 11:00 PM Sasan Amini <aminissn@xxxxxxxxx> wrote:
>
> Dear Mirko,
>
> Thanks for the quick reply. That is the default behavior if the tls
> are not grouped. In this example, even though the detectors are on the
> same edge, they get a different first index:
> Am I correct?
>
> On Wed, Jul 3, 2024 at 5:25 PM Mirko Barthauer <m.barthauer@xxxxxxxxxxx> wrote:
> >
> > Hi Sasan,
> >
> > the relevant code line seems to be https://github.com/eclipse-sumo/sumo/blob/fc540e9834bb840b3da0eb3c1224ad4022a46263/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp#L222 . The first number is an edge index used inside the TL and the second is the lane index. The edge index is built from the lanes included in the TL control (every time a new edge is found in the order of lanes the index is incremented).
> >
> >
> >
> > Best regards
> >
> > Mirko
> >
> >
> >
> >
> >
> > -----Original-Nachricht-----
> > Betreff: [sumo-user] Detector ID for actuated TLS
> > Datum: 2024-07-03T17:09:52+0200
> > Von: "Sasan Amini via sumo-user" <sumo-user@xxxxxxxxxxx>
> > An: "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>
> >
> > Dear all,
> > I was wondering how the IDs for automatically generated detectors for
> > actuated tls are assigned? I have manually changed tlIndex of some
> > connections, and in most cases detectors are basically D0.0 such as
> > first digit is the tlLinkIndex and the second digit is an enumerator.
> > However, sometimes it is not. Below is a screenshot of an example:
> > instead of D2.0 I get D1.1. Can anyone help me to get these IDs maybe
> > using sumolib? or at least a way to reproduce how they are created and
> > assigned?
> >
> > Thanks,
> > 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