From f865490ff908d239c46b3ae8c544be6ff39cc63c Mon Sep 17 00:00:00 2001 From: guille Date: Fri, 13 Oct 2023 09:11:03 +0200 Subject: [PATCH] Corrected bug in distribution_systems_electrical_consumption, but need to be confirmed with pilar --- hub/city_model_structure/building.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hub/city_model_structure/building.py b/hub/city_model_structure/building.py index d7efb9f2..e4d654b2 100644 --- a/hub/city_model_structure/building.py +++ b/hub/city_model_structure/building.py @@ -743,8 +743,11 @@ class Building(CityObject): for key, item in self._distribution_systems_electrical_consumption.items(): for i in range(0, len(item)): + _working_hours_value = _working_hours[key] + if len(item) == 12: + _working_hours_value = _working_hours[key][i] self._distribution_systems_electrical_consumption[key][i] += ( - _peak_load * _consumption_fix_flow * _working_hours[key] * cte.WATTS_HOUR_TO_JULES + _peak_load * _consumption_fix_flow * _working_hours_value * cte.WATTS_HOUR_TO_JULES ) return self._distribution_systems_electrical_consumption