Examples
This folder contains several example files which help with the understanding of AixCaliBuHA.
Getting started
You have three ways of accessing the examples:
Only via markdown to read. Use the .md-files under examples/docs
Offline using jupyter-notebook. Use the .ipynb-files under examples/jupyter_notebooks
Offline using python. Use the .py-files under examples. While these examples should run in any IDE, we advise using PyCharm.
For the latter two, be sure to:
Create a clean environment of python 3.8 or 3.9. In Anaconda run:
conda create -n py38_ebcpy python=3.8
Activate the environment in your terminal. In Anaconda run:
activate py38_ebcpy
Clone the library using
git clone --recurse-submodules https://github.com/RWTH-EBC/AixCaliBuHA
Install the library using
pip install -e AixCaliBuHA
We have two models to show the calibration process for different components inside typical building and HVAC systems.
Example model A: This model is of a heat pump system supplying heat to a room using a radiator. The models are based on the
AixLib
.Example model B: This model is of a pump and a valve from the Modelica Standard Library.
Currently, example A runs only on windows. Example B runs on both linux and windows.
Additionally, you need Dymola installed for the first example of model A. If you don’t have Dymola, just follow example B or skip the first example. It’s not vital to understand this framework, it just helps to understand the energy system analysis prior to calibration.
To follow a specific example A or B, execute the first and second example for the case, for instance e1_A
.
The examples 3-5 are written for both, so just alter the parameter in the if __name__ == '__main__'
section, for instance EXAMPLE = A
to EXAMPLE = B
.
What can I learn in the examples?
e1_A_energy_system_analysis.py
and e1_B_energy_system_analysis.py
Learn how to analyze the model of your energy system
Improve your
SimulationAPI
knowledgeImprove your skill-set on
TimeSeriesData
Generate some measured data to later use in a calibration
e2_A_optimization_problem_definition.py
and e2_B_optimization_problem_definition.py
Learn how to formulate your calibration problem using our data_types
Get to know
TunerParas
Get to know
Goals
Get to know
CalibrationClass
Learn how to merge multiple classes
e3_sensitivity_analysis_example.py
Learn how to execute a simple sensitivity analysis
Learn how to automatically select sensitive tuner parameters
e3_1_verbose_sensitivity_analysis_example.py
Learn how to execute a verbose sensitivity analysis
Learn the meaning of the results the analysis of your model
Learn other sensitivity methods
Learn time dependent sensitivity analysis
Learn how to save the results for reproduction
e3_1_verbose_dymola_sensitivity_analysis_example.py
Learn how to execute a sensitivity analysis with the dymola api
e4_calibration_example.py
Learn the settings for a calibration
Learn how to use both Single- and MultiClassCalibration
Learn how to validate your calibration
e5_automated_process.py
Learn how to run everything in one script
e6_multiprocessing_calibration_example.py
Just as in e4, learn how to set up a calibration, this time while using multiprocessing
Install and use pandas==1.3.5 and tables==3.6.1