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

Issue448 service submit #455

Merged
merged 348 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
348 commits
Select commit Hold shift + click to select a range
5d9cd4d
Add capability to overwrite AHU pump signals
dhblum Nov 24, 2021
941b8a9
Update documentation to include description of door model
dhblum Nov 30, 2021
c6c483c
Update Buildings library version
dhblum Nov 30, 2021
23f6dc0
Update documentation
dhblum Dec 1, 2021
3c99d72
Update revisions to include creation of BOPTEST test case
dhblum Dec 1, 2021
aa6e0dd
Merge branch 'master' into issue273_tesCasMulZonOffSimAir
dhblum Dec 1, 2021
b9a6903
Update unit tests and reference results
dhblum Dec 1, 2021
9b1d2db
Add find days and heating-cooling csv
dhblum Dec 1, 2021
57e09d0
Update wrapped.fmu
dhblum Dec 1, 2021
959d1db
Update reference results for python3
dhblum Dec 1, 2021
1f0e94d
cleanup.
rlutes Dec 13, 2021
89c9859
Merge branch 'issue73_messaging' of https://github.com/SenHuang19/pro…
rlutes Dec 13, 2021
f927a45
Merge master.
rlutes Dec 14, 2021
103f23f
Issue73 merge with master.
rlutes Dec 14, 2021
e907d80
Merge pull request #7 from rlutes/issue73_messaging
SenHuang19 Dec 15, 2021
d51bd9e
fix bugs
Dec 17, 2021
b1b6392
fix tests.
rlutes Dec 17, 2021
bc321b8
Merge pull request #8 from rlutes/issue73_messaging
SenHuang19 Dec 18, 2021
bd56b74
bug fix
Dec 19, 2021
ee66595
Initial implementation for electricity demand
dhblum Dec 21, 2021
1957076
Handle cases with no electricity and add dictionary
dhblum Dec 23, 2021
c29e9ea
fix one issue in the javascript example
Dec 27, 2021
3393d5b
temp solution
Dec 28, 2021
49ebcc4
update javascript docker
Dec 28, 2021
e0dc901
Minor update to comments and doc strings.
rlutes Jan 8, 2022
5dd88d2
Merge pull request #9 from rlutes/issue73_messaging
SenHuang19 Jan 10, 2022
bc8a36f
Merge branch 'master' into issue388_peakDemand
dhblum Jan 11, 2022
d57dc79
Update test_kpis and reference results
dhblum Jan 11, 2022
eb2eeed
Update example python and julia interface and testcase2 unit test ref…
dhblum Jan 11, 2022
59d5cc1
Update reference results for bestest_air
dhblum Jan 11, 2022
051d2cd
Update reference results for bestest_hydronic_heat_pump
dhblum Jan 11, 2022
d7f2809
Update reference results for multizone_residential_hydronic
dhblum Jan 11, 2022
107c396
Update reference results for bestest_hydronic
dhblum Jan 11, 2022
d70c943
Update reference results for singlezone_commercial_hydronic
dhblum Jan 11, 2022
9f05598
Fix order of reference results for bestest_air and bestest_hydronic_h…
dhblum Jan 11, 2022
ac52000
Fix printing nothing in julia examples
dhblum Jan 11, 2022
d9c22a2
Update release notes
dhblum Jan 11, 2022
7d333e0
Fix javascript wrapper
dhblum Jan 12, 2022
075907f
Update reference results for testcase1
dhblum Jan 12, 2022
4e9243a
Update reference results for testcase3
dhblum Jan 12, 2022
1d2410e
Change peak_demand to total_demand
dhblum Jan 20, 2022
9b75ed9
Take max only once
dhblum Jan 20, 2022
b33ccb0
Merge branch 'master' into issue273_tesCasMulZonOffSimAir
dhblum Jan 26, 2022
971e88c
Merge master.
rlutes Feb 11, 2022
44f5687
Merge pull request #10 from rlutes/issue73_messaging
SenHuang19 Feb 11, 2022
9bc17d0
restapi.py
rlutes Feb 11, 2022
bd9f288
restapi.py
rlutes Feb 11, 2022
3e43ea3
Change return format for api to value, status_code.
rlutes Feb 12, 2022
cac45bd
Change return format for api to value, status_code.
rlutes Feb 12, 2022
89beac1
Merge pull request #11 from rlutes/issue73_messaging
SenHuang19 Feb 12, 2022
0c7ac47
Updae to inteface to verify api status code.
rlutes Feb 15, 2022
ecf23ff
Return exception obejct if problem in advance.
rlutes Feb 15, 2022
ac02a58
Merge pull request #12 from rlutes/issue73_messaging
SenHuang19 Feb 15, 2022
5a401f5
minor changes to get the corrected output for put scenarios
Feb 15, 2022
db34939
fix issues in the testing scripts
Feb 16, 2022
1fe2200
fix the issues in js and julia examples
Feb 17, 2022
b31cd18
refactor the 400 error
Feb 19, 2022
64c9a58
fix one issue in parse advance
Feb 20, 2022
8453a45
a small fix
Feb 20, 2022
47b8f7e
fix one issue when return error message
Feb 21, 2022
7a6c1ae
Update releasnotes and version number for development.
dhblum Mar 5, 2022
556f5c6
Update README.md
dhblum Mar 22, 2022
dfea7d0
Update releasenotes.md
dhblum Mar 22, 2022
c0bf5bf
Merge pull request #410 from ibpsa/issue408_updateReadme
dhblum Mar 22, 2022
36b1fe6
Merge branch 'master' into issue273_tesCasMulZonOffSimAir
dhblum Mar 28, 2022
abb7278
Add water distribution pressure drop and increase pump head
dhblum Mar 29, 2022
f319881
Add read blocks to chilled and hot water distribution pump electrical…
dhblum Mar 29, 2022
8b46ccb
Update read block names for chilled and hot water distribution pump p…
dhblum Mar 29, 2022
9db0b57
Remove outside airflow measurement and update economizer control to m…
dhblum Mar 29, 2022
4267b38
Update documentation and heat pump size
dhblum Mar 31, 2022
147b927
Enable cooling during unoccupied period and update documentation
dhblum Apr 1, 2022
2cc7c08
Add direct transitions from occupied mode to night set back or set up
dhblum Apr 1, 2022
07950e5
Update docs
dhblum Apr 1, 2022
9f16ed4
Update data csvs, days json, and other cleanup
dhblum Apr 1, 2022
57ca7f3
Update unit test results
dhblum Apr 1, 2022
6670a28
Update release notes and testcases readme
dhblum Apr 1, 2022
5462bdc
Add testcase review docs
dhblum Apr 1, 2022
d5a5d03
Correct thermal comfort set point limits
dhblum Apr 1, 2022
7824d6d
Update wrapped fmu
dhblum Apr 1, 2022
09e60d3
Reference results for forrect unit test environment
dhblum Apr 1, 2022
31a6c4e
Update .pre-commit-config.yaml from git: to https:
dhblum Apr 7, 2022
f20656b
Merge pull request #413 from ibpsa/dhblum-patch-1
dhblum Apr 7, 2022
1787a5c
Merge branch 'master' into issue273_tesCasMulZonOffSimAir
dhblum Apr 7, 2022
aa5a1e3
Add test case to compare_references
dhblum Apr 7, 2022
00bbc0b
Merge pull request #412 from ibpsa/issue273_tesCasMulZonOffSimAir
dhblum Apr 7, 2022
b2c6574
Merge branch 'master' into issue388_peakDemand
dhblum Apr 11, 2022
b8bcf3f
Update releasenotes
dhblum Apr 11, 2022
37f7de7
Add doc to design requirements and guide
dhblum Apr 11, 2022
d99e9c1
Sume power and then take 15 minute average
dhblum Apr 11, 2022
2783d6e
Add pele for multizone_office_simple_air
dhblum Apr 12, 2022
cbe2bc0
Fix docs
dhblum Apr 14, 2022
020d9d3
Merge pull request #415 from ibpsa/issue414_fixTestCaseDoc
dhblum Apr 14, 2022
60bed77
Update docs/DesReqGui/source/core_kpi.rst
dhblum Apr 15, 2022
d6e3cf2
Update docs
dhblum Apr 15, 2022
b03ed26
Update docs
dhblum Apr 15, 2022
249c469
Add peak gas kpi calculation
dhblum Apr 15, 2022
3785b9f
Add peak district heating kpi calculation
dhblum Apr 15, 2022
1487cf5
Add gas and district heating docs
dhblum Apr 15, 2022
428add6
Update example controllers to print new kpis
dhblum Apr 15, 2022
d4e13e1
Use pip3 instead of pip
dhblum Apr 18, 2022
6965b29
Fix typo
dhblum Apr 18, 2022
af3e462
Remove pathlib dependency
dhblum Apr 18, 2022
050cf6c
[skip travis] update release notes
dhblum Apr 18, 2022
cc64543
Merge pull request #417 from ibpsa/issue416_unitTestsFailing
dhblum Apr 18, 2022
efbf177
Merge branch 'master' into issue388_peakDemand
dhblum Apr 18, 2022
b4b9351
Update reference results with new kpis
dhblum Apr 18, 2022
ea70c98
Add reference results for kpi test
dhblum Apr 18, 2022
218ae20
Update release notes
dhblum Apr 18, 2022
fdb5165
Fix typo docs
dhblum Apr 21, 2022
e1bc55c
Fix typo kpi docs
dhblum Apr 22, 2022
bb6a7ad
Merge pull request #394 from ibpsa/issue388_peakDemand
dhblum Apr 22, 2022
f29016e
Update README.md
dhblum Apr 27, 2022
0207439
Update releasenotes.md
dhblum Apr 27, 2022
2cc47d5
Update README.md
dhblum Apr 27, 2022
bc29a6a
Merge pull request #420 from ibpsa/issue419_windowsTCSet
dhblum Apr 27, 2022
0531acf
Merge and update restapi and testcase error handling.
rlutes May 3, 2022
a7e0f5f
Fix inteface.py and response handling.
rlutes May 3, 2022
c464c08
Add new papers to readme [ci skip]
dhblum May 3, 2022
807ff76
Merge pull request #13 from rlutes/issue73_messaging
SenHuang19 May 4, 2022
6a3e9e5
fix tests.
rlutes May 7, 2022
977b99e
Merge pull request #14 from rlutes/issue73_messaging
SenHuang19 May 7, 2022
497c9e9
fix the interface to generate standard http response
May 7, 2022
aaaa5be
include the new testcase in the unit test scripts
May 8, 2022
5c18d6c
clean the code
May 8, 2022
aed9bc0
patch-paperLink
dhblum May 13, 2022
db19fb4
moving the 400 error handling to the testcase.py
May 13, 2022
ac75da7
fixe typos in the doc
May 18, 2022
9177acf
Merge pull request #272 from SenHuang19/issue73_messaging
dhblum May 23, 2022
f24755d
Remove trial markers
dhblum May 23, 2022
12cf85d
Edit messages and some clean up
dhblum May 23, 2022
e0fc083
Add resource_file_exclusion list to test case config.json optionally
dhblum May 24, 2022
76d1dc4
Add to config.json documentation
dhblum May 24, 2022
80be60a
Update releasenotes
dhblum May 24, 2022
601824a
Rename DesResGui to design
dhblum May 25, 2022
7326dbf
Merge pull request #429 from ibpsa/patch-desdoc-dir
dhblum May 25, 2022
6cba820
Merge branch 'master' into issue423_dataExclusionList
dhblum May 25, 2022
a3056ef
Add image and update docs
dhblum May 25, 2022
a0e7600
Clean headers
dhblum May 25, 2022
17b1172
Merge pull request #430 from ibpsa/issue418_multizoneDocs
dhblum May 25, 2022
a01b0d2
Fix indent in restapi construct method.
rlutes May 28, 2022
2554e86
Merge branch 'master' of https://github.com/ibpsa/project1-boptest in…
rlutes May 28, 2022
e922484
Update advance method of testcase.py.
rlutes May 28, 2022
5bac6dd
Merge pull request #15 from rlutes/issue73_messaging
SenHuang19 May 30, 2022
f35e212
fixe one typo
May 30, 2022
eccbe4c
fix some issues in parsing the inputs
May 30, 2022
114ae18
modifying the logic to determine 500 errors for some apis
May 31, 2022
1bac0ed
Add API test for 400 messages.
rlutes Jun 6, 2022
36eee9f
Fix typo in message.
rlutes Jun 6, 2022
33dfd25
Change from convertable string to word for 400 error message.
rlutes Jun 6, 2022
45e416e
Merge pull request #16 from rlutes/issue73_messaging
SenHuang19 Jun 8, 2022
11e7e2c
Merge pull request #426 from ibpsa/issue423_dataExclusionList
dhblum Jun 9, 2022
3c4c6e1
Merge branch 'master' of https://github.com/ibpsa/project1-boptest in…
rlutes Jun 13, 2022
9833a96
Merge branch 'issue73_messaging' of https://github.com/SenHuang19/pro…
rlutes Jun 13, 2022
b687ac3
Move invalid test functions to allow other tests to pass. Move error…
rlutes Jun 13, 2022
5913112
Merge pull request #17 from rlutes/issue73_messaging
SenHuang19 Jun 14, 2022
b5b673b
fix some remaining issues
Jun 14, 2022
a7db046
merge the fork and resolve comflicts
Jun 14, 2022
f8935be
Initial implementation
dhblum Jun 14, 2022
75fe426
Add type check in restapi.py and testcase.py.
rlutes Jun 14, 2022
70b20be
Merge pull request #18 from rlutes/issue73_messaging
SenHuang19 Jun 15, 2022
3f60f16
fix some issues
Jun 15, 2022
eb7ea0a
add type check for advance
Jun 15, 2022
3c4fc48
Add scenario list for testcase1-3 in testcases/README.md
dhblum Jun 15, 2022
3a27ad8
Merge pull request #438 from ibpsa/patch-testcase123-scenario-list
dhblum Jun 15, 2022
d5207f5
avoid reporting warning twices
Jun 15, 2022
19cc14e
Testing.
rlutes Jun 16, 2022
6d8a789
Step as int.
rlutes Jun 16, 2022
de6e9b5
Merge pull request #19 from rlutes/issue73_messaging
SenHuang19 Jun 16, 2022
998af6c
Initialize step for utilities unit tests.
rlutes Jun 17, 2022
a2bec9c
Merge pull request #20 from rlutes/issue73_messaging
SenHuang19 Jun 17, 2022
6150f70
Change step_ref type in utilities setup.
rlutes Jun 17, 2022
e5e803e
Merge pull request #21 from rlutes/issue73_messaging
SenHuang19 Jun 17, 2022
755259d
fix small issues in the doc
Jun 20, 2022
084dc2d
Merge branch 'master' into issue73_messaging
dhblum Jun 22, 2022
992fe62
update the log messages and the check for the advance api
Jun 23, 2022
fa31842
Add additional 400 error tests.
rlutes Jun 23, 2022
c31cf2e
Merge pull request #22 from rlutes/issue73_messaging
SenHuang19 Jun 24, 2022
e23c31b
update the check of the int inputs
Jun 24, 2022
21a3e1f
Merge pull request #436 from SenHuang19/issue73_messaging
dhblum Jun 25, 2022
0eda72b
Change back to float and message edits
dhblum Jun 26, 2022
2e7f2fc
Finish switch back to try float
dhblum Jun 26, 2022
935fb75
Raise error for invalid point name in instantiating /advance args
dhblum Jun 26, 2022
d862845
Update doc strings
dhblum Jun 26, 2022
1d7e6df
Update messages.
dhblum Jun 26, 2022
1d1c3cf
Fix for custom input error handler
dhblum Jun 26, 2022
634e95b
Various cleanup
dhblum Jun 26, 2022
db094b2
Various cleanup
dhblum Jun 26, 2022
242d700
Cleanup for tests
dhblum Jun 26, 2022
406208b
Update unit test code
dhblum Jun 26, 2022
4837433
Update javascript examples
dhblum Jun 26, 2022
e329227
Small message edit
dhblum Jun 26, 2022
6fe6016
Make get_elapsed_control_time_ratio private method
dhblum Jun 26, 2022
ac43e9d
Update releasenotes
dhblum Jun 26, 2022
481d603
Update. releasenotes [travis skip]
dhblum Jun 26, 2022
3e444ba
Check for _activate boolean convertable and add unit tests
dhblum Jun 26, 2022
e1671ee
Merge branch 'issue73_messaging' of https://github.com/ibpsa/project1…
dhblum Jun 26, 2022
9964282
Edit releasenotes
dhblum Jun 26, 2022
f7b7063
Update readme
dhblum Jun 26, 2022
21b24c9
Update README.md
dhblum Jun 26, 2022
19700b5
Add required=true for /results inputs in restapi
dhblum Jun 27, 2022
0c08b14
fix typo
dhblum Jul 5, 2022
9c334df
Fix typo GET to PUT
dhblum Jul 5, 2022
1e93eb9
Remove debug=True
dhblum Jul 5, 2022
21e9af1
Format log and add to console output
dhblum Jul 6, 2022
10753af
Correct and enhance /advance and /initialize log messages
dhblum Jul 6, 2022
d68053d
Allow lower case true/false in _activate input
dhblum Jul 6, 2022
2a14c33
Add UTC note to log timestamp
dhblum Jul 6, 2022
152c43b
Add warmup period to initlize log message
dhblum Jul 6, 2022
a056d4d
Update error message for bad _activate input
dhblum Jul 7, 2022
3553ad3
Make /advance input name strict in flask and add test for this.
dhblum Jul 7, 2022
e737f7a
Merge branch 'issue73_messaging' into issue403_submit
dhblum Jul 8, 2022
8dc8256
Update for new API and basic messaging
dhblum Jul 8, 2022
21cb378
Add up to 10 tags
dhblum Jul 8, 2022
552a47e
Clean up and add docstring
dhblum Jul 8, 2022
7032180
Install Spawn to Dockerfile
dhblum Jul 11, 2022
8152c5e
Update readme and releasenotes
dhblum Jul 11, 2022
4a923ee
Make dashboard server url environment variable
dhblum Jul 11, 2022
7ada79b
Require formal scenario test to be completed before submit allowed
dhblum Jul 11, 2022
aa50d8d
Update readme and releasenotes
dhblum Jul 11, 2022
e39e027
Merge pull request #441 from ibpsa/issue73_messaging
dhblum Jul 12, 2022
3239bd6
Merge branch 'master' into issue403_submit
dhblum Jul 12, 2022
bcbbf29
Use random uid generator instead of random numer
dhblum Jul 12, 2022
a479f9e
Merge remote-tracking branch 'origin/master' into issue445-messages-s…
kbenne Jul 12, 2022
6ea9944
Update service with status codes
kbenne Jul 14, 2022
967cbbb
Add unit tests and associated arg to API
dhblum Jul 14, 2022
d477b1f
Fix unit tests
dhblum Jul 14, 2022
32d8e65
Add requests version to Dockerfile
dhblum Jul 14, 2022
d7e700a
Move uid and dateRun checks overwrite to unit testing code
dhblum Jul 14, 2022
5360c2c
Fix uid generation
dhblum Jul 14, 2022
7a92552
Fix tests
dhblum Jul 15, 2022
86541b3
Add submit reference results
dhblum Jul 15, 2022
76bdd13
Update kpis values for tim_rat for testcase 1-2
dhblum Jul 15, 2022
0227a23
Change javascript time rat KPI back
dhblum Jul 15, 2022
d7a298c
[travis skip] Fix typos in code comments
dhblum Jul 15, 2022
fecd3e8
Merge pull request #444 from ibpsa/issue403_submit
dhblum Jul 15, 2022
475a5c8
Merge branch 'master' into issue214_ghPages_readme_update
dhblum Jul 15, 2022
a4638bf
Update readme
dhblum Jul 15, 2022
c2686ad
readme edit
dhblum Jul 15, 2022
0e9673a
Merge pull request #446 from ibpsa/issue214_ghPages_readme_update
dhblum Jul 16, 2022
dde4825
Update release otes
dhblum Jul 19, 2022
23daae2
Merge branch 'master' into issue406_spawnSupport
dhblum Jul 19, 2022
28d3063
Migrate to "MessagePack" going in/out of Redis
kbenne Jul 19, 2022
e2cabba
Merge remote-tracking branch 'origin/master' into issue445-messages-s…
kbenne Jul 19, 2022
86dfa29
Tweaks to fix testcases
kbenne Jul 20, 2022
34dace5
Merge pull request #447 from ibpsa/issue406_spawnSupport
dhblum Jul 20, 2022
2eabe3f
Service: Fix test_multizone_office_simple_air failures
kbenne Jul 20, 2022
94c2b1b
Service: Rename the redis controller
kbenne Jul 20, 2022
1ecfcd8
Service: Add submit api
kbenne Jul 21, 2022
61a09ab
Service: split travis into multiple jobs
kbenne Jul 21, 2022
795d367
Merge remote-tracking branch 'origin/master' into issue448-service-su…
kbenne Jul 26, 2022
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
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ MONGO_URL=mongodb://mongo:27017/
MONGO_DB_NAME=alfalfa
REGION=us-west-1
BOPTEST_SUBMIT_URL=http://web
BOPTEST_DASHBOARD_SERVER=https://dashboard.boptest.net/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# )

repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: trailing-whitespace
Expand Down
44 changes: 43 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,46 @@ jobs:
include:
- 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 test_all
script: cd testing && make build_jm_image && make build_boptest_image && make test_parser
- 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 build_boptest_image && make test_data
- 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 build_boptest_image && make test_forecast
- 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 build_boptest_image && make test_kpis
# - 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 build_boptest_image && make test_readme_commands
- 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 build_boptest_image && make test_testcase1
- 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 build_boptest_image && make test_testcase2
- 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 build_boptest_image && make test_testcase3
- 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 build_boptest_image && make test_bestest_air
- 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 build_boptest_image && make test_bestest_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 && make build_jm_image && make build_boptest_image && make test_bestest_hydronic_heat_pump
- 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 build_boptest_image && make test_multizone_residential_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 && make build_jm_image && make build_boptest_image && make test_singlezone_commercial_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 && make build_jm_image && make build_boptest_image && make test_multizone_office_simple_air
# - python: 2.7
# install: pip install --upgrade pip && pip install pandas==0.24.2 numpy==1.16.6 matplotlib==2.1.1 requests==2.18.4
# script: cd testing && make test_python2
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,23 @@ USER root
# Edit pyfmi to event update at start of simulation for ME2
RUN sed -i "350 i \\\n if isinstance(self.model, fmi.FMUModelME2):\n self.model.event_update()" $JMODELICA_HOME/Python/pyfmi/fmi_algorithm_drivers.py

# Install commands for Spawn
ENV SPAWN_VERSION=0.3.0-8d93151657
RUN wget https://spawn.s3.amazonaws.com/custom/Spawn-$SPAWN_VERSION-Linux.tar.gz \
&& tar -xzf Spawn-$SPAWN_VERSION-Linux.tar.gz \
&& ln -s /Spawn-$SPAWN_VERSION-Linux/bin/spawn-$SPAWN_VERSION /usr/local/bin/

USER developer

WORKDIR $HOME

RUN pip install --user flask-restful==0.3.9 pandas==0.24.2 flask_cors==3.0.10
RUN pip install --user flask-restful==0.3.9 pandas==0.24.2 flask_cors==3.0.10 requests==2.27.1

RUN mkdir models && \
mkdir doc

ENV PYTHONPATH $PYTHONPATH:$HOME
ENV BOPTEST_DASHBOARD_SERVER https://api.boptest.net:8081/

CMD python restapi.py && bash

Expand Down
63 changes: 49 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
Building Optimization Performance Tests

This repository contains code for the Building Optimization Performance Test framework (BOPTEST)
that is being developed as part of the IBPSA Project 1 (https://ibpsa.github.io/project1/).
that is being developed as part of the [IBPSA Project 1](https://ibpsa.github.io/project1/).

Visit the [BOPTEST Home Page](https://ibpsa.github.io/project1-boptest/) for more information about the project, software, and documentation.

## Structure
- ``/testcases`` contains test cases, including docs, models, and configuration settings.
Expand All @@ -17,13 +19,21 @@ that is being developed as part of the IBPSA Project 1 (https://ibpsa.github.io/
- ``/kpis`` contains code for calculating key performance indicators.
- ``/docs`` contains design requirements and guide documentation.

##2) Build the test case by ``$ make build`` where <testcase_dir_name> is the name of the test case subdirectory located in ``/testcases``.
## Quick-Start to Run Test Cases
1) Install [Docker](https://docs.docker.com/get-docker/).
2) Build the BOPTEST Service by ``$ make build``.
3) Start the BOPTEST Service by ``$ make run``.
4) In a separate process, use the test case API defined below to interact with a test case using your test controller. Alternatively, view and run an example test controller as described in the next step.
5) Run an example test controller:
1) Download this repository.
2) Install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/).
3) Build and deploy a test case using the following commands executed in the root directory of this repository and where <testcase_dir_name> is the name of the test case subdirectory located in [/testcases](https://github.com/ibpsa/project1-boptest/tree/master/testcases):

* ``docker-compose up``
* A couple notes:
* The first time this command is run, the image ``boptest_base`` will be built. This takes about a minute. Subsequent usage will use the already-built image and deploy much faster.
* If you update your BOPTEST repository, use the command ``docker rmi boptest_base`` to remove the image so it can be re-built with the updated repository upon next deployment.
* ``TESTCASE`` is simply an environment variable. Consistent with use of docker-compose, you may also edit the value of this variable in the ``.env`` file and then use ``docker-compose up``.

4) In a separate process, use the test case API defined below to interact with the test case using your test controller. Alternatively, view and run an example test controller as described below.
5) Shutdown the test case by the command ``docker-compose down`` executed in the root directory of this repository

