flixopt 3.0.1__tar.gz → 3.0.3__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.1 → flixopt-3.0.3}/CHANGELOG.md +62 -11
- flixopt-3.0.3/PKG-INFO +272 -0
- flixopt-3.0.3/README.md +192 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/plotting.py +16 -16
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/results.py +17 -14
- flixopt-3.0.3/flixopt.egg-info/PKG-INFO +272 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/pyproject.toml +1 -1
- flixopt-3.0.1/PKG-INFO +0 -209
- flixopt-3.0.1/README.md +0 -129
- flixopt-3.0.1/flixopt.egg-info/PKG-INFO +0 -209
- {flixopt-3.0.1 → flixopt-3.0.3}/LICENSE +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/MANIFEST.in +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/__init__.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/aggregation.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/calculation.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/commons.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/components.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/config.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/core.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/effects.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/elements.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/features.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/flow_system.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/interface.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/io.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/linear_converters.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/modeling.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/network_app.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/solvers.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/structure.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt/utils.py +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt.egg-info/SOURCES.txt +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt.egg-info/dependency_links.txt +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt.egg-info/requires.txt +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/flixopt.egg-info/top_level.txt +0 -0
- {flixopt-3.0.1 → flixopt-3.0.3}/setup.cfg +0 -0
|
@@ -41,7 +41,6 @@ Please keep the format of the changelog consistent with the other releases, so t
|
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
-
|
|
45
44
|
## [Unreleased] - ????-??-??
|
|
46
45
|
|
|
47
46
|
### ✨ Added
|
|
@@ -69,9 +68,36 @@ Please keep the format of the changelog consistent with the other releases, so t
|
|
|
69
68
|
---
|
|
70
69
|
Until here -->
|
|
71
70
|
|
|
71
|
+
## [3.0.3] - 2025-10-16
|
|
72
|
+
**Summary**: Hotfixing new plotting parameter `style`. Continue to use `mode`.
|
|
73
|
+
|
|
74
|
+
### 🐛 Fixed
|
|
75
|
+
- Reverted breaking change from v3.0.0: continue to use `mode parameter in plotting instead of new `style`
|
|
76
|
+
- Renamed new `mode` parameter in plotting methods to `unit_type`
|
|
77
|
+
|
|
78
|
+
### 📝 Docs
|
|
79
|
+
- Updated Migration Guide and added missing entries.
|
|
80
|
+
- Improved Changelog of v3.0.0
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## [3.0.2] - 2025-10-15
|
|
85
|
+
**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
|
+
|
|
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/).
|
|
88
|
+
|
|
89
|
+
### 📝 Docs
|
|
90
|
+
- Update the Readme
|
|
91
|
+
- Add a project roadmap to the docs
|
|
92
|
+
- Change Development status to "Production/Stable"
|
|
93
|
+
- Regroup parts in docs
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
72
97
|
## [3.0.1] - 2025-10-14
|
|
73
|
-
**Summary**:
|
|
74
|
-
|
|
98
|
+
**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
|
+
|
|
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/).
|
|
75
101
|
|
|
76
102
|
### 📝 Docs
|
|
77
103
|
- Fixed deployed docs
|
|
@@ -84,7 +110,8 @@ See the [Migration Guide](https://flixopt.github.io/flixopt/user-guide/migration
|
|
|
84
110
|
|
|
85
111
|
## [3.0.0] - 2025-10-13
|
|
86
112
|
**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
|
-
|
|
113
|
+
|
|
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/).
|
|
88
115
|
|
|
89
116
|
### ✨ Added
|
|
90
117
|
|
|
@@ -124,17 +151,43 @@ This replaces `specific_share_to_other_effects_*` parameters and inverts the dir
|
|
|
124
151
|
|
|
125
152
|
### 💥 Breaking Changes
|
|
126
153
|
|
|
127
|
-
|
|
154
|
+
**API and Behavior Changes:**
|
|
155
|
+
|
|
156
|
+
- **Effect system redesigned** (no deprecation):
|
|
157
|
+
- **Terminology changes**: Effect domains renamed for clarity: `operation` → `temporal`, `invest`/`investment` → `periodic`
|
|
158
|
+
- **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)
|
|
159
|
+
- **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
|
|
160
|
+
- **Bus and Effect object assignment**: Direct assignment of Bus/Effect objects is no longer supported. Use labels (strings) instead:
|
|
161
|
+
- `Flow.bus` must receive a string label, not a Bus object
|
|
162
|
+
- Effect shares must use effect labels (strings) in dictionaries, not Effect objects
|
|
163
|
+
- **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()`
|
|
164
|
+
|
|
165
|
+
**Class and Method Renaming:**
|
|
166
|
+
|
|
128
167
|
- Renamed class `SystemModel` to `FlowSystemModel`
|
|
129
168
|
- Renamed class `Model` to `Submodel`
|
|
130
169
|
- Renamed `mode` parameter in plotting methods to `style`
|
|
131
|
-
-
|
|
132
|
-
|
|
170
|
+
- `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()`
|
|
171
|
+
|
|
172
|
+
**Variable Renaming in Results:**
|
|
173
|
+
|
|
174
|
+
- Investment binary variable: `is_invested` → `invested` in `InvestmentModel`
|
|
175
|
+
- Switch tracking variables in `OnOffModel`:
|
|
176
|
+
- `switch_on` → `switch|on`
|
|
177
|
+
- `switch_off` → `switch|off`
|
|
178
|
+
- `switch_on_nr` → `switch|count`
|
|
179
|
+
- Effect submodel variables (following terminology changes):
|
|
180
|
+
- `Effect(invest)|total` → `Effect(periodic)`
|
|
181
|
+
- `Effect(operation)|total` → `Effect(temporal)`
|
|
182
|
+
- `Effect(operation)|total_per_timestep` → `Effect(temporal)|per_timestep`
|
|
183
|
+
- `Effect|total` → `Effect`
|
|
184
|
+
|
|
185
|
+
**Data Structure Changes:**
|
|
186
|
+
|
|
187
|
+
- `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
|
|
133
188
|
|
|
134
189
|
### ♻️ Changed
|
|
135
190
|
|
|
136
|
-
- FlowSystems cannot be shared across multiple Calculations anymore. A copy of the FlowSystem is created instead, making every Calculation independent
|
|
137
|
-
- Each Subcalculation in `SegmentedCalculation` now has its own distinct `FlowSystem` object
|
|
138
191
|
- Type system overhaul - added clear separation between temporal and non-temporal data throughout codebase for better clarity
|
|
139
192
|
- Enhanced FlowSystem interface with improved `__repr__()` and `__str__()` methods
|
|
140
193
|
- Improved Model Structure - Views and organisation is now divided into:
|
|
@@ -149,8 +202,6 @@ This replaces `specific_share_to_other_effects_*` parameters and inverts the dir
|
|
|
149
202
|
|
|
150
203
|
- 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.
|
|
151
204
|
- 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.
|
|
152
|
-
- 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.
|
|
153
|
-
- 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.
|
|
154
205
|
- **InvestParameters** parameters renamed for improved clarity around investment and retirement effects:
|
|
155
206
|
- `fix_effects` → `effects_of_investment`
|
|
156
207
|
- `specific_effects` → `effects_of_investment_per_size`
|
flixopt-3.0.3/PKG-INFO
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flixopt
|
|
3
|
+
Version: 3.0.3
|
|
4
|
+
Summary: Vector based energy and material flow optimization framework in Python.
|
|
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
|
+
Maintainer-email: Felix Bumann <felixbumann387@gmail.com>, Peter Stange <peter.stange@tu-dresden.de>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: homepage, https://tu-dresden.de/ing/maschinenwesen/iet/gewv/forschung/forschungsprojekte/flixopt
|
|
9
|
+
Project-URL: repository, https://github.com/flixOpt/flixopt
|
|
10
|
+
Project-URL: documentation, https://flixopt.github.io/flixopt/
|
|
11
|
+
Keywords: optimization,energy systems,numerical analysis
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Intended Audience :: Science/Research
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: numpy<3,>=1.21.5
|
|
24
|
+
Requires-Dist: pandas<3,>=2.0.0
|
|
25
|
+
Requires-Dist: xarray<2026.0,>=2024.2.0
|
|
26
|
+
Requires-Dist: linopy<0.6,>=0.5.1
|
|
27
|
+
Requires-Dist: h5netcdf<2,>=1.0.0
|
|
28
|
+
Requires-Dist: pyyaml<7,>=6.0.0
|
|
29
|
+
Requires-Dist: rich<15,>=13.0.0
|
|
30
|
+
Requires-Dist: tomli<3,>=2.0.1; python_version < "3.11"
|
|
31
|
+
Requires-Dist: highspy<2,>=1.5.3
|
|
32
|
+
Requires-Dist: matplotlib<4,>=3.5.2
|
|
33
|
+
Requires-Dist: plotly<7,>=5.15.0
|
|
34
|
+
Requires-Dist: numexpr<2.14,>=2.8.4; python_version < "3.11"
|
|
35
|
+
Provides-Extra: network-viz
|
|
36
|
+
Requires-Dist: dash<4,>=3.0.0; extra == "network-viz"
|
|
37
|
+
Requires-Dist: dash-cytoscape<2,>=1.0.0; extra == "network-viz"
|
|
38
|
+
Requires-Dist: dash-daq<1,>=0.6.0; extra == "network-viz"
|
|
39
|
+
Requires-Dist: networkx<4,>=3.0.0; extra == "network-viz"
|
|
40
|
+
Requires-Dist: werkzeug<4,>=3.0.0; extra == "network-viz"
|
|
41
|
+
Requires-Dist: flask<4,>=3.0.0; extra == "network-viz"
|
|
42
|
+
Provides-Extra: full
|
|
43
|
+
Requires-Dist: pyvis==0.3.2; extra == "full"
|
|
44
|
+
Requires-Dist: tsam<3,>=2.3.1; extra == "full"
|
|
45
|
+
Requires-Dist: scipy<2,>=1.15.1; extra == "full"
|
|
46
|
+
Requires-Dist: gurobipy<13,>=10.0.0; extra == "full"
|
|
47
|
+
Requires-Dist: dash<4,>=3.0.0; extra == "full"
|
|
48
|
+
Requires-Dist: dash-cytoscape<2,>=1.0.0; extra == "full"
|
|
49
|
+
Requires-Dist: dash-daq<1,>=0.6.0; extra == "full"
|
|
50
|
+
Requires-Dist: networkx<4,>=3.0.0; extra == "full"
|
|
51
|
+
Requires-Dist: werkzeug<4,>=3.0.0; extra == "full"
|
|
52
|
+
Requires-Dist: flask<4,>=3.0.0; extra == "full"
|
|
53
|
+
Provides-Extra: dev
|
|
54
|
+
Requires-Dist: pytest==8.4.2; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest-xdist==3.8.0; extra == "dev"
|
|
56
|
+
Requires-Dist: nbformat==5.10.4; extra == "dev"
|
|
57
|
+
Requires-Dist: ruff==0.13.3; extra == "dev"
|
|
58
|
+
Requires-Dist: pre-commit==4.3.0; extra == "dev"
|
|
59
|
+
Requires-Dist: pyvis==0.3.2; extra == "dev"
|
|
60
|
+
Requires-Dist: tsam==2.3.9; extra == "dev"
|
|
61
|
+
Requires-Dist: scipy==1.15.1; extra == "dev"
|
|
62
|
+
Requires-Dist: gurobipy==12.0.3; extra == "dev"
|
|
63
|
+
Requires-Dist: dash==3.0.0; extra == "dev"
|
|
64
|
+
Requires-Dist: dash-cytoscape==1.0.2; extra == "dev"
|
|
65
|
+
Requires-Dist: dash-daq==0.6.0; extra == "dev"
|
|
66
|
+
Requires-Dist: networkx==3.0.0; extra == "dev"
|
|
67
|
+
Requires-Dist: werkzeug==3.0.0; extra == "dev"
|
|
68
|
+
Provides-Extra: docs
|
|
69
|
+
Requires-Dist: mkdocs-material==9.6.21; extra == "docs"
|
|
70
|
+
Requires-Dist: mkdocstrings-python==1.18.2; extra == "docs"
|
|
71
|
+
Requires-Dist: mkdocs-table-reader-plugin==3.1.0; extra == "docs"
|
|
72
|
+
Requires-Dist: mkdocs-gen-files==0.5.0; extra == "docs"
|
|
73
|
+
Requires-Dist: mkdocs-include-markdown-plugin==7.1.7; extra == "docs"
|
|
74
|
+
Requires-Dist: mkdocs-literate-nav==0.6.2; extra == "docs"
|
|
75
|
+
Requires-Dist: markdown-include==0.8.1; extra == "docs"
|
|
76
|
+
Requires-Dist: pymdown-extensions==10.16.1; extra == "docs"
|
|
77
|
+
Requires-Dist: pygments==2.19.2; extra == "docs"
|
|
78
|
+
Requires-Dist: mike==2.1.3; extra == "docs"
|
|
79
|
+
Dynamic: license-file
|
|
80
|
+
|
|
81
|
+
# FlixOpt: Energy and Material Flow Optimization Framework
|
|
82
|
+
|
|
83
|
+
[](https://flixopt.github.io/flixopt/latest/)
|
|
84
|
+
[](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml)
|
|
85
|
+
[](https://pypi.org/project/flixopt/)
|
|
86
|
+
[](https://pypi.org/project/flixopt/)
|
|
87
|
+
[](https://pypi.org/project/flixopt/)
|
|
88
|
+
[](https://opensource.org/licenses/MIT)
|
|
89
|
+
[](https://pypi.org/project/flixopt/)
|
|
90
|
+
[](https://github.com/flixOpt/flixopt/commits/main)
|
|
91
|
+
[](https://github.com/flixOpt/flixopt/issues)
|
|
92
|
+
[](https://results.pre-commit.ci/latest/github/flixOpt/flixopt/main)
|
|
93
|
+
[](https://github.com/astral-sh/ruff)
|
|
94
|
+
[](https://github.com/PyPSA/linopy/)
|
|
95
|
+
[](https://xarray.dev/)
|
|
96
|
+
[](https://doi.org/10.18086/eurosun.2022.04.07)
|
|
97
|
+
[](https://github.com/flixOpt/flixopt/stargazers)
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
**FlixOpt is a Python framework for optimizing energy and material flow systems** - from district heating networks to industrial production lines, from renewable energy portfolios to supply chain logistics.
|
|
102
|
+
|
|
103
|
+
**Start simple, scale complex:** Build a working optimization model in minutes, then progressively add detail - multi-period investments, stochastic scenarios, custom constraints - without rewriting your code.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 🚀 Quick Start
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pip install flixopt
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
That's it! FlixOpt comes with the [HiGHS](https://highs.dev/) solver included. You're ready to optimize.
|
|
114
|
+
|
|
115
|
+
**The basic workflow:**
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import flixopt as fx
|
|
119
|
+
|
|
120
|
+
# 1. Define your system structure
|
|
121
|
+
flow_system = fx.FlowSystem(timesteps)
|
|
122
|
+
flow_system.add_elements(buses, components, effects)
|
|
123
|
+
|
|
124
|
+
# 2. Create and solve
|
|
125
|
+
calculation = fx.FullCalculation("MyModel", flow_system)
|
|
126
|
+
calculation.solve()
|
|
127
|
+
|
|
128
|
+
# 3. Analyze results
|
|
129
|
+
calculation.results.solution
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Get started with real examples:**
|
|
133
|
+
- 📚 [Full Documentation](https://flixopt.github.io/flixopt/latest/)
|
|
134
|
+
- 💡 [Examples Gallery](https://flixopt.github.io/flixopt/latest/examples/) - Complete working examples from simple to complex
|
|
135
|
+
- 🔧 [API Reference](https://flixopt.github.io/flixopt/latest/api-reference/)
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 🌟 Why FlixOpt?
|
|
140
|
+
|
|
141
|
+
### Progressive Enhancement - Your Model Grows With You
|
|
142
|
+
|
|
143
|
+
**Start simple:**
|
|
144
|
+
```python
|
|
145
|
+
# Basic single-period model
|
|
146
|
+
flow_system = fx.FlowSystem(timesteps)
|
|
147
|
+
boiler = fx.Boiler("Boiler", eta=0.9, ...)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Add complexity incrementally:**
|
|
151
|
+
- **Investment decisions** → Add `InvestParameters` to components
|
|
152
|
+
- **Multi-period planning** → Add `periods` dimension to FlowSystem
|
|
153
|
+
- **Uncertainty modeling** → Add `scenarios` dimension with probabilities
|
|
154
|
+
- **Custom constraints** → Extend with native linopy syntax
|
|
155
|
+
|
|
156
|
+
**No refactoring required.** Your component definitions stay the same - periods, scenarios, and features are added as dimensions and parameters.
|
|
157
|
+
|
|
158
|
+
→ [Learn more about multi-period and stochastic modeling](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/dimensions/)
|
|
159
|
+
|
|
160
|
+
### For Everyone
|
|
161
|
+
|
|
162
|
+
- **Beginners:** High-level components that "just work"
|
|
163
|
+
- **Experts:** Full access to modify models with linopy
|
|
164
|
+
- **Researchers:** Quick prototyping with customization options
|
|
165
|
+
- **Engineers:** Reliable, tested components without black boxes
|
|
166
|
+
- **Students:** Clear, Pythonic interfaces for learning optimization
|
|
167
|
+
|
|
168
|
+
### Key Features
|
|
169
|
+
|
|
170
|
+
**Multi-criteria optimization:** Model costs, emissions, resource use - any custom metric. Optimize single objectives or use weighted combinations and ε-constraints.
|
|
171
|
+
→ [Effects documentation](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/effects-penalty-objective/)
|
|
172
|
+
|
|
173
|
+
**Performance at any scale:** Choose calculation modes without changing your model - Full, Segmented, or Aggregated (using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam)).
|
|
174
|
+
→ [Calculation modes](https://flixopt.github.io/flixopt/latest/api-reference/calculation/)
|
|
175
|
+
|
|
176
|
+
**Built for reproducibility:** Self-contained NetCDF result files with complete model information. Load results months later - everything is preserved.
|
|
177
|
+
→ [Results documentation](https://flixopt.github.io/flixopt/latest/api-reference/results/)
|
|
178
|
+
|
|
179
|
+
**Flexible data operations:** Transform FlowSystems with xarray-style operations (`sel()`, `resample()`) for multi-stage optimization.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## 🎯 What is FlixOpt?
|
|
184
|
+
|
|
185
|
+
### A General-Purpose Flow Optimization Framework
|
|
186
|
+
|
|
187
|
+
FlixOpt models **any system involving flows and conversions:**
|
|
188
|
+
|
|
189
|
+
- **Energy systems:** District heating/cooling, microgrids, renewable portfolios, sector coupling
|
|
190
|
+
- **Material flows:** Supply chains, production lines, chemical processes
|
|
191
|
+
- **Integrated systems:** Water-energy nexus, industrial symbiosis
|
|
192
|
+
|
|
193
|
+
While energy systems are our primary focus, the same foundation applies universally. This enables coupling different system types within integrated models.
|
|
194
|
+
|
|
195
|
+
### Modern Foundations
|
|
196
|
+
|
|
197
|
+
Built on [linopy](https://github.com/PyPSA/linopy/) and [xarray](https://github.com/pydata/xarray), FlixOpt delivers **performance** and **transparency**. Full access to variables, constraints, and model structure. Extend anything with native linopy syntax.
|
|
198
|
+
|
|
199
|
+
### Our Position
|
|
200
|
+
|
|
201
|
+
We bridge the gap between high-level strategic models (like [FINE](https://github.com/FZJ-IEK3-VSA/FINE)) and low-level dispatch tools - similar to [PyPSA](https://docs.pypsa.org/latest/). FlixOpt is the sweet spot for detailed operational planning and long-term investment analysis in the **same framework**.
|
|
202
|
+
|
|
203
|
+
### Academic Roots
|
|
204
|
+
|
|
205
|
+
Originally developed at [TU Dresden](https://github.com/gewv-tu-dresden) for the SMARTBIOGRID project (funded by the German Federal Ministry for Economic Affairs and Energy, FKZ: 03KB159B). FlixOpt evolved from the MATLAB-based flixOptMat framework while incorporating best practices from [oemof/solph](https://github.com/oemof/oemof-solph).
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 🛣️ Roadmap
|
|
210
|
+
|
|
211
|
+
**FlixOpt aims to be the most accessible, flexible, and universal Python framework for energy and material flow optimization.** We believe optimization modeling should be approachable for beginners yet powerful for experts, minimizing context switching between different planning horizons.
|
|
212
|
+
|
|
213
|
+
**Current focus:**
|
|
214
|
+
- Enhanced component library (sector coupling, hydrogen, thermal networks)
|
|
215
|
+
- Examples showcasing multi-period and stochastic modeling
|
|
216
|
+
- Advanced result analysis and visualization
|
|
217
|
+
|
|
218
|
+
**Future vision:**
|
|
219
|
+
- Modeling to generate alternatives (MGA) for robust decision-making
|
|
220
|
+
- Advanced stochastic optimization (two-stage, CVaR)
|
|
221
|
+
- Community ecosystem of user-contributed components
|
|
222
|
+
|
|
223
|
+
→ [Full roadmap and vision](https://flixopt.github.io/flixopt/latest/roadmap/)
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 🛠️ Installation
|
|
228
|
+
|
|
229
|
+
### Basic Installation
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
pip install flixopt
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Includes the [HiGHS](https://highs.dev/) solver - you're ready to optimize immediately.
|
|
236
|
+
|
|
237
|
+
### Full Installation
|
|
238
|
+
|
|
239
|
+
For additional features (interactive network visualization, time series aggregation):
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
pip install "flixopt[full]"
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Solver Support
|
|
246
|
+
|
|
247
|
+
FlixOpt supports many solvers via linopy: **HiGHS** (included), **Gurobi**, **CPLEX**, **CBC**, **GLPK**, and more.
|
|
248
|
+
|
|
249
|
+
→ [Installation guide](https://flixopt.github.io/flixopt/latest/getting-started/)
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## 🤝 Contributing
|
|
254
|
+
|
|
255
|
+
FlixOpt thrives on community input. Whether you're fixing bugs, adding components, improving docs, or sharing use cases - **we welcome your contributions.**
|
|
256
|
+
|
|
257
|
+
→ [Contribution guide](https://flixopt.github.io/flixopt/latest/contribute/)
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 📖 Citation
|
|
262
|
+
|
|
263
|
+
If FlixOpt supports your research or project, please cite:
|
|
264
|
+
|
|
265
|
+
- **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
|
|
266
|
+
- **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## 📄 License
|
|
271
|
+
|
|
272
|
+
MIT License - See [LICENSE](https://github.com/flixopt/flixopt/blob/main/LICENSE) for details.
|
flixopt-3.0.3/README.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# FlixOpt: Energy and Material Flow Optimization Framework
|
|
2
|
+
|
|
3
|
+
[](https://flixopt.github.io/flixopt/latest/)
|
|
4
|
+
[](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml)
|
|
5
|
+
[](https://pypi.org/project/flixopt/)
|
|
6
|
+
[](https://pypi.org/project/flixopt/)
|
|
7
|
+
[](https://pypi.org/project/flixopt/)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
[](https://pypi.org/project/flixopt/)
|
|
10
|
+
[](https://github.com/flixOpt/flixopt/commits/main)
|
|
11
|
+
[](https://github.com/flixOpt/flixopt/issues)
|
|
12
|
+
[](https://results.pre-commit.ci/latest/github/flixOpt/flixopt/main)
|
|
13
|
+
[](https://github.com/astral-sh/ruff)
|
|
14
|
+
[](https://github.com/PyPSA/linopy/)
|
|
15
|
+
[](https://xarray.dev/)
|
|
16
|
+
[](https://doi.org/10.18086/eurosun.2022.04.07)
|
|
17
|
+
[](https://github.com/flixOpt/flixopt/stargazers)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
**FlixOpt is a Python framework for optimizing energy and material flow systems** - from district heating networks to industrial production lines, from renewable energy portfolios to supply chain logistics.
|
|
22
|
+
|
|
23
|
+
**Start simple, scale complex:** Build a working optimization model in minutes, then progressively add detail - multi-period investments, stochastic scenarios, custom constraints - without rewriting your code.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 🚀 Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install flixopt
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
That's it! FlixOpt comes with the [HiGHS](https://highs.dev/) solver included. You're ready to optimize.
|
|
34
|
+
|
|
35
|
+
**The basic workflow:**
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
import flixopt as fx
|
|
39
|
+
|
|
40
|
+
# 1. Define your system structure
|
|
41
|
+
flow_system = fx.FlowSystem(timesteps)
|
|
42
|
+
flow_system.add_elements(buses, components, effects)
|
|
43
|
+
|
|
44
|
+
# 2. Create and solve
|
|
45
|
+
calculation = fx.FullCalculation("MyModel", flow_system)
|
|
46
|
+
calculation.solve()
|
|
47
|
+
|
|
48
|
+
# 3. Analyze results
|
|
49
|
+
calculation.results.solution
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Get started with real examples:**
|
|
53
|
+
- 📚 [Full Documentation](https://flixopt.github.io/flixopt/latest/)
|
|
54
|
+
- 💡 [Examples Gallery](https://flixopt.github.io/flixopt/latest/examples/) - Complete working examples from simple to complex
|
|
55
|
+
- 🔧 [API Reference](https://flixopt.github.io/flixopt/latest/api-reference/)
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 🌟 Why FlixOpt?
|
|
60
|
+
|
|
61
|
+
### Progressive Enhancement - Your Model Grows With You
|
|
62
|
+
|
|
63
|
+
**Start simple:**
|
|
64
|
+
```python
|
|
65
|
+
# Basic single-period model
|
|
66
|
+
flow_system = fx.FlowSystem(timesteps)
|
|
67
|
+
boiler = fx.Boiler("Boiler", eta=0.9, ...)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Add complexity incrementally:**
|
|
71
|
+
- **Investment decisions** → Add `InvestParameters` to components
|
|
72
|
+
- **Multi-period planning** → Add `periods` dimension to FlowSystem
|
|
73
|
+
- **Uncertainty modeling** → Add `scenarios` dimension with probabilities
|
|
74
|
+
- **Custom constraints** → Extend with native linopy syntax
|
|
75
|
+
|
|
76
|
+
**No refactoring required.** Your component definitions stay the same - periods, scenarios, and features are added as dimensions and parameters.
|
|
77
|
+
|
|
78
|
+
→ [Learn more about multi-period and stochastic modeling](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/dimensions/)
|
|
79
|
+
|
|
80
|
+
### For Everyone
|
|
81
|
+
|
|
82
|
+
- **Beginners:** High-level components that "just work"
|
|
83
|
+
- **Experts:** Full access to modify models with linopy
|
|
84
|
+
- **Researchers:** Quick prototyping with customization options
|
|
85
|
+
- **Engineers:** Reliable, tested components without black boxes
|
|
86
|
+
- **Students:** Clear, Pythonic interfaces for learning optimization
|
|
87
|
+
|
|
88
|
+
### Key Features
|
|
89
|
+
|
|
90
|
+
**Multi-criteria optimization:** Model costs, emissions, resource use - any custom metric. Optimize single objectives or use weighted combinations and ε-constraints.
|
|
91
|
+
→ [Effects documentation](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/effects-penalty-objective/)
|
|
92
|
+
|
|
93
|
+
**Performance at any scale:** Choose calculation modes without changing your model - Full, Segmented, or Aggregated (using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam)).
|
|
94
|
+
→ [Calculation modes](https://flixopt.github.io/flixopt/latest/api-reference/calculation/)
|
|
95
|
+
|
|
96
|
+
**Built for reproducibility:** Self-contained NetCDF result files with complete model information. Load results months later - everything is preserved.
|
|
97
|
+
→ [Results documentation](https://flixopt.github.io/flixopt/latest/api-reference/results/)
|
|
98
|
+
|
|
99
|
+
**Flexible data operations:** Transform FlowSystems with xarray-style operations (`sel()`, `resample()`) for multi-stage optimization.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 🎯 What is FlixOpt?
|
|
104
|
+
|
|
105
|
+
### A General-Purpose Flow Optimization Framework
|
|
106
|
+
|
|
107
|
+
FlixOpt models **any system involving flows and conversions:**
|
|
108
|
+
|
|
109
|
+
- **Energy systems:** District heating/cooling, microgrids, renewable portfolios, sector coupling
|
|
110
|
+
- **Material flows:** Supply chains, production lines, chemical processes
|
|
111
|
+
- **Integrated systems:** Water-energy nexus, industrial symbiosis
|
|
112
|
+
|
|
113
|
+
While energy systems are our primary focus, the same foundation applies universally. This enables coupling different system types within integrated models.
|
|
114
|
+
|
|
115
|
+
### Modern Foundations
|
|
116
|
+
|
|
117
|
+
Built on [linopy](https://github.com/PyPSA/linopy/) and [xarray](https://github.com/pydata/xarray), FlixOpt delivers **performance** and **transparency**. Full access to variables, constraints, and model structure. Extend anything with native linopy syntax.
|
|
118
|
+
|
|
119
|
+
### Our Position
|
|
120
|
+
|
|
121
|
+
We bridge the gap between high-level strategic models (like [FINE](https://github.com/FZJ-IEK3-VSA/FINE)) and low-level dispatch tools - similar to [PyPSA](https://docs.pypsa.org/latest/). FlixOpt is the sweet spot for detailed operational planning and long-term investment analysis in the **same framework**.
|
|
122
|
+
|
|
123
|
+
### Academic Roots
|
|
124
|
+
|
|
125
|
+
Originally developed at [TU Dresden](https://github.com/gewv-tu-dresden) for the SMARTBIOGRID project (funded by the German Federal Ministry for Economic Affairs and Energy, FKZ: 03KB159B). FlixOpt evolved from the MATLAB-based flixOptMat framework while incorporating best practices from [oemof/solph](https://github.com/oemof/oemof-solph).
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 🛣️ Roadmap
|
|
130
|
+
|
|
131
|
+
**FlixOpt aims to be the most accessible, flexible, and universal Python framework for energy and material flow optimization.** We believe optimization modeling should be approachable for beginners yet powerful for experts, minimizing context switching between different planning horizons.
|
|
132
|
+
|
|
133
|
+
**Current focus:**
|
|
134
|
+
- Enhanced component library (sector coupling, hydrogen, thermal networks)
|
|
135
|
+
- Examples showcasing multi-period and stochastic modeling
|
|
136
|
+
- Advanced result analysis and visualization
|
|
137
|
+
|
|
138
|
+
**Future vision:**
|
|
139
|
+
- Modeling to generate alternatives (MGA) for robust decision-making
|
|
140
|
+
- Advanced stochastic optimization (two-stage, CVaR)
|
|
141
|
+
- Community ecosystem of user-contributed components
|
|
142
|
+
|
|
143
|
+
→ [Full roadmap and vision](https://flixopt.github.io/flixopt/latest/roadmap/)
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 🛠️ Installation
|
|
148
|
+
|
|
149
|
+
### Basic Installation
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
pip install flixopt
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Includes the [HiGHS](https://highs.dev/) solver - you're ready to optimize immediately.
|
|
156
|
+
|
|
157
|
+
### Full Installation
|
|
158
|
+
|
|
159
|
+
For additional features (interactive network visualization, time series aggregation):
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
pip install "flixopt[full]"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Solver Support
|
|
166
|
+
|
|
167
|
+
FlixOpt supports many solvers via linopy: **HiGHS** (included), **Gurobi**, **CPLEX**, **CBC**, **GLPK**, and more.
|
|
168
|
+
|
|
169
|
+
→ [Installation guide](https://flixopt.github.io/flixopt/latest/getting-started/)
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 🤝 Contributing
|
|
174
|
+
|
|
175
|
+
FlixOpt thrives on community input. Whether you're fixing bugs, adding components, improving docs, or sharing use cases - **we welcome your contributions.**
|
|
176
|
+
|
|
177
|
+
→ [Contribution guide](https://flixopt.github.io/flixopt/latest/contribute/)
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## 📖 Citation
|
|
182
|
+
|
|
183
|
+
If FlixOpt supports your research or project, please cite:
|
|
184
|
+
|
|
185
|
+
- **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
|
|
186
|
+
- **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 📄 License
|
|
191
|
+
|
|
192
|
+
MIT License - See [LICENSE](https://github.com/flixopt/flixopt/blob/main/LICENSE) for details.
|