Skip to content

Commit da355bd

Browse files
author
Wail Samjouni
committed
upload all module
0 parents  commit da355bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5151
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
__pycache__/
3+
*.pyc
4+
*.pyo
5+
*.pyd
6+
7+
venv/
8+
env/
9+
10+
.**/

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT) amended
2+
3+
Copyright (c) 2024 Julian Bischof, Simon Knoll, Michael Hörner, Wail Samjouni, André Müller and Jens Calisti - Institut Wohnen und Umwelt
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# DibsComuptingCore
2+
![DIBS_Logo](src/docs/img/DIBS_Logo.png)
3+
Dynamic ISO Building Simulator (DIBS) is a simulation program for calculating the space heating, occupancy hot water, cooling and electricity demand of German non-residential buildings. Further the DIBS calculates the heating value based energy uses, the primary energy and the greenhouse gas emission based on the defined factors of the German building energy ordinance (Gebäudeenergiegesetz). The adapted hourly dynamic building energy simulator for single buildings and building stocks is ready to use with [ENOB:dataNWG interview](https://www.datanwg.de/stichprobenerhebung/breitenerhebung) and [on-site inspection](https://www.datanwg.de/stichprobenerhebung/tiefenerhebung) data. The underlying resistance-capacity-model is based on the simplified hourly method of ISO 13790:2008. DIBS is based on the [RC_BuildingSimulator](https://github.com/architecture-building-systems/RC_BuildingSimulator) and represents an extension of capabilities and adaptation to the requirements of the ENOB:dataNWG project.
4+
5+
## Getting Started
6+
7+
Python packages you need to use DIBS:
8+
- [>= Python 3.10.0](https://www.python.org/)
9+
10+
## Installation
11+
To install the package, use the following command:
12+
13+
```bash
14+
pip install dibs_computing_core==1.0.0
15+
```
16+
17+
## Further information
18+
19+
For a detailed installation guide and further information on DIBS see the [wiki](https://github.com/IWUGERMANY/DIBS---Dynamic-ISO-Building-Simulator/wiki)
20+
21+
## References
22+
- DIN EN ISO 13790:2008-09. Energieeffizienz von Gebäuden - Berechnung des Energiebedarfs für Heizung und Kühlung (ISO 13790:2008). Berlin: Beuth Verlag.
23+
- Jayathissa, P. (2020). 5R1C Building Simulation Model. URL: https://github.com/architecture-building-systems/RC_BuildingSimulator
24+
- DIN V 18599, 2016: DIN V 18599-1 - Energetische Bewertung von Gebäuden - Berechnung des Nutz-, End- und Primärenergiebedarfs für Heizung, Kühlung, Lüftung, Trinkwarmwasser und Beleuchtung.
25+
- SIA 2024, 2015: SIA 2024 - Raumnutzungsdaten für die Energie- und Gebäudetechnik.
26+
- Quaschning, Volker; Hanitsch, Rolf (1995): SHADE CALCULATIONS IN PHOTOVOLTAIC SYSTEMS. in ISES Solar World Conference - Harare / Zimbabwe - September 11-15, 1995. In ISES Solar World Conference 1995. Available online at https://www.researchgate.net/publication/242728998_SHADE_CALCULATIONS_IN_PHOTOVOLTAIC_SYSTEMS, checked on 3/8/2022.
27+
- Crawley, Drury B.; Barnaby, Charles S. (2019): Weather and climate in building performance simulation. In Jan L.M. Hensen, Roberto Lamberts (Eds.): Building Performance Simulation for Design and Operation. Second edition. | Abingdon, Oxon, New York, NY : Routledge, 2019.: Routledge, pp. 191–220.
28+
-climate.onebuilding.org (2023): \climatewebsite\WMO_Region_6_Europe\DEU_Germany. Available online at https://climate.onebuilding.org/WMO_Region_6_Europe/DEU_Germany/index.html, updated on 9/16/2023, checked on 12/13/2023.
29+
-GEG2020 (2020): Gesetz zur Vereinheitlichung des Energieeinsparrechts für Gebäude und zur Änderung weiterer Gesetze. Vom 8. August 2020. In Bundesanzeiger 2020 (Bundesgesetzblatt Teil I Nr. 37), pp. 1728–1794. Available online at https://www.bgbl.de/xaver/bgbl/text.xav?SID=&tf=xaver.component.Text_0&tocf=&qmf=&hlf=xaver.component.Hitlist_0&bk=bgbl&start=%2F%2F*%5B%40node_id%3D%27941169%27%5D&skin=pdf&tlevel=-2&nohist=1&sinst=6C6E28BB.
30+
- Szokolay, Steven V. (2008): Introduction to architectural science. The basis of sustainable design. 2. ed. Amsterdam, Heidelberg: Architectural Press.
31+
- BMWE and BMIBH (4/15/2021): Bekanntmachung der Regeln für Energieverbrauchswerte und der Vergleichswerte im Nichtwohngebäudebestand, revised BAnz AT 5/3/2021 B1. In : Bekanntmachung. Available online at https://www.bundesanzeiger.de/pub/publication/GZb2vlJQJe1XCpSyM6h?0, checked on 7/19/2021.
32+
- DIN 4108-2, Februar 2013: Thermal protection and energy economy in buildings.
33+
- Hörner, Michael; Knissel, Jens; Bagherian, Behrooz; Born, Rolf; Grafe, Michael; Jedek, Christoph; Loga, Tobias (2014): Teilenergiekennwerte von Nichtwohngebäuden (TEK). Berechnungsgrundlagen des TEK-Tools Version TEK 6.2. Darmstadt: IWU. Available online at http://www.iwu.de/fileadmin/user_upload/dateien/energie/tektool/TEK-Methodik_6.2_final_ISBN.pdf.
34+
35+
36+
---
37+
38+
## Publications
39+
- Bischof, Julian; Knoll, Simon; Duffy, Aidan (2022): DEVELOPMENT OF A PYTHON-BASED SIMPLIFIED HOURLY BUILDING MODEL FOR NON-DOMESTIC BUILDING STOCK OPERATIONAL ENERGY SIMULATIONS. In the proceedings of the BauSIM 2022 in Weimar, 20. – 22. September 2022. In: BauSIM2022 2022. URL: https://www.researchgate.net/publication/364386249_DEVELOPMENT_OF_A_PYTHON-BASED_SIMPLIFIED_HOURLY_BUILDING_MODEL_FOR_NON-DOMESTIC_BUILDING_STOCK_OPERATIONAL_ENERGY_SIMULATIONS.
40+
41+
---
42+
43+
## Usage
44+
45+
import dibs-computing-core
46+
47+
The Dynamic ISO Building Simulator has been developed in context of the 'ENOB:DataNWG Forschungsdatenbank Nichtwohngebäude' (www.datanwg.de) project and the project 'FlexGeber - Demonstration of flexibility options in the building sector and their integration with the energy system in Germany' at Institut Wohnen und Umwelt (IWU), Darmstadt.
48+
<p float="left">
49+
<img src="src/docs/img/IWU_Logo.PNG" width="15%" />
50+
</p>
51+
52+
<b>ENOB:DataNWG<b>
53+
<b>Funding code:</b> Fkz.: 03ET1315
54+
<b>Project duration:</b> 01.12.2015 until 31.05.2021
55+
56+
<b>FlexGeber<b>
57+
<b>Funding code:</b> Fkz.: 03EGB0001
58+
<b>Project duration:</b> 01.10.2017 until 31.07.2022
59+
60+
<b>ENOB:LezBAU<b>
61+
<b>Funding code:</b> Fkz.: 03EN1074A
62+
</br><b>Project duration:</b> 01.01.2023 until 31.12.2025
63+
64+
<b>All funded by:</b>
65+
<p float="left">
66+
<img src="src/docs/img/BMWi_Logo.png" width="30%" />
67+
</p>
68+
in accordance with the parliamentary resolution of the German Parliament.
69+

pyproject.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[project]
2+
name = "dibs_computing_core"
3+
version = "1.0.0"
4+
description = "DIBS---Dynamic-ISO-Building-Simulator is a simulation program for calculating the space heating, occupancy hot water, cooling and electricity demand of German non-residential buildings. Further the DIBS calculates the heating value based energy uses, the primary energy and the greenhouse gas emission based on the defined factors of the German building energy ordinance (Gebäudeenergiegesetz). The underlying resistance-capacity-model is based on the simplified hourly method of ISO 13790:2008."
5+
readme = "README.md"
6+
requires-python = ">=3.10.0"
7+
license = { file = "LICENSE" }
8+
authors = [
9+
{ name = "Julian Bischof", email = "[email protected]" },
10+
{ name = "Simon Knoll" },
11+
{ name = "Michael Hörner" },
12+
{ name = "Wail Samjouni", email = "[email protected]" },
13+
{ name = "André Müller", email = "[email protected]" },
14+
{ name = "Jens Calisti", email = "[email protected]" },
15+
]
16+
keywords = ["Building", "Building-Stock", "Non-Domestic", "Non-Residential", "Operational", "Energy", "Greenhouse Gas", "Global Warming Potential", "Simulation", "Model", "Germany", "ISO 13790", "5R1C"]
17+
classifiers = [
18+
"Development Status :: 4 - Beta",
19+
"Programming Language :: Python"
20+
]
21+
22+
[tool.pytest.ini_options]
23+
pythonpath = [
24+
"src",
25+
]
26+
27+
addopts = [
28+
"--import-mode=importlib",
29+
]
30+
31+
[project.urls]
32+
Homepage = "https://github.com/IWUGERMANY/DIBS---Dynamic-ISO-Building-Simulator/tree/master"
33+
Documentation = "https://github.com/IWUGERMANY/DIBS---Dynamic-ISO-Building-Simulator/blob/master/doc/DIBS_documentation.pdf"
34+
Repository = "https://github.com/IWUGERMANY/DibsComputingCore"
35+
36+
[tool.black]
37+
line-length = 88
38+
target-version = ['py310']
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# 🪄 This is your project's Sourcery configuration file.
2+
3+
# You can use it to get Sourcery working in the way you want, such as
4+
# ignoring specific refactorings, skipping directories in your project,
5+
# or writing custom rules.
6+
7+
# 📚 For a complete reference to this file, see the documentation at
8+
# https://docs.sourcery.ai/Configuration/Project-Settings/
9+
10+
# This file was auto-generated by Sourcery on 2023-11-17 at 08:57.
11+
12+
version: '1' # The schema version of this config file
13+
14+
ignore: # A list of paths or files which Sourcery will ignore.
15+
- .git
16+
- venv
17+
- .venv
18+
- env
19+
- .env
20+
- .tox
21+
- node_modules
22+
- vendor
23+
24+
rule_settings:
25+
enable:
26+
- default
27+
disable: [] # A list of rule IDs Sourcery will never suggest.
28+
rule_types:
29+
- refactoring
30+
- suggestion
31+
- comment
32+
python_version: '3.9' # A string specifying the lowest Python version your project supports. Sourcery will not suggest refactorings requiring a higher Python version.
33+
34+
# rules: # A list of custom rules Sourcery will include in its analysis.
35+
# - id: no-print-statements
36+
# description: Do not use print statements in the test directory.
37+
# pattern: print(...)
38+
# language: python
39+
# replacement:
40+
# condition:
41+
# explanation:
42+
# paths:
43+
# include:
44+
# - test
45+
# exclude:
46+
# - conftest.py
47+
# tests: []
48+
# tags: []
49+
50+
# rule_tags: {} # Additional rule tags.
51+
52+
# metrics:
53+
# quality_threshold: 25.0
54+
55+
# github:
56+
# labels: []
57+
# ignore_labels:
58+
# - sourcery-ignore
59+
# request_review: author
60+
# sourcery_branch: sourcery/{base_branch}
61+
62+
# clone_detection:
63+
# min_lines: 3
64+
# min_duplicates: 2
65+
# identical_clones_only: false
66+
67+
# proxy:
68+
# url:
69+
# ssl_certs_file:
70+
# no_ssl_verify: false
71+
72+
# coding_assistant:
73+
# project_description: ''
74+
# enabled:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
5+
Vagrant.configure("2") do |config|
6+
config.vm.box = "ubuntu/trusty64"
7+
config.vm.provision :shell, path: "bootstrap.sh"
8+
# apt-get update
9+
# apt-get install -y apache2
10+
# SHELL
11+
end

src/dibs_computing_core/__init__.py

Whitespace-only changes.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
3+
# Generating locale, can be an issue on fresh DO servers
4+
export LANGUAGE=en_US.UTF-8
5+
export LANG=en_US.UTF-8
6+
export LC_ALL=en_US.UTF-8
7+
sudo locale-gen en_US.UTF-8
8+
sudo dpkg-reconfigure locales
9+
10+
# Update and upgrade without requiring manual GRUB configuration
11+
# To make GRUB headless https://askubuntu.com/questions/146921/how-do-i-apt-get-y-dist-upgrade-without-a-grub-config-prompt
12+
# To not mess up encoding https://stackoverflow.com/questions/18471764/vagrant-provisioning-switches-character-encoding
13+
unset UCF_FORCE_CONFFOLD
14+
export UCF_FORCE_CONFFNEW=YES
15+
ucf --purge /boot/grub/menu.lst
16+
17+
export DEBIAN_FRONTEND=noninteractive
18+
apt-get update
19+
# sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" -o Dpkg::Options::="--force-confold" --force-yes -fuy dist-upgrade
20+
21+
# Create swap space for installation of lxml https://stackoverflow.com/a/26762938
22+
sudo dd if=/dev/zero of=/swapfile bs=1024 count=524288
23+
sudo chmod 600 /swapfile
24+
sudo mkswap /swapfile
25+
sudo swapon /swapfile
26+
27+
# Installation of foodcampus-specific packages
28+
sudo apt-get install -y libpq-dev python3-dev libjpeg-dev libjpeg8 zlib1g libfreetype6
29+
30+
# Insall everything
31+
echo Downloading Pip...
32+
wget https://bootstrap.pypa.io/get-pip.py >/dev/null 2>&1
33+
python3 get-pip.py
34+
pip3 install virtualenvwrapper
35+
echo $PWD
36+
pip3 install -r /vagrant/requirements.txt
37+
38+
39+
# Pandas Fails to install with Pip3!!! Installation being annoying
40+
echo Installing Pandas with sudo apt get
41+
sudo apt-get install python3-pandas -y
42+
43+
44+
# Echo virtualenvironment things into bashrc, also for python3 compatibility
45+
echo "
46+
VIRTUALENVWRAPPER_PYTHON='/usr/bin/python3'
47+
export WORKON_HOME=/rc-simulator/.virtualenvs
48+
export PROJECT_HOME=/rc-simulator/
49+
source /usr/local/bin/virtualenvwrapper.sh
50+
cd /rc-simulator/
51+
workon rc_simulator
52+
" >> /home/vagrant/.bashrc
53+
54+
# Unmount swap
55+
sudo swapoff -a
56+
sudo locale-gen en_US.UTF-8
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# from .simulator import BuildingSimulator

0 commit comments

Comments
 (0)