Skip to content

Examples

Learn flixopt through practical examples organized by topic. Each notebook includes a real-world user story and progressively builds your understanding.

Basics

Notebook Description
01-Quickstart Minimal working example - heat a workshop with a gas boiler
02-Heat System District heating with thermal storage and time-varying prices

Investment

Notebook Description
03-Sizing Size a solar heating system - let the optimizer decide equipment sizes
04-Constraints Industrial boiler with startup costs, minimum uptime, and load constraints

Advanced

Notebook Description
05-Multi-Carrier Hospital with CHP producing both electricity and heat
10-Transmission Connect sites with pipelines or cables, including losses and bidirectional flow

Non-Linear Modeling

Notebook Description
06a-Time-Varying Heat pump with temperature-dependent COP
06b-Piecewise Conversion Gas engine with load-dependent efficiency curves
06c-Piecewise Effects Economies of scale in investment costs

Scaling

Notebook Description
07-Scenarios Multi-year planning with uncertain demand scenarios
08a-Aggregation Speed up large problems with resampling and two-stage optimization
08b-Rolling Horizon Decompose large problems into sequential time segments

Results

Notebook Description
09-Plotting Access optimization results and create visualizations

Key Concepts

Concept Introduced In
FlowSystem, Bus, Flow Quickstart
Storage, time-varying prices Heat System
InvestParameters, optimal sizing Sizing
StatusParameters, startup costs Constraints
Multi-carrier, CHP Multi-Carrier
Transmission, losses, bidirectional Transmission
Time-varying conversion_factors Time-Varying Parameters
PiecewiseConversion, part-load efficiency Piecewise Conversion
PiecewiseEffects, economies of scale Piecewise Effects
Periods, scenarios, weights Scenarios
transform.resample(), fix_sizes() Aggregation
optimize.rolling_horizon() Rolling Horizon
statistics, topology, plotting Plotting