From 23cb327e1bc5d995348c4e87b8d3ed38521cf2a1 Mon Sep 17 00:00:00 2001 From: Guille Date: Fri, 9 Jun 2023 12:31:01 -0400 Subject: [PATCH] Bug fixing in associate energy systems --- .../montreal_custom_energy_system_parameters.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py b/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py index 5e4eda61..f80f66e9 100644 --- a/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py +++ b/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py @@ -123,9 +123,12 @@ class MontrealCustomEnergySystemParameters: energy_systems_connection = city.energy_systems_connection_table for building in city.buildings: _building_energy_systems = [] - energy_systems = energy_systems_connection['Energy System Type'] \ - .where(energy_systems_connection['Building'] == building.name) + energy_systems = energy_systems_connection['Energy System Type'].where( + energy_systems_connection['Building'] == building.name + ) for energy_system in energy_systems: + if str(energy_system) == 'nan': + break _generic_building_energy_systems = city.generic_energy_systems[energy_system] for _generic_building_energy_system in _generic_building_energy_systems: _building_energy_equipment = EnergySystem()