flixopt 3.0.2__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.
- {flixopt-3.0.2 → flixopt-3.1.0}/CHANGELOG.md +78 -21
- {flixopt-3.0.2/flixopt.egg-info → flixopt-3.1.0}/PKG-INFO +5 -2
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/__init__.py +1 -1
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/elements.py +4 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/interface.py +5 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/plotting.py +681 -331
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/results.py +666 -154
- {flixopt-3.0.2 → flixopt-3.1.0/flixopt.egg-info}/PKG-INFO +5 -2
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt.egg-info/requires.txt +3 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/pyproject.toml +7 -6
- {flixopt-3.0.2 → flixopt-3.1.0}/LICENSE +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/MANIFEST.in +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/README.md +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/aggregation.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/calculation.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/commons.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/components.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/config.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/core.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/effects.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/features.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/flow_system.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/io.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/linear_converters.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/modeling.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/network_app.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/solvers.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/structure.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt/utils.py +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt.egg-info/SOURCES.txt +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt.egg-info/dependency_links.txt +0 -0
- {flixopt-3.0.2 → flixopt-3.1.0}/flixopt.egg-info/top_level.txt +0 -0
- {flixopt-3.0.2 → 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
|
|
@@ -41,38 +48,64 @@ Please keep the format of the changelog consistent with the other releases, so t
|
|
|
41
48
|
|
|
42
49
|
---
|
|
43
50
|
|
|
44
|
-
|
|
45
51
|
## [Unreleased] - ????-??-??
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+
Until here -->
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
## [3.1.0] - 2025-10-19
|
|
56
|
+
|
|
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).
|
|
58
|
+
|
|
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).
|
|
60
|
+
|
|
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
|
|
50
66
|
|
|
51
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
|
|
52
72
|
|
|
53
73
|
### 🗑️ Deprecated
|
|
54
|
-
|
|
55
|
-
|
|
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
|
|
56
77
|
|
|
57
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
|
|
58
81
|
|
|
59
|
-
###
|
|
82
|
+
### 📝 Documentation
|
|
83
|
+
- **Redesigned documentation website** with custom css
|
|
60
84
|
|
|
61
|
-
###
|
|
85
|
+
### 👷 Development
|
|
86
|
+
- Renamed internal `_apply_indexer_to_data()` to `_apply_selection_to_data()` for consistency with new API naming
|
|
62
87
|
|
|
63
|
-
|
|
88
|
+
---
|
|
64
89
|
|
|
65
|
-
|
|
90
|
+
## [3.0.3] - 2025-10-16
|
|
91
|
+
**Summary**: Hotfixing new plotting parameter `style`. Continue to use `mode`.
|
|
66
92
|
|
|
67
|
-
|
|
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
|
+
|
|
95
|
+
### 🐛 Fixed
|
|
96
|
+
- Reverted breaking change from v3.0.0: continue to use `mode parameter in plotting instead of new `style`
|
|
97
|
+
- Renamed new `mode` parameter in plotting methods to `unit_type`
|
|
98
|
+
|
|
99
|
+
### 📝 Docs
|
|
100
|
+
- Updated Migration Guide and added missing entries.
|
|
101
|
+
- Improved Changelog of v3.0.0
|
|
68
102
|
|
|
69
103
|
---
|
|
70
|
-
Until here -->
|
|
71
104
|
|
|
72
105
|
## [3.0.2] - 2025-10-15
|
|
73
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.
|
|
74
107
|
|
|
75
|
-
**Note**: If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0)
|
|
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).
|
|
76
109
|
|
|
77
110
|
### 📝 Docs
|
|
78
111
|
- Update the Readme
|
|
@@ -85,7 +118,7 @@ Until here -->
|
|
|
85
118
|
## [3.0.1] - 2025-10-14
|
|
86
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.
|
|
87
120
|
|
|
88
|
-
**Note**: If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0)
|
|
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).
|
|
89
122
|
|
|
90
123
|
### 📝 Docs
|
|
91
124
|
- Fixed deployed docs
|
|
@@ -99,7 +132,7 @@ Until here -->
|
|
|
99
132
|
## [3.0.0] - 2025-10-13
|
|
100
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.
|
|
101
134
|
|
|
102
|
-
**Note**: If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0)
|
|
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).
|
|
103
136
|
|
|
104
137
|
### ✨ Added
|
|
105
138
|
|
|
@@ -139,17 +172,43 @@ This replaces `specific_share_to_other_effects_*` parameters and inverts the dir
|
|
|
139
172
|
|
|
140
173
|
### 💥 Breaking Changes
|
|
141
174
|
|
|
142
|
-
|
|
175
|
+
**API and Behavior Changes:**
|
|
176
|
+
|
|
177
|
+
- **Effect system redesigned** (no deprecation):
|
|
178
|
+
- **Terminology changes**: Effect domains renamed for clarity: `operation` → `temporal`, `invest`/`investment` → `periodic`
|
|
179
|
+
- **Sharing system**: The old `specific_share_to_other_effects_*` parameters were completely replaced with the new `share_from_temporal` and `share_from_periodic` syntax (see 🔥 Removed section)
|
|
180
|
+
- **FlowSystem independence**: FlowSystems cannot be shared across multiple Calculations anymore. A copy of the FlowSystem is created instead, making every Calculation independent. Each Subcalculation in `SegmentedCalculation` now has its own distinct `FlowSystem` object
|
|
181
|
+
- **Bus and Effect object assignment**: Direct assignment of Bus/Effect objects is no longer supported. Use labels (strings) instead:
|
|
182
|
+
- `Flow.bus` must receive a string label, not a Bus object
|
|
183
|
+
- Effect shares must use effect labels (strings) in dictionaries, not Effect objects
|
|
184
|
+
- **Logging defaults** (from v2.2.0): Console and file logging are now disabled by default. Enable explicitly with `CONFIG.Logging.console = True` and `CONFIG.apply()`
|
|
185
|
+
|
|
186
|
+
**Class and Method Renaming:**
|
|
187
|
+
|
|
143
188
|
- Renamed class `SystemModel` to `FlowSystemModel`
|
|
144
189
|
- Renamed class `Model` to `Submodel`
|
|
145
190
|
- Renamed `mode` parameter in plotting methods to `style`
|
|
146
|
-
-
|
|
147
|
-
|
|
191
|
+
- `Calculation.do_modeling()` now returns the `Calculation` object instead of its `linopy.Model`. Callers that previously accessed the linopy model directly should now use `calculation.do_modeling().model` instead of `calculation.do_modeling()`
|
|
192
|
+
|
|
193
|
+
**Variable Renaming in Results:**
|
|
194
|
+
|
|
195
|
+
- Investment binary variable: `is_invested` → `invested` in `InvestmentModel`
|
|
196
|
+
- Switch tracking variables in `OnOffModel`:
|
|
197
|
+
- `switch_on` → `switch|on`
|
|
198
|
+
- `switch_off` → `switch|off`
|
|
199
|
+
- `switch_on_nr` → `switch|count`
|
|
200
|
+
- Effect submodel variables (following terminology changes):
|
|
201
|
+
- `Effect(invest)|total` → `Effect(periodic)`
|
|
202
|
+
- `Effect(operation)|total` → `Effect(temporal)`
|
|
203
|
+
- `Effect(operation)|total_per_timestep` → `Effect(temporal)|per_timestep`
|
|
204
|
+
- `Effect|total` → `Effect`
|
|
205
|
+
|
|
206
|
+
**Data Structure Changes:**
|
|
207
|
+
|
|
208
|
+
- `relative_minimum_charge_state` and `relative_maximum_charge_state` don't have an extra timestep anymore. Use the new `relative_minimum_final_charge_state` and `relative_maximum_final_charge_state` parameters for final state control
|
|
148
209
|
|
|
149
210
|
### ♻️ Changed
|
|
150
211
|
|
|
151
|
-
- FlowSystems cannot be shared across multiple Calculations anymore. A copy of the FlowSystem is created instead, making every Calculation independent
|
|
152
|
-
- Each Subcalculation in `SegmentedCalculation` now has its own distinct `FlowSystem` object
|
|
153
212
|
- Type system overhaul - added clear separation between temporal and non-temporal data throughout codebase for better clarity
|
|
154
213
|
- Enhanced FlowSystem interface with improved `__repr__()` and `__str__()` methods
|
|
155
214
|
- Improved Model Structure - Views and organisation is now divided into:
|
|
@@ -164,8 +223,6 @@ This replaces `specific_share_to_other_effects_*` parameters and inverts the dir
|
|
|
164
223
|
|
|
165
224
|
- The `agg_group` and `agg_weight` parameters of `TimeSeriesData` are deprecated and will be removed in a future version. Use `aggregation_group` and `aggregation_weight` instead.
|
|
166
225
|
- The `active_timesteps` parameter of `Calculation` is deprecated and will be removed in a future version. Use the new `sel(time=...)` method on the FlowSystem instead.
|
|
167
|
-
- The assignment of Bus Objects to Flow.bus is deprecated and will be removed in a future version. Use the label of the Bus instead.
|
|
168
|
-
- The usage of Effects objects in Dicts to assign shares to Effects is deprecated and will be removed in a future version. Use the label of the Effect instead.
|
|
169
226
|
- **InvestParameters** parameters renamed for improved clarity around investment and retirement effects:
|
|
170
227
|
- `fix_effects` → `effects_of_investment`
|
|
171
228
|
- `specific_effects` → `effects_of_investment_per_size`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flixopt
|
|
3
|
-
Version: 3.0
|
|
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>
|
|
@@ -9,7 +9,7 @@ Project-URL: homepage, https://tu-dresden.de/ing/maschinenwesen/iet/gewv/forschu
|
|
|
9
9
|
Project-URL: repository, https://github.com/flixOpt/flixopt
|
|
10
10
|
Project-URL: documentation, https://flixopt.github.io/flixopt/
|
|
11
11
|
Keywords: optimization,energy systems,numerical analysis
|
|
12
|
-
Classifier: Development Status ::
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -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:
|