flixopt 3.0.3__tar.gz → 3.1.0__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.3 → flixopt-3.1.0}/CHANGELOG.md +36 -15
  2. {flixopt-3.0.3/flixopt.egg-info → flixopt-3.1.0}/PKG-INFO +4 -1
  3. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/__init__.py +1 -1
  4. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/elements.py +4 -0
  5. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/interface.py +5 -0
  6. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/plotting.py +668 -318
  7. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/results.py +651 -142
  8. {flixopt-3.0.3 → flixopt-3.1.0/flixopt.egg-info}/PKG-INFO +4 -1
  9. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt.egg-info/requires.txt +3 -0
  10. {flixopt-3.0.3 → flixopt-3.1.0}/pyproject.toml +6 -5
  11. {flixopt-3.0.3 → flixopt-3.1.0}/LICENSE +0 -0
  12. {flixopt-3.0.3 → flixopt-3.1.0}/MANIFEST.in +0 -0
  13. {flixopt-3.0.3 → flixopt-3.1.0}/README.md +0 -0
  14. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/aggregation.py +0 -0
  15. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/calculation.py +0 -0
  16. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/commons.py +0 -0
  17. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/components.py +0 -0
  18. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/config.py +0 -0
  19. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/core.py +0 -0
  20. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/effects.py +0 -0
  21. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/features.py +0 -0
  22. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/flow_system.py +0 -0
  23. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/io.py +0 -0
  24. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/linear_converters.py +0 -0
  25. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/modeling.py +0 -0
  26. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/network_app.py +0 -0
  27. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/solvers.py +0 -0
  28. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/structure.py +0 -0
  29. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt/utils.py +0 -0
  30. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt.egg-info/SOURCES.txt +0 -0
  31. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt.egg-info/dependency_links.txt +0 -0
  32. {flixopt-3.0.3 → flixopt-3.1.0}/flixopt.egg-info/top_level.txt +0 -0
  33. {flixopt-3.0.3 → flixopt-3.1.0}/setup.cfg +0 -0
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
4
4
  Formatting is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) & [Gitmoji](https://gitmoji.dev).
5
5
  For more details regarding the individual PRs and contributors, please refer to our [GitHub releases](https://github.com/flixOpt/flixopt/releases).
6
6
 
7
+ !!! tip
8
+
9
+ If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0) and [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/).
10
+
7
11
  ---
8
12
 
9
13
  <!-- This text won't be rendered
@@ -17,6 +21,9 @@ Please keep the format of the changelog consistent with the other releases, so t
17
21
 
18
22
  ## [Template] - ????-??-??
19
23
 
24
+ If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0) and [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/).
25
+
26
+
20
27
  ### ✨ Added
21
28
 
22
29
  ### 💥 Breaking Changes
@@ -43,34 +50,48 @@ Please keep the format of the changelog consistent with the other releases, so t
43
50
 
44
51
  ## [Unreleased] - ????-??-??
45
52
 
46
- ### Added
53
+ Until here -->
47
54
 
48
- ### 💥 Breaking Changes
55
+ ## [3.1.0] - 2025-10-19
49
56
 
50
- ### ♻️ Changed
57
+ **Summary**: This release adds faceting and animation support for multidimensional plots and redesigns the documentation website. Plotting results across scenarios or periods is now significantly simpler (Plotly only).
51
58
 
52
- ### 🗑️ Deprecated
59
+ If upgrading from v2.x, see the [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/) and [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0).
53
60
 
54
- ### 🔥 Removed
61
+ ### Added
62
+ - **Faceting and animation for multidimensional plots**: All plotting methods now support `facet_by` and `animate_by` parameters to create subplot grids and animations from multidimensional data (scenarios, periods, etc.). *Plotly only.*
63
+ - **Flexible data selection with `select` parameter**: Select data using single values, lists, slices, or index arrays for precise control over what gets plotted
64
+ - **Heatmap fill control**: New `fill` parameter in heatmap methods controls how missing values are filled after reshaping (`'ffill'` or `'bfill'`)
65
+ - **Smart line styling for mixed variables**: Area plots now automatically style variables containing both positive and negative values with dashed lines, while stacking purely positive or negative variables
55
66
 
