**631 commits**| Last commit

**≈ 2 months ago**

COMANDO is a next generation modeling framework for Component-Oriented Modeling and optimizAtion for Nonlinear Design and Operation of integrated energy systems.

16

mentions

10

contributors

Get started

COMANDO is a next generation modeling framework for **Component-Oriented Modeling and optimizAtion for Nonlinear Design and Operation of integrated energy systems**.

An energy system is considered to be a collection of different interconnected components whose purpose is to satisfy demands of various commodities such as, e.g., electric power, heat and cooling in a variety of different operating conditions.

When such a system is built (or extended), there are many design and operational decisions that need to be made.

In this context, optimizing the design and operation means finding a set of decisions that results in a minimal value for some generalized costs, taking into account restrictions imposed by individual components, their connections or by other safety-related, social, political, or economic considerations.

COMANDO provides means to...

- model existing energy systems and possible extension in a flexible,

component-oriented fashion. - use the resulting system models to create mathematical optimization problems
- solve these problems directly or use tools to automatically approximate/

reformulate them to a form, more amenable to solution

When using COMANDO in an academic context please cite

our associated publication.

```
@Article{langiu2021comando,
title = {COMANDO: A Next-Generation Open-Source Framework for Energy Systems Optimization},
journal = {Computers & Chemical Engineering},
volume = {152},
pages = {107366},
year = {2021},
issn = {0098-1354},
doi = {https://doi.org/10.1016/j.compchemeng.2021.107366},
author = {Marco Langiu and David Yang Shu and Florian Joseph Baader and Dominik Hering and
Uwe Bau and André Xhonneux and Dirk Müller and André Bardow and Alexander Mitsos
and Manuel Dahmen}
}
```

This project is licensed under the MIT License, for more information please refer to the LICENSE file.

The documentation for COMANDO is hosted on readthedocs.

You can also build it locally, following the instructions in the docs directory.

We also have a Skype group where you can ask questions that may be of interest to other users and share your experiences.

At the moment COMANDO is distributed exclusively via the IEK-10 GitLab server.

In the future we plan to upload COMANDO to the Python package index for easy installation with `pip`

.

Until then we recommend cloning this repository with `git`

.

To install a basic version of COMANDO issue:

```
# from the parent directory of this repository...
python -m pip install .
```

As with most packages, we recommended to install COMANDO within a virtual environment.

Several additional features can be installed by listing them in square brackets and separated by commas, e.g., for the Pyomo interface and packages required for automatic linearization you would run:

```
# from the parent directory of this repository...
# NOTE: no spaces between features
python -m pip install .[pyomo,linearization]
```

For a list of all available features refer to `extra-requirements.txt`

.

In order to install all available extensions (**recommended**) run:

```
# from the parent directory of this repository...
python -m pip install .[all]
```

If you plan on further developing COMANDO, you may want to do an editable user intallation, adding the `-e`

flag:

```
# from the parent directory of this repository...
python -m pip install -e .[all]
```

At this point you have configured COMANDO for the fomulation of models and optimization problems, but not yet for their solution!

You can refer to the interfaces-specific README.md for insight into which solver and AML interfaces are available and how to install and use them.

When comando was installed with the `test`

or `dev`

features, `pytest`

should be available, and you can check if everything worked, by running:

```
# from the parent directory of this repository...
python -m pytest tests
```

Some tests will be skipped or have expected failures depending on the extras and interfaces you installed.

```
# from anywhere
python -m pip uninstall comando
```

This is a short summary of a typical COMANDO workflow.

For more detailed information please refer to the documentation.

The usage of COMANDO can be split into three phases

- Modeling phase
- Component model creation
- System model creation

- Problem formulation phase
- problem generation
- objective selection
- time-structure selection
- scenario-structure selection
- providing data

- problem reformulation
- time discretization
- linearization
- ...

- problem generation
- Problem solution phase

In the modeling phase the system behavior is specified in terms of the

component behavior and system structure.

In COMANDO a component is the basic building block of an energy system.

It represents a model of a generic real-world component, specified via a collection of mathematical expressions in symbolic form.

The symbols contained in such an expression are either **Parameters** (input data) or **Variables** (representing decisions to be made).

Both kinds of symbols may be *'indexed'* or not, i.e., they may represent scalars or vectors of values.

