forked from s_ranjbar/city_retrofit
modified a small bug in north_america_energy_system_catalog.py
This commit is contained in:
parent
c6d4feec89
commit
0240e89170
@ -40,15 +40,10 @@ class NorthAmericaEnergySystemCatalog(Catalog):
|
|||||||
def _load_generation_components(self):
|
def _load_generation_components(self):
|
||||||
generation_components = []
|
generation_components = []
|
||||||
boilers = self._archetypes['EnergySystemCatalog']['energy_generation_components']['boilers']
|
boilers = self._archetypes['EnergySystemCatalog']['energy_generation_components']['boilers']
|
||||||
print(len(boilers))
|
|
||||||
heat_pumps = self._archetypes['EnergySystemCatalog']['energy_generation_components']['heatPumps']
|
heat_pumps = self._archetypes['EnergySystemCatalog']['energy_generation_components']['heatPumps']
|
||||||
print(len(heat_pumps))
|
|
||||||
photovoltaics = self._archetypes['EnergySystemCatalog']['energy_generation_components']['photovoltaicModules']
|
photovoltaics = self._archetypes['EnergySystemCatalog']['energy_generation_components']['photovoltaicModules']
|
||||||
print(len(photovoltaics))
|
|
||||||
templates = self._archetypes['EnergySystemCatalog']['energy_generation_components']['templateGenerationEquipments']
|
templates = self._archetypes['EnergySystemCatalog']['energy_generation_components']['templateGenerationEquipments']
|
||||||
print(len(templates))
|
|
||||||
for boiler in boilers:
|
for boiler in boilers:
|
||||||
print(boiler)
|
|
||||||
boiler_id = boiler['@generation_id']
|
boiler_id = boiler['@generation_id']
|
||||||
name = boiler['@name']
|
name = boiler['@name']
|
||||||
system_type = 'Boiler'
|
system_type = 'Boiler'
|
||||||
@ -175,7 +170,8 @@ class NorthAmericaEnergySystemCatalog(Catalog):
|
|||||||
source_medium=source_medium,
|
source_medium=source_medium,
|
||||||
supply_medium=supply_medium,
|
supply_medium=supply_medium,
|
||||||
fuel_type=fuel_type,
|
fuel_type=fuel_type,
|
||||||
heat_efficiency=heat_efficiency)
|
heat_efficiency=heat_efficiency,
|
||||||
|
energy_storage_systems=energy_storage_system)
|
||||||
generation_components.append(heat_pump_template)
|
generation_components.append(heat_pump_template)
|
||||||
else:
|
else:
|
||||||
electricity_efficiency = float(template['@nominalEfficiency'])
|
electricity_efficiency = float(template['@nominalEfficiency'])
|
||||||
|
@ -54,4 +54,4 @@ class TestSystemsCatalog(TestCase):
|
|||||||
|
|
||||||
with self.assertRaises(IndexError):
|
with self.assertRaises(IndexError):
|
||||||
catalog.get_entry('unknown')
|
catalog.get_entry('unknown')
|
||||||
|
print(catalog.entries())
|
||||||
|
Loading…
Reference in New Issue
Block a user