flixopt 3.0.1__py3-none-any.whl → 6.0.0rc7__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.
- flixopt/__init__.py +57 -49
- flixopt/carrier.py +159 -0
- flixopt/clustering/__init__.py +51 -0
- flixopt/clustering/base.py +1746 -0
- flixopt/clustering/intercluster_helpers.py +201 -0
- flixopt/color_processing.py +372 -0
- flixopt/comparison.py +819 -0
- flixopt/components.py +848 -270
- flixopt/config.py +853 -496
- flixopt/core.py +111 -98
- flixopt/effects.py +294 -284
- flixopt/elements.py +484 -223
- flixopt/features.py +220 -118
- flixopt/flow_system.py +2026 -389
- flixopt/interface.py +504 -286
- flixopt/io.py +1718 -55
- flixopt/linear_converters.py +291 -230
- flixopt/modeling.py +304 -181
- flixopt/network_app.py +2 -1
- flixopt/optimization.py +788 -0
- flixopt/optimize_accessor.py +373 -0
- flixopt/plot_result.py +143 -0
- flixopt/plotting.py +1177 -1034
- flixopt/results.py +1331 -372
- flixopt/solvers.py +12 -4
- flixopt/statistics_accessor.py +2412 -0
- flixopt/stats_accessor.py +75 -0
- flixopt/structure.py +954 -120
- flixopt/topology_accessor.py +676 -0
- flixopt/transform_accessor.py +2277 -0
- flixopt/types.py +120 -0
- flixopt-6.0.0rc7.dist-info/METADATA +290 -0
- flixopt-6.0.0rc7.dist-info/RECORD +36 -0
- {flixopt-3.0.1.dist-info → flixopt-6.0.0rc7.dist-info}/WHEEL +1 -1
- flixopt/aggregation.py +0 -382
- flixopt/calculation.py +0 -672
- flixopt/commons.py +0 -51
- flixopt/utils.py +0 -86
- flixopt-3.0.1.dist-info/METADATA +0 -209
- flixopt-3.0.1.dist-info/RECORD +0 -26
- {flixopt-3.0.1.dist-info → flixopt-6.0.0rc7.dist-info}/licenses/LICENSE +0 -0
- {flixopt-3.0.1.dist-info → flixopt-6.0.0rc7.dist-info}/top_level.txt +0 -0
flixopt/types.py
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"""Type system for dimension-aware data in flixopt.
|
|
2
|
+
|
|
3
|
+
Type aliases use suffix notation to indicate maximum dimensions. Data can have any
|
|
4
|
+
subset of these dimensions (including scalars, which are broadcast to all dimensions).
|
|
5
|
+
|
|
6
|
+
| Suffix | Dimensions | Use Case |
|
|
7
|
+
|--------|------------|----------|
|
|
8
|
+
| `_TPS` | Time, Period, Scenario | Time-varying data across all dimensions |
|
|
9
|
+
| `_PS` | Period, Scenario | Investment parameters (no time variation) |
|
|
10
|
+
| `_S` | Scenario | Scenario-specific parameters |
|
|
11
|
+
| (none) | Scalar only | Single numeric values |
|
|
12
|
+
|
|
13
|
+
All dimensioned types accept: scalars (`int`, `float`), arrays (`ndarray`),
|
|
14
|
+
Series (`pd.Series`), DataFrames (`pd.DataFrame`), or DataArrays (`xr.DataArray`).
|
|
15
|
+
|
|
16
|
+
Example:
|
|
17
|
+
```python
|
|
18
|
+
from flixopt.types import Numeric_TPS, Numeric_PS, Scalar
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def create_flow(
|
|
22
|
+
size: Numeric_PS = None, # Scalar, array, Series, DataFrame, or DataArray
|
|
23
|
+
profile: Numeric_TPS = 1.0, # Time-varying data
|
|
24
|
+
efficiency: Scalar = 0.95, # Scalars only
|
|
25
|
+
): ...
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# All valid:
|
|
29
|
+
create_flow(size=100) # Scalar broadcast
|
|
30
|
+
create_flow(size=np.array([100, 150])) # Period-varying
|
|
31
|
+
create_flow(profile=pd.DataFrame(...)) # Time + scenario
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Important:
|
|
35
|
+
Data can have **any subset** of specified dimensions, but **cannot have more
|
|
36
|
+
dimensions than the FlowSystem**. If the FlowSystem has only time dimension,
|
|
37
|
+
you cannot pass period or scenario data. The type hints indicate the maximum
|
|
38
|
+
dimensions that could be used if they exist in the FlowSystem.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
from typing import TypeAlias
|
|
42
|
+
|
|
43
|
+
import numpy as np
|
|
44
|
+
import pandas as pd
|
|
45
|
+
import xarray as xr
|
|
46
|
+
|
|
47
|
+
# Internal base types - not exported
|
|
48
|
+
_Numeric: TypeAlias = int | float | np.integer | np.floating | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
49
|
+
_Bool: TypeAlias = bool | np.bool_ | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
50
|
+
_Effect: TypeAlias = dict[
|
|
51
|
+
str, int | float | np.integer | np.floating | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
# Combined type for numeric or boolean data (no dimension information)
|
|
55
|
+
NumericOrBool: TypeAlias = (
|
|
56
|
+
int | float | bool | np.integer | np.floating | np.bool_ | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
57
|
+
)
|
|
58
|
+
"""Numeric or boolean data without dimension metadata. For internal utilities."""
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# Numeric data types - Repeating types instead of using common var for better docs rendering
|
|
62
|
+
Numeric_TPS: TypeAlias = int | float | np.integer | np.floating | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
63
|
+
"""Time, Period, Scenario dimensions. For time-varying data across all dimensions."""
|
|
64
|
+
|
|
65
|
+
Numeric_PS: TypeAlias = int | float | np.integer | np.floating | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
66
|
+
"""Period, Scenario dimensions. For investment parameters (e.g., size, costs)."""
|
|
67
|
+
|
|
68
|
+
Numeric_S: TypeAlias = int | float | np.integer | np.floating | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
69
|
+
"""Scenario dimension. For scenario-specific parameters (e.g., discount rates)."""
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# Boolean data types - Repeating types instead of using common var for better docs rendering
|
|
73
|
+
Bool_TPS: TypeAlias = bool | np.bool_ | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
74
|
+
"""Time, Period, Scenario dimensions. For time-varying binary flags/constraints."""
|
|
75
|
+
|
|
76
|
+
Bool_PS: TypeAlias = bool | np.bool_ | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
77
|
+
"""Period, Scenario dimensions. For period-specific binary decisions."""
|
|
78
|
+
|
|
79
|
+
Bool_S: TypeAlias = bool | np.bool_ | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
80
|
+
"""Scenario dimension. For scenario-specific binary flags."""
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# Effect data types
|
|
84
|
+
Effect_TPS: TypeAlias = dict[
|
|
85
|
+
str, int | float | np.integer | np.floating | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
86
|
+
]
|
|
87
|
+
"""Time, Period, Scenario dimensions. Dict mapping effect names to numeric values.
|
|
88
|
+
For time-varying effects (costs, emissions). Use `Effect_TPS | Numeric_TPS` to accept single values."""
|
|
89
|
+
|
|
90
|
+
Effect_PS: TypeAlias = dict[
|
|
91
|
+
str, int | float | np.integer | np.floating | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
92
|
+
]
|
|
93
|
+
"""Period, Scenario dimensions. Dict mapping effect names to numeric values.
|
|
94
|
+
For period-specific effects (investment costs). Use `Effect_PS | Numeric_PS` to accept single values."""
|
|
95
|
+
|
|
96
|
+
Effect_S: TypeAlias = dict[
|
|
97
|
+
str, int | float | np.integer | np.floating | np.ndarray | pd.Series | pd.DataFrame | xr.DataArray
|
|
98
|
+
]
|
|
99
|
+
"""Scenario dimension. Dict mapping effect names to numeric values.
|
|
100
|
+
For scenario-specific effects (carbon prices). Use `Effect_S | Numeric_S` to accept single values."""
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# Scalar type (no dimensions)
|
|
104
|
+
Scalar: TypeAlias = int | float | np.integer | np.floating
|
|
105
|
+
"""Scalar numeric values only. Not converted to DataArray (unlike dimensioned types)."""
|
|
106
|
+
|
|
107
|
+
# Export public API
|
|
108
|
+
__all__ = [
|
|
109
|
+
'Numeric_TPS',
|
|
110
|
+
'Numeric_PS',
|
|
111
|
+
'Numeric_S',
|
|
112
|
+
'Bool_TPS',
|
|
113
|
+
'Bool_PS',
|
|
114
|
+
'Bool_S',
|
|
115
|
+
'Effect_TPS',
|
|
116
|
+
'Effect_PS',
|
|
117
|
+
'Effect_S',
|
|
118
|
+
'Scalar',
|
|
119
|
+
'NumericOrBool',
|
|
120
|
+
]
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flixopt
|
|
3
|
+
Version: 6.0.0rc7
|
|
4
|
+
Summary: Progressive flow system optimization in Python - start simple, scale to complex.
|
|
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.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Intended Audience :: Science/Research
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
|
20
|
+
Requires-Python: >=3.11
|
|
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: netcdf4<1.7.4,>=1.6.1
|
|
28
|
+
Requires-Dist: pyyaml<7,>=6.0.0
|
|
29
|
+
Requires-Dist: colorlog<7,>=6.8.0
|
|
30
|
+
Requires-Dist: tqdm<5,>=4.66.0
|
|
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: xarray_plotly<1,>=0.0.3
|
|
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: scipy<2,>=1.15.1; extra == "full"
|
|
45
|
+
Requires-Dist: gurobipy<14,>=10.0.0; python_version < "3.14" and extra == "full"
|
|
46
|
+
Requires-Dist: dash<4,>=3.0.0; extra == "full"
|
|
47
|
+
Requires-Dist: dash-cytoscape<2,>=1.0.0; extra == "full"
|
|
48
|
+
Requires-Dist: dash-daq<1,>=0.6.0; extra == "full"
|
|
49
|
+
Requires-Dist: networkx<4,>=3.0.0; extra == "full"
|
|
50
|
+
Requires-Dist: werkzeug<4,>=3.0.0; extra == "full"
|
|
51
|
+
Requires-Dist: flask<4,>=3.0.0; extra == "full"
|
|
52
|
+
Provides-Extra: dev
|
|
53
|
+
Requires-Dist: pytest==8.4.2; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-xdist==3.8.0; extra == "dev"
|
|
55
|
+
Requires-Dist: nbformat==5.10.4; extra == "dev"
|
|
56
|
+
Requires-Dist: ruff==0.14.10; extra == "dev"
|
|
57
|
+
Requires-Dist: pre-commit==4.3.0; extra == "dev"
|
|
58
|
+
Requires-Dist: pyvis==0.3.2; extra == "dev"
|
|
59
|
+
Requires-Dist: scipy==1.16.3; extra == "dev"
|
|
60
|
+
Requires-Dist: gurobipy==12.0.3; python_version < "3.14" and extra == "dev"
|
|
61
|
+
Requires-Dist: dash==3.3.0; extra == "dev"
|
|
62
|
+
Requires-Dist: dash-cytoscape==1.0.2; extra == "dev"
|
|
63
|
+
Requires-Dist: dash-daq==0.6.0; extra == "dev"
|
|
64
|
+
Requires-Dist: networkx==3.0.0; extra == "dev"
|
|
65
|
+
Requires-Dist: werkzeug==3.1.4; extra == "dev"
|
|
66
|
+
Provides-Extra: docs
|
|
67
|
+
Requires-Dist: mkdocs==1.6.1; extra == "docs"
|
|
68
|
+
Requires-Dist: mkdocs-material==9.7.1; extra == "docs"
|
|
69
|
+
Requires-Dist: mkdocstrings-python==1.19.0; extra == "docs"
|
|
70
|
+
Requires-Dist: mkdocs-table-reader-plugin==3.1.0; extra == "docs"
|
|
71
|
+
Requires-Dist: mkdocs-gen-files==0.5.0; extra == "docs"
|
|
72
|
+
Requires-Dist: mkdocs-include-markdown-plugin==7.2.0; extra == "docs"
|
|
73
|
+
Requires-Dist: mkdocs-literate-nav==0.6.2; extra == "docs"
|
|
74
|
+
Requires-Dist: mkdocs-plotly-plugin==0.1.3; extra == "docs"
|
|
75
|
+
Requires-Dist: mkdocs-jupyter==0.25.1; extra == "docs"
|
|
76
|
+
Requires-Dist: markdown-include==0.8.1; extra == "docs"
|
|
77
|
+
Requires-Dist: pymdown-extensions==10.19.1; extra == "docs"
|
|
78
|
+
Requires-Dist: pygments==2.19.2; extra == "docs"
|
|
79
|
+
Requires-Dist: mike==2.1.3; extra == "docs"
|
|
80
|
+
Requires-Dist: mkdocs-git-revision-date-localized-plugin==1.5.0; extra == "docs"
|
|
81
|
+
Requires-Dist: mkdocs-minify-plugin==0.8.0; extra == "docs"
|
|
82
|
+
Requires-Dist: notebook>=7.5.0; extra == "docs"
|
|
83
|
+
Requires-Dist: demandlib<0.3,>=0.2.2; extra == "docs"
|
|
84
|
+
Requires-Dist: pvlib<0.14,>=0.10.0; extra == "docs"
|
|
85
|
+
Requires-Dist: holidays<1,>=0.40; extra == "docs"
|
|
86
|
+
Dynamic: license-file
|
|
87
|
+
|
|
88
|
+
# FlixOpt: Progressive Flow System Optimization
|
|
89
|
+
|
|
90
|
+
<p align="center">
|
|
91
|
+
<b>F</b>lexible • <b>L</b>ow-entry • <b>I</b>nvestment • <b>X</b>-sector • <b>OPT</b>imization
|
|
92
|
+
</p>
|
|
93
|
+
|
|
94
|
+
<p align="center">
|
|
95
|
+
<i>Model more than costs</i> · <i>Easy to prototype</i> · <i>Based on dispatch</i> · <i>Sector coupling</i> · <i>Mathematical optimization</i>
|
|
96
|
+
</p>
|
|
97
|
+
|
|
98
|
+
[](https://flixopt.github.io/flixopt/latest/)
|
|
99
|
+
[](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml)
|
|
100
|
+
[](https://pypi.org/project/flixopt/)
|
|
101
|
+
[](https://pypi.org/project/flixopt/)
|
|
102
|
+
[](https://pypi.org/project/flixopt/)
|
|
103
|
+
[](https://opensource.org/licenses/MIT)
|
|
104
|
+
[](https://pypi.org/project/flixopt/)
|
|
105
|
+
[](https://github.com/flixOpt/flixopt/commits/main)
|
|
106
|
+
[](https://github.com/flixOpt/flixopt/issues)
|
|
107
|
+
[](https://github.com/astral-sh/ruff)
|
|
108
|
+
[](https://github.com/PyPSA/linopy/)
|
|
109
|
+
[](https://xarray.dev/)
|
|
110
|
+
[](https://doi.org/10.5281/zenodo.17448623)
|
|
111
|
+
[](https://doi.org/10.18086/eurosun.2022.04.07)
|
|
112
|
+
[](https://github.com/flixOpt/flixopt/stargazers)
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
**FlixOpt is a Python framework for progressive flow system optimization** - from district heating networks to industrial production lines, from renewable energy portfolios to supply chain logistics.
|
|
117
|
+
|
|
118
|
+
Build simple models quickly, then incrementally add investment decision, multi-period planning, stochastic scenarios, and custom constraints without refactoring.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 🚀 Quick Start
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
pip install flixopt
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
That's it! FlixOpt comes with the [HiGHS](https://highs.dev/) solver included. You're ready to optimize.
|
|
129
|
+
|
|
130
|
+
**The basic workflow:**
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
import flixopt as fx
|
|
134
|
+
|
|
135
|
+
# 1. Define your system structure
|
|
136
|
+
flow_system = fx.FlowSystem(timesteps)
|
|
137
|
+
flow_system.add_elements(buses, components, effects)
|
|
138
|
+
|
|
139
|
+
# 2. Optimize
|
|
140
|
+
flow_system.optimize(fx.solvers.HighsSolver())
|
|
141
|
+
|
|
142
|
+
# 3. Analyze results
|
|
143
|
+
flow_system.solution # Raw xarray Dataset
|
|
144
|
+
flow_system.statistics # Convenient analysis accessor
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Get started with real examples:**
|
|
148
|
+
- 📚 [Full Documentation](https://flixopt.github.io/flixopt/latest/)
|
|
149
|
+
- 💡 [Examples Gallery](https://flixopt.github.io/flixopt/latest/examples/) - Complete working examples from simple to complex
|
|
150
|
+
- 🔧 [API Reference](https://flixopt.github.io/flixopt/latest/api-reference/)
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 🌟 Why FlixOpt?
|
|
155
|
+
|
|
156
|
+
### Progressive Enhancement - Your Model Grows With You
|
|
157
|
+
|
|
158
|
+
**Start simple:**
|
|
159
|
+
```python
|
|
160
|
+
# Basic single-period model
|
|
161
|
+
flow_system = fx.FlowSystem(timesteps)
|
|
162
|
+
boiler = fx.linear_converters.Boiler("Boiler", eta=0.9, ...)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Add complexity incrementally:**
|
|
166
|
+
- **Investment decisions** → Add `InvestParameters` to components
|
|
167
|
+
- **Multi-period planning** → Add `periods` dimension to FlowSystem
|
|
168
|
+
- **Uncertainty modeling** → Add `scenarios` dimension with probabilities
|
|
169
|
+
- **Custom constraints** → Extend with native linopy syntax
|
|
170
|
+
|
|
171
|
+
**No refactoring required.** Your component definitions stay the same - periods, scenarios, and features are added as dimensions and parameters.
|
|
172
|
+
|
|
173
|
+
→ [Learn more about multi-period and stochastic modeling](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/dimensions/)
|
|
174
|
+
|
|
175
|
+
### For Everyone
|
|
176
|
+
|
|
177
|
+
- **Beginners:** High-level components that "just work"
|
|
178
|
+
- **Experts:** Full access to modify models with linopy
|
|
179
|
+
- **Researchers:** Quick prototyping with customization options
|
|
180
|
+
- **Engineers:** Reliable, tested components without black boxes
|
|
181
|
+
- **Students:** Clear, Pythonic interfaces for learning optimization
|
|
182
|
+
|
|
183
|
+
### Key Features
|
|
184
|
+
|
|
185
|
+
**Multi-criteria optimization:** Model costs, emissions, resource use - any custom metric. Optimize single objectives or use weighted combinations and ε-constraints.
|
|
186
|
+
→ [Effects documentation](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/effects-and-dimensions/)
|
|
187
|
+
|
|
188
|
+
**Performance at any scale:** Choose optimization modes without changing your model - full optimization, rolling horizon, or clustering (using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam)).
|
|
189
|
+
→ [Scaling notebooks](https://flixopt.github.io/flixopt/latest/notebooks/08a-aggregation/)
|
|
190
|
+
|
|
191
|
+
**Built for reproducibility:** Self-contained NetCDF result files with complete model information. Load results months later - everything is preserved.
|
|
192
|
+
→ [Results documentation](https://flixopt.github.io/flixopt/latest/api-reference/results/)
|
|
193
|
+
|
|
194
|
+
**Flexible data operations:** Transform FlowSystems with xarray-style operations (`sel()`, `resample()`) for multi-stage optimization.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## 🎯 What is FlixOpt?
|
|
199
|
+
|
|
200
|
+
### A General-Purpose Flow Optimization Framework
|
|
201
|
+
|
|
202
|
+
FlixOpt models **any system involving flows and conversions:**
|
|
203
|
+
|
|
204
|
+
- **Energy systems:** District heating/cooling, microgrids, renewable portfolios, sector coupling
|
|
205
|
+
- **Material flows:** Supply chains, production lines, chemical processes
|
|
206
|
+
- **Integrated systems:** Water-energy nexus, industrial symbiosis
|
|
207
|
+
|
|
208
|
+
While energy systems are our primary focus, the same foundation applies universally. This enables coupling different system types within integrated models.
|
|
209
|
+
|
|
210
|
+
### Modern Foundations
|
|
211
|
+
|
|
212
|
+
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.
|
|
213
|
+
|
|
214
|
+
### Our Position
|
|
215
|
+
|
|
216
|
+
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**.
|
|
217
|
+
|
|
218
|
+
### Academic Roots
|
|
219
|
+
|
|
220
|
+
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).
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 🛣️ Roadmap
|
|
225
|
+
|
|
226
|
+
**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.
|
|
227
|
+
|
|
228
|
+
**Current focus:**
|
|
229
|
+
- Enhanced component library (sector coupling, hydrogen, thermal networks)
|
|
230
|
+
- Examples showcasing multi-period and stochastic modeling
|
|
231
|
+
- Advanced result analysis and visualization
|
|
232
|
+
|
|
233
|
+
**Future vision:**
|
|
234
|
+
- Modeling to generate alternatives (MGA) for robust decision-making
|
|
235
|
+
- Advanced stochastic optimization (two-stage, CVaR)
|
|
236
|
+
- Community ecosystem of user-contributed components
|
|
237
|
+
|
|
238
|
+
→ [Full roadmap and vision](https://flixopt.github.io/flixopt/latest/roadmap/)
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 🛠️ Installation
|
|
243
|
+
|
|
244
|
+
### Basic Installation
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
pip install flixopt
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Includes the [HiGHS](https://highs.dev/) solver - you're ready to optimize immediately.
|
|
251
|
+
|
|
252
|
+
### Full Installation
|
|
253
|
+
|
|
254
|
+
For additional features (interactive network visualization, time series aggregation):
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
pip install "flixopt[full]"
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Solver Support
|
|
261
|
+
|
|
262
|
+
FlixOpt supports many solvers via linopy: **HiGHS** (included), **Gurobi**, **CPLEX**, **CBC**, **GLPK**, and more.
|
|
263
|
+
|
|
264
|
+
→ [Installation guide](https://flixopt.github.io/flixopt/latest/getting-started/)
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## 🤝 Contributing
|
|
269
|
+
|
|
270
|
+
FlixOpt thrives on community input. Whether you're fixing bugs, adding components, improving docs, or sharing use cases - **we welcome your contributions.**
|
|
271
|
+
|
|
272
|
+
→ [Contribution guide](https://flixopt.github.io/flixopt/latest/contribute/)
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## 📖 Citation
|
|
277
|
+
|
|
278
|
+
If FlixOpt supports your research or project, please cite:
|
|
279
|
+
|
|
280
|
+
- **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
|
|
281
|
+
- **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
|
|
282
|
+
|
|
283
|
+
To pinpoint which version you used in your work, please reference one of these doi's here:
|
|
284
|
+
- [](https://doi.org/10.5281/zenodo.17448623)
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## 📄 License
|
|
289
|
+
|
|
290
|
+
MIT License - See [LICENSE](https://github.com/flixopt/flixopt/blob/main/LICENSE) for details.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
flixopt/__init__.py,sha256=uUsa6yJB7dyZLKUzE_tbg6H1r5ngvF_CPlsgRyAh_Hg,2093
|
|
2
|
+
flixopt/carrier.py,sha256=1wHs5ZWGDCRLG2e-du6Fijf2iPqMZsIY03yFJ4LU67s,4833
|
|
3
|
+
flixopt/color_processing.py,sha256=953hmJxBljQYNXXVA7M2PCDJun8aTpPmzUa_gRjCPOI,12941
|
|
4
|
+
flixopt/comparison.py,sha256=Z7dT9KYSSauuwNUP1boCbrL_JSlsp7KZn984FDwNqms,31570
|
|
5
|
+
flixopt/components.py,sha256=pyE6viE_KVFbAv8Mfycyrf1xVXqYBs8DJbHhzvvs6I8,86167
|
|
6
|
+
flixopt/config.py,sha256=u8IlGOYdxMfpXOt3rZLQx53afNxv6iXDso00TqCwlmM,36977
|
|
7
|
+
flixopt/core.py,sha256=OIpdIV4C90xprDNi-mFyoBjnqzd9JZXHGkAHdIZ0Hxs,27393
|
|
8
|
+
flixopt/effects.py,sha256=5PIiFifMVQtO1AuF4Lb5qFbU7J9aQ1CRlwkM8EFg4UU,36269
|
|
9
|
+
flixopt/elements.py,sha256=lIv4PSyJu6UJpY00KDkKI3wMuO2V0APBsFiRSBLYIpw,48152
|
|
10
|
+
flixopt/features.py,sha256=6pbmUY8-RMekJCbkPBlM7hOzjdSBiW1i_tjOTozU7f4,29840
|
|
11
|
+
flixopt/flow_system.py,sha256=mdh1B9mefAItSOYgEo4ui0sopr0m_OBvGz25RGssTmA,107820
|
|
12
|
+
flixopt/interface.py,sha256=ol99IPiZTi2NCI_XRCwobdbFxPGiwdQ7h5bT5yrDYZY,65672
|
|
13
|
+
flixopt/io.py,sha256=cNw8x1TSj9kz102EtVsu8Y8hOFY5_Tl9P3VNf_6udTY,73995
|
|
14
|
+
flixopt/linear_converters.py,sha256=16-Trvv0ES7WPlLE6OPJy-2OevMby_AqBTzP3X8fQzI,27459
|
|
15
|
+
flixopt/modeling.py,sha256=6veBxPMyphp7Hy7Gwwc6ZRHnbKEqb0Je1p5zpfXHjrY,37396
|
|
16
|
+
flixopt/network_app.py,sha256=K2pBY1xFR26HPY9FmrlYVQhlUgHMFH_a_FmE3SO0Ryg,29487
|
|
17
|
+
flixopt/optimization.py,sha256=E-xyjkyMK-PHxEj_6kuGc0G00DaNFXFBpfjgEt8LDbM,33042
|
|
18
|
+
flixopt/optimize_accessor.py,sha256=9Yfk5HvkpRmRyzQffeILoCTrL1AzqxCvDUkWg8Qa8Fs,14982
|
|
19
|
+
flixopt/plot_result.py,sha256=pZRxKhROmYk8lrsJ4fTazKHZwJX0YSGXrSq5r9cx4-w,4211
|
|
20
|
+
flixopt/plotting.py,sha256=DVK0lT3yROqeViYeVhTSMP7eIOcBzK6xHWwMetCN7cM,64827
|
|
21
|
+
flixopt/results.py,sha256=uuhtp4SlFim7Z4qvoP0Q-CG1OEpEH_jaBLrNxF2UMAQ,120360
|
|
22
|
+
flixopt/solvers.py,sha256=rTFuL-lBflpbY_NGVGdXeWB2vLw5AdKemTn-Q0KaG7w,3007
|
|
23
|
+
flixopt/statistics_accessor.py,sha256=6xP2rHSJ15XQ7swE2oBkq_Uf80S6NpO-Tr_O4fvlnGw,95937
|
|
24
|
+
flixopt/stats_accessor.py,sha256=iJLTQM6kHT2yb6iepRiWu2mZsclswc0_zUA6yiAmapY,2856
|
|
25
|
+
flixopt/structure.py,sha256=lKX8u073tirLpJzpnZ0ggh3INiv0BXP7u9IB8fJZ74w,80468
|
|
26
|
+
flixopt/topology_accessor.py,sha256=p9pYLt5FkOU27PpxfNtjqlD0Qvb4KeAeQCwiQbXuja4,25576
|
|
27
|
+
flixopt/transform_accessor.py,sha256=Ffjys2PVdcFgf6h0GuuKXLbUMUzS161McPYhVPZAO7U,100655
|
|
28
|
+
flixopt/types.py,sha256=x5ldws1PSWZL1aB-BA85gjyAKxdp5aKqQvctQlnY0Ik,4967
|
|
29
|
+
flixopt/clustering/__init__.py,sha256=RyYp7fnK9umc0z4RRNjpsY1ZTVhW3_LqqzdloC9xThw,1913
|
|
30
|
+
flixopt/clustering/base.py,sha256=GnVD71Yd7e1N7Bc4r5Sp9Rq3iv46TQRKBZGlsi6GF3s,68029
|
|
31
|
+
flixopt/clustering/intercluster_helpers.py,sha256=IuoYP8NooQ82Q0UGOlVd8QU-sIaIQ3CnctdJzi90Ntc,7620
|
|
32
|
+
flixopt-6.0.0rc7.dist-info/licenses/LICENSE,sha256=HKsZnbrM_3Rvnr_u9cWSG90cBsj5_slaqI_z_qcxnGI,1118
|
|
33
|
+
flixopt-6.0.0rc7.dist-info/METADATA,sha256=KIwDakVzlFDr5UIG-Ir28EDnavQnzsHr01a3Mv0afiQ,13586
|
|
34
|
+
flixopt-6.0.0rc7.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
35
|
+
flixopt-6.0.0rc7.dist-info/top_level.txt,sha256=fanTzb9NylIXfv6Ic7spU97fVmRgGDPKvI_91tw4S3E,8
|
|
36
|
+
flixopt-6.0.0rc7.dist-info/RECORD,,
|