HiSim - House Infrastructure Simulator

Related tags

MiscellaneousHiSim
Overview

Forschungszentrum Juelich Logo

HiSim - House Infrastructure Simulator

HiSim is a Python package for simulation and analysis of household scenarios using modern components as alternative to fossil fuel based ones. This package integrates load profiles generation of electricity consumption, heating demand, electricity generation, and strategies of smart strategies of modern components, such as heat pump, battery, electric vehicle or thermal energy storage. HiSim is a package under development by Forschungszentrum Jülich und Hochschule Emden/Leer.

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 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.8
conda activate hisimvenv

With the successful activation, hisim is ready to be locally installed.

Install package

After setting up the virtual environment, install the package to your local libraries:

python setup.py install

Run Simple Examples

Run the python interpreter in the hisim/examples directory with the following command:

python ../hisim/hisim.py examples first_example

This command executes hisim.py on the setup function first_example implemented in the file examples.py that is stored in hisim/examples. The same file contains another setup function that can be used: second_example. 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 Example

The directory hisim\examples also contains a basic household configuration in the script basic_household.py. The first setup function (basic_household_explicit) can be executed with the following command:

python ../hisim/hisim.py basic_household basic_household_explicit

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 to cover the electricity the 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 correspondingly to its output sequentially. This is difference then automatically connecting inputs and outputs based its similarity. For a better understanding of explicit connection, proceed to session IO Connecting Functions.

Generic Setup Function Walkthrough

The basic structure of a setup function follows:

  1. Set the simulation parameters (See SimulationParameters class in hisim/hisim/component.py)
  2. Create a Component object and add it to Simulator object
    1. Create a Component object from one of the child classes implemented in hisim/hisim/components
      1. Check if Component class has been correctly imported
    2. If necessary, connect your object's inputs with previous created Component objects' outputs.
    3. Finally, add your Component object to Simulator object
  3. 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 example run.

Package Structure

The main program is executed from hisim/hisim/hisim.py. The Simulator(simulator.py) object groups Components declared and added from the setups functions. The ComponentWrapper(simulator.py) gathers together the Components inside an 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.

List of Component children

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)
  • SimpleController (simple_controller.py)
  • SimpleSotrage (simple_storage.py)
  • Transformer (transformer.py)
  • PVSystem (pvs.py)
  • CHPSystem (chp_system.py)
  • Csvload (csvload.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.ElectricityInput,
                                       src_object_name=my_appliance.ComponentName,
                                       src_field_name=my_appliance.ElectricityOutput)

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.

License

MIT License

Copyright (C) 2020-2021 Noah Pflugradt, Vitor Zago, Frank Burkard, Tjarko Tjaden, Leander Kotzur, Detlef Stolten

You should have received a copy of the MIT License along with this program. If not, see https://opensource.org/licenses/MIT

About Us

Institut TSA

We are the Institute of Energy and Climate Research - Techno-economic Systems Analysis (IEK-3) 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

This software is developed together with the Hochschule Emden/Leer inside the project "Piegstrom".

Acknowledgement

This work was supported by the Helmholtz Association under the Joint Initiative "Energy System 2050 A Contribution of the Research Field Energy".

Helmholtz Logo

Owner
FZJ-IEK3
Institute of Energy and Climate Research - Techno-economic Systems Analysis (IEK-3)
FZJ-IEK3
Simple project to learn more about Bézier curves

Python Quadratic Bézier Simple project to learn more about Bézier curves. On this project i used some api's to graphics and gui pygame thorpy in theor

Kenned Ferreira 2 Mar 06, 2022
Dot Browser is a privacy-conscious web browser with smarts built-in for protection against trackers and advertisments online.

🌍 Take back your privacy with Dot Browser, the privacy-conscious web browser that protects you from being tracked and monitored online.

Dot HQ 1k Jan 07, 2023
PDX Code Guild Full Stack Python Bootcamp starting 2022/02/28

Class Liger Rough Timeline Weeks 1, 2, 3, 4: Python Weeks 5, 6, 7, 8: HTML/CSS/Flask Weeks 9, 10, 11: Javascript Weeks 12, 13, 14, 15: Django Weeks 16

