Skip to content

Getting Started with FlixOpt

This guide will help you install FlixOpt, understand its basic concepts, and run your first optimization model.

Installation

Basic Installation

Install FlixOpt directly into your environment using pip:

pip install flixopt

This provides the core functionality with the HiGHS solver included.

Full Installation

For all features including interactive network visualizations and time series aggregation:

pip install "flixopt[full]"

Logging

FlixOpt uses Python's standard logging module with optional colored output via colorlog. Logging is silent by default but can be easily configured.

from flixopt import CONFIG

# Enable colored console logging
CONFIG.Logging.enable_console('INFO')

# Or use a preset configuration for exploring
CONFIG.exploring()

For advanced logging configuration, you can use Python's standard logging module directly:

import logging
logging.basicConfig(level=logging.DEBUG)

For more details on logging configuration, see the CONFIG.Logging documentation.

Basic Workflow

Working with FlixOpt follows a general pattern:

  1. Create a FlowSystem with a time series
  2. Define Effects (costs, emissions, etc.)
  3. Define Buses as connection points in your system
  4. Add Components like converters, storage, sources/sinks with their Flows
  5. Run Calculations to optimize your system
  6. Analyze Results using built-in or external visualization tools

Next Steps

Now that you've installed FlixOpt and understand the basic workflow, you can: