|
3 | 3 | [](https://flixopt.github.io/flixopt/latest/) |
4 | 4 | [](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml) |
5 | 5 | [](https://pypi.org/project/flixopt/) |
| 6 | +[](https://pypi.org/project/flixopt/) |
6 | 7 | [](https://pypi.org/project/flixopt/) |
7 | 8 | [](https://opensource.org/licenses/MIT) |
| 9 | +[](https://pypi.org/project/flixopt/) |
| 10 | +[](https://github.com/flixOpt/flixopt/commits/main) |
| 11 | +[](https://github.com/flixOpt/flixopt/issues) |
| 12 | +[](https://results.pre-commit.ci/latest/github/flixOpt/flixopt/main) |
| 13 | +[](https://github.com/astral-sh/ruff) |
| 14 | +[](https://github.com/PyPSA/linopy/) |
| 15 | +[](https://xarray.dev/) |
| 16 | +[](https://doi.org/10.18086/eurosun.2022.04.07) |
| 17 | +[](https://github.com/flixOpt/flixopt/stargazers) |
8 | 18 |
|
9 | 19 | --- |
10 | 20 |
|
11 | | -## 🎯 Vision |
| 21 | +**FlixOpt is a Python framework for optimizing energy and material flow systems** - from district heating networks to industrial production lines, from renewable energy portfolios to supply chain logistics. |
12 | 22 |
|
13 | | -**FlixOpt aims to be the most accessible and flexible Python framework for energy and material flow optimization.** |
| 23 | +**Start simple, scale complex:** Build a working optimization model in minutes, then progressively add detail - multi-period investments, stochastic scenarios, custom constraints - without rewriting your code. |
14 | 24 |
|
15 | | -We believe that optimization modeling should be **approachable for beginners** yet **powerful for experts**. Too often, frameworks force you to choose between ease of use and flexibility. FlixOpt refuses this compromise. |
16 | | - |
17 | | -### Where We're Going |
| 25 | +--- |
18 | 26 |
|
19 | | -**Short-term goals:** |
20 | | -- **Multi-dimensional modeling**: Full support for multi-period investments and scenario-based stochastic optimization (periods and scenarios are in active development) |
21 | | -- **Enhanced component library**: More pre-built, domain-specific components (sector coupling, hydrogen systems, thermal networks, demand-side management) |
| 27 | +## 🚀 Quick Start |
22 | 28 |
|
23 | | -**Medium-term vision:** |
24 | | -- **Modeling to generate alternatives (MGA)**: Built-in support for exploring near-optimal solution spaces to produce more robust, diverse solutions under uncertainty |
25 | | -- **Interactive tutorials**: Browser-based, reactive tutorials for learning FlixOpt without local installation |
26 | | -- **Standardized cost calculations**: Align with industry standards (VDI 2067) for CAPEX/OPEX calculations |
27 | | -- **Advanced result analysis**: Time-series aggregation, automated reporting, and rich visualization options |
| 29 | +```bash |
| 30 | +pip install flixopt |
| 31 | +``` |
28 | 32 |
|
29 | | -**Long-term vision:** |
30 | | -- **Showcase universal applicability**: FlixOpt already handles any flow-based system (supply chains, water networks, production planning, chemical processes) - we need more examples and domain-specific component libraries to demonstrate this |
31 | | -- **Seamless integration**: First-class support for coupling with simulation tools, databases, existing energy system models, and GIS data |
32 | | -- **Robust optimization**: Built-in uncertainty quantification and stochastic programming capabilities |
33 | | -- **Community ecosystem**: Rich library of user-contributed components, examples, and domain-specific extensions |
34 | | -- **Model validation tools**: Automated checks for physical plausibility, data consistency, and common modeling errors |
| 33 | +That's it! FlixOpt comes with the [HiGHS](https://highs.dev/) solver included. You're ready to optimize. |
35 | 34 |
|
36 | | -### Why FlixOpt Exists |
| 35 | +**The basic workflow:** |
37 | 36 |
|
38 | | -FlixOpt is a **general-purpose framework for modeling any system involving flows and conversions** - energy, materials, fluids, goods, or data. While energy systems are our primary focus, the same mathematical foundation applies to supply chains, water networks, production lines, and more. |
| 37 | +```python |
| 38 | +import flixopt as fx |
39 | 39 |
|
40 | | -We bridge the gap between high-level strategic models (like [FINE](https://github.com/FZJ-IEK3-VSA/FINE)) for long-term planning and low-level dispatch tools for operations. FlixOpt is the **sweet spot** for: |
| 40 | +# 1. Define your system structure |
| 41 | +flow_system = fx.FlowSystem(timesteps) |
| 42 | +flow_system.add_elements(buses, components, effects) |
41 | 43 |
|
42 | | -- **Researchers** who need to prototype quickly but may require deep customization later |
43 | | -- **Engineers** who want reliable, tested components without black-box abstractions |
44 | | -- **Students** learning optimization who benefit from clear, Pythonic interfaces |
45 | | -- **Practitioners** who need to move from model to production-ready results |
46 | | -- **Domain experts** from any field where things flow, transform, and need optimizing |
| 44 | +# 2. Create and solve |
| 45 | +calculation = fx.FullCalculation("MyModel", flow_system) |
| 46 | +calculation.solve() |
47 | 47 |
|
48 | | -Built on modern foundations ([linopy](https://github.com/PyPSA/linopy/) and [xarray](https://github.com/pydata/xarray)), FlixOpt delivers both **performance** and **transparency**. You can inspect everything, extend anything, and trust that your model does exactly what you designed. |
| 48 | +# 3. Analyze results |
| 49 | +calculation.results.solution |
| 50 | +``` |
49 | 51 |
|
50 | | -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 has evolved from the Matlab-based flixOptMat framework while incorporating the best ideas from [oemof/solph](https://github.com/oemof/oemof-solph). |
| 52 | +**Get started with real examples:** |
| 53 | +- 📚 [Full Documentation](https://flixopt.github.io/flixopt/latest/) |
| 54 | +- 💡 [Examples Gallery](https://flixopt.github.io/flixopt/latest/examples/) - Complete working examples from simple to complex |
| 55 | +- 🔧 [API Reference](https://flixopt.github.io/flixopt/latest/api-reference/) |
51 | 56 |
|
52 | 57 | --- |
53 | 58 |
|
54 | | -## 🌟 What Makes FlixOpt Different |
| 59 | +## 🌟 Why FlixOpt? |
55 | 60 |
|
56 | | -### Start Simple, Scale Complex |
57 | | -Define a working model in minutes with high-level components, then drill down to fine-grained control when needed. No rewriting, no framework switching. |
| 61 | +### Progressive Enhancement - Your Model Grows With You |
58 | 62 |
|
| 63 | +**Start simple:** |
59 | 64 | ```python |
60 | | -import flixopt as fx |
61 | | - |
62 | | -# Simple start |
| 65 | +# Basic single-period model |
| 66 | +flow_system = fx.FlowSystem(timesteps) |
63 | 67 | boiler = fx.Boiler("Boiler", eta=0.9, ...) |
64 | | - |
65 | | -# Advanced control when needed - extend with native linopy |
66 | | -boiler.model.add_constraints(custom_constraint, name="my_constraint") |
67 | 68 | ``` |
68 | 69 |
|
69 | | -### Multi-Criteria Optimization Done Right |
70 | | -Model costs, emissions, resource use, and any custom metric simultaneously as **Effects**. Optimize any single Effect, use weighted combinations, or apply ε-constraints: |
| 70 | +**Add complexity incrementally:** |
| 71 | +- **Investment decisions** → Add `InvestParameters` to components |
| 72 | +- **Multi-period planning** → Add `periods` dimension to FlowSystem |
| 73 | +- **Uncertainty modeling** → Add `scenarios` dimension with probabilities |
| 74 | +- **Custom constraints** → Extend with native linopy syntax |
71 | 75 |
|
72 | | -```python |
73 | | -costs = fx.Effect('costs', '€', 'Total costs', |
74 | | - share_from_temporal={'CO2': 180}) # 180 €/tCO2 |
75 | | -co2 = fx.Effect('CO2', 'kg', 'Emissions', maximum_periodic=50000) |
76 | | -``` |
| 76 | +**No refactoring required.** Your component definitions stay the same - periods, scenarios, and features are added as dimensions and parameters. |
| 77 | + |
| 78 | +→ [Learn more about multi-period and stochastic modeling](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/dimensions/) |
| 79 | + |
| 80 | +### For Everyone |
| 81 | + |
| 82 | +- **Beginners:** High-level components that "just work" |
| 83 | +- **Experts:** Full access to modify models with linopy |
| 84 | +- **Researchers:** Quick prototyping with customization options |
| 85 | +- **Engineers:** Reliable, tested components without black boxes |
| 86 | +- **Students:** Clear, Pythonic interfaces for learning optimization |
77 | 87 |
|
78 | | -### Performance at Any Scale |
79 | | -Choose the right calculation mode for your problem: |
80 | | -- **Full** - Maximum accuracy for smaller problems |
81 | | -- **Segmented** - Rolling horizon for large time series |
82 | | -- **Aggregated** - Typical periods using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam) for massive models |
| 88 | +### Key Features |
83 | 89 |
|
84 | | -### Built for Reproducibility |
85 | | -Every result file is self-contained with complete model information. Load it months later and know exactly what you optimized. Export to NetCDF, share with colleagues, archive for compliance. |
| 90 | +**Multi-criteria optimization:** Model costs, emissions, resource use - any custom metric. Optimize single objectives or use weighted combinations and ε-constraints. |
| 91 | +→ [Effects documentation](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/effects-penalty-objective/) |
| 92 | + |
| 93 | +**Performance at any scale:** Choose calculation modes without changing your model - Full, Segmented, or Aggregated (using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam)). |
| 94 | +→ [Calculation modes](https://flixopt.github.io/flixopt/latest/api-reference/calculation/) |
| 95 | + |
| 96 | +**Built for reproducibility:** Self-contained NetCDF result files with complete model information. Load results months later - everything is preserved. |
| 97 | +→ [Results documentation](https://flixopt.github.io/flixopt/latest/api-reference/results/) |
| 98 | + |
| 99 | +**Flexible data operations:** Transform FlowSystems with xarray-style operations (`sel()`, `resample()`) for multi-stage optimization. |
86 | 100 |
|
87 | 101 | --- |
88 | 102 |
|
89 | | -## 🚀 Quick Start |
| 103 | +## 🎯 What is FlixOpt? |
| 104 | + |
| 105 | +### A General-Purpose Flow Optimization Framework |
| 106 | + |
| 107 | +FlixOpt models **any system involving flows and conversions:** |
| 108 | + |
| 109 | +- **Energy systems:** District heating/cooling, microgrids, renewable portfolios, sector coupling |
| 110 | +- **Material flows:** Supply chains, production lines, chemical processes |
| 111 | +- **Integrated systems:** Water-energy nexus, industrial symbiosis |
| 112 | + |
| 113 | +While energy systems are our primary focus, the same foundation applies universally. This enables coupling different system types within integrated models. |
| 114 | + |
| 115 | +### Modern Foundations |
| 116 | + |
| 117 | +Built on [linopy](https://github.com/PyPSA/linopy/) and [xarray](https://github.com/pydata/xarray), FlixOpt delivers **performance** and **transparency**. Full access to variables, constraints, and model structure. Extend anything with native linopy syntax. |
| 118 | + |
| 119 | +### Our Position |
| 120 | + |
| 121 | +We bridge the gap between high-level strategic models (like [FINE](https://github.com/FZJ-IEK3-VSA/FINE)) and low-level dispatch tools - similar to [PyPSA](https://docs.pypsa.org/latest/). FlixOpt is the sweet spot for detailed operational planning and long-term investment analysis in the **same framework**. |
| 122 | + |
| 123 | +### Academic Roots |
| 124 | + |
| 125 | +Originally developed at [TU Dresden](https://github.com/gewv-tu-dresden) for the SMARTBIOGRID project (funded by the German Federal Ministry for Economic Affairs and Energy, FKZ: 03KB159B). FlixOpt evolved from the MATLAB-based flixOptMat framework while incorporating best practices from [oemof/solph](https://github.com/oemof/oemof-solph). |
| 126 | + |
| 127 | +--- |
| 128 | + |
| 129 | +## 🛣️ Roadmap |
| 130 | + |
| 131 | +**FlixOpt aims to be the most accessible, flexible, and universal Python framework for energy and material flow optimization.** We believe optimization modeling should be approachable for beginners yet powerful for experts, minimizing context switching between different planning horizons. |
| 132 | + |
| 133 | +**Current focus:** |
| 134 | +- Enhanced component library (sector coupling, hydrogen, thermal networks) |
| 135 | +- Examples showcasing multi-period and stochastic modeling |
| 136 | +- Advanced result analysis and visualization |
| 137 | + |
| 138 | +**Future vision:** |
| 139 | +- Modeling to generate alternatives (MGA) for robust decision-making |
| 140 | +- Advanced stochastic optimization (two-stage, CVaR) |
| 141 | +- Community ecosystem of user-contributed components |
| 142 | + |
| 143 | +→ [Full roadmap and vision](https://flixopt.github.io/flixopt/latest/roadmap/) |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## 🛠️ Installation |
| 148 | + |
| 149 | +### Basic Installation |
90 | 150 |
|
91 | 151 | ```bash |
92 | 152 | pip install flixopt |
93 | 153 | ``` |
94 | 154 |
|
95 | | -That's it. FlixOpt comes with the [HiGHS](https://highs.dev/) solver included - you're ready to optimize. |
96 | | -Many more solvers are supported (gurobi, cplex, cbc, glpk, ...) |
| 155 | +Includes the [HiGHS](https://highs.dev/) solver - you're ready to optimize immediately. |
| 156 | + |
| 157 | +### Full Installation |
97 | 158 |
|
98 | 159 | For additional features (interactive network visualization, time series aggregation): |
| 160 | + |
99 | 161 | ```bash |
100 | 162 | pip install "flixopt[full]" |
101 | 163 | ``` |
102 | 164 |
|
103 | | -**Next steps:** |
104 | | -- 📚 [Full Documentation](https://flixopt.github.io/flixopt/latest/) |
105 | | -- 💡 [Examples](https://flixopt.github.io/flixopt/latest/examples/) |
106 | | -- 🔧 [API Reference](https://flixopt.github.io/flixopt/latest/api-reference/) |
| 165 | +### Solver Support |
| 166 | + |
| 167 | +FlixOpt supports many solvers via linopy: **HiGHS** (included), **Gurobi**, **CPLEX**, **CBC**, **GLPK**, and more. |
| 168 | + |
| 169 | +→ [Installation guide](https://flixopt.github.io/flixopt/latest/getting-started/) |
107 | 170 |
|
108 | 171 | --- |
109 | 172 |
|
110 | 173 | ## 🤝 Contributing |
111 | 174 |
|
112 | | -FlixOpt thrives on community input. Whether you're fixing bugs, adding components, improving docs, or sharing use cases - we welcome your contributions. |
| 175 | +FlixOpt thrives on community input. Whether you're fixing bugs, adding components, improving docs, or sharing use cases - **we welcome your contributions.** |
113 | 176 |
|
114 | | -See our [contribution guide](https://flixopt.github.io/flixopt/latest/contribute/) to get started. |
| 177 | +→ [Contribution guide](https://flixopt.github.io/flixopt/latest/contribute/) |
115 | 178 |
|
116 | 179 | --- |
117 | 180 |
|
|
0 commit comments