Skip to content

Commit e7f2053

Browse files
authored
Merge pull request #202 from flixOpt/next/major
Major Release: v2.0.0
2 parents 6eba050 + 796f7ad commit e7f2053

84 files changed

Lines changed: 11578 additions & 9715 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/python-app.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
(sleep 30 && pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ $PACKAGE_NAME) || \
100100
(sleep 60 && pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ $PACKAGE_NAME)
101101
# Basic import test
102-
python -c "import flixOpt; print('Installation successful!')"
102+
python -c "import flixopt; print('Installation successful!')"
103103
104104
publish-pypi:
105105
name: Publish to PyPI
@@ -144,4 +144,4 @@ jobs:
144144
# Install from PyPI
145145
pip install $PACKAGE_NAME
146146
# Basic import test
147-
python -c "import flixOpt; print('PyPI installation successful!')"
147+
python -c "import flixopt; print('PyPI installation successful!')"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.pyc
2+
*.log
23
results/
34
.idea/
45
.venv/

README.md

Lines changed: 40 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,86 @@
1-
# flixOpt: Energy and Material Flow Optimization Framework
1+
# FlixOpt: Energy and Material Flow Optimization Framework
22

33
[![📚 Documentation](https://img.shields.io/badge/📚_docs-online-brightgreen.svg)](https://flixopt.github.io/flixopt/)
44
[![CI](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml/badge.svg)](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml)
55
[![PyPI version](https://badge.fury.io/py/flixopt.svg)](https://badge.fury.io/py/flixopt)
66
[![Python Versions](https://img.shields.io/pypi/pyversions/flixopt.svg)](https://pypi.org/project/flixopt/)
77
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
88

9-
**flixOpt** is a Python-based optimization framework designed to tackle energy and material flow problems using mixed-integer linear programming (MILP). Combining flexibility and efficiency, it provides a powerful platform for both dispatch and investment optimization challenges.
10-
119
---
1210

13-
## 🚀 Introduction
11+
## 🚀 Purpose
1412

15-
flixOpt was 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).
13+
**flixopt** is a Python-based optimization framework designed to tackle energy and material flow problems using mixed-integer linear programming (MILP).
1614

17-
Although flixOpt is in its early stages, it is fully functional and ready for experimentation. It is used for investment and operation decisions by energy providing companys as well as research institutions. Feedback and collaboration are highly encouraged to help shape its future.
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.
1816

19-
---
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.
2018

21-
## 📦 Installation
19+
**flixopt** provides a user-friendly interface with options for advanced users.
2220

23-
Install flixOpt directly into your environment using pip. Thanks to [HiGHS](https://github.com/ERGO-Code/HiGHS?tab=readme-ov-file), flixOpt can be used without further setup.
24-
`pip install flixopt`
25-
26-
We recommend installing flixOpt with all dependencies, which enables interactive network visualizations by [pyvis](https://github.com/WestHealth/pyvis) and time series aggregation by [tsam](https://github.com/FZJ-IEK3-VSA/tsam).
27-
`pip install "flixopt[full]"`
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).
2822

2923
---
3024

31-
## 📚 Documentation
25+
## 🌟 Key Features
3226

33-
Full documentation is available at [https://flixopt.github.io/flixopt/](https://flixopt.github.io/flixopt/)
34-
35-
## 🌟 Key Features and Concepts
36-
37-
### 💡 High-level Interface...
38-
- flixOpt aims to provide a user-friendly interface for defining and solving energy systems, without sacrificing fine-grained control where necessary.
39-
- This is achieved through a high-level interface with many optional or default parameters.
40-
- The most important concepts are:
41-
- **FlowSystem**: Represents the System that is modeled.
42-
- **Flow**: A Flow represents a stream of matter or energy. In an Energy-System, it could be electricity [kW]
43-
- **Bus**: A Bus represents a balancing node in the Energy-System, typically connecting a demand to a supply.
44-
- **Component**: A Component is a physical entity that consumes or produces matter or energy. It can also transform matter or energy into other kinds of matter or energy.
45-
- **Effect**: Flows and Components can have Effects, related to their usage (or size). Common effects are *costs*, *CO2-emissions*, *primary-energy-demand* or *area-demand*. One Effect is used as the optimization target. The others can be constrained.
46-
- To simplify the modeling process, high-level **Components** (CHP, Boiler, Heat Pump, Cooling Tower, Storage, etc.) are availlable.
47-
48-
### 🎛️ ...with low-level control
49-
- **Segmented Linear Correlations**
50-
- Accurate modeling for efficiencies, investment effects, and sizes.
51-
- **On/Off Variables**
52-
- Modeling On/Off-Variables and their constraints.
53-
- On-Hours/Off-Hours
54-
- Consecutive On-Hours/ Off-Hours
55-
- Switch On/Off
56-
57-
### 💰 Investment Optimization
58-
- flixOpt combines dispatch optimization with investment optimization in one model.
59-
- Size and/or discrete investment decisions can be modeled
60-
- Investment decisions can be combined with Modeling On/Off-Variables and their constraints
61-
62-
### Further Features
63-
- **Multiple Effects**
64-
- Couple effects (e.g., specific CO2 costs) and set constraints (e.g., max CO2 emissions).
65-
- Easily switch between optimization targets (e.g., minimize CO2 or costs).
66-
- This allows to solve questions like "How much does it cost to reduce CO2 emissions by 20%?"
67-
68-
- **Advanced Time Handling**
69-
- Non-equidistant timesteps supported.
70-
- Energy prices or effects in general can always be defined per hour (or per MWh...)
71-
72-
- A variety of predefined constraints for operational and investment optimization can be applied.
73-
- Many of these are optional and only applied when necessary, keeping the amount o variables and equations low.
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
7431

75-
---
76-
77-
## 🖥️ Usage Example
78-
![Usage Example](https://github.com/user-attachments/assets/fa0e12fa-2853-4f51-a9e2-804abbefe20c)
79-
80-
**Plotting examples**:
81-
![flixOpt plotting](/pics/flixOpt_plotting.jpg)
32+
- **Investment Optimization**
33+
- Combined dispatch and investment optimization
34+
- Size optimization and discrete investment decisions
35+
- Combined with On/Off variables and constraints
8236

83-
## ⚙️ Calculation Modes
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).
8443

85-
flixOpt offers three calculation modes, tailored to different performance and accuracy needs:
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.
8648

87-
- **Full Mode**
88-
- Provides exact solutions with high computational requirements.
89-
- Recommended for detailed analyses and investment decision problems.
90-
91-
- **Segmented Mode**
92-
- Solving a Model segmentwise, this mode can speed up the solving process for complex systems, while being fairly accurate.
93-
- Utilizes variable time overlap to improve accuracy.
94-
- Not suitable for large storage systems or investment decisions.
49+
---
9550

96-
- **Aggregated Mode**
97-
- Automatically generates typical periods using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam).
98-
- Balances speed and accuracy, making it ideal for large-scale simulations.
51+
## 📦 Installation
9952

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..
10056

101-
## 🏗️ Architecture
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]"`
10259

103-
- **Minimal coupling to Pyomo**
104-
- Included independent module is used to organize variables and equations, independently of a specific modeling language.
105-
- While currently only working with [Pyomo](http://www.pyomo.org/), flixOpt is designed to work with different modeling languages with minor modifications ([cvxpy](https://www.cvxpy.org)).
60+
---
10661

107-
- **File-based Post-Processing Unit**
108-
- Results are saved to .json and .yaml files for easy access and analysis anytime.
109-
- Internal plotting functions utilizing matplotlib, plotly and pandas simplify results visualization and reporting.
62+
## 📚 Documentation
11063

111-
![Architecture Diagram](/pics/architecture_flixOpt.png)
64+
The documentation is available at [https://flixopt.github.io/flixopt/](https://flixopt.github.io/flixopt/)
11265

11366
---
11467

11568
## 🛠️ Solver Integration
11669

117-
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:
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:
11871

119-
- [CBC](https://github.com/coin-or/Cbc)
120-
- [GLPK](https://www.gnu.org/software/glpk/)
12172
- [Gurobi](https://www.gurobi.com/)
73+
- [CBC](https://github.com/coin-or/Cbc)
74+
- [GLPK](https://www.gnu.org/software/glpk/)
12275
- [CPLEX](https://www.ibm.com/analytics/cplex-optimizer)
12376

124-
Executables can be found for example [here for CBC](https://portal.ampl.com/dl/open/cbc/) and [here for GLPK](https://sourceforge.net/projects/winglpk/) (Windows: You have to put solver-executables to the PATH-variable)
125-
12677
For detailed licensing and installation instructions, refer to the respective solver documentation.
12778

12879
---
12980

13081
## 📖 Citation
13182

132-
If you use flixOpt in your research or project, please cite the following:
83+
If you use FlixOpt in your research or project, please cite the following:
13384

13485
- **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
13586
- **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
136-
137-
---
138-
139-
## 🔧 Development and Testing
140-
141-
Run the tests using:
142-
143-
```bash
144-
python -m unittest discover -s tests

docs/SUMMARY.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
- [Home](index.md)
22
- [Getting Started](getting-started.md)
3-
- [Concepts & Math](concepts-and-math/)
3+
- [User Guide](user-guide/)
44
- [Examples](examples/)
5+
- [FAQ](faq/)
56
- [API-Reference](api-reference/)
6-
- [Contribute](contribute.md)
7+
- [Release Notes](release-notes/)

docs/concepts-and-math/Mathematical Description.md

Lines changed: 0 additions & 108 deletions
This file was deleted.

0 commit comments

Comments
 (0)