Skip to main content

Vector based energy and material flow optimization framework in Python.

Project description

FlixOpt: Energy and Material Flow Optimization Framework

Documentation Build Status PyPI version Python Versions License: MIT


🎯 Vision

FlixOpt aims to be the most accessible and flexible Python framework for energy and material flow optimization.

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.

Where We're Going

Short-term goals:

  • Multi-dimensional modeling: Full support for multi-period investments and scenario-based stochastic optimization (periods and scenarios are in active development)
  • Enhanced component library: More pre-built, domain-specific components (sector coupling, hydrogen systems, thermal networks, demand-side management)

Medium-term vision:

  • Modeling to generate alternatives (MGA): Built-in support for exploring near-optimal solution spaces to produce more robust, diverse solutions under uncertainty
  • Interactive tutorials: Browser-based, reactive tutorials for learning FlixOpt without local installation
  • Standardized cost calculations: Align with industry standards (VDI 2067) for CAPEX/OPEX calculations
  • Advanced result analysis: Time-series aggregation, automated reporting, and rich visualization options

Long-term vision:

  • 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
  • Seamless integration: First-class support for coupling with simulation tools, databases, existing energy system models, and GIS data
  • Robust optimization: Built-in uncertainty quantification and stochastic programming capabilities
  • Community ecosystem: Rich library of user-contributed components, examples, and domain-specific extensions
  • Model validation tools: Automated checks for physical plausibility, data consistency, and common modeling errors

Why FlixOpt Exists

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.

We bridge the gap between high-level strategic models (like FINE) for long-term planning and low-level dispatch tools for operations. FlixOpt is the sweet spot for:

  • Researchers who need to prototype quickly but may require deep customization later
  • Engineers who want reliable, tested components without black-box abstractions
  • Students learning optimization who benefit from clear, Pythonic interfaces
  • Practitioners who need to move from model to production-ready results
  • Domain experts from any field where things flow, transform, and need optimizing

Built on modern foundations (linopy and xarray), FlixOpt delivers both performance and transparency. You can inspect everything, extend anything, and trust that your model does exactly what you designed.

Originally developed at 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.


🌟 What Makes FlixOpt Different

Start Simple, Scale Complex

Define a working model in minutes with high-level components, then drill down to fine-grained control when needed. No rewriting, no framework switching.

import flixopt as fx

# Simple start
boiler = fx.Boiler("Boiler", eta=0.9, ...)

# Advanced control when needed - extend with native linopy
boiler.model.add_constraints(custom_constraint, name="my_constraint")

Multi-Criteria Optimization Done Right

Model costs, emissions, resource use, and any custom metric simultaneously as Effects. Optimize any single Effect, use weighted combinations, or apply ε-constraints:

costs = fx.Effect('costs', '€', 'Total costs',
                  share_from_temporal={'CO2': 180})  # 180 €/tCO2
co2 = fx.Effect('CO2', 'kg', 'Emissions', maximum_periodic=50000)

Performance at Any Scale

Choose the right calculation mode for your problem:

  • Full - Maximum accuracy for smaller problems
  • Segmented - Rolling horizon for large time series
  • Aggregated - Typical periods using TSAM for massive models

Built for Reproducibility

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.


🚀 Quick Start

pip install flixopt

That's it. FlixOpt comes with the HiGHS solver included - you're ready to optimize. Many more solvers are supported (gurobi, cplex, cbc, glpk, ...)

For additional features (interactive network visualization, time series aggregation):

pip install "flixopt[full]"

Next steps:


🤝 Contributing

FlixOpt thrives on community input. Whether you're fixing bugs, adding components, improving docs, or sharing use cases - we welcome your contributions.

See our contribution guide to get started.


📖 Citation

If FlixOpt supports your research or project, please cite:


📄 License

MIT License - See LICENSE for details.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flixopt-3.0.1.tar.gz (160.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flixopt-3.0.1-py3-none-any.whl (156.5 kB view details)

Uploaded Python 3

File details

Details for the file flixopt-3.0.1.tar.gz.

File metadata

  • Download URL: flixopt-3.0.1.tar.gz
  • Upload date:
  • Size: 160.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for flixopt-3.0.1.tar.gz
Algorithm Hash digest
SHA256 a55b3a6823fcf0f7477ca34e9e1c5bee29bd181f8d8a7acf98a704b2803ad5f6
MD5 e7c8e8efcc361feaa269c65d98aa08c0
BLAKE2b-256 bf5af1b1ba3dd18a9c9f1afba62f745ff861e9ca817e4466eefb6b03e252cd55

See more details on using hashes here.

File details

Details for the file flixopt-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: flixopt-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 156.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for flixopt-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39e0ea46348a4f7e14a4ad8459dc5314a0f2fc3a04dc9019ad51cefdb60baf49
MD5 548d0e0e00eff9a0ef131f7e884cfa83
BLAKE2b-256 e4f28a90154631e58536a7ecb44205098f816e1367ac987cb49bb485edbac8f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page