diff --git a/src/libecalc/core/consumers/compressor/component.py b/src/libecalc/core/consumers/compressor/component.py index 4e66567dab..09f654d7dd 100644 --- a/src/libecalc/core/consumers/compressor/component.py +++ b/src/libecalc/core/consumers/compressor/component.py @@ -1,7 +1,5 @@ from __future__ import annotations -from typing import Optional - import numpy as np from libecalc.common.stream_conditions import TimeSeriesStreamConditions @@ -16,16 +14,12 @@ from libecalc.core.result import EcalcModelResult from libecalc.core.result import results as core_results from libecalc.domain.stream_conditions import Pressure, StreamConditions -from libecalc.dto.core_specs.compressor.operational_settings import ( - CompressorOperationalSettings, -) class Compressor(BaseConsumerWithoutOperationalSettings): def __init__(self, id: str, compressor_model: CompressorModel): self.id = id self._compressor_model = compressor_model - self._operational_settings: Optional[CompressorOperationalSettings] = None def get_max_rate(self, inlet_stream: StreamConditions, target_pressure: Pressure) -> float: """ diff --git a/src/libecalc/core/consumers/pump/component.py b/src/libecalc/core/consumers/pump/component.py index e64e1f4296..2c1b5f702d 100644 --- a/src/libecalc/core/consumers/pump/component.py +++ b/src/libecalc/core/consumers/pump/component.py @@ -1,7 +1,5 @@ from __future__ import annotations -from typing import Optional - import numpy as np from libecalc.common.stream_conditions import TimeSeriesStreamConditions @@ -17,14 +15,12 @@ from libecalc.core.result import EcalcModelResult from libecalc.core.result import results as core_results from libecalc.domain.stream_conditions import Pressure, StreamConditions -from libecalc.dto.core_specs.pump.operational_settings import PumpOperationalSettings class Pump(BaseConsumerWithoutOperationalSettings): def __init__(self, id: str, pump_model: PumpModel): self.id = id self._pump_model = pump_model - self._operational_settings: Optional[PumpOperationalSettings] = None def get_max_rate(self, inlet_stream: StreamConditions, target_pressure: Pressure) -> list[float]: """ diff --git a/src/libecalc/dto/core_specs/__init__.py b/src/libecalc/dto/core_specs/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/libecalc/dto/core_specs/base/__init__.py b/src/libecalc/dto/core_specs/base/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/libecalc/dto/core_specs/base/operational_settings.py b/src/libecalc/dto/core_specs/base/operational_settings.py deleted file mode 100644 index 1dd3299f30..0000000000 --- a/src/libecalc/dto/core_specs/base/operational_settings.py +++ /dev/null @@ -1,10 +0,0 @@ -from abc import ABC, abstractmethod -from datetime import datetime -from typing import Self - -from libecalc.dto.base import EcalcBaseModel - - -class OperationalSettings(ABC, EcalcBaseModel): - @abstractmethod - def get_subset_for_timestep(self, timestep: datetime) -> Self: ... diff --git a/src/libecalc/dto/core_specs/compressor/__init__.py b/src/libecalc/dto/core_specs/compressor/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/libecalc/dto/core_specs/compressor/operational_settings.py b/src/libecalc/dto/core_specs/compressor/operational_settings.py deleted file mode 100644 index c8ee77f27c..0000000000 --- a/src/libecalc/dto/core_specs/compressor/operational_settings.py +++ /dev/null @@ -1,28 +0,0 @@ -from __future__ import annotations - -from typing import Self - -from libecalc.common.stream_conditions import TimeSeriesStreamConditions -from libecalc.common.time_utils import Period, Periods -from libecalc.dto.core_specs.base.operational_settings import OperationalSettings - - -class CompressorOperationalSettings(OperationalSettings): - inlet_streams: list[TimeSeriesStreamConditions] - outlet_stream: TimeSeriesStreamConditions - - periods: Periods - - def get_subset_for_period(self, current_period: Period) -> Self: - """ - For a given timestep, get the operational settings that is relevant - for that timestep only. Only valid for periods a part of the global periods. - :param current_period: the period must be a part of the global periods - :return: - """ - - return CompressorOperationalSettings( - inlet_streams=[stream_condition.for_period(current_period) for stream_condition in self.inlet_streams], - outlet_stream=self.outlet_stream.for_timestep(current_period), - periods=[current_period], - ) diff --git a/src/libecalc/dto/core_specs/pump/__init__.py b/src/libecalc/dto/core_specs/pump/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/libecalc/dto/core_specs/pump/operational_settings.py b/src/libecalc/dto/core_specs/pump/operational_settings.py deleted file mode 100644 index 1f4ddfecd4..0000000000 --- a/src/libecalc/dto/core_specs/pump/operational_settings.py +++ /dev/null @@ -1,28 +0,0 @@ -from __future__ import annotations - -from typing import Self - -from libecalc.common.stream_conditions import TimeSeriesStreamConditions -from libecalc.common.time_utils import Period, Periods -from libecalc.dto.core_specs.base.operational_settings import OperationalSettings - - -class PumpOperationalSettings(OperationalSettings): - inlet_streams: list[TimeSeriesStreamConditions] - outlet_stream: TimeSeriesStreamConditions - - periods: Periods - - def get_subset_for_timestep(self, current_period: Period) -> Self: - """ - For a given timestep, get the operational settings that is relevant - for that timestep only. Only valid for periods a part of the global periods. - :param current_timestep: the period must be a part of the global periods - :return: - """ - - return PumpOperationalSettings( - inlet_streams=[stream_condition.for_timestep(current_period) for stream_condition in self.inlet_streams], - outlet_stream=self.outlet_stream.for_timestep(current_period), - periods=[current_period], - ) diff --git a/src/libecalc/dto/core_specs/system/__init__.py b/src/libecalc/dto/core_specs/system/__init__.py deleted file mode 100644 index e69de29bb2..0000000000