Skip to main content
. 2018 Dec 12;18(12):4399. doi: 10.3390/s18124399
Algorithm 11 Time min max.
Input: Lane l, tlsdesc
Result: Time until next switch tmin, time until next “green” state tmax
  • 1:

    tlss CurrentState(tlsdesc)

  • 2:

    tminSecondsToNextSwitch(tlss,tlsdesc)

  • 3:

    tmaxtmin

  • 4:

    iftlss in green state then

  • 5:

        tlssNextState(tlss,tlsdesc)

  • 6:

    end if

  • 7:

    whiletlss not in green state do

  • 8:

        tmaxSecondsToNextSwitch(tlss,tlsdesc)

  • 9:

        tlssNextState(tlss,tlsdesc)

  • 10:

    end while

  • 11:

    return(tmin,tmax)