56
- ### 🐛 Fixed
67
+ ### ♻️ Changed
68
+ - **Breaking: Selection behavior**: Plotting methods no longer automatically select the first value for non-time dimensions. Use the `select` parameter for explicit selection of scenarios, periods, or other dimensions
69
+ - **Better error messages**: Enhanced error messages when using Matplotlib with multidimensional data, with clearer guidance on dimension requirements and suggestions to use Plotly
70
+ - **Improved examples**: Enhanced `scenario_example.py` with better demonstration of new features
71
+ - **Robust validation**: Improved dimension validation in `plot_heatmap()` with clearer error messages
57
72
 
58
- ### 🔒 Security
73
+ ### 🗑️ Deprecated
74
+ - **`indexer` parameter**: Use the new `select` parameter instead. The `indexer` parameter will be removed in v4.0.0
75
+ - **`heatmap_timeframes` and `heatmap_timesteps_per_frame` parameters**: Use the new `reshape_time=(timeframes, timesteps_per_frame)` parameter instead in heatmap plotting methods
76
+ - **`color_map` parameter**: Use the new `colors` parameter instead in heatmap plotting methods
59
77
 
60
- ### 📦 Dependencies
78
+ ### 🐛 Fixed
79
+ - Fixed cryptic errors when working with empty buses by adding proper validation
80
+ - Added early validation for non-existent periods when using linked periods with tuples
61
81
 
62
- ### 📝 Docs
82
+ ### 📝 Documentation
83
+ - **Redesigned documentation website** with custom css
63
84
 
64
85
  ### 👷 Development
65
-
66
- ### 🚧 Known Issues
86
+ - Renamed internal `_apply_indexer_to_data()` to `_apply_selection_to_data()` for consistency with new API naming
67
87
 
68
88
  ---
69
- Until here -->
70
89
 
71
90
  ## [3.0.3] - 2025-10-16
72
91
  **Summary**: Hotfixing new plotting parameter `style`. Continue to use `mode`.
73
92
 
93
+ **Note**: If upgrading from v2.x, see the [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/) and [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0).
94
+
74
95
  ### 🐛 Fixed
75
96
  - Reverted breaking change from v3.0.0: continue to use `mode parameter in plotting instead of new `style`
76
97
  - Renamed new `mode` parameter in plotting methods to `unit_type`
@@ -84,7 +105,7 @@ Until here -->
84
105
  ## [3.0.2] - 2025-10-15
85
106
  **Summary**: This is a follow-up release to **[v3.0.0](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0)**, improving the documentation.
86
107
 
87
- **Note**: If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0) and [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/).
108
+ **Note**: If upgrading from v2.x, see the [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/) and [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0).
88
109
 
89
110
  ### 📝 Docs
90
111
  - Update the Readme
@@ -97,7 +118,7 @@ Until here -->
97
118
  ## [3.0.1] - 2025-10-14
98
119
  **Summary**: This is a follow-up release to **[v3.0.0](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0)**, adding a Migration Guide and bugfixing the docs.
99
120
 
100
- **Note**: If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0) and [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/).
121
+ **Note**: If upgrading from v2.x, see the [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/) and [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0).
101
122
 
102
123
  ### 📝 Docs
103
124
  - Fixed deployed docs
@@ -111,7 +132,7 @@ Until here -->
111
132
  ## [3.0.0] - 2025-10-13
112
133
  **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.
113
134
 
114
- **Note**: If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0) and [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/).
135
+ **Note**: If upgrading from v2.x, see the [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/) and [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0).
115
136
 
116
137
  ### ✨ Added
117
138
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flixopt
3
- Version: 3.0.3
3
+ Version: 3.1.0
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>
@@ -66,6 +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==1.6.1; extra == "docs"
69
70
  Requires-Dist: mkdocs-material==9.6.21; extra == "docs"
70
71
  Requires-Dist: mkdocstrings-python==1.18.2; extra == "docs"
71
72
  Requires-Dist: mkdocs-table-reader-plugin==3.1.0; extra == "docs"
@@ -76,6 +77,8 @@ Requires-Dist: markdown-include==0.8.1; extra == "docs"
76
77
  Requires-Dist: pymdown-extensions==10.16.1; extra == "docs"
77
78
  Requires-Dist: pygments==2.19.2; extra == "docs"
78
79
  Requires-Dist: mike==2.1.3; extra == "docs"
80
+ Requires-Dist: mkdocs-git-revision-date-localized-plugin==1.4.7; extra == "docs"
81
+ Requires-Dist: mkdocs-minify-plugin==0.8.0; extra == "docs"
79
82
  Dynamic: license-file
80
83
 
81
84
  # FlixOpt: Energy and Material Flow Optimization Framework
@@ -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
 
@@ -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:
@@ -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: