2

Repost from User Timo N.

Hi guys,

When running the grid0 baseline benchmark, I encountered a problem regarding the traffic lights. I adjusted the number of rows and columns to 1 so the scenario fits my needs.

When running, the traffic lights have faulty states. There are 3 lights green/red/yellow at the same time.

grid_network

When I tried to design a custom scenario by myself, I encountered the same problem.

I tried running grid0 without changes to the number of rows and columns and it keeps giving the same bug.

Did anyone encounter the same issue, or know how to solve this?

Many thanks in advance!

zmag
  • 6,257
  • 12
  • 26
  • 33
Alben
  • 76
  • 5

1 Answers1

1

This is something I personally also faced when I tried the grid scenario. The reason is that we have the function

tl_logic.add

In the grid.py file, which adds the specified traffic light logic to the simulation. A quick fix for this is to comment on the following lines:

tl_logic.add("center0", phases=phases, programID=1)


tl_logic.add("center1", phases=phases, programID=1)


tl_logic.add("center2", tls_type="actuated", phases=phases, programID=1)

I hope this helps.

Ashkan
  • 238
  • 1
  • 10