flixopt 3.0.0__tar.gz → 3.0.1__tar.gz

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.

Files changed (33) hide show
  1. {flixopt-3.0.0 → flixopt-3.0.1}/CHANGELOG.md +14 -0
  2. {flixopt-3.0.0/flixopt.egg-info → flixopt-3.0.1}/PKG-INFO +3 -3
  3. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/calculation.py +9 -5
  4. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/config.py +1 -1
  5. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/core.py +3 -3
  6. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/modeling.py +2 -4
  7. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/results.py +2 -2
  8. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/utils.py +3 -5
  9. {flixopt-3.0.0 → flixopt-3.0.1/flixopt.egg-info}/PKG-INFO +3 -3
  10. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt.egg-info/requires.txt +2 -2
  11. {flixopt-3.0.0 → flixopt-3.0.1}/pyproject.toml +2 -2
  12. {flixopt-3.0.0 → flixopt-3.0.1}/LICENSE +0 -0
  13. {flixopt-3.0.0 → flixopt-3.0.1}/MANIFEST.in +0 -0
  14. {flixopt-3.0.0 → flixopt-3.0.1}/README.md +0 -0
  15. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/__init__.py +0 -0
  16. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/aggregation.py +0 -0
  17. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/commons.py +0 -0
  18. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/components.py +0 -0
  19. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/effects.py +0 -0
  20. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/elements.py +0 -0
  21. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/features.py +0 -0
  22. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/flow_system.py +0 -0
  23. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/interface.py +0 -0
  24. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/io.py +0 -0
  25. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/linear_converters.py +0 -0
  26. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/network_app.py +0 -0
  27. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/plotting.py +0 -0
  28. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/solvers.py +0 -0
  29. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt/structure.py +0 -0
  30. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt.egg-info/SOURCES.txt +0 -0
  31. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt.egg-info/dependency_links.txt +0 -0
  32. {flixopt-3.0.0 → flixopt-3.0.1}/flixopt.egg-info/top_level.txt +0 -0
  33. {flixopt-3.0.0 → flixopt-3.0.1}/setup.cfg +0 -0
@@ -69,8 +69,22 @@ Please keep the format of the changelog consistent with the other releases, so t
69
69
  ---
70
70
  Until here -->
71
71
 
