fix: final changes to catalogue, importer, and parameter importer
This commit is contained in:
parent
1279dffff8
commit
dc3372ff5e
@ -10,7 +10,7 @@ class EmissionSystem:
|
||||
"""
|
||||
Emission system class
|
||||
"""
|
||||
def __init__(self, system_id, model_name=None, system_type=None, parasitic_energy_consumption=None):
|
||||
def __init__(self, system_id, model_name=None, system_type=None, parasitic_energy_consumption=0):
|
||||
|
||||
self._system_id = system_id
|
||||
self._model_name = model_name
|
||||
|
@ -135,7 +135,7 @@ class MontrealCustomCatalog(Catalog):
|
||||
equipment_id = float(equipment['@id'])
|
||||
equipment_type = equipment['@type']
|
||||
model_name = equipment['name']
|
||||
parasitic_consumption = None
|
||||
parasitic_consumption = 0
|
||||
if 'parasitic_consumption' in equipment:
|
||||
parasitic_consumption = float(equipment['parasitic_consumption']['#text']) / 100
|
||||
|
||||
|
@ -262,7 +262,7 @@ class MontrealFutureSystemCatalogue(Catalog):
|
||||
system_id = None
|
||||
model_name = None
|
||||
system_type = None
|
||||
parasitic_energy_consumption = None
|
||||
parasitic_energy_consumption = 0
|
||||
emission_system = EmissionSystem(system_id=system_id,
|
||||
model_name=model_name,
|
||||
system_type=system_type,
|
||||
|
@ -13,7 +13,7 @@ class EmissionSystem:
|
||||
def __init__(self):
|
||||
self._model_name = None
|
||||
self._type = None
|
||||
self._parasitic_energy_consumption = None
|
||||
self._parasitic_energy_consumption = 0
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
|
@ -138,8 +138,12 @@ class MontrealCustomEnergySystemParameters:
|
||||
_distribution_system.heat_losses = archetype_distribution_system.heat_losses
|
||||
_emission_system = None
|
||||
if archetype_distribution_system.emission_systems is not None:
|
||||
_emission_system = EmissionSystem()
|
||||
_distribution_system.emission_systems = [_emission_system]
|
||||
_emission_systems = []
|
||||
for emission_system in archetype_distribution_system.emission_systems:
|
||||
_emission_system = EmissionSystem()
|
||||
_emission_system.parasitic_energy_consumption = emission_system.parasitic_energy_consumption
|
||||
_emission_systems.append(_emission_system)
|
||||
_distribution_system.emission_systems = _emission_systems
|
||||
_distribution_systems.append(_distribution_system)
|
||||
return _distribution_systems
|
||||
|
||||
|
@ -187,8 +187,12 @@ class MontrealFutureEnergySystemParameters:
|
||||
_distribution_system.heat_losses = archetype_distribution_system.heat_losses
|
||||
_emission_system = None
|
||||
if archetype_distribution_system.emission_systems is not None:
|
||||
_emission_system = EmissionSystem()
|
||||
_distribution_system.emission_systems = [_emission_system]
|
||||
_emission_systems = []
|
||||
for emission_system in archetype_distribution_system.emission_systems:
|
||||
_emission_system = EmissionSystem()
|
||||
_emission_system.parasitic_energy_consumption = emission_system.parasitic_energy_consumption
|
||||
_emission_systems.append(_emission_system)
|
||||
_distribution_system.emission_systems = _emission_systems
|
||||
_distribution_systems.append(_distribution_system)
|
||||
return _distribution_systems
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user