About ebcpy
ebcpy
This PYthon package provides generic functions and classes commonly used for the analysis and optimization of energy systems, buildings and indoor climate (EBC).
Key features are:
TimeSeriesData
SimulationAPI
‘sOptimization wrapper
Pre-/Postprocessing
Modelica utilities
It was developed together with AixCaliBuHA
, a framework for an automated calibration of dynamic building and HVAC models. During this development, we found several interfaces relevant to further research. We thus decoupled these interfaces into ebcpy
and used the framework, for instance in the design optimization of heat pump systems (link).
Installation
To install, simply run
pip install ebcpy
In order to use all optional dependencies (e.g. pymoo
optimization), install via:
pip install ebcpy[full]
If you encounter an error with the installation of scikit-learn
, first install scikit-learn
separatly and then install ebcpy
:
pip install scikit-learn
pip install ebcpy
If this still does not work, we refer to the troubleshooting section of scikit-learn: https://scikit-learn.org/stable/install.html#troubleshooting. Also check issue 23 for updates.
In order to help development, install it as an egg:
git clone https://github.com/RWTH-EBC/ebcpy
pip install -e ebcpy
How to get started?
We recommend running our jupyter-notebook to be guided through a helpful tutorial.
For this, run the following code:
# If jupyter is not already installed:
pip install jupyter
# Go into your ebcpy-folder (cd \path_to_\ebcpy) or change the path to tutorial.ipynb and run:
jupyter notebook tutorial\tutorial.ipynb
Or, clone this repo and look at the examplesREADME.md file. Here you will find several examples to execute.
How to cite ebcpy
Please use the following metadata to cite ebcpy
in your research:
@article{Wuellhorst2022,
doi = {10.21105/joss.03861},
url = {https://doi.org/10.21105/joss.03861},
year = {2022},
publisher = {The Open Journal},
volume = {7},
number = {72},
pages = {3861},
author = {Fabian Wüllhorst and Thomas Storek and Philipp Mehrfeld and Dirk Müller},
title = {AixCaliBuHA: Automated calibration of building and HVAC systems},
journal = {Journal of Open Source Software}
}
TimeSeriesData
Note that we use our own TimeSeriesData
object which inherits from pd.DataFrame
. The aim is to make tasks like loading different filetypes or applying multiple tags to one variable more convenient, while conserving the powerful tools of the DataFrame.
Just a quick intro here:
FloatIndex and DateTimeIndex
Measured data typically holds a datetime stamps (DateTimeIndex
) while simulation result files hold absolute seconds (FloatIndex
).
You can easily convert back and forth using:
# From Datetime to float
tsd.to_float_index()
# From float to datetime
tsd.to_datetime_index()
# To clean your data and create a common frequency:
tsd.clean_and_space_equally(desired_freq="1s")
Documentation
Visit our official Documentation.
Problems?
Please raise an issue here.