Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timed-traffic light step switch condition wait = 0 always evaluating as True #1497

Closed
simmichj opened this issue Mar 28, 2022 · 0 comments · Fixed by #1673
Closed

Timed-traffic light step switch condition wait = 0 always evaluating as True #1497

simmichj opened this issue Mar 28, 2022 · 0 comments · Fixed by #1673
Assignees
Labels
BUG Defect detected TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc

Comments

@simmichj
Copy link

simmichj commented Mar 28, 2022

EDIT: see https://youtu.be/EqkzznhV6hc?t=760

Step switch conditions

The step switch condition of wait = 0 should prolong the current step if somebody is waiting for the light, or skip to the next step if nobody is waiting for the light.

From watching the other step switch condition that monitors waiting (wait > 0), it appears that the wait starts at 0 when the min time elapses and then increases to non-zero values if vehicles are slowing down for or stopped at the light. This is unlike the flow value which appears to start at a non-zero value if vehicles are moving when the min time elapses.

If the wait begins at 0 initially for the wait = 0 step, this means that this step switch condition will always evaluate as True before it has time to increase to a non-zero value and prolong the current step.

I'm using TM:PE 11.6.5.1 TEST. I have tested with simulation accuracy very high or very low.

Steps to reproduce

Create a simple timed traffic light at a crossing node with the following steps:

  1. Red for vehicle traffic, min 5s, max 20s, switch if wait > 0
  2. Red for vehicle traffic, min 5s, max 20s, switch if wait = 0
  3. Green for vehicle traffic, min 1s, max 60s, switch if flow = 0 (just to flush the queue through the intersection start again)

The very same waiting vehicles that will produce a non-zero wait value and cause the steps to switch from step 1 to step 2 will then fail to prevent the steps from switching prematurely from step 2 to step 3.

@simmichj simmichj added BUG Defect detected triage Awaiting issue categorisation labels Mar 28, 2022
@originalfoo originalfoo added the TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc label Mar 28, 2022
@krzychu124 krzychu124 added this to the Timed Traffic Lights milestone Oct 2, 2022
@kianzarrin kianzarrin self-assigned this Oct 10, 2022
@kianzarrin kianzarrin removed the triage Awaiting issue categorisation label Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants