HiSim
Simulation and analysis of household scenarios using modern components as alternative to fossil fuel based ones.
https://github.com/FZJ-IEK3-VSA/HiSim
Category: Consumption
Sub Category: Buildings and Heating
Last synced: about 6 hours ago
JSON representation
Repository metadata
HiSim - House Infrastructure Simulator
- Host: GitHub
- URL: https://github.com/FZJ-IEK3-VSA/HiSim
- Owner: FZJ-IEK3-VSA
- License: mit
- Created: 2021-10-05T11:08:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T11:35:14.000Z (17 days ago)
- Last Synced: 2025-04-20T10:40:22.762Z (7 days ago)
- Language: Python
- Size: 861 MB
- Stars: 32
- Watchers: 4
- Forks: 14
- Open Issues: 20
- Releases: 2
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Citation: CITATION.cff
- Authors: AUTHORS.rst
README.md
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.9
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
Run Simple System Setups
Run the python interpreter in the HiSim/system_setups
directory 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 is as follows:
- Set the simulation parameters (See
SimulationParameters
class inhisim/hisim/component.py
) - Create a
Component
object and add it toSimulator
object- Create a
Component
object from one of the child classes implemented inhisim/hisim/components
- Check if
Component
class has been correctly imported
- Check if
- If necessary, connect your object's inputs with previous created
Component
objects' outputs. - Finally, add your
Component
object toSimulator
object
- Create a
- Repeat step 2 while all the necessary components have been created, connected and added to the
Simulator
object.
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 Component
s declared and added from the setups functions. The ComponentWrapper
(simulator.py
) gathers together the Component
s inside a Simulator
object. The Simulator
object performs the entire simulation under the function run_all_timesteps
and stores the results in a Python pickle data.pkl
in a subdirectory of hisim/hisim/results
named after the executed setup function. Plots and the report are automatically generated from the pickle by the class PostProcessor
(hisim/hisim/postprocessing/postprocessing.py
).
Component Class
A child class inherits from the Component
class in hisim/hisim/component.py
and 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.
Component
Children
List of Theses classes inherent from Component
(component.py
) class and can be used in your setup function to customize different configurations. All Component
class children are stored in hisim/hisim/components
directory. Some of these classes are:
RandomNumbers
(random_numbers.py
)SimpleWaterStorage
(simple_water_storage.py
)Transformer
(transformer_rectifier.py
)PVSystem
(generic_pv_system.py
)SimpleCHP
(generic_chp.py
)CSVLoader
(csvloader.py
)SumBuilderForTwoInputs
(sumbuilder.py
)SumBuilderForThreeInputs
(sumbuilder.py
)- ToDo: more components to be added
Connecting Input/Outputs
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.
Post Processing
After the simulator runs all time steps, the post processing (postprocessing.py
) reads the persistent saved results, plots the data and generates a report.
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 [email protected]) and participate in our HiSim developer meetings held every second Monday. 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
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)" and "NREL National Solar Radiation Database" (License: Creative Commons Attribution 3.0 United States License); 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 furthermore recieves funding by the FFG through the project "AI4CarbonFreeHeating".
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit. # Visit https://bit.ly/cffinit to generate yours today! cff-version: 1.2.0 title: ETHOS.HiSim - House Infrastructure Simulator message: >- If you use this software, please cite it using the metadata from this file. type: software authors: - given-names: Noah family-names: Pflugradt email: [email protected] orcid: 'https://orcid.org/0000-0002-1982-8794' affiliation: Forschungszentrum Jülich repository-code: 'https://github.com/FZJ-IEK3-VSA/HiSim' license: MIT
Owner metadata
- Name: Forschungszentrum Jülich - Jülich Systems Analysis
- Login: FZJ-IEK3-VSA
- Email:
- Kind: organization
- Description: Institute of Climate and Energy Systems (ICE)
- Website: https://www.fz-juelich.de/iek/iek-3/EN/Home/home_node.html
- Location: Forschungszentrum Jülich
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/28654423?v=4
- Repositories: 16
- Last ynced at: 2024-12-23T04:12:17.721Z
- Profile URL: https://github.com/FZJ-IEK3-VSA
GitHub Events
Total
- Issues event: 15
- Watch event: 4
- Delete event: 6
- Member event: 1
- Issue comment event: 4
- Push event: 128
- Pull request review event: 19
- Pull request event: 35
- Create event: 12
Last Year
- Issues event: 15
- Watch event: 4
- Delete event: 6
- Member event: 1
- Issue comment event: 4
- Push event: 128
- Pull request review event: 19
- Pull request event: 35
- Create event: 12
Committers metadata
Last synced: 5 days ago
Total Commits: 1,181
Total Committers: 18
Avg Commits per committer: 65.611
Development Distribution Score (DDS): 0.681
Commits in past year: 313
Committers in past year: 6
Avg Commits per committer in past year: 52.167
Development Distribution Score (DDS) in past year: 0.061
Name | Commits | |
---|---|---|
k.rieck | k****k@f****e | 377 |
Noah Pflugradt | N****t@g****m | 301 |
Johanna Ganglbauer | j****r@4****t | 182 |
Vitor Zago | v****o@p****m | 71 |
d.neuroth | d****h@f****e | 53 |
Kevin Knosala | 5****a | 42 |
MaHi | 7****n | 32 |
Tjarko Tjaden | t****n@g****m | 26 |
efcollab | 8****b | 22 |
sdickler | s****r@f****e | 18 |
Max | m****n@f****e | 14 |
Hoppe-J | 1****J | 13 |
Marwa Alfouly | m****y@t****e | 12 |
markusblasberg | 6****g | 9 |
Kristina Dabrock | 1****k | 4 |
Noah Pflugradt | n****t@i****e | 3 |
FranzOldopp | 4****p | 1 |
Hauke Hoops | 7****i | 1 |
Committer domains:
- fz-juelich.de: 4
- iwv3.kfa-juelich.de: 1
- tum.de: 1
- 4wardenergy.at: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 72
Total pull requests: 326
Average time to close issues: 5 months
Average time to close pull requests: 13 days
Total issue authors: 18
Total pull request authors: 15
Average comments per issue: 0.72
Average comments per pull request: 0.11
Merged pull request: 250
Bot issues: 0
Bot pull requests: 0
Past year issues: 17
Past year pull requests: 47
Past year average time to close issues: about 2 months
Past year average time to close pull requests: 25 days
Past year issue authors: 7
Past year pull request authors: 6
Past year average comments per issue: 0.47
Past year average comments per pull request: 0.04
Past year merged pull request: 37
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- k-knosala (15)
- k-rieck (14)
- noah80 (9)
- Hoppe-J (6)
- kdabrock (5)
- MFaisalZaki (3)
- Mousa-Zerai (3)
- FranzOldopp (3)
- Marwa-AL (2)
- kknos (2)
- H0ooo (2)
- markusblasberg (2)
- sdickler (1)
- luzpaz (1)
- vitorzago (1)
Top Pull Request Authors
- k-rieck (104)
- joga4er (62)
- k-knosala (38)
- Hillenfz (28)
- Hoppe-J (21)
- sdickler (19)
- markusblasberg (14)
- DavidNeuroth (13)
- noah80 (8)
- ttjaden (7)
- vitorzago (3)
- kdabrock (3)
- efcollab (2)
- Marwa-AL (2)
- FranzOldopp (2)
Top Issue Labels
- improvement (12)
- feature request (8)
- bug (7)
- enhancement (4)
- documentation (3)
- question (1)
- maintenance (1)
Top Pull Request Labels
- bug (1)
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 410 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 7
- Total maintainers: 2
pypi.org: hisim
ETHOS.HiSim is a house infrastructure simulator
- Homepage: https://github.com/FZJ-IEK3-VSA/HiSim
- Documentation: https://hisim.readthedocs.io/
- Licenses: MIT license
- Latest release: 1.2.2 (published 7 months ago)
- Last Synced: 2025-04-27T14:02:38.918Z (about 6 hours ago)
- Versions: 7
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 410 Last month
-
Rankings:
- Dependent packages count: 7.31%
- Forks count: 11.463%
- Stargazers count: 13.132%
- Average: 14.593%
- Downloads: 18.973%
- Dependent repos count: 22.088%
- Maintainers (2)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- ts-graphviz/setup-graphviz v1 composite
- actions/checkout v2 composite
- actions/upload-artifact v2 composite
- openjournals/openjournals-draft-action master composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- python 3.9-slim build
- bslib ==0.6
- dataclass_wizard *
- dataclasses_json *
- graphviz *
- hplib ==1.9
- matplotlib *
- numpy *
- openpyxl *
- pandas *
- psutil *
- pvlib *
- pydot *
- pytest *
- reportlab *
- seaborn *
- sphinx *
- sphinx-rtd-theme *
- utspclient *
- actions/checkout v2 composite
- actions/setup-python v2 composite
- ts-graphviz/setup-graphviz v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- ts-graphviz/setup-graphviz v1 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- ts-graphviz/setup-graphviz v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- ts-graphviz/setup-graphviz v1 composite
Score: 12.865063069438625