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.""" 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)