Adding New Models
Following sections present a conceptual overview, as well as a step by step example on how to incorporate yet unsupported models into Tessif.
The incorporation procedure is divided into 4 different categories:
Writing a python interface based on Tessif’s model terminology representing an energy supply system.
This step is independent of the steps 1 to 3 but a requirement for them. Therfor this is usually the first thing to do, if necessary.
Note
For most python based energy supply system simulation tools such an interface already exists. For most non-python based tools however you need to write your own interface
Adding Tessif’s Post Processing Capabilities
This step is independent of the following two but required by them. Hence it is usually the first thing to implement.
Adding Full Support
This step includes step 1, but is independent of step 3. It represents the standard use case when utilizing Tessif for what it was designed for, comparing and unifying energy supply system simulation models.
Adding Direct Model Support
This step includes step 1, but is independent of step 2. It basically consists of adding Tessif’s data format specific input parsing capabilities and a python interface for starting the simulation.
Standard use case for just implementing step 1 and 3 is utilizing Tessif’s in- and output capabilities but not caring about Tessif’s
energy systembeingtransformableinto a python based model representation.
0. Writing a python interface based on Tessif’s model terminology
Following descriptions give detailed overview on how to write a python interface for non python based energy supply system simulation code so it can be utilized in Tessif.
1. Adding Tessif’s Post-Processing Capabilities
Following paragraphs discuss the topic of incorporating a python based post processing interface for a new unsupported model using Tessif.
Use Case
Using Tessif’s Post Processing Capabilities like it’s Visualization and
Data Extraction for:
Other python based energy supply system simulation libraries
Numerical optimization tools written in other languages (Convention calls for an actual energy system object as input, the code written for the
Data Extractionmechanisms, however is just an interface returning a mapping)
Recommended Procedure
Implementing new model support for Tessif’s post processing capabilities includes following steps:
Creating a minimum working example as in
tessif.examples.data.tsf.py_hard.create_mwe()or intessif.examples.data.omf.py_hard.create_mwe()and create a respective description in docs/source/usage/supported_models/model_name.rst.This serves as both, a how to for you and your audiance, as well as a doctesting utility for testing and developing any further tessif support.
Implementing a
model_name(or abbrevatiion) module insidetessif.transform.es2mapping.So for incorporating i.e. PyPSA. A
tessif.transform.es2mapping.ppsamodule would be implemented.This module’s task is to extract the simulation results out of the model’s python based interface. It does so by providing
Transformerchild classes which specialize on extracting and post processing certain categories of results. For a list of necessary child classes, refer to thees2mapping.basemodule.
2. Adding Full Tessif Support
The following paragraphs explain how to fully incorporate an unsupported model into Tessif and why that might be useful.
Use Case
Implementing full Tessif support is useful for:
Utilizing
Tessif's Model Comparison UtilitiesWrapping other python based energy supply system simulation interfaces in Tessif’s
Input Parsingand Visualization Capabilities.
Recommended Procedure
In addition to Adding Tessif’s Post Processing Capabilities following steps are necessary to realize a full support:
Eins
Zwei
3. Adding Direct Model Support / Tessif Input Capabilities
Following paragraphs describe how to utilize Tessif’s data format specific input parsing capabilities to write a python interface that reads in model flavored data (as opposed to Tessif flavored data) as well as a python interface for conducting the simulation.
Use Case
Implementing direct model support via Tessif can be useful for:
Utilizing Tessif’s in- and output capabilities but not caring about Tessif’s
energy systembeingtransformableinto a python based model representation.
Recommended Procedure
In addition to Adding Tessif’s Post Processing Capabilities following steps are necessary to realize a full support:
Eins
Zwei