From 3e193f04a63d081c58d95f340fca91d27b92a658 Mon Sep 17 00:00:00 2001 From: Saeed Ranjbar Date: Thu, 1 Feb 2024 15:41:05 -0500 Subject: [PATCH] The dual_supply_capability is added to the city model structure --- .../non_pv_generation_system.py | 19 +++++++++++++++++++ ...america_custom_energy_system_parameters.py | 2 ++ tests/test_systems_factory.py | 3 ++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/hub/city_model_structure/energy_systems/non_pv_generation_system.py b/hub/city_model_structure/energy_systems/non_pv_generation_system.py index 3dc044e5..fea1d7b2 100644 --- a/hub/city_model_structure/energy_systems/non_pv_generation_system.py +++ b/hub/city_model_structure/energy_systems/non_pv_generation_system.py @@ -42,6 +42,7 @@ class NonPvGenerationSystem(GenerationSystem): self._cooling_output_curve = None self._cooling_fuel_consumption_curve = None self._cooling_efficiency_curve = None + self._dual_supply_capability = None @property def nominal_heat_output(self): @@ -427,4 +428,22 @@ class NonPvGenerationSystem(GenerationSystem): """ self._cooling_efficiency_curve = value + @property + def dual_supply_capability(self): + """ + Get the capability of the generation component for simultaneous heat and cold production + + :return: bool + """ + return self._dual_supply_capability + + @dual_supply_capability.setter + def dual_supply_capability(self, value): + """ + Set the capability of the generation component for simultaneous heat and cold production + + :return: bool + """ + self._dual_supply_capability = value + 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 f898cdfa..92eb866e 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 @@ -120,6 +120,8 @@ class NorthAmericaCustomEnergySystemParameters: _generic_storage_system.type_energy_stored = 'thermal' _storage_systems.append(_generic_storage_system) _generation_system.energy_storage_systems = [_storage_systems] + if archetype_generation_system.dual_supply_capability: + _generation_system.dual_supply_capability = True _generation_systems.append(_generation_system) return _generation_systems diff --git a/tests/test_systems_factory.py b/tests/test_systems_factory.py index ce508b46..036048e9 100644 --- a/tests/test_systems_factory.py +++ b/tests/test_systems_factory.py @@ -141,4 +141,5 @@ class TestSystemsFactory(TestCase): self.assertLess(0, building.heating_consumption[cte.YEAR][0]) self.assertEqual(0, building.cooling_consumption[cte.YEAR][0]) self.assertLess(0, building.domestic_hot_water_consumption[cte.YEAR][0]) - self.assertLess(0, building.onsite_electrical_production[cte.YEAR][0]) \ No newline at end of file + self.assertLess(0, building.onsite_electrical_production[cte.YEAR][0]) + print('test') \ No newline at end of file