From 1d8a1dc275b62f5fc86ae09ee04b3f797509e408 Mon Sep 17 00:00:00 2001 From: p_monsalvete Date: Thu, 1 Jun 2023 14:10:03 -0400 Subject: [PATCH] solved bug in enumerate --- hub/city_model_structure/building.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hub/city_model_structure/building.py b/hub/city_model_structure/building.py index 6aa29be0..42276a55 100644 --- a/hub/city_model_structure/building.py +++ b/hub/city_model_structure/building.py @@ -661,7 +661,7 @@ class Building(CityObject): for heating_demand_key in self.heating: _consumption = [0]*len(self.heating[heating_demand_key][cte.INSEL_MEB]) _demand = self.heating[heating_demand_key][cte.INSEL_MEB] - for i in enumerate(_consumption): + for i, _ in enumerate(_consumption): _consumption[i] += (parasitic_energy_consumption + consumption_variable_flow) * _demand[i] self._distribution_systems_electrical_consumption[heating_demand_key] = _consumption if demand_type.lower() == cte.COOLING.lower(): @@ -670,7 +670,7 @@ class Building(CityObject): for demand_key in self.cooling: _consumption = self._distribution_systems_electrical_consumption[demand_key] _demand = self.cooling[demand_key][cte.INSEL_MEB] - for i in enumerate(_consumption): + for i, _ in enumerate(_consumption): _consumption[i] += (parasitic_energy_consumption + consumption_variable_flow) * _demand[i] self._distribution_systems_electrical_consumption[demand_key] = _consumption