changing from generation system to generation systemS in system importer north america

This commit is contained in:
Pilar Monsalvete 2023-10-03 09:40:32 -04:00
parent fac6844da1
commit 087384475f
2 changed files with 31 additions and 27 deletions

View File

@ -86,9 +86,11 @@ class NorthAmericaCustomEnergySystemParameters:
_hub_demand_types.append(Dictionaries().north_america_demand_type_to_hub_energy_demand_type[demand_type]) _hub_demand_types.append(Dictionaries().north_america_demand_type_to_hub_energy_demand_type[demand_type])
energy_system.name = system.name energy_system.name = system.name
energy_system.demand_types = _hub_demand_types energy_system.demand_types = _hub_demand_types
archetype_generation_equipments = system.generation_systems
_generation_systems = []
for archetype_generation_equipment in archetype_generation_equipments:
_generation_system = GenericGenerationSystem() _generation_system = GenericGenerationSystem()
archetype_generation_equipment = system.generation_systems _type = archetype_generation_equipment.name
_type = system.name
_generation_system.type = Dictionaries().north_america_system_to_hub_energy_generation_system[_type] _generation_system.type = Dictionaries().north_america_system_to_hub_energy_generation_system[_type]
_fuel_type = Dictionaries().north_america_custom_fuel_to_hub_fuel[archetype_generation_equipment.fuel_type] _fuel_type = Dictionaries().north_america_custom_fuel_to_hub_fuel[archetype_generation_equipment.fuel_type]
_generation_system.fuel_type = _fuel_type _generation_system.fuel_type = _fuel_type
@ -111,8 +113,9 @@ class NorthAmericaCustomEnergySystemParameters:
_generation_system._cooling_output_curve = archetype_generation_equipment.cooling_output_curve _generation_system._cooling_output_curve = archetype_generation_equipment.cooling_output_curve
_generation_system._cooling_fuel_consumption_curve = archetype_generation_equipment.cooling_fuel_consumption_curve _generation_system._cooling_fuel_consumption_curve = archetype_generation_equipment.cooling_fuel_consumption_curve
_generation_system._cooling_efficiency_curve = archetype_generation_equipment.cooling_efficiency_curve _generation_system._cooling_efficiency_curve = archetype_generation_equipment.cooling_efficiency_curve
_generation_systems.append(_generation_system)
energy_system.generation_system = _generation_system energy_system.generation_systems = _generation_systems
_thermal_storage_system = ThermalStorageSystem() _thermal_storage_system = ThermalStorageSystem()
archetype_storage_equipment = system.energy_storage_systems archetype_storage_equipment = system.energy_storage_systems

View File

@ -9,6 +9,7 @@ from pathlib import Path
from hub.helpers.utils import validate_import_export_type from hub.helpers.utils import validate_import_export_type
from hub.imports.energy_systems.montreal_custom_energy_system_parameters import MontrealCustomEnergySystemParameters from hub.imports.energy_systems.montreal_custom_energy_system_parameters import MontrealCustomEnergySystemParameters
from hub.imports.energy_systems.north_america_custom_energy_system_parameters import NorthAmericaCustomEnergySystemParameters
class EnergySystemsFactory: class EnergySystemsFactory:
@ -37,7 +38,7 @@ class EnergySystemsFactory:
""" """
Enrich the city by using north america custom energy systems catalog information Enrich the city by using north america custom energy systems catalog information
""" """
MontrealCustomEnergySystemParameters(self._city).enrich_buildings() NorthAmericaCustomEnergySystemParameters(self._city).enrich_buildings()
self._city.level_of_detail.energy_systems = 2 self._city.level_of_detail.energy_systems = 2
for building in self._city.buildings: for building in self._city.buildings:
building.level_of_detail.energy_systems = 2 building.level_of_detail.energy_systems = 2