mjcortejo / csc931m-complex-systems

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

Cars are not moving in P3 -> C3 -> 17 position #42

Closed mjcortejo closed 1 year ago

mjcortejo commented 1 year ago

Found issue, Debug line 222. And start from there.

There's an error when using get intersection light state, where intersection 11 heading to 17 does not have an object.

Instead of looping neighbors we need to loop the ones that are in-degrees

mjcortejo commented 1 year ago

Must use G.predecessors to loop all the neighbors instead of everything

https://networkx.org/documentation/stable/reference/classes/generated/networkx.DiGraph.predecessors.html

mjcortejo commented 1 year ago

lol fixed by using predecessors