An expression that contains any indexed symbol is itself considered to be indexed and it is assumed that all indexed symbols within an expression have conforming dimensions.

Whether a Variable is indexed or not is decided in the modeling phase, by explicitly creating a design variable (scalar) or an operational variable (indexed).

In contrast to this, whether a Parameter is indexed or not is decided during the problem formulation phase by assigning a scalar or vector of values.

The algebraic expressions created in this way can be stored under some name or combined to relational expressions of the form

- e1 <= e2
- e1 == e2
- e1 >= e2

constituting restrictions on the component behavior.

It is also possible to declare operational variables to be **'states'**, i.e., quantities whose time-derivative is given by some algebraic expression.

This allows the consideration of dynamic effects.

Components may also assign individual algebraic expressions to connectors, allowing them to be interfaced with other components.

Connectors may be specified as inputs, outputs or bidirectional connectors.

The former two restrict the value of the corresponding expression to be nonnegative and nonpositive, respectively, while the latter does not impose additional restrictions.

Systems are modeled as collections of interconnected components, i.e., a system model consists of a set of components and the specification of how their connectors are connected.

As systems inherit from components, they can define additional expressions constraints and connectors (for nesting of subsystems).

Given a system model, COMANDO can currently be used to create a *Problem* object, representing a mathematical optimization problem (OP) of the form:

Where x and y are the vectors of design- and operation-variables, respectively.

F_I and F_II,s are user-specified scalar and indexed expressions corresponding to one-time and momentary costs, T_s are time horizons for different scenarios s, represented by a set of time-steps with possibly variable length, and S is a set of scenarios with corresponding weights w_s.

The constraints for the OP are automatically generated from the system model, i.e., all scalar relational expressions are taken as contraints and all indexed relational expressions are taken as constraints, parametrized by t, and s.

The dependence of the objective and constraint functions on time and scenario can be expressed in terms of the values or parameters p, which are user input.

This data can currently be given only in discrete form, i.e., for a discrete time and scenario.

**If any states were defined in the model the corresponding differential equations are currently discretized by default.**

An exception is the use of the Pyomo.DAE interface, here the time-continuous representation is passed and discretization via collocation can be performed.

Data for the parameter values and initial guesses for the variable values can be provided based on the user-chosen sets T_s and S.

It is possible to use manual or automated reformulations of the original problem formulation.

An example reformulation is an automated linearization.

Given a Problem, the user can chose to pass it directly to a solver capable of handling the corresponding problem type, transform the COMANDO Problem to a representation in an AML, or work directly with the COMANDO representation in a custom algorithm to preprocess or solve the Problem.

A list of available solver and AML interfaces can be found here.

Conference papers

3- 1.Incorporating AC Power Flow into the Multi-Energy System Optimization Framework COMANDOAuthor(s): Philipp Glucker, Marco Langiu, Thiemo Pesch, Manuel Dahmen, Andrea BenigniPublished in 2022 Open Source Modelling and Simulation of Energy Systems (OSMSES) by IEEE in 202210.1109/osmses54027.2022.9769138
- 2.Data-Driven Generation of Mixed-Integer Linear Programming Formulations for Model Predictive Control of Hybrid Energy Storage Systems using detailed nonlinear Simulation ModelsAuthor(s): Alexander Holtwerth, Andre Xhonneux, Dirk MullerPublished in 2022 Open Source Modelling and Simulation of Energy Systems (OSMSES) by IEEE in 202210.1109/osmses54027.2022.9769104
- 3.A Hardware-in-the-Loop Co-simulation of Multi-modal Energy System for Control ValidationAuthor(s): Diran Liu, Dominik Hering, Daniele Carta, Andre Xhonneux, Dirk Muller, Andrea BenigniPublished in IECON 2021 – 47th Annual Conference of the IEEE Industrial Electronics Society by IEEE in 202110.1109/iecon48115.2021.9589743

Journal articles