## Run an example test controller:

* For Python-based example controllers:
* Build and run the BOPTEST Service. Then, in a separate terminal, use ``$ cd examples/python/ && python testcase1.py`` to test a simple proportional feedback controller on this test case over a two-day period.
Expand All @@ -38,6 +48,7 @@ that is being developed as part of the IBPSA Project 1 (https://ibpsa.github.io/
## Test Case RESTful API
- To run a test, use the API defined in the table below by sending RESTful requests to: ``http://127.0.0.1/<request>/<testid>``
- In BOPTEST Service there can be many tests running concurently. The ``select`` API is used to begin a test and retrieve a unique ``testid`` which is used for further API requests related to the test: ``curl -X POST http://127.0.0.1/testcases/testcase1/select``. The value ``testcase1`` can be any one of the available BOPTEST test cases reported by the API: GET ``http://127.0.0.1/testcases/``.
- The API will return a JSON in the form ``{"status":<status_code_int>, "message":<message_str>, "payload":<relevant_return_data>}``. Status codes in ``"status"`` are integers: ``200`` for successful with or without warning, ``400`` for bad input error, or ``500`` for internal error. Data returned in ``"payload"`` is the data of interest relvant to the specific API request, while the string in ``"message"`` will report any warnings or error messages to help debug encountered problems.

Example RESTful interaction:

Expand All @@ -50,23 +61,25 @@ Example RESTful interaction:
| Interaction | Request |
|-----------------------------------------------------------------------|-----------------------------------------------------------|
| List available test cases. | GET ``testcases`` |
| Select a test case and begin a new test. | POST ``testcases/{testcase_name}/select`` |
| Select a test case and begin a new test. A unique ``testid`` will be returned. | POST ``testcases/{testcase_name}/select`` |
| Stop a running test. | PUT ``stop/{testid}`` |
| Advance simulation with control input and receive measurements. | POST ``advance/{testid}`` with json data "{<input_name>:<value>}" |
| Initialize simulation to a start time using a warmup period in seconds. | PUT ``initialize/{testid}`` with arguments ``start_time=<value>``, ``warmup_time=<value>``|
| Advance simulation with control input and receive measurements. | POST ``advance/{testid}`` with optional json data "{<input_name>:<value>}" |
| Initialize simulation to a start time using a warmup period in seconds. Also resets point data history and KPI calculations. | PUT ``initialize/{testid}`` with required arguments ``start_time=<value>``, ``warmup_period=<value>``|
| Receive communication step in seconds. | GET ``step/{testid}`` |
| Set communication step in seconds. | PUT ``step/{testid}`` with argument ``step=<value>`` |
| Set communication step in seconds. | PUT ``step/{testid}`` with required argument ``step=<value>`` |
| Receive sensor signal point names (y) and metadata. | GET ``measurements/{testid}`` |
| Receive control signal point names (u) and metadata. | GET ``inputs/{testid}`` |
| Receive test result data for the given point name between the start and final time in seconds. | PUT ``results/{testid}`` with arguments ``point_name=<string>``, ``start_time=<value>``, ``final_time=<value>``|
| Receive test result data for the given point name between the start and final time in seconds. | PUT ``results/{testid}`` with required arguments ``point_name=<string>``, ``start_time=<value>``, ``final_time=<value>``|
| Receive test KPIs. | GET ``kpi/{testid}`` |
| Receive test case name. | GET ``name/{testid}`` |
| Receive boundary condition forecast from current communication step. | GET ``forecast/{testid}`` |
| Receive boundary condition forecast parameters in seconds. | GET ``forecast_parameters/{testid}`` |
| Set boundary condition forecast parameters in seconds. | PUT ``forecast_parameters/{testid}`` with arguments ``horizon=<value>``, ``interval=<value>``|
| Set boundary condition forecast parameters in seconds. | PUT ``forecast_parameters/{testid}`` with required arguments ``horizon=<value>``, ``interval=<value>``|
| Receive current test scenario. | GET ``scenario/{testid}`` |
| Set test scenario. Setting the argument ``time_period`` performs an initialization with predefined start time and warmup period and will only simulate for predefined duration. | PUT ``scenario/{testid}`` with optional arguments ``electricity_price=<string>``, ``time_period=<string>``. See README in [/testcases](https://github.com/ibpsa/project1-boptest/tree/master/testcases) for options and test case documentation for details.|
| Receive BOPTEST version. | GET ``version`` |
| Submit KPIs, other test information, and optional string tags (up to 10) to online dashboard. Requires a formal test scenario to be completed, initialized using the PUT ``scenario`` API. | POST ``submit`` with required argument ``api_key=<string>`` and optional arguments ``tag#=<string>`` where # is an integer between 1 and 10. The API key can be obtained from the user account registered wth the online dashboard at (url coming soon).|

## Development

This repository uses pre-commit to ensure that the files meet standard formatting conventions (such as line spacing, layout, etc).
Expand All @@ -82,4 +95,26 @@ See the [wiki](https://github.com/ibpsa/project1-boptest/wiki) for use cases and
A dashboard for aggregating and sharing test results is under development here: https://github.com/NREL/boptest-dashboard.

## Publications
D. Blum, F. Jorissen, S. Huang, Y. Chen, J. Arroyo, K. Benne, Y. Li, V. Gavan, L. Rivalin, L. Helsen, D. Vrabie, M. Wetter, and M. Sofos. (2019). “Prototyping the BOPTEST framework for simulation-based testing of advanced control strategies in buildings.” In *Proc. of the 16th International Conference of IBPSA*, Sep 2 – 4. Rome, Italy.
### To cite, please use:
D. Blum, J. Arroyo, S. Huang, J. Drgona, F. Jorissen, H.T. Walnum, Y. Chen, K. Benne, D. Vrabie, M. Wetter, and L. Helsen. (2021). ["Building optimization testing framework (BOPTEST) for simulation-based benchmarking of control strategies in buildings."](https://doi.org/10.1080/19401493.2021.1986574) *Journal of Building Performance Simulation*, 14(5), 586-610.

### Additional publications:
J. Arroyo, F. Spiessens, and L. Helsen. (2022). ["Comparison of Optimal Control Techniques for Building Energy Management."](https://doi.org/10.3389/fbuil.2022.849754) *Frontiers in Built Environment* 8.

T. Marzullo, S. Dey, N. Long, J. L. Vilaplana, and G. Henze. (2022). ["A high-fidelity building performance simulation test bed for the development and evaluation of advanced controls"](https://doi.org/10.1080/19401493.2022.2058091) *Journal of Building Performance Simulation*, 15(3), 379-397.

J. Arroyo, C. Manna, F. Spiessens, and L. Helsen. (2022). ["Reinforced model predictive control (RL-MPC) for building energy management."](https://doi.org/10.1016/j.apenergy.2021.118346) *Applied Energy* 309: 118346.

J. Arroyo, C. Manna, F. Spiessens, and L. Helsen. (2021). [“An OpenAI-Gym Environment for the Building Optimization Testing (BOPTEST) Framework.”](https://www.researchgate.net/profile/Javier-Arroyo/publication/354386346_An_OpenAI-Gym_environment_for_the_Building_Optimization_Testing_BOPTEST_framework/links/613616690360302a0082ffc1/An-OpenAI-Gym-environment-for-the-Building-Optimization-Testing-BOPTEST-framework.pdf) In *Proceedings of the 17th IBPSA Conference*, Sep 1 - 3. Bruges, Belgium.

F. Bünning, C. Pfister, A. Aboudonia, P. Heer, and J. Lygeros. (2021). [“Comparing Machine Learning Based Methods to Standard Regression Methods for MPC on a Virtual Testbed.”](https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/524933/BS2021_finalVersion.pdf?sequence=1&isAllowed=y) In *Proceedings of the 17th IBPSA Conference*, Sep 1 - 3. Bruges, Belgium.

T. Yang, K. Filonenko, K. Arendt, and C. Veje. (2020). [“Implementation and Performance Analysis of a Multi-Energy Building Emulator.”](https://ieeexplore.ieee.org/document/9236623) In *2020 6th IEEE International Energy Conference (ENERGYCon)*, Sep 28 - Oct 1. Gammarth, Tunisia, 451–456.

H. T. Walnum, I. Sartori, and M. Bagle. (2020). [“Model Predictive Control of District Heating Substations for Flexible Heating of Buildings.”](https://sintef.brage.unit.no/sintef-xmlui/handle/11250/2683181) In *SINTEF Proceedings no 5, ser. BuildSim-Nordic 2020*, Oct 13–14. Oslo, Norway: International Conference Organised by IBPSA-Nordic, 123–130.

J. Arroyo, F. Spiessens, and L. Helsen. (2020). [“Identification of Multi-zone Grey-box Building Models for Use in Model Predictive Control.”](https://doi.org/10.1080/19401493.2020.1770861) *Journal of Building Performance Simulation* 13 (4): 472–486.

D. Blum, F. Jorissen, S. Huang, Y. Chen, J. Arroyo, K. Benne, Y. Li, V. Gavan, L. Rivalin, L. Helsen, D. Vrabie, M. Wetter, and M. Sofos. (2019). [“Prototyping the BOPTEST framework for simulation-based testing of advanced control strategies in buildings.”](http://www.ibpsa.org/proceedings/BS2019/BS2019_211276.pdf) In *Proceedings of the 16th International Conference of IBPSA*, Sep 2 – 4. Rome, Italy.

S. Huang, Y. Chen, P. W. Ehrlich, and D. L. Vrabie. (2018). [“A Control-Oriented Building Envelope and HVAC System Simulation Model for a Typical Large Office Building.”](https://www.ashrae.org/File%20Library/Conferences/Specialty%20Conferences/2018%20Building%20Performance%20Analysis%20Conference%20and%20SimBuild/Papers/C101.pdf) In *Proceedings of 2018 Building Performance Modeling Conference and SimBuild co-organized by ASHRAE and IBPSA-USA*, Sep 26 - 28. Chicago, IL.
13 changes: 11 additions & 2 deletions data/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,13 @@ def load_data_and_jsons(self):
files = []
for f in z_fmu.namelist():
if f.startswith('resources/') and f.endswith('.csv'):
files.append(f)
if 'resource_file_exclusion' in self.case.config_json:
if f.split('/')[-1] in self.case.config_json['resource_file_exclusion']:
print('{0} found on"resource_file_exclusion" list. Not loading data into testcase.'.format(f))
else:
files.append(f)
else:
files.append(f)

# Find the minimum sampling resolution
sampling = 3600.
Expand Down Expand Up @@ -425,7 +431,10 @@ def load_data_and_jsons(self):
'you want this variable to be part of the test case data '\
'make sure that the column has a key with any of the specified '\
'formats in categories.json and that, if it is a zone related '\
'key, it is in the format: variable[zone_identifier] '.format(col,f))
'key, it is in the format: variable[zone_identifier]. If you '\
'do not intend for this variable to be included, consider adding '\
'the file it is contained within to the "resource_file_exclusion" '\
'list in the test case config.json.'.format(col,f))
else:
for category in self.categories:
# Use linear interpolation for continuous variables
Expand Down
Loading