solved bug in enumerate

This commit is contained in:
Pilar Monsalvete 2023-06-01 14:10:03 -04:00
parent 665bf8159b
commit 1d8a1dc275

View File

@ -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