flixopt 3.0.2__py3-none-any.whl → 3.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of flixopt might be problematic. Click here for more details.
- flixopt/__init__.py +1 -1
- flixopt/elements.py +4 -0
- flixopt/interface.py +5 -0
- flixopt/plotting.py +681 -331
- flixopt/results.py +666 -154
- {flixopt-3.0.2.dist-info → flixopt-3.1.0.dist-info}/METADATA +5 -2
- {flixopt-3.0.2.dist-info → flixopt-3.1.0.dist-info}/RECORD +10 -10
- {flixopt-3.0.2.dist-info → flixopt-3.1.0.dist-info}/WHEEL +0 -0
- {flixopt-3.0.2.dist-info → flixopt-3.1.0.dist-info}/licenses/LICENSE +0 -0
- {flixopt-3.0.2.dist-info → flixopt-3.1.0.dist-info}/top_level.txt +0 -0
flixopt/__init__.py
CHANGED
|
@@ -7,7 +7,7 @@ from importlib.metadata import PackageNotFoundError, version
|
|
|
7
7
|
|
|
8
8
|
try:
|
|
9
9
|
__version__ = version('flixopt')
|
|
10
|
-
except PackageNotFoundError:
|
|
10
|
+
except (PackageNotFoundError, TypeError):
|
|
11
11
|
# Package is not installed (development mode without editable install)
|
|
12
12
|
__version__ = '0.0.0.dev0'
|
|
13
13
|
|
flixopt/elements.py
CHANGED
|
@@ -207,6 +207,10 @@ class Bus(Element):
|
|
|
207
207
|
logger.warning(
|
|
208
208
|
f'In Bus {self.label_full}, the excess_penalty_per_flow_hour is 0. Use "None" or a value > 0.'
|
|
209
209
|
)
|
|
210
|
+
if len(self.inputs) == 0 and len(self.outputs) == 0:
|
|
211
|
+
raise ValueError(
|
|
212
|
+
f'Bus "{self.label_full}" has no Flows connected to it. Please remove it from the FlowSystem'
|
|
213
|
+
)
|
|
210
214
|
|
|
211
215
|
@property
|
|
212
216
|
def with_excess(self) -> bool:
|
flixopt/interface.py
CHANGED
|
@@ -963,6 +963,11 @@ class InvestParameters(Interface):
|
|
|
963
963
|
raise TypeError(
|
|
964
964
|
f'If you provide a tuple to "linked_periods", it needs to be len=2. Got {len(self.linked_periods)=}'
|
|
965
965
|
)
|
|
966
|
+
if flow_system.periods is None:
|
|
967
|
+
raise ValueError(
|
|
968
|
+
f'Cannot use linked_periods={self.linked_periods} when FlowSystem has no periods defined. '
|
|
969
|
+
f'Please define periods in FlowSystem or use linked_periods=None.'
|
|
970
|
+
)
|
|
966
971
|
logger.debug(f'Computing linked_periods from {self.linked_periods}')
|
|
967
972
|
start, end = self.linked_periods
|
|
968
973
|
if start not in flow_system.periods.values:
|