From ef89da8552e71b568fb876f87821a21592c460f2 Mon Sep 17 00:00:00 2001 From: Saeed Ranjbar Date: Thu, 5 Oct 2023 16:18:08 -0400 Subject: [PATCH] created a loop for generation systems in _associate_energy_systems --- ...north_america_custom_energy_system_parameters.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hub/imports/energy_systems/north_america_custom_energy_system_parameters.py b/hub/imports/energy_systems/north_america_custom_energy_system_parameters.py index 9db1d445..30ca9465 100644 --- a/hub/imports/energy_systems/north_america_custom_energy_system_parameters.py +++ b/hub/imports/energy_systems/north_america_custom_energy_system_parameters.py @@ -150,14 +150,19 @@ class NorthAmericaCustomEnergySystemParameters: _building_energy_equipment = EnergySystem() _building_energy_equipment.name = _generic_building_energy_system.name _building_energy_equipment.demand_types = _generic_building_energy_system.demand_types - _building_generation_system = GenerationSystem() - _building_generation_system.generic_generation_system = \ - copy.deepcopy(_generic_building_energy_system.generation_systems) + _generation_systems = [] + _generic_building_generation_systems = _generic_building_energy_system.generation_systems + for _generic_building_generation_system in _generic_building_generation_systems: + _building_generation_system = GenerationSystem() + _building_generation_system.generic_generation_system = \ + copy.deepcopy(_generic_building_generation_system) + _generation_systems.append(_building_generation_system) + _building_energy_equipment.generation_systems = _generation_systems _building_storage_system = ThermalStorageSystem() _building_storage_system.generic_storage_system = \ copy.deepcopy(_generic_building_energy_system.energy_storage_systems) - _building_energy_equipment.generation_systems = _building_generation_system + _building_energy_equipment.energy_storage_systems = _building_storage_system _building_energy_systems.append(_building_energy_equipment)