72
+ ## [3.0.1] - 2025-10-14
73
+ **Summary**: Adding a Migration Guide for the new **flixopt 3** and fixing docs
74
+ See the [Migration Guide](https://flixopt.github.io/flixopt/user-guide/migration-guide-v3/).
75
+
76
+ ### 📝 Docs
77
+ - Fixed deployed docs
78
+ - Added Migration Guide for flixopt 3
79
+
80
+ ### 👷 Development
81
+ - Added missing type hints
82
+
83
+ ---
84
+
72
85
  ## [3.0.0] - 2025-10-13
73
86
  **Summary**: This release introduces new model dimensions (periods and scenarios) for multi-period investments and stochastic modeling, along with a redesigned effect sharing system and enhanced I/O capabilities.
87
+ For detailed migration instructions, see the [Migration Guide](https://flixopt.github.io/flixopt/user-guide/migration-guide-v3/).
74
88
 
75
89
  ### ✨ Added
76
90
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flixopt
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: Vector based energy and material flow optimization framework in Python.
5
5
  Author-email: "Chair of Building Energy Systems and Heat Supply, TU Dresden" <peter.stange@tu-dresden.de>, Felix Bumann <felixbumann387@gmail.com>, Felix Panitz <baumbude@googlemail.com>, Peter Stange <peter.stange@tu-dresden.de>
6
6
  Maintainer-email: Felix Bumann <felixbumann387@gmail.com>, Peter Stange <peter.stange@tu-dresden.de>
@@ -54,7 +54,7 @@ Provides-Extra: dev
54
54
  Requires-Dist: pytest==8.4.2; extra == "dev"
55
55
  Requires-Dist: pytest-xdist==3.8.0; extra == "dev"
56
56
  Requires-Dist: nbformat==5.10.4; extra == "dev"
57
- Requires-Dist: ruff==0.13.2; extra == "dev"
57
+ Requires-Dist: ruff==0.13.3; extra == "dev"
58
58
  Requires-Dist: pre-commit==4.3.0; extra == "dev"
59
59
  Requires-Dist: pyvis==0.3.2; extra == "dev"
60
60
  Requires-Dist: tsam==2.3.9; extra == "dev"
@@ -66,7 +66,7 @@ Requires-Dist: dash-daq==0.6.0; extra == "dev"
66
66
  Requires-Dist: networkx==3.0.0; extra == "dev"
67
67
  Requires-Dist: werkzeug==3.0.0; extra == "dev"
68
68
  Provides-Extra: docs
69
- Requires-Dist: mkdocs-material==9.6.20; extra == "docs"
69
+ Requires-Dist: mkdocs-material==9.6.21; extra == "docs"
70
70
  Requires-Dist: mkdocstrings-python==1.18.2; extra == "docs"
71
71
  Requires-Dist: mkdocs-table-reader-plugin==3.1.0; extra == "docs"
72
72
  Requires-Dist: mkdocs-gen-files==0.5.0; extra == "docs"
@@ -23,7 +23,7 @@ import yaml
23
23
 
24
24
  from . import io as fx_io
25
25
  from . import utils as utils
26
- from .aggregation import AggregationModel, AggregationParameters
26
+ from .aggregation import Aggregation, AggregationModel, AggregationParameters
27
27
  from .components import Storage
28
28
  from .config import CONFIG
29
29
  from .core import DataConverter, Scalar, TimeSeriesData, drop_constant_arrays
@@ -286,7 +286,10 @@ class AggregatedCalculation(FullCalculation):
286
286
  This equalizes variables in the components according to the typical periods computed in the aggregation
287
287
  active_timesteps: DatetimeIndex of timesteps to use for calculation. If None, all timesteps are used
288
288
  folder: Folder where results should be saved. If None, current working directory is used
289
- aggregation: contains the aggregation model
289
+
290
+ Attributes:
291
+ aggregation (Aggregation | None): Contains the clustered time series data
292
+ aggregation_model (AggregationModel | None): Contains Variables and Constraints that equalize clusters of the time series data
290
293
  """
291
294
 
292
295
  def __init__(
@@ -306,7 +309,8 @@ class AggregatedCalculation(FullCalculation):
306
309
  super().__init__(name, flow_system, active_timesteps, folder=folder)
307
310
  self.aggregation_parameters = aggregation_parameters
308
311
  self.components_to_clusterize = components_to_clusterize
309
- self.aggregation = None
312
+ self.aggregation: Aggregation | None = None
313
+ self.aggregation_model: AggregationModel | None = None
310
314
 
311
315
  def do_modeling(self) -> AggregatedCalculation:
312
316
  t_start = timeit.default_timer()
@@ -317,10 +321,10 @@ class AggregatedCalculation(FullCalculation):
317
321
  self.model = self.flow_system.create_model(self.normalize_weights)
318
322
  self.model.do_modeling()
319
323
  # Add Aggregation Submodel after modeling the rest
320
- self.aggregation = AggregationModel(
324
+ self.aggregation_model = AggregationModel(
321
325
  self.model, self.aggregation_parameters, self.flow_system, self.aggregation, self.components_to_clusterize
322
326
  )
323
- self.aggregation.do_modeling()
327
+ self.aggregation_model.do_modeling()
324
328
  self.durations['modeling'] = round(timeit.default_timer() - t_start, 2)
325
329
  return self
326
330
 
@@ -286,7 +286,7 @@ class CONFIG:
286
286
  setattr(cls, key, value)
287
287
 
288
288
  @classmethod
289
- def to_dict(cls):
289
+ def to_dict(cls) -> dict:
290
290
  """Convert the configuration class into a dictionary for JSON serialization.
291
291
 
292
292
  Returns:
@@ -6,7 +6,7 @@ It provides Datatypes, logging functionality, and some functions to transform da
6
6
  import logging
7
7
  import warnings
8
8
  from itertools import permutations
9
- from typing import Literal, Union
9
+ from typing import Any, Literal, Union
10
10
 
11
11
  import numpy as np
12
12
  import pandas as pd
@@ -46,12 +46,12 @@ class TimeSeriesData(xr.DataArray):
46
46
 
47
47
  def __init__(
48
48
  self,
49
- *args,
49
+ *args: Any,
50
50
  aggregation_group: str | None = None,
51
51
  aggregation_weight: float | None = None,
52
52
  agg_group: str | None = None,
53
53
  agg_weight: float | None = None,
54
- **kwargs,
54
+ **kwargs: Any,
55
55
  ):
56
56
  """
57
57
  Args:
@@ -396,7 +396,7 @@ class BoundingPatterns:
396
396
  variable: linopy.Variable,
397
397
  bounds: tuple[TemporalData, TemporalData],
398
398
  name: str = None,
399
- ):
399
+ ) -> list[linopy.constraints.Constraint]:
400
400
  """Create simple bounds.
401
401
  variable ∈ [lower_bound, upper_bound]
402
402
 
@@ -409,9 +409,7 @@ class BoundingPatterns:
409
409
  bounds: Tuple of (lower_bound, upper_bound) absolute bounds
410
410
 
411
411
  Returns:
412
- Tuple containing:
413
- - variables (Dict): Empty dict
414
- - constraints (Dict[str, linopy.Constraint]): 'ub', 'lb'
412
+ List containing lower_bound and upper_bound constraints
415
413
  """
416
414
  if not isinstance(model, Submodel):
417
415
  raise ValueError('BoundingPatterns.basic_bounds() can only be used with a Submodel')
@@ -1243,7 +1243,7 @@ class ComponentResults(_NodeResults):
1243
1243
  class EffectResults(_ElementResults):
1244
1244
  """Results for an Effect"""
1245
1245
 
1246
- def get_shares_from(self, element: str):
1246
+ def get_shares_from(self, element: str) -> xr.Dataset:
1247
1247
  """Get effect shares from specific element.
1248
1248
 
1249
1249
  Args:
@@ -1399,7 +1399,7 @@ class SegmentedCalculationResults:
1399
1399
  )
1400
1400
 
1401
1401
  @classmethod
1402
- def from_file(cls, folder: str | pathlib.Path, name: str):
1402
+ def from_file(cls, folder: str | pathlib.Path, name: str) -> SegmentedCalculationResults:
1403
1403
  """Load SegmentedCalculationResults from saved files.
1404
1404
 
1405
1405
  Args:
@@ -5,7 +5,7 @@ This module contains several utility functions used throughout the flixopt frame
5
5
  from __future__ import annotations
6
6
 
7
7
  import logging
8
- from typing import Literal
8
+ from typing import Any, Literal
9
9
 
10
10
  import numpy as np
11
11
  import xarray as xr
@@ -13,7 +13,7 @@ import xarray as xr
13
13
  logger = logging.getLogger('flixopt')
14
14
 
15
15
 
16
- def round_nested_floats(obj, decimals=2):
16
+ def round_nested_floats(obj: dict | list | float | int | Any, decimals: int = 2) -> dict | list | float | int | Any:
17
17
  """Recursively round floating point numbers in nested data structures.
18
18
 
19
19
  This function traverses nested data structures (dictionaries, lists) and rounds
@@ -27,9 +27,7 @@ def round_nested_floats(obj, decimals=2):
27
27
  decimals (int, optional): Number of decimal places to round to. Defaults to 2.
28
28
 
29
29
  Returns:
30
- The processed object with the same structure as the input, but with all
31
- floating point numbers rounded to the specified precision. NumPy arrays
32
- and xarray DataArrays are converted to lists.
30
+ The processed object with the same structure as the input, but with all floating point numbers rounded to the specified precision. NumPy arrays and xarray DataArrays are converted to lists.
33
31
 
34
32
  Examples:
35
33
  >>> data = {'a': 3.14159, 'b': [1.234, 2.678]}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flixopt
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: Vector based energy and material flow optimization framework in Python.
5
5
  Author-email: "Chair of Building Energy Systems and Heat Supply, TU Dresden" <peter.stange@tu-dresden.de>, Felix Bumann <felixbumann387@gmail.com>, Felix Panitz <baumbude@googlemail.com>, Peter Stange <peter.stange@tu-dresden.de>
6
6
  Maintainer-email: Felix Bumann <felixbumann387@gmail.com>, Peter Stange <peter.stange@tu-dresden.de>
@@ -54,7 +54,7 @@ Provides-Extra: dev
54
54
  Requires-Dist: pytest==8.4.2; extra == "dev"
55
55
  Requires-Dist: pytest-xdist==3.8.0; extra == "dev"
56
56
  Requires-Dist: nbformat==5.10.4; extra == "dev"
57
- Requires-Dist: ruff==0.13.2; extra == "dev"
57
+ Requires-Dist: ruff==0.13.3; extra == "dev"
58
58
  Requires-Dist: pre-commit==4.3.0; extra == "dev"
59
59
  Requires-Dist: pyvis==0.3.2; extra == "dev"
60
60
  Requires-Dist: tsam==2.3.9; extra == "dev"
@@ -66,7 +66,7 @@ Requires-Dist: dash-daq==0.6.0; extra == "dev"
66
66
  Requires-Dist: networkx==3.0.0; extra == "dev"
67
67
  Requires-Dist: werkzeug==3.0.0; extra == "dev"
68
68
  Provides-Extra: docs
69
- Requires-Dist: mkdocs-material==9.6.20; extra == "docs"
69
+ Requires-Dist: mkdocs-material==9.6.21; extra == "docs"
70
70
  Requires-Dist: mkdocstrings-python==1.18.2; extra == "docs"
71
71
  Requires-Dist: mkdocs-table-reader-plugin==3.1.0; extra == "docs"
72
72
  Requires-Dist: mkdocs-gen-files==0.5.0; extra == "docs"
@@ -17,7 +17,7 @@ numexpr<2.14,>=2.8.4
17
17
  pytest==8.4.2
18
18
  pytest-xdist==3.8.0
19
19
  nbformat==5.10.4
20
- ruff==0.13.2
20
+ ruff==0.13.3
21
21
  pre-commit==4.3.0
22
22
  pyvis==0.3.2
23
23
  tsam==2.3.9
@@ -30,7 +30,7 @@ networkx==3.0.0
30
30
  werkzeug==3.0.0
31
31
 
32
32
  [docs]
33
- mkdocs-material==9.6.20
33
+ mkdocs-material==9.6.21
34
34
  mkdocstrings-python==1.18.2
35
35
  mkdocs-table-reader-plugin==3.1.0
36
36
  mkdocs-gen-files==0.5.0
@@ -83,7 +83,7 @@ dev = [
83
83
  "pytest==8.4.2",
84
84
  "pytest-xdist==3.8.0",
85
85
  "nbformat==5.10.4",
86
- "ruff==0.13.2",
86
+ "ruff==0.13.3",
87
87
  "pre-commit==4.3.0",
88
88
  "pyvis==0.3.2",
89
89
  "tsam==2.3.9",
@@ -98,7 +98,7 @@ dev = [
98
98
 
99
99
  # Documentation building
100
100
  docs = [
101
- "mkdocs-material==9.6.20",
101
+ "mkdocs-material==9.6.21",
102
102
  "mkdocstrings-python==1.18.2",
103
103
  "mkdocs-table-reader-plugin==3.1.0",
104
104
  "mkdocs-gen-files==0.5.0",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes