ETHOS.HiSim - Household Infrastructure and Building Simulator
ETHOS.HiSim is a Python package for simulation and analysis of household scenarios and building systems using modern components as alternative to fossil fuel based ones. This package integrates load profiles generation of electricity consumption, heating demand, electricity generation, and smart strategies of modern components, such as heat pump, battery, electric vehicle or thermal energy storage. ETHOS.HiSim is a package under development by Forschungszentrum Jülich und Hochschule Emden/Leer. For detailed documentation, please access ReadTheDocs of this repository.
Install Graphviz
If you want to use the feature that generates system charts, you need to install GraphViz in your system. If you don't have Graphviz installed, you will experience error messages about a missing dot.exe under Windows.
Follow the installation instructions from here: https://www.graphviz.org/download/
(or simply disable the system charts)
Clone Repository
To clone this repository, enter the following command to your terminal:
git clone https://github.com/FZJ-IEK3-VSA/HiSim.git
Virtual Environment
Before installing ETHOS.Hisim, it is recommended to set up a Python virtual environment. Let hisimvenv be the name of
virtual environment to be created. For Windows users, setting the virtual environment in the path \Hisim is done with
the command line:
python -m venv hisimvenv
After its creation, the virtual environment can be activated in the same directory:
hisimvenv\Scripts\activate
For Linux/Mac users, the virtual environment is set up and activated as follows:
virtual hisimvenv source hisimvenv/bin/activate
Alternatively, Anaconda can be used to set up and activate the virtual environment:
conda create -n hisimvenv python=3.10
conda activate hisimvenv
With the successful activation, ETHOS.HiSim is ready to be locally installed.
Install Package
After setting up the virtual environment, install the package to your local libraries:
pip install -e .
Optional: Set Environment Variables
Certain components might access APIs to retrieve data. In order to use them, you need to set the url and key as environment variables. This can be done with an .env file wihtin the HiSim root folder or with system tools. The environment variables are:
UTSP_URL
UTSP_API_KEY
Executing a Building Simulation
In ETHOS.HiSim we are calling a specific building configuration a system setup. A system setup encompasses the building itself, all the technical infrastructure and other parameters, such as geographic location, weather, residents, energy prices and many more. You can find the predefined system setups in the directory HiSim/system_setups.
Run Simple System Setups
We provide some simplified examples to show the general principles of the simulation.
You can run the simple system setups in the directory HiSim/system_setups with the following command:
python ../hisim/hisim_main.py simple_system_setup_one.py
or
python ../hisim/hisim_main.py simple_system_setup_two.py
This command executes hisim_main.py on the setup function setup_function implemented in the files simple_system_setup_one.py and simple_system_setup_two.py that are stored in HiSim/system_setups.
The results can be visualized under directory results created under the same directory where the script with the setup function is located.
Run Basic Household System Setup
The directory HiSim/system_setups also contains a basic household configuration in the script basic_household.py.
It can be executed with the following command:
python ../hisim/hisim_main.py basic_household.py
The system is set up with the following elements:
- Occupancy (Residents' Demands)
- Weather
- Photovoltaic System
- Building
- Heat Pump
Hence, photovoltaic modules and the heat pump are responsible for covering the electricity and thermal energy demands as
best as possible. As the name of the setup function says, the components are explicitly connected to each other, binding
inputs to their corresponding output sequentially. This is different from automatically connecting inputs and outputs
based on similarity. For a better understanding of explicit connection, proceed to section IO Connecting Functions.
Generic Setup Function Walkthrough
The basic structure of a setup function in the Household System Setups in HiSim/system_setups is as follows:
- Set the simulation parameters (See
SimulationParametersclass inhisim/hisim/component.py) - Create a
Componentobject and add it toSimulatorobject- Create a
Componentobject from one of the child classes implemented inhisim/hisim/components - Check if
Componentclass has been correctly imported - If necessary, connect your object's inputs with previous created
Componentobjects' outputs. You can use manual or automatic default connections. - Finally, add your
Componentobject toSimulatorobject
- Create a
- Repeat step 2 while all the necessary components have been created, connected and added to the
Simulatorobject.
Once you are done, you can run the setup function according to the description in the simple system setup run.
Package Structure
The main program is executed from hisim/hisim/hisim_main.py. The Simulator(simulator.py) object groups Components declared and added from the setups functions. The ComponentWrapper (simulator.py) gathers together the Components inside a Simulator object. The Simulator object performs the entire simulation under the function run_all_timesteps and stores the results in a subdirectory of hisim/hisim/results named after the executed setup function.
Plots, KPIs, CSV-files and the PDF-report can be generated by the class PostProcessor (hisim/hisim/postprocessing/postprocessing.py).
For this you need to add the respective PostProcessingOptions (hisim/hisim/postprocessingoptions.py) to your SimulationParameters when you are executing your Household System Setup in HiSim/system_setups.
Component Classes
All HiSim component classes are stored in hisim/hisim/components directory and inherent from the parent class Component (hisim/hisim/component.py). They can be used in your setup function to customize different configurations.
A Component child class has to have the following methods implemented:
- i_save_state: updates previous state variable with the current state variable
- i_restore_state: updates current state variable with the previous state variable
- i_simulate: performs a timestep iteration for the
Component - i_doublecheck: checks if the values are expected throughout the iteration
These methods are used by Simulator to execute the simulation and generate the results.
Connecting Input/Outputs
In the following the basic principle of the Component connections is explained.
Let my_home_electricity_grid and my_appliance be Component objects used in the setup function. The object my_apppliance has an output ElectricityOutput that has to be connected to an object ElectricityGrid. The object my_home_electricity_grid has an input ElectricityInput, where this connection takes place. In the setup function, the connection is performed with the method connect_input from the Simulator class:
my_home_electricity_grid.connect_input(input_fieldname=my_home_electricity_grid.ELECTRICITY_INPUT,
src_object_name=my_appliance.component_name,
src_field_name=my_appliance.ELECTRICITY_OUTPUT)
Configuration Automator
A configuration automator is under development and has the goal to reduce connections calls among similar components.
Contributions and Collaborations
ETHOS.HiSim welcomes any kind of feedback, contributions, and collaborations. If you are interested in joining the project, adding new features, or providing valuable insights, feel free to reach out (email to k.rieck@fz-juelich.de) and participate in our bi-weekly HiSim developer meetings. Additionally, we encourage you to utilize our Issue section to share feedback or report any bugs you encounter. We look forward to your contributions and to making meaningful improvements. Happy coding!
License
MIT License
Copyright (C) 2020-2021 Noah Pflugradt, Leander Kotzur, Detlef Stolten, Tjarko Tjaden, Kevin Knosala, Sebastian Dickler, Katharina Rieck, David Neuroth, Johanna Ganglbauer, Vitor Zago, Frank Burkard, Maximilian Hillen, Marwa Alfouly, Franz Oldopp, Markus Blasberg, Kristina Dabrock, Valentin Janser, Nicolai Gölz, Felix Schattmann, Jonas Hoppe
You should have received a copy of the MIT License along with this program. If not, see https://opensource.org/licenses/MIT
About Us
We are the Institute of Climate and Energy Systems - Juelich Systems Analysis belonging to the Forschungszentrum Jülich. Our interdisciplinary institute's research is focusing on energy-related process and systems analyses. Data searches and system simulations are used to determine energy and mass balances, as well as to evaluate performance, emissions and costs of energy systems. The results are used for performing comparative assessment studies between the various systems. Our current priorities include the development of energy strategies, in accordance with the German Federal Government’s greenhouse gas reduction targets, by designing new infrastructures for sustainable and secure energy supply chains and by conducting cost analysis studies for integrating new technologies into future energy market frameworks.
Contributions and Users
Development Partners:
Hochschule Emden/Leer inside the project "Piegstrom".
4ward Energy inside the EU project "WHY" and the FFG project "AI4CarbonFreeHeating"
Acknowledgement
This work was supported by the Helmholtz Association under the Joint Initiative "Energy System 2050 A Contribution of the Research Field Energy".
For this work weather data is based on data from ["German Weather Service (Deutscher Wetterdienst-DWD)"](https://www.dwd.de/DE/Home/home_node.html/, https://www.dwd.de/DE/service/rechtliche_hinweise/rechtliche_hinweise_node.html) and "NREL National Solar Radiation Database" (License: Creative Commons Attribution 3.0 United States License, Creative Commons BY 4.0); individual values are averaged.
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 891943.
This project has received funding from the FFG under the topic “Digital Technologies”, an initiative of the Federal Ministry for Climate Action, Environment, Energy, Mobility, Innovation and Technology (BMK), through the project "AI4CarbonFreeHeating"
This project has received funding from the Federal Ministry for Economic Affairs and Climate Actions (BMWK.IIB4) under the WAAGE Grant Program (Grant No. 03EI1044/03EE5031D).
Metadata
Release files for hisim 1.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hisim-1.2.4.tar.gz | 84.2 MB | With provenance | Details for hisim-1.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hisim-1.2.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for hisim-1.2.4-py2.py3-none-any.whl |
Total release size: 169.5 MB
Release files / hisim-1.2.4.tar.gz
| Download URL | hisim-1.2.4.tar.gz |
|---|---|
| Size | 84.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aca09707ce69ca154060929e4ceb7224003f73454463d19297b27efc6dc98092
|
|
BLAKE2b-256 checksum How to use checksums |
46027e547b62e8e71464229b1f8d59c9902a11c9fdea1c33a2a79b9b5d677c98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency logRelease files / hisim-1.2.4-py2.py3-none-any.whl
| Download URL | hisim-1.2.4-py2.py3-none-any.whl |
|---|---|
| Size | 85.3 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e9b4d77b373d424bbdf269e8f268ff0762cc726bf48b09e7ad2dad9a5b7649d5
|
|
BLAKE2b-256 checksum How to use checksums |
489f15b1cb3a53a999e09d322f43586ee7a788d0319edad4e6fc74c1a3c136cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency logSecurity for hisim 1.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for hisim-1.2.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.