cogeneration ratio was removed from generation_system.py
pv_generation_system.py is completed by adding an inheritance from the GenerationSystem class parameter_function.py is renamed to performance_curves.py and an attribute to get the list of target parameters is added to it system.py is modified by adding energy storage, performance curves, pv to it
This commit is contained in:
parent
acd7ad2266
commit
3feecac15d
|
@ -13,38 +13,36 @@ class DistributionSystem:
|
|||
Distribution system class
|
||||
"""
|
||||
|
||||
def __init__(self, model, manufacturer, system_type, supply_temperature, distribution_consumption_fix_flow,
|
||||
distribution_consumption_variable_flow, heat_losses, nominal_heat_output, medium):
|
||||
self._model = model
|
||||
self._manufacturer = manufacturer
|
||||
def __init__(self, system_id, name, system_type, supply_temperature, distribution_consumption_fix_flow,
|
||||
distribution_consumption_variable_flow, heat_losses):
|
||||
self._system_id = system_id
|
||||
self._name = name
|
||||
self._type = system_type
|
||||
self._supply_temperature = supply_temperature
|
||||
self._distribution_consumption_fix_flow = distribution_consumption_fix_flow
|
||||
self._distribution_consumption_variable_flow = distribution_consumption_variable_flow
|
||||
self._heat_losses = heat_losses
|
||||
self._nominal_heat_output = nominal_heat_output
|
||||
self._medium = medium
|
||||
|
||||
@property
|
||||
def model(self):
|
||||
def id(self):
|
||||
"""
|
||||
Get system model
|
||||
:return: string
|
||||
Get system id
|
||||
:return: float
|
||||
"""
|
||||
return self._model
|
||||
return self._system_id
|
||||
|
||||
@property
|
||||
def manufacturer(self):
|
||||
def name(self):
|
||||
"""
|
||||
Get name
|
||||
:return: string
|
||||
"""
|
||||
return self._manufacturer
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Get type from ['radiator', 'forced air convection', 'radiant floor heating']
|
||||
Get type from [air, water, refrigerant]
|
||||
:return: string
|
||||
"""
|
||||
return self._type
|
||||
|
@ -82,35 +80,17 @@ class DistributionSystem:
|
|||
"""
|
||||
return self._heat_losses
|
||||
|
||||
@property
|
||||
def nominal_heat_output(self):
|
||||
"""
|
||||
Get the nominal heat output of the heat distribution system in kW
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_heat_output
|
||||
|
||||
@property
|
||||
def medium(self) -> Material:
|
||||
"""
|
||||
Get the heat transfer medium characteristics
|
||||
:return: Material
|
||||
"""
|
||||
return self._medium
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
content = {
|
||||
'Layer': {
|
||||
'model': self.model,
|
||||
'manufacturer': self.manufacturer,
|
||||
'id': self.id,
|
||||
'name': self.name,
|
||||
'type': self.type,
|
||||
'supply temperature [Celsius]': self.supply_temperature,
|
||||
'distribution consumption if fix flow over peak power [W/W]': self.distribution_consumption_fix_flow,
|
||||
'distribution consumption if variable flow over peak power [J/J]': self.distribution_consumption_variable_flow,
|
||||
'heat losses per energy produced [J/J]': self.heat_losses,
|
||||
'nominal_heat_output': self.nominal_heat_output,
|
||||
'heat transfer medium': self.medium
|
||||
'heat losses per energy produced [J/J]': self.heat_losses
|
||||
}
|
||||
}
|
||||
return content
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
"""
|
||||
Energy System catalog emission system
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
|
||||
class EmissionSystem:
|
||||
"""
|
||||
Emission system class
|
||||
"""
|
||||
def __init__(self, system_id, name, system_type, parasitic_energy_consumption):
|
||||
|
||||
self._system_id = system_id
|
||||
self._name = name
|
||||
self._type = system_type
|
||||
self._parasitic_energy_consumption = parasitic_energy_consumption
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
"""
|
||||
Get system id
|
||||
:return: float
|
||||
"""
|
||||
return self._system_id
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
Get name
|
||||
:return: string
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Get type
|
||||
:return: string
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@property
|
||||
def parasitic_energy_consumption(self):
|
||||
"""
|
||||
Get parasitic_energy_consumption in ratio (J/J)
|
||||
:return: float
|
||||
"""
|
||||
return self._parasitic_energy_consumption
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
content = {'Layer': {'id': self.id,
|
||||
'name': self.name,
|
||||
'type': self.type,
|
||||
'parasitic energy consumption per energy produced [J/J]': self.parasitic_energy_consumption
|
||||
}
|
||||
}
|
||||
return content
|
|
@ -0,0 +1,94 @@
|
|||
"""
|
||||
Energy System catalog emission system
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
"""
|
||||
|
||||
from hub.catalog_factories.data_models.construction.material import Material
|
||||
|
||||
|
||||
class EnergyEmissionSystem:
|
||||
"""
|
||||
Emission system class
|
||||
"""
|
||||
def __init__(self, model_name, manufacturer, system_type, parasitic_energy_consumption, nominal_heat_output,
|
||||
nominal_efficiency, medium):
|
||||
|
||||
self._system_id = model_name
|
||||
self._name = manufacturer
|
||||
self._type = system_type
|
||||
self._parasitic_energy_consumption = parasitic_energy_consumption
|
||||
self._nominal_heat_output = nominal_heat_output
|
||||
self._nominal_efficiency = nominal_efficiency
|
||||
self._medium = medium
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
"""
|
||||
Get system id
|
||||
:return: float
|
||||
"""
|
||||
return self._system_id
|
||||
|
||||
@property
|
||||
def manufacturer(self):
|
||||
"""
|
||||
Get name
|
||||
:return: string
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Get type
|
||||
:return: string
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@property
|
||||
def parasitic_energy_consumption(self):
|
||||
"""
|
||||
Get parasitic_energy_consumption in ratio (J/J)
|
||||
:return: float
|
||||
"""
|
||||
return self._parasitic_energy_consumption
|
||||
|
||||
@property
|
||||
def nominal_heat_output(self):
|
||||
"""
|
||||
Get the nominal heat output of the emission system in kW
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_heat_output
|
||||
|
||||
@property
|
||||
def nominal_efficiency(self):
|
||||
"""
|
||||
Get the nominal efficiency of the emission system
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_efficiency
|
||||
|
||||
@property
|
||||
def medium(self) -> Material:
|
||||
"""
|
||||
Get the heat transfer characteristics of the heat transfer medium
|
||||
:return: Material
|
||||
"""
|
||||
return self._medium
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
content = {'Layer': {'id': self.model_name,
|
||||
'name': self.manufacturer,
|
||||
'type': self.type,
|
||||
'parasitic energy consumption per energy produced [J/J]': self.parasitic_energy_consumption,
|
||||
'nominal heat output [kW]': self.nominal_heat_output,
|
||||
'nominal efficiency': self.nominal_efficiency,
|
||||
'heat transfer medium': self.medium
|
||||
}
|
||||
}
|
||||
return content
|
|
@ -17,7 +17,7 @@ class GenerationSystem:
|
|||
|
||||
def __init__(self, model_name, manufacturer, system_type, fuel_type, nominal_thermal_output, modulation_range,
|
||||
source_types, heat_efficiency, cooling_efficiency, electricity_efficiency, source_temperature,
|
||||
source_mass_flow, nominal_electricity_output, cogeneration_ratio):
|
||||
source_mass_flow, nominal_electricity_output):
|
||||
self._model_name = model_name
|
||||
self._manufacturer = manufacturer
|
||||
self._system_type = system_type
|
||||
|
@ -31,7 +31,6 @@ class GenerationSystem:
|
|||
self._source_temperature = source_temperature
|
||||
self._source_mass_flow = source_mass_flow
|
||||
self._nominal_electricity_output = nominal_electricity_output
|
||||
self._cogeneration_ratio = cogeneration_ratio
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
|
@ -137,17 +136,9 @@ class GenerationSystem:
|
|||
"""
|
||||
return self._nominal_electricity_output
|
||||
|
||||
@property
|
||||
def cogeneration_ratio(self):
|
||||
"""
|
||||
Get the ratio between the heat output and electricity output of CHP units
|
||||
:return: float
|
||||
"""
|
||||
return self._cogeneration_ratio
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
content = {'Heat Generation component': {'model name': self.model_name,
|
||||
content = {'Energy Generation component': {'model name': self.model_name,
|
||||
'manufacturer': self.manufacturer,
|
||||
'type': self.system_type,
|
||||
'fuel type': self.fuel_type,
|
||||
|
@ -160,7 +151,6 @@ class GenerationSystem:
|
|||
'cooling efficiency': self.cooling_efficiency,
|
||||
'electricity efficiency': self.electricity_efficiency,
|
||||
'nominal power output [kW]': self.nominal_electricity_output,
|
||||
'cogeneration ratio': self.cogeneration_ratio,
|
||||
}
|
||||
}
|
||||
return content
|
||||
|
|
|
@ -8,15 +8,22 @@ Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
|||
|
||||
from __future__ import annotations
|
||||
from typing import Union
|
||||
from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
|
||||
|
||||
|
||||
class PvGenerationSystem:
|
||||
class PvGenerationSystem(GenerationSystem):
|
||||
"""
|
||||
Electricity Generation system class
|
||||
"""
|
||||
|
||||
def __init__(self, nominal_ambient_temperature, nominal_cell_temperature, nominal_radiation,
|
||||
standard_test_condition_cell_temperature, standard_test_condition_maximum_power, width, height):
|
||||
standard_test_condition_cell_temperature, standard_test_condition_maximum_power, width, height,
|
||||
model_name, manufacturer, electricity_efficiency, nominal_electricity_output):
|
||||
super(GenerationSystem, self).__init__(model_name=model_name, manufacturer=manufacturer, system_type='pv',
|
||||
fuel_type='renewable', nominal_thermal_output=None, modulation_range=None,
|
||||
source_types=None, heat_efficiency=None, cooling_efficiency=None,
|
||||
electricity_efficiency=electricity_efficiency, source_temperature=None,
|
||||
source_mass_flow=None, nominal_electricity_output=nominal_electricity_output)
|
||||
self._nominal_ambient_temperature = nominal_ambient_temperature
|
||||
self._nominal_cell_temperature = nominal_cell_temperature
|
||||
self._nominal_radiation = nominal_radiation
|
||||
|
@ -83,14 +90,18 @@ class PvGenerationSystem:
|
|||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
content = {'Electricity Generation component': {
|
||||
content = {'Photovoltaic Module': {
|
||||
'model name': self.model_name,
|
||||
'manufacturer': self.manufacturer,
|
||||
'type': self.system_type,
|
||||
'fuel type': self.fuel_type,
|
||||
'electricity efficiency': self.electricity_efficiency,
|
||||
'nominal power output [kW]': self.nominal_electricity_output,
|
||||
'nominal ambient temperature [Celsius]': self.nominal_ambient_temperature,
|
||||
'nominal cell temperature [Celsius]': self.nominal_cell_temperature,
|
||||
'nominal radiation [W/m2]': self.nominal_radiation,
|
||||
'standard test condition cell temperature [Celsius]':
|
||||
self.standard_test_condition_cell_temperature,
|
||||
'standard test condition maximum power [kW]':
|
||||
self.standard_test_condition_maximum_power,
|
||||
'standard test condition cell temperature [Celsius]': self.standard_test_condition_cell_temperature,
|
||||
'standard test condition maximum power [kW]': self.standard_test_condition_maximum_power,
|
||||
'width': self.width,
|
||||
'height': self.height,
|
||||
}
|
||||
|
|
|
@ -1,41 +1,47 @@
|
|||
"""
|
||||
Energy System catalog equipment
|
||||
Energy System catalog heat generation system
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
"""
|
||||
|
||||
from typing import Union
|
||||
from typing import Union, List
|
||||
|
||||
from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.pv_generation_system import PvGenerationSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.distribution_system import DistributionSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.performance_curves import PerformanceCurves
|
||||
from hub.catalog_factories.data_models.energy_systems.energy_emission_system import EnergyEmissionSystem
|
||||
|
||||
|
||||
class System:
|
||||
"""
|
||||
System class
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
lod,
|
||||
system_id,
|
||||
name,
|
||||
system_configuration,
|
||||
demand_types,
|
||||
heat_generation_system,
|
||||
electricity_generation_system,
|
||||
generation_systems,
|
||||
pv_generation_system,
|
||||
distribution_system,
|
||||
emission_system):
|
||||
|
||||
emission_system,
|
||||
energy_storage_systems,
|
||||
performance_curves):
|
||||
self._lod = lod
|
||||
self._system_id = system_id
|
||||
self._name = name
|
||||
self._system_configuration = system_configuration
|
||||
self._demand_types = demand_types
|
||||
self._heat_generation_system = heat_generation_system
|
||||
self._electricity_generation_system = electricity_generation_system
|
||||
self._distribution_system = distribution_system
|
||||
self._emission_system = emission_system
|
||||
self._generation_systems = generation_systems
|
||||
self._pv_generation_system = pv_generation_system
|
||||
self._energy_storage_systems = energy_storage_systems
|
||||
self._performance_curves = performance_curves
|
||||
|
||||
@property
|
||||
def lod(self):
|
||||
|
@ -54,36 +60,37 @@ class System:
|
|||
return self._system_id
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
def system_configuration(self):
|
||||
"""
|
||||
Get name
|
||||
Get the system configuration from ['hp_tes', 'hp_boiler_tes', 'pv_hp', 'pv_battery', 'pv', 'pv_hp_tes',
|
||||
'pv_hp_battery_tes']
|
||||
:return: string
|
||||
"""
|
||||
return self._name
|
||||
return self._system_configuration
|
||||
|
||||
@property
|
||||
def demand_types(self):
|
||||
"""
|
||||
Get demand able to cover from [heating, cooling, domestic_hot_water, electricity]
|
||||
Get demand able to cover from ['heating', 'cooling', 'domestic_hot_water', 'electricity']
|
||||
:return: [string]
|
||||
"""
|
||||
return self._demand_types
|
||||
|
||||
@property
|
||||
def heat_generation_system(self) -> GenerationSystem:
|
||||
def generation_systems(self) -> List[GenerationSystem]:
|
||||
"""
|
||||
Get heat generation system
|
||||
:return: HeatGenerationSystem
|
||||
Get generation system
|
||||
:return: GenerationSystem
|
||||
"""
|
||||
return self._heat_generation_system
|
||||
return self._generation_systems
|
||||
|
||||
@property
|
||||
def electricity_generation_system(self) -> PvGenerationSystem:
|
||||
def pv_generation_system(self) -> Union[None, PvGenerationSystem]:
|
||||
"""
|
||||
Get electricity generation system
|
||||
Get pv generation system
|
||||
:return: ElectricityGenerationSystem
|
||||
"""
|
||||
return self._electricity_generation_system
|
||||
return self._pv_generation_system
|
||||
|
||||
@property
|
||||
def distribution_system(self) -> Union[None, DistributionSystem]:
|
||||
|
@ -94,29 +101,58 @@ class System:
|
|||
return self._distribution_system
|
||||
|
||||
@property
|
||||
def emission_system(self) -> Union[None, EmissionSystem]:
|
||||
def emission_system(self) -> Union[None, EnergyEmissionSystem]:
|
||||
"""
|
||||
Get emission system
|
||||
:return: EmissionSystem
|
||||
"""
|
||||
return self._emission_system
|
||||
|
||||
@property
|
||||
def energy_storage_system(self) -> Union[None, List[EnergyStorageSystem]]:
|
||||
"""
|
||||
Get energy storage system
|
||||
:return: EnergyStorageSystem
|
||||
"""
|
||||
return self._energy_storage_systems
|
||||
|
||||
@property
|
||||
def performance_curves(self) -> Union[None, List[PerformanceCurves]]:
|
||||
"""
|
||||
Get the list of all performance curves associated with components
|
||||
:return: PerformanceCurves
|
||||
"""
|
||||
return self._performance_curves
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
_generation_systems = []
|
||||
for _generation in self.generation_systems:
|
||||
_generation_systems.append(_generation.to_dictionary())
|
||||
_pv_system = None
|
||||
if self.pv_generation_system is not None:
|
||||
_pv_system = self.pv_generation_system.to_dictionary()
|
||||
_distribution_system = None
|
||||
if self.distribution_system is not None:
|
||||
_distribution_system = self.distribution_system.to_dictionary()
|
||||
_emission_system = None
|
||||
if self.emission_system is not None:
|
||||
_emission_system = self.emission_system.to_dictionary()
|
||||
_storage_system = [_storage.to_dictionary() for _storage in
|
||||
self.energy_storage_system] if self.energy_storage_system is not None else None
|
||||
_performance_curves = [_curve.to_dictionary() for _curve in
|
||||
self.performance_curves] if self.performance_curves is not None else None
|
||||
|
||||
content = {'Layer': {'id': self.id,
|
||||
'name': self.name,
|
||||
'name': self.system_configuration,
|
||||
'level of detail': self.lod,
|
||||
'demand types': self.demand_types,
|
||||
'heat generation system': self.heat_generation_system.to_dictionary(),
|
||||
'electricity generation system': self.electricity_generation_system.to_dictionary(),
|
||||
'Generation system(s)': _generation_systems,
|
||||
'electricity generation system': _pv_system,
|
||||
'distribution system': _distribution_system,
|
||||
'emission system': _emission_system
|
||||
'emission system': _emission_system,
|
||||
'energy storage system': _storage_system,
|
||||
'performance curves': _performance_curves
|
||||
}
|
||||
}
|
||||
return content
|
||||
|
|
|
@ -12,7 +12,7 @@ from hub.catalog_factories.data_models.energy_systems.system import System
|
|||
from hub.catalog_factories.data_models.energy_systems.content import Content
|
||||
from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.distribution_system import DistributionSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.energy_emission_system import EnergyEmissionSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.archetype import Archetype
|
||||
|
||||
|
||||
|
@ -114,7 +114,7 @@ class MontrealCustomCatalog(Catalog):
|
|||
if 'parasitic_consumption' in equipment:
|
||||
parasitic_consumption = float(equipment['parasitic_consumption']['#text']) / 100
|
||||
|
||||
emission_system = EmissionSystem(equipment_id,
|
||||
emission_system = EnergyEmissionSystem(equipment_id,
|
||||
name,
|
||||
equipment_type,
|
||||
parasitic_consumption)
|
||||
|
@ -177,32 +177,32 @@ class MontrealCustomCatalog(Catalog):
|
|||
_names = {'archetypes': [], 'systems': [], 'generation_equipments': [], 'distribution_equipments': [],
|
||||
'emission_equipments':[]}
|
||||
for archetype in self._content.archetypes:
|
||||
_names['archetypes'].append(archetype.name)
|
||||
_names['archetypes'].append(archetype.manufacturer)
|
||||
for system in self._content.systems:
|
||||
_names['systems'].append(system.name)
|
||||
_names['systems'].append(system.manufacturer)
|
||||
for equipment in self._content.generation_equipments:
|
||||
_names['generation_equipments'].append(equipment.name)
|
||||
_names['generation_equipments'].append(equipment.manufacturer)
|
||||
for equipment in self._content.distribution_equipments:
|
||||
_names['distribution_equipments'].append(equipment.name)
|
||||
_names['distribution_equipments'].append(equipment.manufacturer)
|
||||
for equipment in self._content.emission_equipments:
|
||||
_names['emission_equipments'].append(equipment.name)
|
||||
_names['emission_equipments'].append(equipment.manufacturer)
|
||||
else:
|
||||
_names = {category: []}
|
||||
if category.lower() == 'archetypes':
|
||||
for archetype in self._content.archetypes:
|
||||
_names[category].append(archetype.name)
|
||||
_names[category].append(archetype.manufacturer)
|
||||
elif category.lower() == 'systems':
|
||||
for system in self._content.systems:
|
||||
_names[category].append(system.name)
|
||||
_names[category].append(system.manufacturer)
|
||||
elif category.lower() == 'generation_equipments':
|
||||
for system in self._content.generation_equipments:
|
||||
_names[category].append(system.name)
|
||||
_names[category].append(system.manufacturer)
|
||||
elif category.lower() == 'distribution_equipments':
|
||||
for system in self._content.distribution_equipments:
|
||||
_names[category].append(system.name)
|
||||
_names[category].append(system.manufacturer)
|
||||
elif category.lower() == 'emission_equipments':
|
||||
for system in self._content.emission_equipments:
|
||||
_names[category].append(system.name)
|
||||
_names[category].append(system.manufacturer)
|
||||
else:
|
||||
raise ValueError(f'Unknown category [{category}]')
|
||||
return _names
|
||||
|
@ -232,18 +232,18 @@ class MontrealCustomCatalog(Catalog):
|
|||
:parm: entry name
|
||||
"""
|
||||
for entry in self._content.archetypes:
|
||||
if entry.name.lower() == name.lower():
|
||||
if entry.manufacturer.lower() == name.lower():
|
||||
return entry
|
||||
for entry in self._content.systems:
|
||||
if entry.name.lower() == name.lower():
|
||||
if entry.manufacturer.lower() == name.lower():
|
||||
return entry
|
||||
for entry in self._content.generation_equipments:
|
||||
if entry.name.lower() == name.lower():
|
||||
if entry.manufacturer.lower() == name.lower():
|
||||
return entry
|
||||
for entry in self._content.distribution_equipments:
|
||||
if entry.name.lower() == name.lower():
|
||||
if entry.manufacturer.lower() == name.lower():
|
||||
return entry
|
||||
for entry in self._content.emission_equipments:
|
||||
if entry.name.lower() == name.lower():
|
||||
if entry.manufacturer.lower() == name.lower():
|
||||
return entry
|
||||
raise IndexError(f"{name} doesn't exists in the catalog")
|
||||
|
|
Loading…
Reference in New Issue
Block a user