forked from s_ranjbar/city_retrofit
fix: energy storage bug is fixed.
This commit is contained in:
parent
73e6dcdaf7
commit
841098b615
|
@ -107,13 +107,19 @@ class MontrealCustomEnergySystemParameters:
|
|||
_generation_system.electricity_efficiency = archetype_generation_system.electricity_efficiency
|
||||
_generic_storage_system = None
|
||||
if archetype_generation_system.energy_storage_systems is not None:
|
||||
if archetype_generation_system.energy_storage_systems.type_energy_stored == 'electrical':
|
||||
_generic_storage_system = ElectricalStorageSystem()
|
||||
_generic_storage_system.type_energy_stored = 'electrical'
|
||||
else:
|
||||
_generic_storage_system = ThermalStorageSystem()
|
||||
_generic_storage_system.type_energy_stored = 'thermal'
|
||||
_generation_system.energy_storage_systems = [_generic_storage_system]
|
||||
_storage_systems = []
|
||||
for storage_system in archetype_generation_system.energy_storage_systems:
|
||||
if storage_system.type_energy_stored == 'electrical':
|
||||
_generic_storage_system = ElectricalStorageSystem()
|
||||
_generic_storage_system.type_energy_stored = 'electrical'
|
||||
else:
|
||||
_generic_storage_system = ThermalStorageSystem()
|
||||
_generic_storage_system.type_energy_stored = storage_system.type_energy_stored
|
||||
_generic_storage_system.height = storage_system.height
|
||||
_generic_storage_system.layers = storage_system.layers
|
||||
_generic_storage_system.storage_medium = storage_system.storage_medium
|
||||
_storage_systems.append(_generic_storage_system)
|
||||
_generation_system.energy_storage_systems = _storage_systems
|
||||
_generation_systems.append(_generation_system)
|
||||
return _generation_systems
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user