Skip to content

Commit

Permalink
Merge pull request #559 from ibpsa/issue554_forecastHorizon0
Browse files Browse the repository at this point in the history
Closes #554
  • Loading branch information
dhblum authored Jul 20, 2023
2 parents 4465066 + 898b12e commit 619d43c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ 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).
Expand Down
4 changes: 2 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

0 comments on commit 619d43c

Please sign in to comment.