mjcortejo / csc931m-complex-systems

This repository contains the projects done for the CSC931M class
0 stars 0 forks source link

Change implementation of generating intersection light states #38

Closed mjcortejo closed 1 year ago

mjcortejo commented 1 year ago
  1. Current solution is its alternatinve between edges as i % 3 == 0

We should implement an approach where we could manually alter the states before running the system.

We could create a dictionary of some sort defining these states

mjcortejo commented 1 year ago

Created a dictionary for initial intersection states

    initial_intersection_states = {
        (2, 1): "green",
        (3, 2): "green",
        (4, 3): "green",
        (5, 4): "green",
        (6, 5): "green",

        (19, 20): "green",
        (21, 20): "green",
        (22, 21): "green",
        (23, 22): "green",
        (24, 23): "green",

        (2, 'C1'): "red",
        (4, 11): "red",
        (5, 12): "red",

        (20, 15): "red",
        (21, 16): "red",
        (23, 18): "red",
    }