Skip to content

Commit

Permalink
put old lpg connector into obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rieck committed Jan 19, 2024
1 parent 0b838f9 commit 9fbeec9
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 48 deletions.
12 changes: 7 additions & 5 deletions hisim/components/loadprofilegenerator_utsp_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class UtspLpgConnectorConfig(cp.ConfigBase):
consumption: float
profile_with_washing_machine_and_dishwasher: bool
predictive_control: bool
predictive: bool
result_dir_path: str
cache_dir_path: Optional[str] = None
guid: str = ""
Expand All @@ -89,6 +90,7 @@ def get_default_utsp_connector_config(cls) -> Any:
consumption=0,
profile_with_washing_machine_and_dishwasher=True,
predictive_control=False,
predictive=False,
cache_dir_path=None,
guid="",
)
Expand Down Expand Up @@ -755,11 +757,11 @@ def build(self):
saved_files=[],
)

# if self.utsp_config.predictive:
# SingletonSimRepository().set_entry(
# key=SingletonDictKeyEnum.HEATINGBYRESIDENTSYEARLYFORECAST,
# entry=self.heating_by_residents,
# )
if self.utsp_config.predictive:
SingletonSimRepository().set_entry(
key=SingletonDictKeyEnum.HEATINGBYRESIDENTSYEARLYFORECAST,
entry=self.heating_by_residents,
)

