Skip to content

Commit

Permalink
Make system setup with hp for webtool (#283)
Browse files Browse the repository at this point in the history
* Add unified gas heater setup with options

* Fix prospector

* Fix pytest

* Fix pytest

* Adapt to utspclient 0.1.6

* Remove cleanup_old_lpg_requests

* Fix unused import

* Update

* Fix prospector

* Make proper json for component_connections.json

* Check connections

* Fix linter

* make hp system setup for webtool

* put old gas heater system setups into obsolete

* move generic_heat_pump back to components because some system setups dont work without

* put tests of obsolete setups also in obsolete

* code qualy fix

* fix pylint

* put one more system setup into obsolete

* heating ref temp

* gas heater with controller ins obsolete

---------

Co-authored-by: Kevin Knosala <[email protected]>
  • Loading branch information
k-rieck and kknos authored Jan 16, 2024
1 parent eb4d2d1 commit 985e145
Show file tree
Hide file tree
Showing 17 changed files with 481 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ tests/results1
tests/results_scaling/
tests/lpg_utsp_scaling_test/
tests/component_connections.json
tests/test_system_setups/results/

components_information.xlsx
hisim/components_information.xlsx
Expand Down
28 changes: 0 additions & 28 deletions hisim/components/electricity_meter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Electricity meter module should replace the sumbuilder. """
# clean
import importlib
from dataclasses import dataclass
from typing import List

Expand Down Expand Up @@ -156,9 +155,6 @@ def __init__(
self.add_dynamic_default_connections(
self.get_default_connections_from_advanced_heat_pump()
)
self.add_dynamic_default_connections(
self.get_default_connections_from_generic_heat_pump()
)

def get_default_connections_from_occupancy(
self,
Expand Down Expand Up @@ -251,30 +247,6 @@ def get_default_connections_from_advanced_heat_pump(
)
return dynamic_connections

def get_default_connections_from_generic_heat_pump(
self,
):
"""Get generic heat pump default connections."""

# use importlib for importing the other component in order to avoid circular-import errors
component_module_name = "hisim.components.generic_heat_pump"
component_module = importlib.import_module(name=component_module_name)
component_class = getattr(component_module, "GenericHeatPump")
dynamic_connections = []
generic_heat_pump_class_name = component_class.get_classname()
dynamic_connections.append(
DynamicComponentConnection(
source_component_class=component_class,
source_class_name=generic_heat_pump_class_name,
source_component_field_name=component_class.ElectricityOutput,
source_load_type=lt.LoadTypes.ELECTRICITY,
source_unit=lt.Units.WATT,
source_tags=[lt.ComponentType.HEAT_PUMP_BUILDING, lt.InandOutputType.ELECTRICITY_CONSUMPTION_UNCONTROLLED],
source_weight=999,
)
)
return dynamic_connections

def write_to_report(self):
"""Writes relevant information to report."""
return self.grid_energy_balancer_config.get_string_dict()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from hisim.components import generic_heat_water_storage
from hisim.components import building
from hisim import log
from system_setups.household_with_heatpump_and_pv import HouseholdPVConfig
from obsolete.household_with_heatpump_and_pv import HouseholdPVConfig

__authors__ = "Vitor Hugo Bellotto Zago, Noah Pflugradt"
__copyright__ = "Copyright 2022, FZJ-IEK-3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from hisim.simulator import SimulationParameters
from hisim.components import loadprofilegenerator_utsp_connector
from hisim.components import weather
from hisim.components import generic_gas_heater_with_controller
from obsolete import generic_gas_heater_with_controller
from hisim.components import heat_distribution_system
from hisim.components import building
from hisim import log
from system_setups.household_with_heatpump_and_pv import HouseholdPVConfig
from obsolete.household_with_heatpump_and_pv import HouseholdPVConfig

__authors__ = "Vitor Hugo Bellotto Zago, Noah Pflugradt"
__copyright__ = "Copyright 2022, FZJ-IEK-3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from hisim.components import building
from hisim.components import simple_hot_water_storage
from hisim import log
from system_setups.household_with_heatpump_and_pv import HouseholdPVConfig
from obsolete.household_with_heatpump_and_pv import HouseholdPVConfig

__authors__ = "Vitor Hugo Bellotto Zago, Noah Pflugradt"
__copyright__ = "Copyright 2022, FZJ-IEK-3"
Expand Down
File renamed without changes.
Loading

0 comments on commit 985e145

Please sign in to comment.