From 3eed97e64adf545fc5122274a98920a36d8e73fe Mon Sep 17 00:00:00 2001 From: RotenProletariat1917 <79891244+CharlesV-s-friend-Suleiman@users.noreply.github.com> Date: Sat, 8 Apr 2023 10:12:40 +0800 Subject: [PATCH 1/2] Update traffic_light_grid.py --- flow/networks/traffic_light_grid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow/networks/traffic_light_grid.py b/flow/networks/traffic_light_grid.py index 7fb9a7b2b..02bea798e 100644 --- a/flow/networks/traffic_light_grid.py +++ b/flow/networks/traffic_light_grid.py @@ -510,10 +510,10 @@ def new_con(side, from_id, to_id, lane, signal_group): top_node_id = "{}_{}".format(i + 1, j) conn = [] - for lane in range(self.vertical_lanes): + for lane in range(self.horizontal_lanes): conn += new_con("bot", node_id, right_node_id, lane, 1) conn += new_con("top", right_node_id, node_id, lane, 1) - for lane in range(self.horizontal_lanes): + for lane in range(self.vectical_lanes): conn += new_con("right", node_id, top_node_id, lane, 2) conn += new_con("left", top_node_id, node_id, lane, 2) From 742d627b3db07b13834b9d25c01f79ad90cb2314 Mon Sep 17 00:00:00 2001 From: RotenProletariat1917 <79891244+CharlesV-s-friend-Suleiman@users.noreply.github.com> Date: Sat, 8 Apr 2023 10:29:08 +0800 Subject: [PATCH 2/2] Update traci.py --- flow/core/kernel/vehicle/traci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/core/kernel/vehicle/traci.py b/flow/core/kernel/vehicle/traci.py index 39bfb35da..b6109187e 100644 --- a/flow/core/kernel/vehicle/traci.py +++ b/flow/core/kernel/vehicle/traci.py @@ -1097,7 +1097,7 @@ def set_color(self, veh_id, color): """ r, g, b = color self.kernel_api.vehicle.setColor( - vehID=veh_id, color=(r, g, b, 255)) + typeID=veh_id, color=(r, g, b, 255)) def add(self, veh_id, type_id, edge, pos, lane, speed): """See parent class."""