flixopt 1.0.12__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of flixopt might be problematic. Click here for more details.
- flixopt-2.0.1/.github/workflows/deploy-docs.yaml +33 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/.github/workflows/python-app.yaml +3 -3
- {flixopt-1.0.12 → flixopt-2.0.1}/.gitignore +1 -0
- flixopt-2.0.1/PKG-INFO +145 -0
- flixopt-2.0.1/README.md +86 -0
- flixopt-2.0.1/docs/SUMMARY.md +7 -0
- flixopt-2.0.1/docs/contribute.md +49 -0
- flixopt-2.0.1/docs/examples/00-Minimal Example.md +5 -0
- flixopt-2.0.1/docs/examples/01-Basic Example.md +5 -0
- flixopt-2.0.1/docs/examples/02-Complex Example.md +10 -0
- flixopt-2.0.1/docs/examples/03-Calculation Modes.md +5 -0
- flixopt-2.0.1/docs/examples/index.md +5 -0
- flixopt-2.0.1/docs/faq/contribute.md +49 -0
- flixopt-2.0.1/docs/faq/index.md +3 -0
- flixopt-2.0.1/docs/getting-started.md +42 -0
- flixopt-2.0.1/docs/images/architecture_flixOpt.png +0 -0
- flixopt-2.0.1/docs/images/flixopt-icon.svg +1 -0
- flixopt-2.0.1/docs/index.md +47 -0
- flixopt-2.0.1/docs/javascripts/mathjax.js +18 -0
- flixopt-2.0.1/docs/release-notes/_template.txt +32 -0
- flixopt-2.0.1/docs/release-notes/index.md +7 -0
- flixopt-2.0.1/docs/release-notes/v2.0.0.md +93 -0
- flixopt-2.0.1/docs/release-notes/v2.0.1.md +12 -0
- flixopt-2.0.1/docs/user-guide/Mathematical Notation/Bus.md +33 -0
- flixopt-2.0.1/docs/user-guide/Mathematical Notation/Effects, Penalty & Objective.md +132 -0
- flixopt-2.0.1/docs/user-guide/Mathematical Notation/Flow.md +26 -0
- flixopt-2.0.1/docs/user-guide/Mathematical Notation/LinearConverter.md +21 -0
- flixopt-2.0.1/docs/user-guide/Mathematical Notation/Piecewise.md +49 -0
- flixopt-2.0.1/docs/user-guide/Mathematical Notation/Storage.md +44 -0
- flixopt-2.0.1/docs/user-guide/Mathematical Notation/index.md +22 -0
- flixopt-2.0.1/docs/user-guide/Mathematical Notation/others.md +3 -0
- flixopt-2.0.1/docs/user-guide/index.md +124 -0
- flixopt-2.0.1/examples/00_Minmal/minimal_example.py +71 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/examples/01_Simple/simple_example.py +31 -31
- {flixopt-1.0.12 → flixopt-2.0.1}/examples/02_Complex/complex_example.py +60 -63
- flixopt-2.0.1/examples/02_Complex/complex_example_results.py +33 -0
- flixopt-2.0.1/examples/03_Calculation_types/example_calculation_types.py +227 -0
- {flixopt-1.0.12/flixOpt → flixopt-2.0.1/flixopt}/__init__.py +5 -2
- {flixopt-1.0.12/flixOpt → flixopt-2.0.1/flixopt}/aggregation.py +113 -140
- flixopt-2.0.1/flixopt/calculation.py +455 -0
- {flixopt-1.0.12/flixOpt → flixopt-2.0.1/flixopt}/commons.py +7 -4
- flixopt-2.0.1/flixopt/components.py +630 -0
- {flixopt-1.0.12/flixOpt → flixopt-2.0.1/flixopt}/config.py +9 -8
- {flixopt-1.0.12/flixOpt → flixopt-2.0.1/flixopt}/config.yaml +3 -3
- flixopt-2.0.1/flixopt/core.py +970 -0
- flixopt-2.0.1/flixopt/effects.py +386 -0
- flixopt-2.0.1/flixopt/elements.py +534 -0
- flixopt-2.0.1/flixopt/features.py +1042 -0
- flixopt-2.0.1/flixopt/flow_system.py +409 -0
- flixopt-2.0.1/flixopt/interface.py +265 -0
- flixopt-2.0.1/flixopt/io.py +308 -0
- flixopt-2.0.1/flixopt/linear_converters.py +331 -0
- flixopt-2.0.1/flixopt/plotting.py +1340 -0
- flixopt-2.0.1/flixopt/results.py +898 -0
- flixopt-2.0.1/flixopt/solvers.py +77 -0
- flixopt-2.0.1/flixopt/structure.py +630 -0
- flixopt-2.0.1/flixopt/utils.py +62 -0
- flixopt-2.0.1/flixopt.egg-info/PKG-INFO +145 -0
- flixopt-2.0.1/flixopt.egg-info/SOURCES.txt +86 -0
- flixopt-2.0.1/flixopt.egg-info/requires.txt +37 -0
- flixopt-2.0.1/flixopt.egg-info/top_level.txt +7 -0
- flixopt-2.0.1/mkdocs.yml +136 -0
- flixopt-2.0.1/pics/architecture_flixOpt-pre2.0.0.png +0 -0
- flixopt-2.0.1/pics/architecture_flixOpt.png +0 -0
- flixopt-2.0.1/pics/flixopt-icon.svg +1 -0
- flixopt-2.0.1/pics/pics.pptx +0 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/pyproject.toml +23 -5
- flixopt-2.0.1/scripts/gen_ref_pages.py +54 -0
- flixopt-2.0.1/site/release-notes/_template.txt +32 -0
- flixopt-2.0.1/tests/conftest.py +410 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/tests/run_all_tests.py +1 -1
- flixopt-2.0.1/tests/test_dataconverter.py +113 -0
- flixopt-2.0.1/tests/test_functional.py +787 -0
- flixopt-2.0.1/tests/test_integration.py +425 -0
- flixopt-2.0.1/tests/test_io.py +65 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/tests/test_plots.py +1 -1
- flixopt-2.0.1/tests/test_results_plots.py +89 -0
- flixopt-2.0.1/tests/test_timeseries.py +605 -0
- flixopt-1.0.12/PKG-INFO +0 -174
- flixopt-1.0.12/README.md +0 -134
- flixopt-1.0.12/examples/00_Minmal/minimal_example.py +0 -67
- flixopt-1.0.12/examples/02_Complex/complex_example_results.py +0 -48
- flixopt-1.0.12/examples/03_Calculation_types/example_calculation_types.py +0 -249
- flixopt-1.0.12/flixOpt/calculation.py +0 -629
- flixopt-1.0.12/flixOpt/components.py +0 -614
- flixopt-1.0.12/flixOpt/core.py +0 -182
- flixopt-1.0.12/flixOpt/effects.py +0 -410
- flixopt-1.0.12/flixOpt/elements.py +0 -489
- flixopt-1.0.12/flixOpt/features.py +0 -942
- flixopt-1.0.12/flixOpt/flow_system.py +0 -351
- flixopt-1.0.12/flixOpt/interface.py +0 -203
- flixopt-1.0.12/flixOpt/linear_converters.py +0 -325
- flixopt-1.0.12/flixOpt/math_modeling.py +0 -1145
- flixopt-1.0.12/flixOpt/plotting.py +0 -712
- flixopt-1.0.12/flixOpt/results.py +0 -563
- flixopt-1.0.12/flixOpt/solvers.py +0 -21
- flixopt-1.0.12/flixOpt/structure.py +0 -733
- flixopt-1.0.12/flixOpt/utils.py +0 -134
- flixopt-1.0.12/flixopt.egg-info/PKG-INFO +0 -174
- flixopt-1.0.12/flixopt.egg-info/SOURCES.txt +0 -47
- flixopt-1.0.12/flixopt.egg-info/requires.txt +0 -19
- flixopt-1.0.12/flixopt.egg-info/top_level.txt +0 -4
- flixopt-1.0.12/pics/pics.pptx +0 -0
- flixopt-1.0.12/tests/test_functional.py +0 -918
- flixopt-1.0.12/tests/test_integration.py +0 -877
- {flixopt-1.0.12 → flixopt-2.0.1}/LICENSE +0 -0
- /flixopt-1.0.12/pics/architecture_flixOpt.png → /flixopt-2.0.1/docs/images/architecture_flixOpt-pre2.0.0.png +0 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/examples/03_Calculation_types/Zeitreihen2020.csv +0 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/flixopt.egg-info/dependency_links.txt +0 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/pics/flixOpt_plotting.jpg +0 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/setup.cfg +0 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/tests/__init__.py +0 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/tests/ressources/Zeitreihen2020.csv +0 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/tests/test_examples.py +0 -0
- {flixopt-1.0.12 → flixopt-2.0.1}/tests/todos.txt +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created] # Automatically deploy docs on release
|
|
6
|
+
workflow_dispatch: # Allow manual triggering
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
deploy-docs:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
with:
|
|
14
|
+
fetch-depth: 0 # Fetch all history for proper versioning
|
|
15
|
+
|
|
16
|
+
- name: Configure Git Credentials
|
|
17
|
+
run: |
|
|
18
|
+
git config user.name github-actions[bot]
|
|
19
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: 3.11
|
|
24
|
+
|
|
25
|
+
- name: Install documentation dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install -e ".[docs]"
|
|
29
|
+
|
|
30
|
+
- name: Deploy docs
|
|
31
|
+
run: |
|
|
32
|
+
VERSION=${GITHUB_REF#refs/tags/v}
|
|
33
|
+
mike deploy --push --update-aliases $VERSION latest
|
|
@@ -99,12 +99,12 @@ jobs:
|
|
|
99
99
|
(sleep 30 && pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ $PACKAGE_NAME) || \
|
|
100
100
|
(sleep 60 && pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ $PACKAGE_NAME)
|
|
101
101
|
# Basic import test
|
|
102
|
-
python -c "import
|
|
102
|
+
python -c "import flixopt; print('Installation successful!')"
|
|
103
103
|
|
|
104
104
|
publish-pypi:
|
|
105
105
|
name: Publish to PyPI
|
|
106
106
|
runs-on: ubuntu-22.04
|
|
107
|
-
needs: [
|
|
107
|
+
needs: [test] # Only run after TestPyPI publish succeeds
|
|
108
108
|
if: github.event_name == 'release' && github.event.action == 'created' # Only on release creation
|
|
109
109
|
|
|
110
110
|
steps:
|
|
@@ -144,4 +144,4 @@ jobs:
|
|
|
144
144
|
# Install from PyPI
|
|
145
145
|
pip install $PACKAGE_NAME
|
|
146
146
|
# Basic import test
|
|
147
|
-
python -c "import
|
|
147
|
+
python -c "import flixopt; print('PyPI installation successful!')"
|
flixopt-2.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flixopt
|
|
3
|
+
Version: 2.0.1
|
|
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: MIT License
|
|
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 :: 3 - Alpha
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Intended Audience :: Science/Research
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
|
20
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
21
|
+
Requires-Python: <3.13,>=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: numpy<2,>=1.21.5
|
|
25
|
+
Requires-Dist: PyYAML>=6.0
|
|
26
|
+
Requires-Dist: linopy>=0.5.1
|
|
27
|
+
Requires-Dist: netcdf4>=1.6.1
|
|
28
|
+
Requires-Dist: rich>=13.0.1
|
|
29
|
+
Requires-Dist: highspy>=1.5.3
|
|
30
|
+
Requires-Dist: pandas<3,>=2
|
|
31
|
+
Requires-Dist: matplotlib>=3.5.2
|
|
32
|
+
Requires-Dist: plotly>=5.15
|
|
33
|
+
Requires-Dist: tomli>=2.0.1
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest; extra == "dev"
|
|
36
|
+
Requires-Dist: ruff; extra == "dev"
|
|
37
|
+
Requires-Dist: pyvis==0.3.1; extra == "dev"
|
|
38
|
+
Requires-Dist: tsam>=2.3.1; extra == "dev"
|
|
39
|
+
Requires-Dist: scipy>=1.15.1; extra == "dev"
|
|
40
|
+
Requires-Dist: gurobipy>=10.0; extra == "dev"
|
|
41
|
+
Provides-Extra: full
|
|
42
|
+
Requires-Dist: pyvis==0.3.1; extra == "full"
|
|
43
|
+
Requires-Dist: tsam>=2.3.1; extra == "full"
|
|
44
|
+
Requires-Dist: scipy>=1.15.1; extra == "full"
|
|
45
|
+
Requires-Dist: streamlit>=1.44.0; extra == "full"
|
|
46
|
+
Requires-Dist: gurobipy>=10.0; extra == "full"
|
|
47
|
+
Provides-Extra: docs
|
|
48
|
+
Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
|
|
49
|
+
Requires-Dist: mkdocstrings-python; extra == "docs"
|
|
50
|
+
Requires-Dist: mkdocs-table-reader-plugin; extra == "docs"
|
|
51
|
+
Requires-Dist: mkdocs-gen-files; extra == "docs"
|
|
52
|
+
Requires-Dist: mkdocs-include-markdown-plugin; extra == "docs"
|
|
53
|
+
Requires-Dist: mkdocs-literate-nav; extra == "docs"
|
|
54
|
+
Requires-Dist: markdown-include; extra == "docs"
|
|
55
|
+
Requires-Dist: pymdown-extensions; extra == "docs"
|
|
56
|
+
Requires-Dist: pygments; extra == "docs"
|
|
57
|
+
Requires-Dist: mike; extra == "docs"
|
|
58
|
+
Dynamic: license-file
|
|
59
|
+
|
|
60
|
+
# FlixOpt: Energy and Material Flow Optimization Framework
|
|
61
|
+
|
|
62
|
+
[](https://flixopt.github.io/flixopt/latest/)
|
|
63
|
+
[](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml)
|
|
64
|
+
[](https://badge.fury.io/py/flixopt)
|
|
65
|
+
[](https://pypi.org/project/flixopt/)
|
|
66
|
+
[](https://opensource.org/licenses/MIT)
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 🚀 Purpose
|
|
71
|
+
|
|
72
|
+
**flixopt** is a Python-based optimization framework designed to tackle energy and material flow problems using mixed-integer linear programming (MILP).
|
|
73
|
+
|
|
74
|
+
**flixopt** bridges the gap between high-level energy systems models like [FINE](https://github.com/FZJ-IEK3-VSA/FINE) used for design and (multi-period) investment decisions and low-level dispatch optimization tools used for operation decisions.
|
|
75
|
+
|
|
76
|
+
**flixopt** leverages the fast and efficient [linopy](https://github.com/PyPSA/linopy/) for the mathematical modeling and [xarray](https://github.com/pydata/xarray) for data handling.
|
|
77
|
+
|
|
78
|
+
**flixopt** provides a user-friendly interface with options for advanced users.
|
|
79
|
+
|
|
80
|
+
It was originally developed by [TU Dresden](https://github.com/gewv-tu-dresden) as part of the SMARTBIOGRID project, funded by the German Federal Ministry for Economic Affairs and Energy (FKZ: 03KB159B). Building on the Matlab-based flixOptMat framework (developed in the FAKS project), FlixOpt also incorporates concepts from [oemof/solph](https://github.com/oemof/oemof-solph).
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 🌟 Key Features
|
|
85
|
+
|
|
86
|
+
- **High-level Interface** with low-level control
|
|
87
|
+
- User-friendly interface for defining flow systems
|
|
88
|
+
- Pre-defined components like CHP, Heat Pump, Cooling Tower, etc.
|
|
89
|
+
- Fine-grained control for advanced configurations
|
|
90
|
+
|
|
91
|
+
- **Investment Optimization**
|
|
92
|
+
- Combined dispatch and investment optimization
|
|
93
|
+
- Size optimization and discrete investment decisions
|
|
94
|
+
- Combined with On/Off variables and constraints
|
|
95
|
+
|
|
96
|
+
- **Effects, not only Costs --> Multi-criteria Optimization**
|
|
97
|
+
- flixopt abstracts costs as so called 'Effects'. This allows to model costs, CO2-emissions, primary-energy-demand or area-demand at the same time.
|
|
98
|
+
- Effects can interact with each other(e.g., specific CO2 costs)
|
|
99
|
+
- Any of these `Effects` can be used as the optimization objective.
|
|
100
|
+
- A **Weigted Sum** of Effects can be used as the optimization objective.
|
|
101
|
+
- Every Effect can be constrained ($\epsilon$-constraint method).
|
|
102
|
+
|
|
103
|
+
- **Calculation Modes**
|
|
104
|
+
- **Full** - Solve the model with highest accuracy and computational requirements.
|
|
105
|
+
- **Segmented** - Speed up solving by using a rolling horizon.
|
|
106
|
+
- **Aggregated** - Speed up solving by identifying typical periods using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam). Suitable for large models.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 📦 Installation
|
|
111
|
+
|
|
112
|
+
Install FlixOpt via pip.
|
|
113
|
+
`pip install flixopt`
|
|
114
|
+
With [HiGHS](https://github.com/ERGO-Code/HiGHS?tab=readme-ov-file) included out of the box, flixopt is ready to use..
|
|
115
|
+
|
|
116
|
+
We recommend installing FlixOpt with all dependencies, which enables additional features like interactive network visualizations ([pyvis](https://github.com/WestHealth/pyvis)) and time series aggregation ([tsam](https://github.com/FZJ-IEK3-VSA/tsam)).
|
|
117
|
+
`pip install "flixopt[full]"`
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 📚 Documentation
|
|
122
|
+
|
|
123
|
+
The documentation is available at [https://flixopt.github.io/flixopt/latest/](https://flixopt.github.io/flixopt/latest/)
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🛠️ Solver Integration
|
|
128
|
+
|
|
129
|
+
By default, FlixOpt uses the open-source solver [HiGHS](https://highs.dev/) which is installed by default. However, it is compatible with additional solvers such as:
|
|
130
|
+
|
|
131
|
+
- [Gurobi](https://www.gurobi.com/)
|
|
132
|
+
- [CBC](https://github.com/coin-or/Cbc)
|
|
133
|
+
- [GLPK](https://www.gnu.org/software/glpk/)
|
|
134
|
+
- [CPLEX](https://www.ibm.com/analytics/cplex-optimizer)
|
|
135
|
+
|
|
136
|
+
For detailed licensing and installation instructions, refer to the respective solver documentation.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 📖 Citation
|
|
141
|
+
|
|
142
|
+
If you use FlixOpt in your research or project, please cite the following:
|
|
143
|
+
|
|
144
|
+
- **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
|
|
145
|
+
- **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
|
flixopt-2.0.1/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
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://badge.fury.io/py/flixopt)
|
|
6
|
+
[](https://pypi.org/project/flixopt/)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🚀 Purpose
|
|
12
|
+
|
|
13
|
+
**flixopt** is a Python-based optimization framework designed to tackle energy and material flow problems using mixed-integer linear programming (MILP).
|
|
14
|
+
|
|
15
|
+
**flixopt** bridges the gap between high-level energy systems models like [FINE](https://github.com/FZJ-IEK3-VSA/FINE) used for design and (multi-period) investment decisions and low-level dispatch optimization tools used for operation decisions.
|
|
16
|
+
|
|
17
|
+
**flixopt** leverages the fast and efficient [linopy](https://github.com/PyPSA/linopy/) for the mathematical modeling and [xarray](https://github.com/pydata/xarray) for data handling.
|
|
18
|
+
|
|
19
|
+
**flixopt** provides a user-friendly interface with options for advanced users.
|
|
20
|
+
|
|
21
|
+
It was originally developed by [TU Dresden](https://github.com/gewv-tu-dresden) as part of the SMARTBIOGRID project, funded by the German Federal Ministry for Economic Affairs and Energy (FKZ: 03KB159B). Building on the Matlab-based flixOptMat framework (developed in the FAKS project), FlixOpt also incorporates concepts from [oemof/solph](https://github.com/oemof/oemof-solph).
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 🌟 Key Features
|
|
26
|
+
|
|
27
|
+
- **High-level Interface** with low-level control
|
|
28
|
+
- User-friendly interface for defining flow systems
|
|
29
|
+
- Pre-defined components like CHP, Heat Pump, Cooling Tower, etc.
|
|
30
|
+
- Fine-grained control for advanced configurations
|
|
31
|
+
|
|
32
|
+
- **Investment Optimization**
|
|
33
|
+
- Combined dispatch and investment optimization
|
|
34
|
+
- Size optimization and discrete investment decisions
|
|
35
|
+
- Combined with On/Off variables and constraints
|
|
36
|
+
|
|
37
|
+
- **Effects, not only Costs --> Multi-criteria Optimization**
|
|
38
|
+
- flixopt abstracts costs as so called 'Effects'. This allows to model costs, CO2-emissions, primary-energy-demand or area-demand at the same time.
|
|
39
|
+
- Effects can interact with each other(e.g., specific CO2 costs)
|
|
40
|
+
- Any of these `Effects` can be used as the optimization objective.
|
|
41
|
+
- A **Weigted Sum** of Effects can be used as the optimization objective.
|
|
42
|
+
- Every Effect can be constrained ($\epsilon$-constraint method).
|
|
43
|
+
|
|
44
|
+
- **Calculation Modes**
|
|
45
|
+
- **Full** - Solve the model with highest accuracy and computational requirements.
|
|
46
|
+
- **Segmented** - Speed up solving by using a rolling horizon.
|
|
47
|
+
- **Aggregated** - Speed up solving by identifying typical periods using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam). Suitable for large models.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 📦 Installation
|
|
52
|
+
|
|
53
|
+
Install FlixOpt via pip.
|
|
54
|
+
`pip install flixopt`
|
|
55
|
+
With [HiGHS](https://github.com/ERGO-Code/HiGHS?tab=readme-ov-file) included out of the box, flixopt is ready to use..
|
|
56
|
+
|
|
57
|
+
We recommend installing FlixOpt with all dependencies, which enables additional features like interactive network visualizations ([pyvis](https://github.com/WestHealth/pyvis)) and time series aggregation ([tsam](https://github.com/FZJ-IEK3-VSA/tsam)).
|
|
58
|
+
`pip install "flixopt[full]"`
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 📚 Documentation
|
|
63
|
+
|
|
64
|
+
The documentation is available at [https://flixopt.github.io/flixopt/latest/](https://flixopt.github.io/flixopt/latest/)
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 🛠️ Solver Integration
|
|
69
|
+
|
|
70
|
+
By default, FlixOpt uses the open-source solver [HiGHS](https://highs.dev/) which is installed by default. However, it is compatible with additional solvers such as:
|
|
71
|
+
|
|
72
|
+
- [Gurobi](https://www.gurobi.com/)
|
|
73
|
+
- [CBC](https://github.com/coin-or/Cbc)
|
|
74
|
+
- [GLPK](https://www.gnu.org/software/glpk/)
|
|
75
|
+
- [CPLEX](https://www.ibm.com/analytics/cplex-optimizer)
|
|
76
|
+
|
|
77
|
+
For detailed licensing and installation instructions, refer to the respective solver documentation.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 📖 Citation
|
|
82
|
+
|
|
83
|
+
If you use FlixOpt in your research or project, please cite the following:
|
|
84
|
+
|
|
85
|
+
- **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
|
|
86
|
+
- **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Contributing to the Project
|
|
2
|
+
|
|
3
|
+
We warmly welcome contributions from the community! This guide will help you get started with contributing to our project.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
1. Clone the repository `git clone https://github.com/flixOpt/flixopt.git`
|
|
7
|
+
2. Install the development dependencies `pip install -editable .[dev, docs]`
|
|
8
|
+
3. Run `pytest` and `ruff check .` to ensure your code passes all tests
|
|
9
|
+
|
|
10
|
+
## Documentation
|
|
11
|
+
FlixOpt uses [mkdocs](https://www.mkdocs.org/) to generate documentation. To preview the documentation locally, run `mkdocs serve` in the root directory.
|
|
12
|
+
|
|
13
|
+
## Helpful Commands
|
|
14
|
+
- `mkdocs serve` to preview the documentation locally. Navigate to `http://127.0.0.1:8000/` to view the documentation.
|
|
15
|
+
- `pytest` to run the test suite (You can also run the provided python script `run_all_test.py`)
|
|
16
|
+
- `ruff check .` to run the linter
|
|
17
|
+
- `ruff check . --fix` to automatically fix linting issues
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
# Best practices
|
|
21
|
+
|
|
22
|
+
## Coding Guidelines
|
|
23
|
+
|
|
24
|
+
- Follow PEP 8 style guidelines
|
|
25
|
+
- Write clear, commented code
|
|
26
|
+
- Include type hints
|
|
27
|
+
- Create or update tests for new functionality
|
|
28
|
+
- Ensure 100% test coverage for new code
|
|
29
|
+
|
|
30
|
+
## Branches
|
|
31
|
+
As we start to think FlixOpt in **Releases**, we decided to introduce multiple **dev**-branches instead of only one:
|
|
32
|
+
Following the **Semantic Versioning** guidelines, we introduced:
|
|
33
|
+
- `next/patch`: This is where all pull requests for the next patch release (1.0.x) go.
|
|
34
|
+
- `next/minor`: This is where all pull requests for the next minor release (1.x.0) go.
|
|
35
|
+
- `next/major`: This is where all pull requests for the next major release (x.0.0) go.
|
|
36
|
+
|
|
37
|
+
Everything else remains in `feature/...`-branches.
|
|
38
|
+
|
|
39
|
+
## Pull requests
|
|
40
|
+
Every feature or bugfix should be merged into one of the 3 [release branches](#branches), using **Squash and merge** or a regular **single commit**.
|
|
41
|
+
At some point, `next/minor` or `next/major` will get merged into `main` using a regular **Merge** (not squash).
|
|
42
|
+
*This ensures that Features are kept separate, and the `next/...`branches stay in synch with ``main`.*
|
|
43
|
+
|
|
44
|
+
## Releases
|
|
45
|
+
As stated, we follow **Semantic Versioning**.
|
|
46
|
+
Right after one of the 3 [release branches](#branches) is merged into main, a **Tag** should be added to the merge commit and pushed to the main branch. The tag has the form `v1.2.3`.
|
|
47
|
+
With this tag, a release with **Release Notes** must be created.
|
|
48
|
+
|
|
49
|
+
*This is our current best practice*
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Complex example
|
|
2
|
+
This saves the results of a calculation to file and reloads them to analyze the results
|
|
3
|
+
## Build the Model
|
|
4
|
+
```python
|
|
5
|
+
{! ../examples/02_Complex/complex_example.py !}
|
|
6
|
+
```
|
|
7
|
+
## Load the Results from file
|
|
8
|
+
```python
|
|
9
|
+
{! ../examples/02_Complex/complex_example_results.py !}
|
|
10
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Contributing to the Project
|
|
2
|
+
|
|
3
|
+
We warmly welcome contributions from the community! This guide will help you get started with contributing to our project.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
1. Clone the repository `git clone https://github.com/flixOpt/flixopt.git`
|
|
7
|
+
2. Install the development dependencies `pip install -editable .[dev, docs]`
|
|
8
|
+
3. Run `pytest` and `ruff check .` to ensure your code passes all tests
|
|
9
|
+
|
|
10
|
+
## Documentation
|
|
11
|
+
FlixOpt uses [mkdocs](https://www.mkdocs.org/) to generate documentation. To preview the documentation locally, run `mkdocs serve` in the root directory.
|
|
12
|
+
|
|
13
|
+
## Helpful Commands
|
|
14
|
+
- `mkdocs serve` to preview the documentation locally. Navigate to `http://127.0.0.1:8000/` to view the documentation.
|
|
15
|
+
- `pytest` to run the test suite (You can also run the provided python script `run_all_test.py`)
|
|
16
|
+
- `ruff check .` to run the linter
|
|
17
|
+
- `ruff check . --fix` to automatically fix linting issues
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
# Best practices
|
|
21
|
+
|
|
22
|
+
## Coding Guidelines
|
|
23
|
+
|
|
24
|
+
- Follow PEP 8 style guidelines
|
|
25
|
+
- Write clear, commented code
|
|
26
|
+
- Include type hints
|
|
27
|
+
- Create or update tests for new functionality
|
|
28
|
+
- Ensure 100% test coverage for new code
|
|
29
|
+
|
|
30
|
+
## Branches
|
|
31
|
+
As we start to think FlixOpt in **Releases**, we decided to introduce multiple **dev**-branches instead of only one:
|
|
32
|
+
Following the **Semantic Versioning** guidelines, we introduced:
|
|
33
|
+
- `next/patch`: This is where all pull requests for the next patch release (1.0.x) go.
|
|
34
|
+
- `next/minor`: This is where all pull requests for the next minor release (1.x.0) go.
|
|
35
|
+
- `next/major`: This is where all pull requests for the next major release (x.0.0) go.
|
|
36
|
+
|
|
37
|
+
Everything else remains in `feature/...`-branches.
|
|
38
|
+
|
|
39
|
+
## Pull requests
|
|
40
|
+
Every feature or bugfix should be merged into one of the 3 [release branches](#branches), using **Squash and merge** or a regular **single commit**.
|
|
41
|
+
At some point, `next/minor` or `next/major` will get merged into `main` using a regular **Merge** (not squash).
|
|
42
|
+
*This ensures that Features are kept separate, and the `next/...`branches stay in synch with ``main`.*
|
|
43
|
+
|
|
44
|
+
## Releases
|
|
45
|
+
As stated, we follow **Semantic Versioning**.
|
|
46
|
+
Right after one of the 3 [release branches](#branches) is merged into main, a **Tag** should be added to the merge commit and pushed to the main branch. The tag has the form `v1.2.3`.
|
|
47
|
+
With this tag, a release with **Release Notes** must be created.
|
|
48
|
+
|
|
49
|
+
*This is our current best practice*
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Getting Started with FlixOpt
|
|
2
|
+
|
|
3
|
+
This guide will help you install FlixOpt, understand its basic concepts, and run your first optimization model.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Basic Installation
|
|
8
|
+
|
|
9
|
+
Install FlixOpt directly into your environment using pip:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install flixopt
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This provides the core functionality with the HiGHS solver included.
|
|
16
|
+
|
|
17
|
+
### Full Installation
|
|
18
|
+
|
|
19
|
+
For all features including interactive network visualizations and time series aggregation:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install "flixopt[full]""
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Basic Workflow
|
|
26
|
+
|
|
27
|
+
Working with FlixOpt follows a general pattern:
|
|
28
|
+
|
|
29
|
+
1. **Create a [`FlowSystem`][flixopt.flow_system.FlowSystem]** with a time series
|
|
30
|
+
2. **Define [`Effects`][flixopt.effects.Effect]** (costs, emissions, etc.)
|
|
31
|
+
3. **Define [`Buses`][flixopt.elements.Bus]** as connection points in your system
|
|
32
|
+
4. **Add [`Components`][flixopt.components]** like converters, storage, sources/sinks with their Flows
|
|
33
|
+
5. **Run [`Calculations`][flixopt.calculation]** to optimize your system
|
|
34
|
+
6. **Analyze [`Results`][flixopt.results]** using built-in or external visualization tools
|
|
35
|
+
|
|
36
|
+
## Next Steps
|
|
37
|
+
|
|
38
|
+
Now that you've installed FlixOpt and understand the basic workflow, you can:
|
|
39
|
+
|
|
40
|
+
- Learn about the [core concepts of FlixOpt](user-guide/index.md)
|
|
41
|
+
- Explore some [examples](examples/)
|
|
42
|
+
- Check the [API reference](api-reference/index.md) for detailed documentation
|
|
Binary file
|