Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue465 multizone office simple hydronic finalize #619

Merged
merged 121 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
c232729
Added resource .csv files and weather .mos file
Aug 7, 2022
2dda932
Added library versions file
Aug 7, 2022
c658a5f
Added 1st version of model. WARNING: still subject to changes
Aug 8, 2022
5366d04
Added days generation script + results
Aug 8, 2022
f98680b
Added data generation script (only weather is necessary)
Aug 8, 2022
6188a35
Added html I/O script
Aug 8, 2022
c9ff132
renamed testcase for consistency
Aug 8, 2022
9798814
added config file
Aug 8, 2022
fb44c73
Run pre-commit
Aug 8, 2022
0d4ea6b
Created and run tests
Aug 8, 2022
29eb812
Added wrapped models, FMU and compile_fmu.py (WARNING: the latter scr…
Aug 8, 2022
f2c738b
Merge branch 'master' into issue465_multizone_office_simple_hydronic
icupeiro Aug 8, 2022
5f851d5
Run pre-commit
Aug 8, 2022
cdbb101
Merge branch 'issue465_multizone_office_simple_hydronic' of github.co…
Aug 8, 2022
0ce1318
Corrected makefile
Aug 8, 2022
90a05f2
Added missing kpis.json
Aug 8, 2022
b565d68
Updated tests after last merge with master
Aug 9, 2022
5bf1318
Merge branch 'master' of github.com:ibpsa/project1-boptest into issue…
Aug 9, 2022
6a969e9
Run pre-commit
Aug 9, 2022
0cc4b31
updated library versions
Aug 24, 2022
6997524
Merge branch 'master' of github.com:ibpsa/project1-boptest into issue…
Aug 24, 2022
b0b62a4
Updated models and FMUs
Aug 24, 2022
676d7c5
Updated KPIs json
Aug 24, 2022
b6cc818
Updated get_html_IO based on new resapi
Aug 24, 2022
acf500a
updated .csv files
Aug 24, 2022
933f9c1
updated scenarios json
Aug 24, 2022
63aa06f
added model documentation
Aug 24, 2022
e17e6cc
updated reference results
Aug 24, 2022
2550020
run pre-commit
Aug 24, 2022
6d5adfe
corrected emissions.csv EOF
Aug 25, 2022
f425b4a
updated model with percentiles
Aug 25, 2022
d88f8c8
updated emissions EOF (now consistent)
Aug 25, 2022
0a47885
updated documentation with percentiles
Aug 25, 2022
5f64c40
run pre-commit
Aug 25, 2022
af3b1fe
added resources to FMU
Aug 25, 2022
eedea13
Changed reference year to 2021
Aug 26, 2022
4813cb8
updated references + pre-commit
Aug 26, 2022
348f36b
Changed reference from protected variable to allow simulation in OM
Sep 13, 2022
baa6a8c
Solve typo
javiarrobas Sep 21, 2022
29e9370
Solve typo
javiarrobas Sep 21, 2022
a4a49d6
Add clarification for the overall heating and cooling production capa…
javiarrobas Sep 26, 2022
e96b5c2
Solve typo.
javiarrobas Sep 26, 2022
692fe93
Solve typo.
javiarrobas Sep 26, 2022
9e1a7cb
Solve typo.
javiarrobas Sep 26, 2022
134f848
Solve typo.
javiarrobas Sep 26, 2022
6cb59ae
Solve typo.
javiarrobas Sep 27, 2022
088b425
Correct set-points for consistency.
javiarrobas Sep 27, 2022
b2f6f1b
Add review document.
javiarrobas Sep 27, 2022
f8f46e1
Merge pull request #1 from JavierArroyoBastida/issue465_multizone_off…
icupeiro Sep 29, 2022
35242fb
removed obsolete file
Sep 29, 2022
021c267
added documentation to model + images
Sep 29, 2022
6f6f8fe
Merge branch 'master' of github.com:ibpsa/project1-boptest into issue…
Sep 29, 2022
572c0c4
added set of relevant variables to compare_references
Sep 29, 2022
2f45e84
recomputed reference results
Sep 29, 2022
7e29bfa
removed obsolete file
Sep 29, 2022
2c41bcc
run pre-commit
Sep 29, 2022
2f846bf
Unit test fixes and add new results
dhblum Oct 7, 2022
54e0e44
Correct typo in travis,yml
icupeiro Oct 11, 2022
59b9888
fix steerability fcu airside and heating cooling coil ahu
bmerema Dec 5, 2022
7b76da8
fix: FanCoilUnitsKPI.mo
bmerema Jul 12, 2023
ac99c6a
fix: south zone and north zone ahu text fixed
bmerema Jul 12, 2023
242744f
Merge pull request #2 from bmerema/issue465_multizone_office_simple_h…
icupeiro Aug 1, 2023
ce922e3
Merge branch 'master' of https://github.com/ibpsa/project1-boptest in…
Nov 27, 2023
23b2cae
Added model with heat pump
Dec 6, 2023
0d5d583
Corrected heat pump coefficients
Dec 6, 2023
e211ade
Updated documentation
Dec 6, 2023
3c38996
Updated documentation
Dec 7, 2023
81decbb
Updated documentation
Dec 7, 2023
829c2a1
Changes in BMS to comply with HP max supply temperatures
dhblum Jan 25, 2024
f0deae0
Edit parser and compile_fmu for OCT
dhblum Feb 2, 2024
0d99686
Update library_versions.json
dhblum Feb 8, 2024
6402947
Merge pull request #618 from icupeiro/issue465_multizone_office_simpl…
dhblum Feb 8, 2024
876a083
Merge branch 'master' into issue465_multizone_office_simple_hydronic
dhblum Feb 8, 2024
0104000
Merge branch 'master' into issue465_multizone_office_simple_hydronic
dhblum Feb 11, 2024
29c1705
Add testcase unit test to travis and makefile
dhblum Feb 11, 2024
98c6239
Fix parser
dhblum Feb 11, 2024
4d66429
Update reference results and pass tests
dhblum Feb 11, 2024
63d5533
Add forecast points to docs and update input,output docs
dhblum Feb 12, 2024
285ebcb
Update fmu
dhblum Feb 14, 2024
9d21943
Remove building of jm image in unit test
dhblum Feb 14, 2024
b0a2807
Small edits to doc [ci skip]
dhblum Feb 16, 2024
4b47f8e
Update release notes
dhblum Feb 16, 2024
2b08026
Update contributors [ci skip]
dhblum Feb 16, 2024
d3d811c
Merge branch 'master' into issue465_multizone_office_simple_hydronic
dhblum Feb 17, 2024
a89c7c1
Doc updates for resolved convos
dhblum Feb 21, 2024
ce3e91e
Changed schematic to have the drawing of a heat pump instead of a boiler
Feb 23, 2024
6f87022
Changed nominal temperature differences according to HP
Feb 23, 2024
660358f
Merge pull request #628 from icupeiro/issue465_multizone_office_simpl…
dhblum Feb 23, 2024
5603557
Update reference results
dhblum Feb 25, 2024
79b3c85
Update doc pump powers
dhblum Feb 25, 2024
557e7d0
Add floor plan image to doc
dhblum Feb 25, 2024
51eeea9
Update input, output, forecast points in doc [ci skip]
dhblum Feb 25, 2024
4c4388e
Update docs for dymola and confirm links work [ci skip]
dhblum Feb 25, 2024
6892e73
Update fmu
dhblum Feb 25, 2024
68f2722
Update testcases README [ci skip]
dhblum Feb 26, 2024
c567ba6
Merge branch 'master' into issue465_multizone_office_simple_hydronic
dhblum Mar 9, 2024
abe185f
Fix negative cooling power [ci skip]
dhblum Mar 9, 2024
0892d21
Remove extra spaces added [ci skip]
dhblum Mar 9, 2024
8b4bc13
Add azi=0
dhblum Jul 15, 2024
ad42000
Corrected model with the following changes 1. Changed hysteresis and …
Jul 8, 2024
06cba94
Merge branch 'issue465_multizone_office_simple_hydronic' of https://g…
Jul 8, 2024
5025042
Fix cherry pick
dhblum Jul 15, 2024
158b1f0
Merge branch 'master' into issue465_multizone_office_simple_hydronic
dhblum Jul 15, 2024
f0efad4
Merge branch 'master' into issue465_multizone_office_simple_hydronic
dhblum Jul 30, 2024
c9a95f9
Merge branch 'master' into issue465_multizone_office_simple_hydronic
dhblum Aug 5, 2024
069c649
Change heating production power to electric KPI tag [ci skip]
dhblum Aug 5, 2024
68f1193
Update docs [ci skip]
dhblum Aug 5, 2024
9b64b50
Update find_days and days.json
dhblum Aug 6, 2024
d6ed5c0
Update heating and cooling day figures
dhblum Aug 6, 2024
d2c3f16
Update unit test reference results
dhblum Aug 6, 2024
cd4dfad
Merge branch 'issue465_multizone_office_simple_hydronic' of https://g…
dhblum Aug 6, 2024
9eeaa8b
Remove unneeded fmu [ci skip]
dhblum Aug 23, 2024
1964f6c
Update release notes with OCT support [ci skip]
dhblum Aug 23, 2024
524154e
Fix release notes [ci skip]
dhblum Aug 23, 2024
b1400ca
Merge branch 'master' into issue465_multizone_office_simple_hydronic
dhblum Aug 23, 2024
c1013ed
Update reference results
dhblum Aug 23, 2024
2e496c7
Update wrapped fmu
dhblum Aug 23, 2024
7a5bfb8
Fix typo in find_days
dhblum Aug 24, 2024
c3adc85
Add tests for new find_days functionality
dhblum Aug 24, 2024
343e3eb
Add link to release notes and typo in test script [ci skip]
dhblum Aug 28, 2024
9b0549e
Update release notes [ci skip]
dhblum Aug 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ jobs:
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
script: cd testing && make build_jm_image && make test_twozone_apartment_hydronic
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
script: cd testing && travis_wait 90 make test_multizone_office_simple_hydronic_no_compile
- python: 3.9
install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 matplotlib==3.3.4 requests==2.25.1
script: cd testing && make build_jm_image && travis_wait 90 make test_multizone_office_simple_air ARG="-s test_peak_heat_day,test_typical_heat_day"
Expand Down
3 changes: 3 additions & 0 deletions contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Thank you to all who have provided guidance on the development of this software.
- Dave Biagioni, National Renewable Energy Laboratory
- David Blum, Lawrence Berkeley National Laboratory
- Yan Chen, Pacific Northwest National Laboratory
- Roel De Coninck, dnergy
- Iago Cupeiro Figueroa, Cupeiro Sinte, dnergy
- Konstantin Filonenko, University of Southern Denmark
- Gauthier-Clerc Francois, Pure Control
- Valentin Gavan, ENGIE
Expand All @@ -17,6 +19,7 @@ Thank you to all who have provided guidance on the development of this software.
- Yanfei Li, National Renewable Energy Laboratory
- Nicholas Long, National Renewable Energy Laboratory
- Robert Lutes, Pacific Northwest National Laboratory
- Bart Merema, dnergy
- Kefei Mo, Pacific Northwest National Laboratory
- Erik Paulson, Independent
- Matt Robinson, University of Colorado - Boulder
Expand Down
45 changes: 37 additions & 8 deletions parsing/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
from data.data_manager import Data_Manager
import warnings

def parse_instances(model_path, file_name):
if 'MODELICAPATH' in os.environ:
modelicapath=os.environ['MODELICAPATH']
else:
modelicapath=os.path.abspath('.')

def parse_instances(model_path, file_name, tool='JModelica'):
'''Parse the signal exchange block class instances using fmu xml.

Parameters
Expand All @@ -29,6 +34,9 @@ def parse_instances(model_path, file_name):
file_name : list
Path(s) to modelica file and required libraries not on MODELICAPATH.
Passed to file_name parameter of pymodelica.compile_fmu() in JModelica.
tool : str, optional
FMU compilation tool. "JModelica" or "OCT" supported.
Default is "JModelica".

Returns
-------
Expand All @@ -42,7 +50,12 @@ def parse_instances(model_path, file_name):
'''

# Compile fmu
fmu_path = compile_fmu(model_path, file_name, jvm_args="-Xmx8g", target='cs')
if tool == 'JModelica':
fmu_path = compile_fmu(model_path, file_name, jvm_args="-Xmx8g", target='cs')
elif tool == 'OCT':
fmu_path = compile_fmu(model_path, file_name, modelicapath=modelicapath, jvm_args="-Xmx8g", target='cs')
else:
raise ValueError('Tool {0} unknown.'.format(tool))
# Load fmu
fmu = load_fmu(fmu_path)
# Check version
Expand Down Expand Up @@ -105,7 +118,7 @@ def parse_instances(model_path, file_name):

return instances, signals

def write_wrapper(model_path, file_name, instances):
def write_wrapper(model_path, file_name, instances, tool='JModelica'):
'''Write the wrapper modelica model and export as fmu

Parameters
Expand All @@ -118,6 +131,9 @@ def write_wrapper(model_path, file_name, instances):
instances : dict
Dictionary of overwrite and read block class instance lists.
{'Overwrite': [str], 'Read': [str]}
tool : str, optional
FMU compilation tool. "JModelica" or "OCT" supported.
Default is "JModelica".

Returns
-------
Expand Down Expand Up @@ -179,18 +195,28 @@ def write_wrapper(model_path, file_name, instances):
# End file -- with hard line ending
f.write('end wrapped;\n')
# Export as fmu
fmu_path = compile_fmu('wrapped', [wrapped_path]+file_name, jvm_args="-Xmx8g", target='cs')
if tool == 'JModelica':
fmu_path = compile_fmu('wrapped', [wrapped_path]+file_name, jvm_args="-Xmx8g", target='cs')
elif tool == 'OCT':
fmu_path = compile_fmu('wrapped', [wrapped_path]+file_name, modelicapath=modelicapath, jvm_args="-Xmx8g", target='cs')
else:
raise ValueError('Tool {0} unknown.'.format(tool))
# If there are not, write and export wrapper model
else:
# Warn user
warnings.warn('No signal exchange block instances found in model. Exporting model as is.')
# Compile fmu
fmu_path = compile_fmu(model_path, file_name, jvm_args="-Xmx8g", target='cs')
if tool == 'JModelica':
fmu_path = compile_fmu(model_path, file_name, jvm_args="-Xmx8g", target='cs')
elif tool == 'OCT':
fmu_path = compile_fmu(model_path, file_name, modelicapath=modelicapath, jvm_args="-Xmx8g", target='cs')
else:
raise ValueError('Tool {0} unknown.'.format(tool))
wrapped_path = None

return fmu_path, wrapped_path

def export_fmu(model_path, file_name):
def export_fmu(model_path, file_name, tool='JModelica'):
'''Parse signal exchange blocks and export boptest fmu and kpi json.

Parameters
Expand All @@ -200,6 +226,9 @@ def export_fmu(model_path, file_name):
file_name : list
Path(s) to modelica file and required libraries not on MODELICAPATH.
Passed to file_name parameter of pymodelica.compile_fmu() in JModelica.
tool : str, optional
FMU compilation tool. "JModelica" or "OCT" supported.
Default is "JModelica".

Returns
-------
Expand All @@ -211,9 +240,9 @@ def export_fmu(model_path, file_name):
'''

# Get signal exchange instances and kpi signals
instances, signals = parse_instances(model_path, file_name)
instances, signals = parse_instances(model_path, file_name, tool)
# Write wrapper and export as fmu
fmu_path, _ = write_wrapper(model_path, file_name, instances)
fmu_path, _ = write_wrapper(model_path, file_name, instances, tool)
# Write kpi json
kpi_path = os.path.join(os.getcwd(), 'kpis.json')
with open(kpi_path, 'w') as f:
Expand Down
4 changes: 4 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Released on xx/xx/xxxx.
- Fix unit tests for possible false passes in certain test cases. This is for [#620](https://github.com/ibpsa/project1-boptest/issues/620).


**The following new test cases have been added:**

- ``multizone_office_simple_hydronic``, a 2-zone typical office building in Brussels, Belgium, served by fan-coil units for space heating and cooling, air handling units for space ventilation, an air-source heat pump for hot water production, and an air-cooled chiller for chilled water production. This is for [#465](https://github.com/ibpsa/project1-boptest/issues/465).

## BOPTEST v0.5.0

Released on 10/04/2023.
Expand Down
7 changes: 4 additions & 3 deletions testcases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ This directory contains test cases for BOPTEST. A summary of available test cas
| ``bestest_air``| BESTEST Case 900 room model with idealized fan coil unit.|**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**:<br />``'peak_heat_day'``, <br />``'typical_heat_day'``, <br />``'peak_cool_day'``, <br />``'typical_cool_day'``, <br />``'mix_day'``|
| ``bestest_hydronic``| BESTEST Case 900 room model with gas boiler and radiator.|**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**: <br />``'peak_heat_day'``, <br />``'typical_heat_day'``|
| ``bestest_hydronic_heat_pump``| BESTEST Case 900 room model, scaled by four in floor area, that uses a heat pump as heating production system and floor heating as heating emission system.|**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**: <br />``'peak_heat_day'``, <br />``'typical_heat_day'``|
| ``twozone_apartment_hydronic``| Low energy consumption two room aparment in Milan. Only heating is considered. The generation system is a heat pump and the emission system is floor heating. |**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**: <br />``'peak_heat_day'``, <br />``'typical_heat_day'``|
| ``multizone_residential_hydronic``| Multi-zone residential hydronic model with gas boiler, radiators, and ideal cooling system. |**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**: <br />``'peak_heat_day'``, <br />``'typical_heat_day'``|
| ``twozone_apartment_hydronic``| Low energy consumption 2 zone apartment in Milan. Only heating is considered. The generation system is a heat pump and the emission system is floor heating. |**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**: <br />``'peak_heat_day'``, <br />``'typical_heat_day'``|
| ``multizone_residential_hydronic``| Multi-zone (8 zones) residential hydronic model with gas boiler, radiators, and ideal cooling system. |**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**: <br />``'peak_heat_day'``, <br />``'typical_heat_day'``|
| ``singlezone_commercial_hydronic``| Single-zone commercial building model representing a university building with district heating source, zone radiator, occupancy based on real data, and air handling unit providing fresh air with CO2 control and heat recovery. |**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**: <br />``'peak_heat_day'``, <br />``'typical_heat_day'``|
| ``multizone_office_simple_air`` | Multi-zone commercial building model based on U.S. DOE medium office building with single-duct VAV with terminal reheat, air-cooled chiller, and air-to-water heat pump.|**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**:<br />``'peak_heat_day'``, <br />``'typical_heat_day'``, <br />``'peak_cool_day'``, <br />``'typical_cool_day'``, <br />``'mix_day'``|
| ``multizone_office_simple_hydronic`` | Multi-zone (2 zones) commercial office building model with fan coil units for space heating and cooling, air handling units for ventilation, with air-to-water heat pump and air-cooled chilled.|**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**:<br />``'peak_heat_day'``, <br />``'typical_heat_day'``, <br />``'peak_cool_day'``, <br />``'typical_cool_day'``, <br />``'mix_day'``|
| ``multizone_office_simple_air`` | Multi-zone (5 zones) commercial building model based on U.S. DOE medium office building with single-duct VAV with terminal reheat, air-cooled chiller, and air-to-water heat pump.|**Electricity Prices**: <br />``'constant'``, <br />``'dynamic'``, <br />``'highly_dynamic'``<br />**Time Periods**:<br />``'peak_heat_day'``, <br />``'typical_heat_day'``, <br />``'peak_cool_day'``, <br />``'typical_cool_day'``, <br />``'mix_day'``|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading