Skip to content

Commit

Permalink
Merge branch 'master' into issue533_cheKey
Browse files Browse the repository at this point in the history
  • Loading branch information
dhblum committed Jul 24, 2023
2 parents 7b4a23f + 619d43c commit 67b0690
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN mkdir models && \
mkdir doc

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

CMD python restapi.py && bash

Expand Down
2 changes: 2 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ Released on xx/xx/xxxx.

**The following changes are backwards-compatible and do not significantly change benchmark results:**

- Allow forecast horizons of 0 to retrieve boundary condition data at current time like pricing or temperature setpoints. This is for [#554](https://github.com/ibpsa/project1-boptest/issues/554).
- Update ``docs/tutorials/tutorial1_developer`` and ``docs/workshops/BS21Workshop_20210831``. This is for [#532](https://github.com/ibpsa/project1-boptest/issues/532).
- In examples and unit test Python requests, use ``json`` attribute instead of ``data``. This is for [#528](https://github.com/ibpsa/project1-boptest/issues/528).
- In unit test checking fetching of single forecast variable, specify specific forecast point to check for each test case. This is for [#529](https://github.com/ibpsa/project1-boptest/issues/529).
- Update ``KPI_Calculator.get_computational_time_ratio`` to return ``None`` if no simulation steps have been processed. This is for [#540](https://github.com/ibpsa/project1-boptest/issues/540).
- Add ``forecastParameters`` to dashboard submission with empty dictionary and update url for submitting dashboard results. This is for [#548](https://github.com/ibpsa/project1-boptest/issues/548).

**The following changes are backwards-compatible, but might change benchmark results:**

Expand Down
5 changes: 3 additions & 2 deletions testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,10 +859,10 @@ def get_forecast(self, point_names, horizon, interval):
message = "Invalid value {} for parameter interval. Value must be a float, integer, or string able to be converted to a float, but is {}.".format(interval, type(interval))
logging.error(message)
return status, message, payload
if horizon <= 0:
if horizon < 0:
payload = None
status = 400
message = "Invalid value {} for parameter horizon. Value must be positive.".format(horizon)
message = "Invalid value {} for parameter horizon. Value must not be negative.".format(horizon)
logging.error(message)
return status, message, payload
if interval <= 0:
Expand Down Expand Up @@ -1139,6 +1139,7 @@ def post_results_to_dashboard(self, api_key, tags, unit_test=False):
"account": {
"apiKey": api_key
},
"forecastParameters":{},
"tags": tags,
"kpis": self.get_kpis()[2],
"scenario": self.add_forecast_uncertainty(self.keys_to_camel_case(self.get_scenario()[2])),
Expand Down
2 changes: 1 addition & 1 deletion testing/references/bestest_air/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "bestest_air"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.0273067557575723, "emis_tot": 0.785588519629367, "ener_tot": 3.722732131848899, "idis_tot": 1220.1797359785448, "pdih_tot": null, "pele_tot": 0.010215810323849649, "pgas_tot": 0.12133181119488147, "tdis_tot": 5.687315396946064, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "bestest_air"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.0273067557575723, "emis_tot": 0.785588519629367, "ener_tot": 3.722732131848899, "idis_tot": 1220.1797359785448, "pdih_tot": null, "pele_tot": 0.010215810323849649, "pgas_tot": 0.12133181119488147, "tdis_tot": 5.687315396946064, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/bestest_hydronic/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "bestest_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.465938501176076, "emis_tot": 1.628640744152675, "ener_tot": 9.000706489138203, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.00025517153990852034, "pgas_tot": 0.11798039028403248, "tdis_tot": 18.217583154564775, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "bestest_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.465938501176076, "emis_tot": 1.628640744152675, "ener_tot": 9.000706489138203, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.00025517153990852034, "pgas_tot": 0.11798039028403248, "tdis_tot": 18.217583154564775, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/bestest_hydronic_heat_pump/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "bestest_hydronic_heat_pump"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.8828705411678542, "emis_tot": 0.5808444758926209, "ener_tot": 3.4781106340875496, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.018913031427716383, "pgas_tot": null, "tdis_tot": 8.382467492017371, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "bestest_hydronic_heat_pump"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.8828705411678542, "emis_tot": 0.5808444758926209, "ener_tot": 3.4781106340875496, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.018913031427716383, "pgas_tot": null, "tdis_tot": 8.382467492017371, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/multizone_office_simple_air/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "multizone_office_simple_air"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.16537569781601175, "emis_tot": 0.6104861553474377, "ener_tot": 1.790281980491019, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.03334238212125819, "pgas_tot": null, "tdis_tot": 11.835569616547645, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "multizone_office_simple_air"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.16537569781601175, "emis_tot": 0.6104861553474377, "ener_tot": 1.790281980491019, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.03334238212125819, "pgas_tot": null, "tdis_tot": 11.835569616547645, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "multizone_residential_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.7912501281574299, "emis_tot": 1.4253043873549793, "ener_tot": 8.140085161898376, "idis_tot": 9114.593818178417, "pdih_tot": null, "pele_tot": 0.0017390231869758264, "pgas_tot": 0.09592720495532536, "tdis_tot": 22.003355978645242, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "multizone_residential_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.7912501281574299, "emis_tot": 1.4253043873549793, "ener_tot": 8.140085161898376, "idis_tot": 9114.593818178417, "pdih_tot": null, "pele_tot": 0.0017390231869758264, "pgas_tot": 0.09592720495532536, "tdis_tot": 22.003355978645242, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "singlezone_commercial_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.26318819272610183, "emis_tot": 0.3835824174014755, "ener_tot": 3.216803183654829, "idis_tot": 5.423240054209877, "pdih_tot": 0.08966901817018418, "pele_tot": 0.004907824412797784, "pgas_tot": null, "tdis_tot": 7.9949290180759505, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "singlezone_commercial_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.26318819272610183, "emis_tot": 0.3835824174014755, "ener_tot": 3.216803183654829, "idis_tot": 5.423240054209877, "pdih_tot": 0.08966901817018418, "pele_tot": 0.004907824412797784, "pgas_tot": null, "tdis_tot": 7.9949290180759505, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/testcase1/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "testcase1"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.8993115895520294, "emis_tot": 2.5694616844343696, "ener_tot": 12.847308422171846, "idis_tot": 7118.611500670603, "pdih_tot": null, "pele_tot": null, "pgas_tot": 0.11536491775500209, "tdis_tot": 503.7616200965347, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "testcase1"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.8993115895520294, "emis_tot": 2.5694616844343696, "ener_tot": 12.847308422171846, "idis_tot": 7118.611500670603, "pdih_tot": null, "pele_tot": null, "pgas_tot": 0.11536491775500209, "tdis_tot": 503.7616200965347, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/testcase2/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "testcase2"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 1.5461632218795267, "emis_tot": 5.779914422546377, "ener_tot": 11.559828845092754, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.08727961692454471, "pgas_tot": null, "tdis_tot": 0.587950393326939, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "testcase2"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 1.5461632218795267, "emis_tot": 5.779914422546377, "ener_tot": 11.559828845092754, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.08727961692454471, "pgas_tot": null, "tdis_tot": 0.587950393326939, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/testcase3/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "testcase3"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.9675513120754404, "emis_tot": 2.764432320215544, "ener_tot": 13.822161601077719, "idis_tot": 3606.22674562425, "pdih_tot": null, "pele_tot": null, "pgas_tot": 0.12017492256506475, "tdis_tot": 443.50197076537665, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "testcase3"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.9675513120754404, "emis_tot": 2.764432320215544, "ener_tot": 13.822161601077719, "idis_tot": 3606.22674562425, "pdih_tot": null, "pele_tot": null, "pgas_tot": 0.12017492256506475, "tdis_tot": 443.50197076537665, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "test_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
2 changes: 1 addition & 1 deletion testing/references/twozone_apartment_hydronic/submit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dash_url": "https://api.boptest.net:8081//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "twozone_apartment_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.20050833103389673, "emis_tot": 0.3292126774821889, "ener_tot": 1.0551688380839388, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.039822229155617055, "pgas_tot": null, "tdis_tot": 37.36146074286972, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}
{"dash_url": "https://dashboard.boptest.net//api/results", "payload": {"results": [{"account": {"apiKey": "valid_api_key"}, "boptestVersion": "0.4.0-dev\n", "buildingType": {"uid": "twozone_apartment_hydronic"}, "controlStep": "86400.0", "dateRun": "2020-05-17 00:00:00", "isShared": true, "kpis": {"cost_tot": 0.20050833103389673, "emis_tot": 0.3292126774821889, "ener_tot": 1.0551688380839388, "idis_tot": 0.0, "pdih_tot": null, "pele_tot": 0.039822229155617055, "pgas_tot": null, "tdis_tot": 37.36146074286972, "time_rat": 0}, "scenario": {"electricityPrice": "dynamic", "timePeriod": "peak_heat_day", "weatherForecastUncertainty": "deterministic"}, "forecastParameters":{}, "tags": ["baseline", "unit_test"], "uid": "1"}]}}

0 comments on commit 67b0690

Please sign in to comment.