flixopt 1.0.12__tar.gz → 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of flixopt might be problematic. Click here for more details.

Files changed (114) hide show
  1. flixopt-2.0.0/.github/workflows/deploy-docs.yaml +33 -0
  2. {flixopt-1.0.12 → flixopt-2.0.0}/.github/workflows/python-app.yaml +3 -3
  3. {flixopt-1.0.12 → flixopt-2.0.0}/.gitignore +1 -0
  4. flixopt-2.0.0/PKG-INFO +145 -0
  5. flixopt-2.0.0/README.md +86 -0
  6. flixopt-2.0.0/docs/SUMMARY.md +7 -0
  7. flixopt-2.0.0/docs/contribute.md +49 -0
  8. flixopt-2.0.0/docs/examples/00-Minimal Example.md +5 -0
  9. flixopt-2.0.0/docs/examples/01-Basic Example.md +5 -0
  10. flixopt-2.0.0/docs/examples/02-Complex Example.md +10 -0
  11. flixopt-2.0.0/docs/examples/03-Calculation Modes.md +5 -0
  12. flixopt-2.0.0/docs/examples/index.md +5 -0
  13. flixopt-2.0.0/docs/faq/contribute.md +49 -0
  14. flixopt-2.0.0/docs/faq/index.md +3 -0
  15. flixopt-2.0.0/docs/getting-started.md +42 -0
  16. flixopt-2.0.0/docs/images/architecture_flixOpt.png +0 -0
  17. flixopt-2.0.0/docs/images/flixopt-icon.svg +1 -0
  18. flixopt-2.0.0/docs/index.md +47 -0
  19. flixopt-2.0.0/docs/javascripts/mathjax.js +18 -0
  20. flixopt-2.0.0/docs/release-notes/_template.txt +32 -0
  21. flixopt-2.0.0/docs/release-notes/index.md +7 -0
  22. flixopt-2.0.0/docs/release-notes/v2.0.0.md +93 -0
  23. flixopt-2.0.0/docs/user-guide/Mathematical Notation/Bus.md +33 -0
  24. flixopt-2.0.0/docs/user-guide/Mathematical Notation/Effects, Penalty & Objective.md +132 -0
  25. flixopt-2.0.0/docs/user-guide/Mathematical Notation/Flow.md +26 -0
  26. flixopt-2.0.0/docs/user-guide/Mathematical Notation/LinearConverter.md +21 -0
  27. flixopt-2.0.0/docs/user-guide/Mathematical Notation/Piecewise.md +49 -0
  28. flixopt-2.0.0/docs/user-guide/Mathematical Notation/Storage.md +44 -0
  29. flixopt-2.0.0/docs/user-guide/Mathematical Notation/index.md +22 -0
  30. flixopt-2.0.0/docs/user-guide/Mathematical Notation/others.md +3 -0
  31. flixopt-2.0.0/docs/user-guide/index.md +124 -0
  32. flixopt-2.0.0/examples/00_Minmal/minimal_example.py +71 -0
  33. {flixopt-1.0.12 → flixopt-2.0.0}/examples/01_Simple/simple_example.py +31 -31
  34. {flixopt-1.0.12 → flixopt-2.0.0}/examples/02_Complex/complex_example.py +60 -63
  35. flixopt-2.0.0/examples/02_Complex/complex_example_results.py +33 -0
  36. flixopt-2.0.0/examples/03_Calculation_types/example_calculation_types.py +227 -0
  37. {flixopt-1.0.12/flixOpt → flixopt-2.0.0/flixopt}/__init__.py +5 -2
  38. {flixopt-1.0.12/flixOpt → flixopt-2.0.0/flixopt}/aggregation.py +113 -140
  39. flixopt-2.0.0/flixopt/calculation.py +455 -0
  40. {flixopt-1.0.12/flixOpt → flixopt-2.0.0/flixopt}/commons.py +7 -4
  41. flixopt-2.0.0/flixopt/components.py +630 -0
  42. {flixopt-1.0.12/flixOpt → flixopt-2.0.0/flixopt}/config.py +9 -8
  43. {flixopt-1.0.12/flixOpt → flixopt-2.0.0/flixopt}/config.yaml +3 -3
  44. flixopt-2.0.0/flixopt/core.py +914 -0
  45. flixopt-2.0.0/flixopt/effects.py +386 -0
  46. flixopt-2.0.0/flixopt/elements.py +529 -0
  47. flixopt-2.0.0/flixopt/features.py +1042 -0
  48. flixopt-2.0.0/flixopt/flow_system.py +409 -0
  49. flixopt-2.0.0/flixopt/interface.py +265 -0
  50. flixopt-2.0.0/flixopt/io.py +308 -0
  51. flixopt-2.0.0/flixopt/linear_converters.py +331 -0
  52. flixopt-2.0.0/flixopt/plotting.py +1337 -0
  53. flixopt-2.0.0/flixopt/results.py +898 -0
  54. flixopt-2.0.0/flixopt/solvers.py +77 -0
  55. flixopt-2.0.0/flixopt/structure.py +630 -0
  56. flixopt-2.0.0/flixopt/utils.py +62 -0
  57. flixopt-2.0.0/flixopt.egg-info/PKG-INFO +145 -0
  58. flixopt-2.0.0/flixopt.egg-info/SOURCES.txt +85 -0
  59. flixopt-2.0.0/flixopt.egg-info/requires.txt +37 -0
  60. flixopt-2.0.0/flixopt.egg-info/top_level.txt +7 -0
  61. flixopt-2.0.0/mkdocs.yml +136 -0
  62. flixopt-2.0.0/pics/architecture_flixOpt-pre2.0.0.png +0 -0
  63. flixopt-2.0.0/pics/architecture_flixOpt.png +0 -0
  64. flixopt-2.0.0/pics/flixopt-icon.svg +1 -0
  65. flixopt-2.0.0/pics/pics.pptx +0 -0
  66. {flixopt-1.0.12 → flixopt-2.0.0}/pyproject.toml +23 -5
  67. flixopt-2.0.0/scripts/gen_ref_pages.py +54 -0
  68. flixopt-2.0.0/site/release-notes/_template.txt +32 -0
  69. flixopt-2.0.0/tests/conftest.py +410 -0
  70. {flixopt-1.0.12 → flixopt-2.0.0}/tests/run_all_tests.py +1 -1
  71. flixopt-2.0.0/tests/test_dataconverter.py +113 -0
  72. flixopt-2.0.0/tests/test_functional.py +787 -0
  73. flixopt-2.0.0/tests/test_integration.py +425 -0
  74. flixopt-2.0.0/tests/test_io.py +65 -0
  75. {flixopt-1.0.12 → flixopt-2.0.0}/tests/test_plots.py +1 -1
  76. flixopt-2.0.0/tests/test_results_plots.py +89 -0
  77. flixopt-2.0.0/tests/test_timeseries.py +605 -0
  78. flixopt-1.0.12/PKG-INFO +0 -174
  79. flixopt-1.0.12/README.md +0 -134
  80. flixopt-1.0.12/examples/00_Minmal/minimal_example.py +0 -67
  81. flixopt-1.0.12/examples/02_Complex/complex_example_results.py +0 -48
  82. flixopt-1.0.12/examples/03_Calculation_types/example_calculation_types.py +0 -249
  83. flixopt-1.0.12/flixOpt/calculation.py +0 -629
  84. flixopt-1.0.12/flixOpt/components.py +0 -614
  85. flixopt-1.0.12/flixOpt/core.py +0 -182
  86. flixopt-1.0.12/flixOpt/effects.py +0 -410
  87. flixopt-1.0.12/flixOpt/elements.py +0 -489
  88. flixopt-1.0.12/flixOpt/features.py +0 -942
  89. flixopt-1.0.12/flixOpt/flow_system.py +0 -351
  90. flixopt-1.0.12/flixOpt/interface.py +0 -203
  91. flixopt-1.0.12/flixOpt/linear_converters.py +0 -325
  92. flixopt-1.0.12/flixOpt/math_modeling.py +0 -1145
  93. flixopt-1.0.12/flixOpt/plotting.py +0 -712
  94. flixopt-1.0.12/flixOpt/results.py +0 -563
  95. flixopt-1.0.12/flixOpt/solvers.py +0 -21
  96. flixopt-1.0.12/flixOpt/structure.py +0 -733
  97. flixopt-1.0.12/flixOpt/utils.py +0 -134
  98. flixopt-1.0.12/flixopt.egg-info/PKG-INFO +0 -174
  99. flixopt-1.0.12/flixopt.egg-info/SOURCES.txt +0 -47
  100. flixopt-1.0.12/flixopt.egg-info/requires.txt +0 -19
  101. flixopt-1.0.12/flixopt.egg-info/top_level.txt +0 -4
  102. flixopt-1.0.12/pics/pics.pptx +0 -0
  103. flixopt-1.0.12/tests/test_functional.py +0 -918
  104. flixopt-1.0.12/tests/test_integration.py +0 -877
  105. {flixopt-1.0.12 → flixopt-2.0.0}/LICENSE +0 -0
  106. /flixopt-1.0.12/pics/architecture_flixOpt.png → /flixopt-2.0.0/docs/images/architecture_flixOpt-pre2.0.0.png +0 -0
  107. {flixopt-1.0.12 → flixopt-2.0.0}/examples/03_Calculation_types/Zeitreihen2020.csv +0 -0
  108. {flixopt-1.0.12 → flixopt-2.0.0}/flixopt.egg-info/dependency_links.txt +0 -0
  109. {flixopt-1.0.12 → flixopt-2.0.0}/pics/flixOpt_plotting.jpg +0 -0
  110. {flixopt-1.0.12 → flixopt-2.0.0}/setup.cfg +0 -0
  111. {flixopt-1.0.12 → flixopt-2.0.0}/tests/__init__.py +0 -0
  112. {flixopt-1.0.12 → flixopt-2.0.0}/tests/ressources/Zeitreihen2020.csv +0 -0
  113. {flixopt-1.0.12 → flixopt-2.0.0}/tests/test_examples.py +0 -0
  114. {flixopt-1.0.12 → flixopt-2.0.0}/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 flixOpt; print('Installation successful!')"
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: [publish-testpypi] # Only run after TestPyPI publish succeeds
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 flixOpt; print('PyPI installation successful!')"
147
+ python -c "import flixopt; print('PyPI installation successful!')"
@@ -1,4 +1,5 @@
1
1
  *.pyc
