# FlixOpt: Energy and Material Flow Optimization Framework
[](https://flixopt.github.io/flixopt/latest/)
[](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml)
[](https://pypi.org/project/flixopt/)
[](https://pypi.org/project/flixopt/)
[](https://pypi.org/project/flixopt/)
[](https://opensource.org/licenses/MIT)
[](https://pypi.org/project/flixopt/)
[](https://github.com/flixOpt/flixopt/commits/main)
[](https://github.com/flixOpt/flixopt/issues)
[](https://results.pre-commit.ci/latest/github/flixOpt/flixopt/main)
[](https://github.com/astral-sh/ruff)
[](https://github.com/PyPSA/linopy/)
[](https://xarray.dev/)
[](https://doi.org/10.18086/eurosun.2022.04.07)
[](https://github.com/flixOpt/flixopt/stargazers)
---
**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.
**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.
---
## 🚀 Quick Start
```bash
pip install flixopt
```
That's it! FlixOpt comes with the [HiGHS](https://highs.dev/) solver included. You're ready to optimize.
**The basic workflow:**
```python
import flixopt as fx
# 1. Define your system structure
flow_system = fx.FlowSystem(timesteps)
flow_system.add_elements(buses, components, effects)
# 2. Create and solve
calculation = fx.FullCalculation("MyModel", flow_system)
calculation.solve()
# 3. Analyze results
calculation.results.solution
```
**Get started with real examples:**
- 📚 [Full Documentation](https://flixopt.github.io/flixopt/latest/)
- 💡 [Examples Gallery](https://flixopt.github.io/flixopt/latest/examples/) - Complete working examples from simple to complex
- 🔧 [API Reference](https://flixopt.github.io/flixopt/latest/api-reference/)
---
## 🌟 Why FlixOpt?
### Progressive Enhancement - Your Model Grows With You
**Start simple:**
```python
# Basic single-period model
flow_system = fx.FlowSystem(timesteps)
boiler = fx.Boiler("Boiler", eta=0.9, ...)
```
**Add complexity incrementally:**
- **Investment decisions** → Add `InvestParameters` to components
- **Multi-period planning** → Add `periods` dimension to FlowSystem
- **Uncertainty modeling** → Add `scenarios` dimension with probabilities
- **Custom constraints** → Extend with native linopy syntax
**No refactoring required.** Your component definitions stay the same - periods, scenarios, and features are added as dimensions and parameters.
→ [Learn more about multi-period and stochastic modeling](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/dimensions/)
### For Everyone
- **Beginners:** High-level components that "just work"
- **Experts:** Full access to modify models with linopy
- **Researchers:** Quick prototyping with customization options
- **Engineers:** Reliable, tested components without black boxes
- **Students:** Clear, Pythonic interfaces for learning optimization
### Key Features
**Multi-criteria optimization:** Model costs, emissions, resource use - any custom metric. Optimize single objectives or use weighted combinations and ε-constraints.
→ [Effects documentation](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/effects-penalty-objective/)
**Performance at any scale:** Choose calculation modes without changing your model - Full, Segmented, or Aggregated (using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam)).
→ [Calculation modes](https://flixopt.github.io/flixopt/latest/api-reference/calculation/)
**Built for reproducibility:** Self-contained NetCDF result files with complete model information. Load results months later - everything is preserved.
→ [Results documentation](https://flixopt.github.io/flixopt/latest/api-reference/results/)
**Flexible data operations:** Transform FlowSystems with xarray-style operations (`sel()`, `resample()`) for multi-stage optimization.
---
## 🎯 What is FlixOpt?
### A General-Purpose Flow Optimization Framework
FlixOpt models **any system involving flows and conversions:**
- **Energy systems:** District heating/cooling, microgrids, renewable portfolios, sector coupling
- **Material flows:** Supply chains, production lines, chemical processes
- **Integrated systems:** Water-energy nexus, industrial symbiosis
While energy systems are our primary focus, the same foundation applies universally. This enables coupling different system types within integrated models.
### Modern Foundations
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.
### Our Position
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**.
### Academic Roots
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).
---
## 🛣️ Roadmap
**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.
**Current focus:**
- Enhanced component library (sector coupling, hydrogen, thermal networks)
- Examples showcasing multi-period and stochastic modeling
- Advanced result analysis and visualization
**Future vision:**
- Modeling to generate alternatives (MGA) for robust decision-making
- Advanced stochastic optimization (two-stage, CVaR)
- Community ecosystem of user-contributed components
→ [Full roadmap and vision](https://flixopt.github.io/flixopt/latest/roadmap/)
---
## 🛠️ Installation
### Basic Installation
```bash
pip install flixopt
```
Includes the [HiGHS](https://highs.dev/) solver - you're ready to optimize immediately.
### Full Installation
For additional features (interactive network visualization, time series aggregation):
```bash
pip install "flixopt[full]"
```
### Solver Support
FlixOpt supports many solvers via linopy: **HiGHS** (included), **Gurobi**, **CPLEX**, **CBC**, **GLPK**, and more.
→ [Installation guide](https://flixopt.github.io/flixopt/latest/getting-started/)
---
## 🤝 Contributing
FlixOpt thrives on community input. Whether you're fixing bugs, adding components, improving docs, or sharing use cases - **we welcome your contributions.**
→ [Contribution guide](https://flixopt.github.io/flixopt/latest/contribute/)
---
## 📖 Citation
If FlixOpt supports your research or project, please cite:
- **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
- **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
---
## 📄 License
MIT License - See [LICENSE](https://github.com/flixopt/flixopt/blob/main/LICENSE) for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "flixopt",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Felix Bumann <felixbumann387@gmail.com>, Peter Stange <peter.stange@tu-dresden.de>",
"keywords": "optimization, energy systems, numerical analysis",
"author": null,
"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>",
"download_url": "https://files.pythonhosted.org/packages/a3/48/a9156bceec8da49b8b94994d142da7d8af8379e872ac7e0356693be1b067/flixopt-3.1.0.tar.gz",
"platform": null,
"description": "# FlixOpt: Energy and Material Flow Optimization Framework\n\n[](https://flixopt.github.io/flixopt/latest/)\n[](https://github.com/flixOpt/flixopt/actions/workflows/python-app.yaml)\n[](https://pypi.org/project/flixopt/)\n[](https://pypi.org/project/flixopt/)\n[](https://pypi.org/project/flixopt/)\n[](https://opensource.org/licenses/MIT)\n[](https://pypi.org/project/flixopt/)\n[](https://github.com/flixOpt/flixopt/commits/main)\n[](https://github.com/flixOpt/flixopt/issues)\n[](https://results.pre-commit.ci/latest/github/flixOpt/flixopt/main)\n[](https://github.com/astral-sh/ruff)\n[](https://github.com/PyPSA/linopy/)\n[](https://xarray.dev/)\n[](https://doi.org/10.18086/eurosun.2022.04.07)\n[](https://github.com/flixOpt/flixopt/stargazers)\n\n---\n\n**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.\n\n**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.\n\n---\n\n## \ud83d\ude80 Quick Start\n\n```bash\npip install flixopt\n```\n\nThat's it! FlixOpt comes with the [HiGHS](https://highs.dev/) solver included. You're ready to optimize.\n\n**The basic workflow:**\n\n```python\nimport flixopt as fx\n\n# 1. Define your system structure\nflow_system = fx.FlowSystem(timesteps)\nflow_system.add_elements(buses, components, effects)\n\n# 2. Create and solve\ncalculation = fx.FullCalculation(\"MyModel\", flow_system)\ncalculation.solve()\n\n# 3. Analyze results\ncalculation.results.solution\n```\n\n**Get started with real examples:**\n- \ud83d\udcda [Full Documentation](https://flixopt.github.io/flixopt/latest/)\n- \ud83d\udca1 [Examples Gallery](https://flixopt.github.io/flixopt/latest/examples/) - Complete working examples from simple to complex\n- \ud83d\udd27 [API Reference](https://flixopt.github.io/flixopt/latest/api-reference/)\n\n---\n\n## \ud83c\udf1f Why FlixOpt?\n\n### Progressive Enhancement - Your Model Grows With You\n\n**Start simple:**\n```python\n# Basic single-period model\nflow_system = fx.FlowSystem(timesteps)\nboiler = fx.Boiler(\"Boiler\", eta=0.9, ...)\n```\n\n**Add complexity incrementally:**\n- **Investment decisions** \u2192 Add `InvestParameters` to components\n- **Multi-period planning** \u2192 Add `periods` dimension to FlowSystem\n- **Uncertainty modeling** \u2192 Add `scenarios` dimension with probabilities\n- **Custom constraints** \u2192 Extend with native linopy syntax\n\n**No refactoring required.** Your component definitions stay the same - periods, scenarios, and features are added as dimensions and parameters.\n\n\u2192 [Learn more about multi-period and stochastic modeling](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/dimensions/)\n\n### For Everyone\n\n- **Beginners:** High-level components that \"just work\"\n- **Experts:** Full access to modify models with linopy\n- **Researchers:** Quick prototyping with customization options\n- **Engineers:** Reliable, tested components without black boxes\n- **Students:** Clear, Pythonic interfaces for learning optimization\n\n### Key Features\n\n**Multi-criteria optimization:** Model costs, emissions, resource use - any custom metric. Optimize single objectives or use weighted combinations and \u03b5-constraints.\n\u2192 [Effects documentation](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/effects-penalty-objective/)\n\n**Performance at any scale:** Choose calculation modes without changing your model - Full, Segmented, or Aggregated (using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam)).\n\u2192 [Calculation modes](https://flixopt.github.io/flixopt/latest/api-reference/calculation/)\n\n**Built for reproducibility:** Self-contained NetCDF result files with complete model information. Load results months later - everything is preserved.\n\u2192 [Results documentation](https://flixopt.github.io/flixopt/latest/api-reference/results/)\n\n**Flexible data operations:** Transform FlowSystems with xarray-style operations (`sel()`, `resample()`) for multi-stage optimization.\n\n---\n\n## \ud83c\udfaf What is FlixOpt?\n\n### A General-Purpose Flow Optimization Framework\n\nFlixOpt models **any system involving flows and conversions:**\n\n- **Energy systems:** District heating/cooling, microgrids, renewable portfolios, sector coupling\n- **Material flows:** Supply chains, production lines, chemical processes\n- **Integrated systems:** Water-energy nexus, industrial symbiosis\n\nWhile energy systems are our primary focus, the same foundation applies universally. This enables coupling different system types within integrated models.\n\n### Modern Foundations\n\nBuilt 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.\n\n### Our Position\n\nWe 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**.\n\n### Academic Roots\n\nOriginally 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).\n\n---\n\n## \ud83d\udee3\ufe0f Roadmap\n\n**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.\n\n**Current focus:**\n- Enhanced component library (sector coupling, hydrogen, thermal networks)\n- Examples showcasing multi-period and stochastic modeling\n- Advanced result analysis and visualization\n\n**Future vision:**\n- Modeling to generate alternatives (MGA) for robust decision-making\n- Advanced stochastic optimization (two-stage, CVaR)\n- Community ecosystem of user-contributed components\n\n\u2192 [Full roadmap and vision](https://flixopt.github.io/flixopt/latest/roadmap/)\n\n---\n\n## \ud83d\udee0\ufe0f Installation\n\n### Basic Installation\n\n```bash\npip install flixopt\n```\n\nIncludes the [HiGHS](https://highs.dev/) solver - you're ready to optimize immediately.\n\n### Full Installation\n\nFor additional features (interactive network visualization, time series aggregation):\n\n```bash\npip install \"flixopt[full]\"\n```\n\n### Solver Support\n\nFlixOpt supports many solvers via linopy: **HiGHS** (included), **Gurobi**, **CPLEX**, **CBC**, **GLPK**, and more.\n\n\u2192 [Installation guide](https://flixopt.github.io/flixopt/latest/getting-started/)\n\n---\n\n## \ud83e\udd1d Contributing\n\nFlixOpt thrives on community input. Whether you're fixing bugs, adding components, improving docs, or sharing use cases - **we welcome your contributions.**\n\n\u2192 [Contribution guide](https://flixopt.github.io/flixopt/latest/contribute/)\n\n---\n\n## \ud83d\udcd6 Citation\n\nIf FlixOpt supports your research or project, please cite:\n\n- **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)\n- **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)\n\n---\n\n## \ud83d\udcc4 License\n\nMIT License - See [LICENSE](https://github.com/flixopt/flixopt/blob/main/LICENSE) for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "Vector based energy and material flow optimization framework in Python.",
"version": "3.1.0",
"project_urls": {
"documentation": "https://flixopt.github.io/flixopt/",
"homepage": "https://tu-dresden.de/ing/maschinenwesen/iet/gewv/forschung/forschungsprojekte/flixopt",
"repository": "https://github.com/flixOpt/flixopt"
},
"split_keywords": [
"optimization",
" energy systems",
" numerical analysis"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "02cd6bd9542b295188b33a7f2c1542898f46ae53dfcf35a20c1f6890bb403456",
"md5": "f81265f296fecce68ca1236ca96243e1",
"sha256": "68c804e55c8ee3c3edd082174d8102c266107925a01ce33a87e8b08930ed44c8"
},
"downloads": -1,
"filename": "flixopt-3.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f81265f296fecce68ca1236ca96243e1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 164834,
"upload_time": "2025-10-19T17:04:53",
"upload_time_iso_8601": "2025-10-19T17:04:53.676880Z",
"url": "https://files.pythonhosted.org/packages/02/cd/6bd9542b295188b33a7f2c1542898f46ae53dfcf35a20c1f6890bb403456/flixopt-3.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a348a9156bceec8da49b8b94994d142da7d8af8379e872ac7e0356693be1b067",
"md5": "982a45b7b23618cf560044000aebedf8",
"sha256": "4a626f374d3900dde9f1c5995a7ad1adb7ab115a19593a338f0c7f7de94f247d"
},
"downloads": -1,
"filename": "flixopt-3.1.0.tar.gz",
"has_sig": false,
"md5_digest": "982a45b7b23618cf560044000aebedf8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 170251,
"upload_time": "2025-10-19T17:04:55",
"upload_time_iso_8601": "2025-10-19T17:04:55.072297Z",
"url": "https://files.pythonhosted.org/packages/a3/48/a9156bceec8da49b8b94994d142da7d8af8379e872ac7e0356693be1b067/flixopt-3.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-19 17:04:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "flixOpt",
"github_project": "flixopt",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "flixopt"
}