def get_result_lists_by_summing_over_value_dict(
self, value_dict: Dict[Any, Any]
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions system_setups/air_conditioned_house_a_with_mpc_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from hisim.simulator import SimulationParameters
from hisim.simulator import Simulator
from hisim.components import loadprofilegenerator_connector
from hisim.components import loadprofilegenerator_utsp_connector
from hisim.components import weather
from hisim.components import generic_pv_system
from hisim.components import building
Expand Down Expand Up @@ -236,13 +236,12 @@ def air_conditioned_house(
my_building_information = my_building.my_building_information

""" Occupancy Profile """
my_occupancy_config = loadprofilegenerator_connector.OccupancyConfig.get_scaled_chr01_according_to_number_of_apartments(
number_of_apartments=my_building_information.number_of_apartments,
)
my_occupancy_config = loadprofilegenerator_utsp_connector.UtspLpgConnectorConfig.get_default_utsp_connector_config()
my_occupancy_config.data_acquisition_mode = loadprofilegenerator_utsp_connector.LpgDataAcquisitionMode.USE_PREDEFINED_PROFILE
my_occupancy_config.predictive_control = predictive_control
my_occupancy_config.predictive = predictive

my_occupancy = loadprofilegenerator_connector.Occupancy(
my_occupancy = loadprofilegenerator_utsp_connector.UtspLpgConnector(
config=my_occupancy_config,
my_simulation_parameters=my_simulation_parameters,
)
Expand Down
8 changes: 3 additions & 5 deletions system_setups/automatic_default_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
generic_pv_system,
weather,
advanced_heat_pump_hplib,
loadprofilegenerator_connector,
loadprofilegenerator_utsp_connector,
electricity_meter,
simple_hot_water_storage,
heat_distribution_system,
Expand Down Expand Up @@ -76,10 +76,8 @@ def setup_function(
)

# Build Occupancy
my_occupancy_config = loadprofilegenerator_connector.OccupancyConfig.get_scaled_chr01_according_to_number_of_apartments(
number_of_apartments=my_building_information.number_of_apartments
)
my_occupancy = loadprofilegenerator_connector.Occupancy(
my_occupancy_config = loadprofilegenerator_utsp_connector.UtspLpgConnectorConfig.get_default_utsp_connector_config()
my_occupancy = loadprofilegenerator_utsp_connector.UtspLpgConnector(
config=my_occupancy_config, my_simulation_parameters=my_simulation_parameters
)

Expand Down
8 changes: 3 additions & 5 deletions system_setups/basic_household.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing import Optional, Any
from hisim.simulator import SimulationParameters
from hisim.components import loadprofilegenerator_connector
from hisim.components import loadprofilegenerator_utsp_connector
from hisim.components import weather
from hisim.components import generic_pv_system
from hisim.components import building
Expand Down Expand Up @@ -70,10 +70,8 @@ def setup_function(
config=my_building_config, my_simulation_parameters=my_simulation_parameters
)
# Build Occupancy
my_occupancy_config = (
loadprofilegenerator_connector.OccupancyConfig.get_default_chr01_couple_both_at_work()
)
my_occupancy = loadprofilegenerator_connector.Occupancy(
my_occupancy_config = loadprofilegenerator_utsp_connector.UtspLpgConnectorConfig.get_default_utsp_connector_config()
my_occupancy = loadprofilegenerator_utsp_connector.UtspLpgConnector(
config=my_occupancy_config, my_simulation_parameters=my_simulation_parameters
)

Expand Down
8 changes: 4 additions & 4 deletions system_setups/basic_household_only_heating.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# clean
from typing import Optional, Any
from hisim.simulator import SimulationParameters
from hisim.components import loadprofilegenerator_connector
from hisim.components import loadprofilegenerator_utsp_connector
from hisim.components import weather
from hisim.components import building
from hisim.components import controller_l1_heat_old
Expand Down Expand Up @@ -65,9 +65,9 @@ def setup_function(
my_building_information = my_building.my_building_information

# Build occupancy
my_occupancy = loadprofilegenerator_connector.Occupancy(
config=loadprofilegenerator_connector.OccupancyConfig.get_default_chr01_couple_both_at_work(),
my_simulation_parameters=my_simulation_parameters,
my_occupancy_config = loadprofilegenerator_utsp_connector.UtspLpgConnectorConfig.get_default_utsp_connector_config()
my_occupancy = loadprofilegenerator_utsp_connector.UtspLpgConnector(
config=my_occupancy_config, my_simulation_parameters=my_simulation_parameters
)

# Build Weather
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from hisim import loadtypes as lt
from hisim.components import controller_l2_energy_management_system as cl2
from hisim.components import generic_pv_system, loadprofilegenerator_connector, weather
from hisim.components import generic_pv_system, loadprofilegenerator_utsp_connector, weather
from hisim.components.building import Building, BuildingConfig
from hisim.components.controller_l1_electrolyzer_h2 import (
ElectrolyzerController,
Expand Down Expand Up @@ -161,16 +161,15 @@ def setup_function(
my_simulation_parameters=my_simulation_parameters, config=my_cl2_config
)

my_occupancy_config = (
loadprofilegenerator_connector.OccupancyConfig.get_default_CHS01()
# Build Occupancy
my_occupancy_config = loadprofilegenerator_utsp_connector.UtspLpgConnectorConfig.get_default_utsp_connector_config()
my_occupancy = loadprofilegenerator_utsp_connector.UtspLpgConnector(
config=my_occupancy_config, my_simulation_parameters=my_simulation_parameters
)
# choose 1 to be the default for the number of apartments
SingletonSimRepository().set_entry(
key=SingletonDictKeyEnum.NUMBEROFAPARTMENTS, entry=number_of_apartments
)
my_occupancy = loadprofilegenerator_connector.Occupancy(
config=my_occupancy_config, my_simulation_parameters=my_simulation_parameters
)

my_weather_config = weather.WeatherConfig.get_default(
location_entry=weather.LocationEnum.AACHEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from hisim.components import (
generic_heat_pump,
generic_pv_system,
loadprofilegenerator_connector,
loadprofilegenerator_utsp_connector,
weather,
)
from hisim.components.building import Building, BuildingConfig
Expand Down Expand Up @@ -141,16 +141,15 @@ def setup_function(
my_simulation_parameters=my_simulation_parameters, config=my_cl2_config
)

my_occupancy_config = (
loadprofilegenerator_connector.OccupancyConfig.get_default_CHS01()
# Build Occupancy
my_occupancy_config = loadprofilegenerator_utsp_connector.UtspLpgConnectorConfig.get_default_utsp_connector_config()
my_occupancy = loadprofilegenerator_utsp_connector.UtspLpgConnector(
config=my_occupancy_config, my_simulation_parameters=my_simulation_parameters
)
# choose 1 to be the default for the number of apartments
SingletonSimRepository().set_entry(
key=SingletonDictKeyEnum.NUMBEROFAPARTMENTS, entry=number_of_apartments
)
my_occupancy = loadprofilegenerator_connector.Occupancy(
config=my_occupancy_config, my_simulation_parameters=my_simulation_parameters
)

my_weather_config = weather.WeatherConfig.get_default(
location_entry=weather.LocationEnum.AACHEN
Expand Down
10 changes: 4 additions & 6 deletions system_setups/default_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import Optional, Any
from hisim.simulator import SimulationParameters
from hisim.components import loadprofilegenerator_connector
from hisim.components import loadprofilegenerator_utsp_connector
from hisim.components import weather
from hisim.components import generic_pv_system
from hisim.components import building
Expand Down Expand Up @@ -62,11 +62,9 @@ def setup_function(
config=my_building_config, my_simulation_parameters=my_simulation_parameters
)

# Build occupancy
my_occupancy_config = (
loadprofilegenerator_connector.OccupancyConfig.get_default_chr01_couple_both_at_work()
)
my_occupancy = loadprofilegenerator_connector.Occupancy(
# Build Occupancy
my_occupancy_config = loadprofilegenerator_utsp_connector.UtspLpgConnectorConfig.get_default_utsp_connector_config()
my_occupancy = loadprofilegenerator_utsp_connector.UtspLpgConnector(
config=my_occupancy_config, my_simulation_parameters=my_simulation_parameters
)
my_sim.add_component(my_occupancy)
Expand Down
10 changes: 4 additions & 6 deletions system_setups/dynamic_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# import hisim.components.random_numbers
from hisim.simulator import SimulationParameters
from hisim.components import loadprofilegenerator_connector
from hisim.components import loadprofilegenerator_utsp_connector
from hisim.components import advanced_battery_bslib
from hisim.components import weather

Expand Down Expand Up @@ -92,11 +92,9 @@ def setup_function(
my_simulation_parameters=my_simulation_parameters, config=my_cl2_config
)

my_occupancy_config = (
loadprofilegenerator_connector.OccupancyConfig.get_default_chr01_couple_both_at_work()
)

my_occupancy = loadprofilegenerator_connector.Occupancy(
# Build Occupancy
my_occupancy_config = loadprofilegenerator_utsp_connector.UtspLpgConnectorConfig.get_default_utsp_connector_config()
my_occupancy = loadprofilegenerator_utsp_connector.UtspLpgConnector(
config=my_occupancy_config, my_simulation_parameters=my_simulation_parameters
)

Expand Down

0 comments on commit 9fbeec9

Please sign in to comment.