13- 1.Combined Physics- and Data-Driven Modeling for the Design and Operation Optimization of an Energy Concept Including a Storage SystemAuthor(s): Rushit Kansara, Michael Lockan, María Isabel Roldán SerranoPublished in Energies by MDPI AG in 2024, page: 35010.3390/en17020350
- 2.Quantifying the carbon footprint of energy storage applications with an energy system simulation framework — Energy System NetworkAuthor(s): Anupam Parlikar, Benedikt Tepe, Marc Möller, Holger Hesse, Andreas JossenPublished in 202410.1016/j.enconman.2024.118208
- 3.nPro: A web-based planning tool for designing district energy systems and thermal networksAuthor(s): Marco WirtzPublished in Energy by Elsevier BV in 2023, page: 12657510.1016/j.energy.2022.126575
- 4.Design of low-carbon multi-energy systems in the SecMOD framework by combining MILP optimization and life-cycle assessmentAuthor(s): Christiane Reinert, Niklas Nolzen, Julia Frohmann, Dominik Tillmanns, André BardowPublished in Computers & Chemical Engineering by Elsevier BV in 2023, page: 10817610.1016/j.compchemeng.2023.108176
- 5.Model predictive control simulations with block-hierarchical differential–algebraic process modelsAuthor(s): Robert B. Parker, Bethany L. Nicholson, John D. Siirola, Lorenz T. BieglerPublished in Journal of Process Control by Elsevier BV in 2023, page: 10311310.1016/j.jprocont.2023.103113
- 6.Sustainable process synthesis, design, and analysis: Challenges and opportunitiesAuthor(s): Mariano Martin, Rafiqul Gani, Iqbal M. MujtabaPublished in Sustainable Production and Consumption by Elsevier BV in 2022, page: 686-70510.1016/j.spc.2022.01.002
- 7.Reviewing two decades of energy system analysis with bibliometricsAuthor(s): D.F. Dominković, J.M. Weinand, F. Scheller, M. D'Andrea, R. McKennaPublished in Renewable and Sustainable Energy Reviews by Elsevier BV in 2022, page: 11174910.1016/j.rser.2021.111749
- 8.Comparison of MINLP formulations for global superstructure optimizationAuthor(s): Jannik Burre, Dominik Bongartz, Alexander MitsosPublished in Optimization and Engineering by Springer Science and Business Media LLC in 2022, page: 801-83010.1007/s11081-021-09707-y
- 9.Demand Response Analysis Framework (DRAF): An Open-Source Multi-Objective Decision Support Tool for Decarbonizing Local Multi-Energy SystemsAuthor(s): Markus Fleschutz, Markus Bohlayer, Marco Braun, Michael D. MurphyPublished in Sustainability by MDPI AG in 2022, page: 802510.3390/su14138025
- 10.Simultaneous optimization of design and operation of an air-cooled geothermal ORC under consideration of multiple operating pointsAuthor(s): Marco Langiu, Manuel Dahmen, Alexander MitsosPublished in Computers & Chemical Engineering by Elsevier BV in 2022, page: 10774510.1016/j.compchemeng.2022.107745
- 11.On the development of control solutions for local energy communitiesAuthor(s): A. Benigni, A. Xhonneux, D. Carta, T. Pesch, D. MullerPublished in at - Automatisierungstechnik by Walter de Gruyter GmbH in 2022, page: 1095-111510.1515/auto-2022-0034
- 12.Expert survey and classification of tools for modeling and simulating hybrid energy networksAuthor(s): Edmund Widl, Dennis Cronbach, Peter Sorknæs, Jaume Fitó, Daniel Muschick, Maurizio Repetto, Julien Ramousse, Anton IanakievPublished in Sustainable Energy, Grids and Networks by Elsevier BV in 2022, page: 10091310.1016/j.segan.2022.100913
- 13.Evaluation of a power generation system that integrates multiple Kalina cycles and absorption heat pumpsAuthor(s): Ryosuke Akimoto, Takehiro Yamaki, Masaru Nakaiwa, Keigo MatsudaPublished in Case Studies in Thermal Engineering by Elsevier BV in 2021, page: 10136310.1016/j.csite.2021.101363

ML

ML

Marco Langiu

Forschungszentrum Jülich

FB

Florian Joseph Baader

Forschungszentrum Jülich

DS

David Yang Shu

Forschungszentrum Jülich

DH

Dominik Hering

Forschungszentrum Jülich

MD

Manuel Dahmen

Forschungszentrum Jülich

UB

Uwe Bau

Forschungszentrum Jülich

AX

André Xhonneux

Forschungszentrum Jülich

DM

Dirk Müller

Forschungszentrum Jülich

AB

André Bardow

Forschungszentrum Jülich

AM

Alexander Mitsos

Forschungszentrum Jülich