PDX Code Guild 5 Jul 05, 2022
Experimental proxy for dumping the unencrypted packet data from Brawl Stars (WIP)

Brawl Stars Proxy Experimental proxy for version 39.99 of Brawl Stars. It allows you to capture the packets being sent between the Brawl Stars client

4 Oct 29, 2021
Projects using the Tkinter module in Python!

Tkinter projects This repository includes some Tkinter projects made by me. All of these are simple to understand. I create apps with good functionali

Amey 0 Sep 24, 2021
Swim between bookmarks in the Windows terminal

Marlin Swim between bookmarks in the terminal! Marlin is an easy to use bookmark manager for the terminal. Choose a folder, bookmark it and swim there

wilfredinni 7 Nov 03, 2022
pythonOS: An operating system kernel made in python and assembly

pythonOS An operating system kernel made in python and assembly Wait what? It uses a custom compiler called snek that implements a part of python3.9 (

Abbix 69 Dec 23, 2022
Este projeto se trata de uma análise de campanhas de marketing de uma empresa que vende acessórios para veículos.

Marketing Campaigns Este projeto se trata de uma análise de campanhas de marketing de uma empresa que vende acessórios para veículos. 1. Problema A em

Bibiana Prevedello 1 Jan 12, 2022
A MCPI hack with many features.

Morpheus 2.0 A MCPI hack with many features To Use: You will need to install the keyboard, pysimplegui, and MCPI python modules and you will need to e

11 Oct 11, 2022
Сервис служит прокси между cервисом регистрации ошибок платформы и системой сбора ошибок Sentry

Sentry Reg Service Сервис служит прокси между Cервисом регистрации ошибок платформы и системой сбора ошибок Sentry. Как развернуть Sentry onpremise. С

Ingvar Vilkman 13 May 24, 2022
【AI创造营】参赛作品

-AI-emmmm 【AI创造营】参赛作品 鬼畜小视频 AiStuido地址:https://aistudio.baidu.com/aistudio/projectdetail/1647685 BiliBili视频地址:https://www.bilibili.com/video/BV1Zv411b

107 Nov 09, 2022
Odoo. Open Source Apps To Grow Your Business.

Odoo Odoo is a suite of web based open source business apps. The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Mana

Odoo 27.6k Jan 09, 2023
Results of Robot Framework 5.0 survey

Robot Framework 5.0 survey results We had a survey asking what features Robot Framework community members would like to see in the forthcoming Robot F

Pekka Klärck 2 Oct 16, 2021
Your E-Canteen that is convenient and accessible wherever you are in the campus

Food Web E-Canteen System Your E-Canteen that is convenient and accessible wherever you are in the campus. Table of Contents About The Project Contrib

Pudding 5 Jan 07, 2023
Find all solutions to SUBSET-SUM, including negative, positive, and repeating numbers

subsetsum The subsetsum Python module can enumerate all combinations within a list of integers which sums to a specific value. It works for both negat

Trevor Phillips 9 May 27, 2022
Ahmed Hossam 12 Oct 17, 2022
Advanced python code - For students in my advanced python class

advanced_python_code For students in my advanced python class Week Topic Recordi

Ariel Avshalom 3 May 27, 2022
This is a Docker-based pipeline for preparing sextractor-ready multiwavelength images

Pipeline for creating NB422-detected (ODI) catalog The repository contains a Docker-based pipeline for preprocessing observational data. The pipeline

1 Sep 01, 2022
Yet another basic python package.

ironmelts A basic python package. Easy to use. Minimum requirements. Installing Linux python3 -m pip install -U ironmelts macOS python3 -m pip install

IRONMELTS 1 Oct 26, 2021
Improving the Transferability of Adversarial Examples with Resized-Diverse-Inputs, Diversity-Ensemble and Region Fitting

Improving the Transferability of Adversarial Examples with Resized-Diverse-Inputs, Diversity-Ensemble and Region Fitting

Junhua Zou 7 Oct 20, 2022