2
+ *.log
2
3
  results/
3
4
  .idea/
4
5
  .venv/
flixopt-2.0.0/PKG-INFO ADDED
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.4
2
+ Name: flixopt
3
+ Version: 2.0.0
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
+ [![📚 Documentation](https://img.shields.io/badge/📚_docs-online-brightgreen.svg)](https://flixopt.github.io/flixopt/latest/)
63
+ [![CI](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml/badge.svg)](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml)
64
+ [![PyPI version](https://badge.fury.io/py/flixopt.svg)](https://badge.fury.io/py/flixopt)
65
+ [![Python Versions](https://img.shields.io/pypi/pyversions/flixopt.svg)](https://pypi.org/project/flixopt/)
66
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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/](https://flixopt.github.io/flixopt/)
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)
@@ -0,0 +1,86 @@
1
+ # FlixOpt: Energy and Material Flow Optimization Framework
2
+
3
+ [![📚 Documentation](https://img.shields.io/badge/📚_docs-online-brightgreen.svg)](https://flixopt.github.io/flixopt/latest/)
4
+ [![CI](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml/badge.svg)](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml)
5
+ [![PyPI version](https://badge.fury.io/py/flixopt.svg)](https://badge.fury.io/py/flixopt)
6
+ [![Python Versions](https://img.shields.io/pypi/pyversions/flixopt.svg)](https://pypi.org/project/flixopt/)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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/](https://flixopt.github.io/flixopt/)
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,7 @@
1
+ - [Home](index.md)
2
+ - [Getting Started](getting-started.md)
3
+ - [User Guide](user-guide/)
4
+ - [Examples](examples/)
5
+ - [FAQ](faq/)
6
+ - [API-Reference](api-reference/)
7
+ - [Release Notes](release-notes/)
@@ -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,5 @@
1
+ # Minimal Example
2
+
3
+ ```python
4
+ {! ../examples/00_Minmal/minimal_example.py !}
5
+ ```
@@ -0,0 +1,5 @@
1
+ # Simple example
2
+
3
+ ```python
4
+ {! ../examples/01_Simple/simple_example.py !}
5
+ ```
@@ -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,5 @@
1
+ # Calculation Mode comparison
2
+ **Note:** This example relies on time series data. You can find it in the `examples` folder of the FlixOpt repository.
3
+ ```python
4
+ {! ../examples/03_Calculation_types/example_calculation_types.py !}
5
+ ```
@@ -0,0 +1,5 @@
1
+ # Examples
2
+
3
+ Here you can find a collection of examples that demonstrate how to use FlixOpt.
4
+
5
+ We work on improving this gallery. If you have something to share, please contact us!
@@ -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,3 @@
1
+ # Frequently Asked Questions
2
+
3
+ ## Work in progress
@@ -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