From bf0c42315d69a6fa22829d5f687b74bd58b709fd Mon Sep 17 00:00:00 2001 From: s_ranjbar Date: Thu, 5 Sep 2024 12:41:32 -0400 Subject: [PATCH] fix: small issues in energy system parameter importer is fixed --- hub/data/energy_systems/montreal_future_systems.xml | 4 ++-- hub/helpers/data/montreal_custom_fuel_to_hub_fuel.py | 12 ++++++++---- ...eration_system_to_hub_energy_generation_system.py | 2 +- .../montreal_future_energy_systems_parameters.py | 6 +++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/hub/data/energy_systems/montreal_future_systems.xml b/hub/data/energy_systems/montreal_future_systems.xml index a1de1af4..583a004f 100644 --- a/hub/data/energy_systems/montreal_future_systems.xml +++ b/hub/data/energy_systems/montreal_future_systems.xml @@ -448,7 +448,7 @@ 12 Photovoltaic Module - Photovoltaic + photovoltaic 445MS Canadian Solar @@ -1027,7 +1027,7 @@ 26 template Photovoltaic Module - Photovoltaic + photovoltaic diff --git a/hub/helpers/data/montreal_custom_fuel_to_hub_fuel.py b/hub/helpers/data/montreal_custom_fuel_to_hub_fuel.py index 14fd0fef..0f1329b5 100644 --- a/hub/helpers/data/montreal_custom_fuel_to_hub_fuel.py +++ b/hub/helpers/data/montreal_custom_fuel_to_hub_fuel.py @@ -12,12 +12,16 @@ class MontrealCustomFuelToHubFuel: """ Montreal custom fuel to hub fuel class """ + def __init__(self): self._dictionary = { - 'gas': cte.GAS, - 'electricity': cte.ELECTRICITY, - 'renewable': cte.RENEWABLE - } + 'gas': cte.GAS, + 'natural gas': cte.GAS, + 'diesel': cte.DIESEL, + 'biomass': cte.BIOMASS, + 'electricity': cte.ELECTRICITY, + 'renewable': cte.RENEWABLE + } @property def dictionary(self) -> dict: diff --git a/hub/helpers/data/montreal_generation_system_to_hub_energy_generation_system.py b/hub/helpers/data/montreal_generation_system_to_hub_energy_generation_system.py index 7a42c832..ac5f4cae 100644 --- a/hub/helpers/data/montreal_generation_system_to_hub_energy_generation_system.py +++ b/hub/helpers/data/montreal_generation_system_to_hub_energy_generation_system.py @@ -18,7 +18,7 @@ class MontrealGenerationSystemToHubEnergyGenerationSystem: 'furnace': cte.BASEBOARD, 'cooler': cte.CHILLER, 'electricity generator': cte.ELECTRICITY_GENERATOR, - 'PV system': cte.PHOTOVOLTAIC, + 'photovoltaic': cte.PHOTOVOLTAIC, 'heat pump': cte.HEAT_PUMP } diff --git a/hub/imports/energy_systems/montreal_future_energy_systems_parameters.py b/hub/imports/energy_systems/montreal_future_energy_systems_parameters.py index 1b1638f1..76ac9351 100644 --- a/hub/imports/energy_systems/montreal_future_energy_systems_parameters.py +++ b/hub/imports/energy_systems/montreal_future_energy_systems_parameters.py @@ -88,12 +88,12 @@ class MontrealFutureEnergySystemParameters: archetype_generation_systems = archetype_system.generation_systems if archetype_generation_systems is not None: for archetype_generation_system in archetype_system.generation_systems: - if archetype_generation_system.system_type == 'Photovoltaic': + if archetype_generation_system.system_type == 'photovoltaic': _generation_system = PvGenerationSystem() _generation_system.name = archetype_generation_system.name _generation_system.model_name = archetype_generation_system.model_name _generation_system.manufacturer = archetype_generation_system.manufacturer - _type = 'PV system' + _type = archetype_generation_system.system_type _generation_system.system_type = Dictionaries().montreal_generation_system_to_hub_energy_generation_system[_type] _fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_system.fuel_type] _generation_system.fuel_type = _fuel_type @@ -126,7 +126,7 @@ class MontrealFutureEnergySystemParameters: _generation_system.manufacturer = archetype_generation_system.manufacturer _type = archetype_generation_system.system_type _generation_system.system_type = Dictionaries().montreal_generation_system_to_hub_energy_generation_system[_type] - _fuel_type = Dictionaries().north_america_custom_fuel_to_hub_fuel[archetype_generation_system.fuel_type] + _fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_system.fuel_type] _generation_system.fuel_type = _fuel_type _generation_system.nominal_heat_output = archetype_generation_system.nominal_heat_output _generation_system.nominal_cooling_output = archetype_generation_system.nominal_cooling_output