COMANDO
COMANDO is a next generation modeling framework for Component-Oriented Modeling and optimizAtion for Nonlinear Design and Operation of integrated energy systems.
Description
COMANDO
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
Referencing
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}
}
License
This project is licensed under the MIT License, for more information please refer to the LICENSE file.
Documentation and support 
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.
Installation
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.
Installation options
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.
Testing the installation
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.
Uninstallation
# from anywhere
python -m pip uninstall comando
COMANDO Usage
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
Modeling phase
In the modeling phase the system behavior is specified in terms of the
component behavior and system structure.
Components
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
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).
Problem formulation phase
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.
Problem generation
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.
Problem reformulation
It is possible to use manual or automated reformulations of the original problem formulation.
An example reformulation is an automated linearization.
Problem solution
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.
Participating organisations
Reference papers
Mentions
- 1.Author(s): Yifan Wang, Marvin Volkmer, D�rthe Franzisca Hagedorn, Christiane Reinert, Niklas von der AssenPublished in Systems and Control Transactions, Proceedings of the 10th International Conference on Foundations of Computer-Aided Process Design FOCAPD 2024 by PSE Press in 2024, page: 604-61110.69997/sct.105466
- 2.Author(s): David Y. Shu, Jan Hartmann, Christian Zibunas, Nils Baumg�rtner, Niklas von der Assen, Andr� BardowPublished in Systems and Control Transactions, Proceedings of the 10th International Conference on Foundations of Computer-Aided Process Design FOCAPD 2024 by PSE Press in 2024, page: 585-59010.69997/sct.126329
- 3.Author(s): Juan PedreroAlegria, Eneko Arrizabalaga Uriarte, Nekane Hermoso Martínez, Ander Zubiria Gómez, Amaia González Garrido, Raúl Moneo HernandezPublished in 2024 20th International Conference on the European Energy Market (EEM) by IEEE in 2024, page: 1-910.1109/eem60825.2024.10608985
- 4.Author(s): Carsten Wegkamp, Henrik Wagner, Eike Niehs, Julien Essers, Marcel Lüdecke, Mattias Hadlak, Bernd EngelPublished in 2024 Open Source Modelling and Simulation of Energy Systems (OSMSES) by IEEE in 2024, page: 1-610.1109/osmses62085.2024.10668964
- 5.Author(s): Rushit Kansara, Michael LockanPublished in 36th International Conference on Efficiency, Cost, Optimization, Simulation and Environmental Impact of Energy Systems (ECOS 2023) by ECOS 2023 in 2023, page: 1322-133310.52202/069564-0120
- 6.Author(s): Jan Stock, Malte Berrenberg, André Xhonneux, Dirk MüllerPublished in 36th International Conference on Efficiency, Cost, Optimization, Simulation and Environmental Impact of Energy Systems (ECOS 2023) by ECOS 2023 in 2023, page: 1252-126310.52202/069564-0114
- 7.Author(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 2022, page: 1-610.1109/osmses54027.2022.9769138
- 8.Author(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 2021, page: 1-610.1109/iecon48115.2021.9589743
- 1.Author(s): Luisa Peterson, Ion Victor Gosea, Peter Benner, Kai SundmacherPublished in Computers & Chemical Engineering by Elsevier BV in 2025, page: 10891710.1016/j.compchemeng.2024.108917
- 2.Author(s): Piotr Michalak, Mikołaj BobulaPublished in Journal of Building Performance Simulation by Informa UK Limited in 2025, page: 1-2010.1080/19401493.2025.2504003
- 3.Author(s): Philipp Glücker, Sleiman Mhanna, Thiemo Pesch, Andrea Benigni, Pierluigi MancarellaPublished in Applied Energy by Elsevier BV in 2025, page: 12634210.1016/j.apenergy.2025.126342
- 4.Author(s): Ariana Y. Ojeda-Paredes, Alexander Mitsos, Manuel DahmenPublished in Computers & Chemical Engineering by Elsevier BV in 2025, page: 10920010.1016/j.compchemeng.2025.109200
- 5.Author(s): Piotr MichalakPublished in Energies by MDPI AG in 2025, page: 235010.3390/en18092350
- 6.Author(s): Mohammed Asif Kattimani, Habib Masum, Sumeet Hangargi, Hasibur Rahman, Syed Mustafkhadri, G. S. GirishkumarPublished in Heat and Mass Transfer by Springer Science and Business Media LLC in 202510.1007/s00231-025-03616-x
- 7.Author(s): Jakob M. Fritz, Lea Riebesel, André Xhonneux, Dirk MüllerPublished in Energy Informatics by Springer Science and Business Media LLC in 202510.1186/s42162-025-00558-w
- 8.Author(s): Rushit Kansara, María Isabel Roldán SerranoPublished in Eng by MDPI AG in 2024, page: 3033-304810.3390/eng5040158
- 9.Author(s): Yifan Wang, Luka Bornemann, Christiane Reinert, Niklas von der AssenPublished in Computers & Chemical Engineering by Elsevier BV in 2024, page: 10858210.1016/j.compchemeng.2023.108582
- 10.Author(s): Anupam Parlikar, Benedikt Tepe, Marc Möller, Holger Hesse, Andreas JossenPublished in Energy Conversion and Management by Elsevier BV in 2024, page: 11820810.1016/j.enconman.2024.118208
- 11.Author(s): Efstratios N. Pistikopoulos, Yuhe TianPublished in Annual Review of Chemical and Biomolecular Engineering by Annual Reviews in 2024, page: 81-10310.1146/annurev-chembioeng-100522-112139
- 12.Author(s): Philipp Glücker, Thiemo Pesch, Andrea BenigniPublished in Applied Energy by Elsevier BV in 2024, page: 12373210.1016/j.apenergy.2024.123732
- 13.Author(s): Jan Stock, Till Schmidt, André Xhonneux, Dirk MüllerPublished in Energy by Elsevier BV in 2024, page: 13246110.1016/j.energy.2024.132461
- 14.Author(s): Michael Lockan, Rushit KansaraPublished in Journal of Environmental Management by Elsevier BV in 2024, page: 12202310.1016/j.jenvman.2024.122023
- 15.Author(s): Rushit Kansara, Michael Lockan, María Isabel Roldán SerranoPublished in Energies by MDPI AG in 2024, page: 35010.3390/en17020350
- 16.Author(s): M.I. Roldán, R. KansaraPublished in RE&PQJ by UK Zhende Publishing Limited Company in 2024, page: 33-3810.52152/3926
- 17.Author(s): Jan Stock, André Xhonneux, Dirk MüllerPublished in Energy by Elsevier BV in 2024, page: 13187210.1016/j.energy.2024.131872
- 18.Author(s): Oumaima Mahir, Abdelilah Rochd, Aboubakr Benazzouz, Hicham GhenniouiPublished in Heliyon by Elsevier BV in 2024, page: e3907510.1016/j.heliyon.2024.e39075
- 19.Author(s): Luisa Peterson, Ion Victor Gosea, Peter Benner, Kai SundmacherPublished in SSRN Electronic Journal by Elsevier BV in 202410.2139/ssrn.4747265
- 20.Author(s): Mauricio Carcamo-Medel, Raul Fuentes, Guillermo NarsilioPublished in Communications Earth & Environment by Springer Science and Business Media LLC in 202410.1038/s43247-024-01439-y
- 21.Author(s): Ishan Bajaj, Xinyue Peng, Christos T. MaraveliasPublished in RSC Sustainability by Royal Society of Chemistry (RSC) in 2024, page: 943-96010.1039/d3su00244f
- 22.Author(s): Alexander Holtwerth, André Xhonneux, Dirk MüllerPublished in Energy Conversion and Management: X by Elsevier BV in 2024, page: 10056110.1016/j.ecmx.2024.100561
- 23.Author(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
- 24.Author(s): Marco WirtzPublished in Energy by Elsevier BV in 2023, page: 12657510.1016/j.energy.2022.126575
- 25.Author(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
- 26.Author(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
- 27.Author(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
- 28.Author(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
- 29.Author(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
- 30.Author(s): Xiwang Xiang, Xin Ma, Zhili Ma, Minda Ma, Weiguang CaiPublished in Buildings by MDPI AG in 2022, page: 8310.3390/buildings12010083
- 31.Author(s): Dominik Hering, Michael R. Faller, André Xhonneux, Dirk MüllerPublished in Energy by Elsevier BV in 2022, page: 12376610.1016/j.energy.2022.123766
- 32.Author(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
- 33.Author(s): Markus Fleschutz, Markus Bohlayer, Marco Braun, Michael D. MurphyPublished in Sustainability by MDPI AG in 2022, page: 802510.3390/su14138025
- 34.Author(s): Marco Langiu, Manuel Dahmen, Alexander MitsosPublished in Computers & Chemical Engineering by Elsevier BV in 2022, page: 10774510.1016/j.compchemeng.2022.107745
- 35.Author(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
- 1.Author(s): Yifan Wang, Niklas von der Assen, Qi ZhangPublished by Elsevier BV in 202510.2139/ssrn.5461101
- 2.Author(s): Sina Dibos, Thiemo Pesch, Andrea BenigniPublished by Elsevier BV in 202510.2139/ssrn.5080171
- 3.Author(s): Daoyu Ye, Shengxiang DengPublished by Elsevier BV in 202310.2139/ssrn.4574100
- 4.Author(s): Joel Rogawski, Reinhard MadlenerPublished by Applied Energy Innovation Institute (AEii) in 202210.46855/energy-proceedings-10200