Integrated Energy System Optimization

IESopt – an Integrated Energy System Optimization framework.

IESopt is developed and maintained at the Center for Energy at AIT Austrian Institute of Technology GmbH. The framework isdesigned to support the optimization of energy systems that are characterized by a high degree of integration between different energy carriers and sectors. It focuses on offering a modular and adaptable tool for modelers, that does not compromise on performance, while still being user-friendly. This is enabled by reducing energy system assets to abstract building blocks, that are supported by specialized implementation, and can be combined into complex systems without the need of a detailed understanding of mathematical modeling or proficiency in any coding-language.

Caution

The documentation is currently being put together based on cleaned parts of the internal docs. Until this is finished, this documentation may contains some placeholders.

Overview

This overview of iesopt’s documentation [1] will help you know where to find what you are looking for.

Getting started

  1. The Installation section explains how to quickly install and set up iesopt.

  2. If you are new, you can then work through A first model, which will guide you through all the basics you need to now.

Using this documentation

For anything beyond {Getting started}Getting started, the following provides a high-level overview of the remaining documentation that can be helpful when creating your own models:

  1. Tutorials will help you learn how to apply iesopt’s various main functionalities, to solve energy system optimization models. Start here if you are new and have completed the A first model initial tutorial.

  2. User guides provide various concise how-to guides, that help you accomplish a certain task, correctly and safely. Consult these to remind yourself how to do X.

  3. Reference contains technical reference for IESopt.jl core components, the YAML syntax, APIs, and more internal details. It assumes that you already have a basic understanding of the core concepts of iesopt.

  4. Developer documentation can be consulted for tips on how to improve iesopt, its documentation, or other useful information related to developing iesopt. If you are only using iesopt to develop your own tools / projects, this will not be necessary to check at all.

If you are up- or downgrading iesopt, head over to the Releases Page that provides you with information on what changed between versions.

Different projects

The following projects / repositories are part of “IESopt”:

  • IESopt.jl, the Julia-based core model powering all of IESopt’s capabilities.

  • iesopt, the Python interface (which you are currently viewing), which enables a fast and simple application of IESopt.jl, without the need to know any Julia, or how to set it up. It further provides different quality-of-life features, and embeds the model into a more conventional object-oriented style, that you may be more used to - compared to the way Julia works.

  • IESoptLib.jl, the library of various assets related to IESopt. You can find examples, as well as pre-defined templates and addons here. The library is automatically loaded for you.

Installation

Setting up an environment

Note

Skip this step if you want to install iesopt into an existing environment and directly continue directly continue with Installing iesopt.

This assumes that you have a working conda executable installed on your system, e.g., after installing Miniconda. If you added the binary paths to your PATH environment variable, you should be able to execute the following steps in every terminal (e.g., within VSCode), otherwise make sure to use a proper shell - most likely you Anaconda Prompt.

First we create a new environment using (make sure to replace yourenvname by a fitting name)

conda create -n yourenvname python=3.12 -y
conda activate yourenvname

Your terminal should now print the name of your environment in each new line, similar to

(yourenvname) user@PCNAME:~/your/current/path$

Next, we install Poetry by executing

pip install poetry

and use it to create a new basic environment by executing

poetry init -n

Now you should see a new pyproject.toml file inside your folder, and are ready to [install iesopt](Installing iesopt).

Learning more about managing dependencies with Poetry

Checkout the great tutorial “Dependency Management With Python Poetry” to learn more about all of this, or consult the Basic usage section of the Poetry documentation.

Installing iesopt

This assumes that you have a working environment, that has Poetry installed. It should however work similarly using conda install or pip install instead.

You can install iesopt by executing

poetry add iesopt

And that’s it… you are done!

Precompiling

Julia, compared to Python as you are probably used to it, compiles code [2] just before it executes it. This, coupled with the fact that we - until now - did not fully initialize our Julia environment, may lead to your first time using iesopt taking a long (!) time.

To “prevent” this, we can do a lot of the heavy lifting right here and now, by starting Python. You can do this by just executing python in the terminal that you used to set up everything, like so

(yourenvname) user@PCNAME:~/your/current/path$ python

which should result in an info message similar to this one:

Python 3.11.9 (main, Apr 19 2024, 16:48:06) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Then just run

import iesopt

You will see some messages like INFO:iesopt:Setting up Julia ..., and most likely a lot of other output related to the instantiation of a Julia environment. This may take a few minutes, but should end with lines that print

INFO:iesopt:Julia setup successful
INFO:iesopt:Importing Julia module `IESoptLib`
INFO:iesopt:Importing Julia module `IESopt`
INFO:iesopt:Importing Julia module `JuMP`

and are followed by a welcome message that documents the current version of IESopt that you are using. After that, you are ready to start using iesopt.

Reducing overhead

The next time that you launch iesopt by using import iesopt inside your current environment will be considerably faster. Nonetheless, every new launch comes with certain compilation-related overheads. The best way to prevent this, is making use of an interactive / REPL-based style of development.

Citing IESopt

If you find IESopt useful in your work, and are intend to publish or document your modeling, we kindly request that you include the following citation:

  • Style: APA7

    Strömer, S., Schwabeneder, D., & contributors. (2021-2024). IESopt: Integrated Energy System Optimization [Software]. AIT Austrian Institute of Technology GmbH. https://github.com/ait-energy/IESopt

  • Style: IEEE

    [1] S. Strömer, D. Schwabeneder, and contributors, “IESopt: Integrated Energy System Optimization,” AIT Austrian Institute of Technology GmbH, 2021-2024. [Online]. Available: https://github.com/ait-energy/IESopt

  • BibTeX:

    @misc{iesopt,
        author = {Strömer, Stefan and Schwabeneder, Daniel and contributors},
        title = {{IES}opt: Integrated Energy System Optimization},
        organization = {AIT Austrian Institute of Technology GmbH},
        url = {https://github.com/ait-energy/iesopt},
        type = {Software},
        year = {2021-2024},
    }