-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix UnmetLoads measure for OS 3.0 and newer #168
Draft
shorowit
wants to merge
5
commits into
develop
Choose a base branch
from
unmet_loads_measure_bugfix
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+252
−317
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b47ca7e
Fixes https://github.com/NREL/openstudio-common-measures-gem/issues/76
shorowit 6a04798
Re-enable tests and get them running (though two fail).
shorowit 0875291
Merge branch 'develop' into unmet_loads_measure_bugfix
DavidGoldwasser b64e521
updating measure.xml one more time with openstudio measure -u
DavidGoldwasser b588aca
Merge branch 'develop' into unmet_loads_measure_bugfix
DavidGoldwasser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
# update | ||
# start the measure | ||
class UnmetLoadHoursTroubleshooting < OpenStudio::Measure::ReportingMeasure | ||
|
||
def name | ||
return 'Unmet Load Hours Troubleshooting' | ||
end | ||
|
@@ -55,7 +56,7 @@ def get_unmet_hours_matrix(zoneMetrics) | |
@metrics[:toleranceTimeHeatSetUnmet] = d.getDouble(1).empty? ? 0.2 : d.getDouble(1).get | ||
@metrics[:toleranceTimeCoolSetUnmet] = d.getDouble(2).empty? ? 0.2 : d.getDouble(2).get | ||
end | ||
# We must use Kelvin -> Rankine conversion instead of Celsius -> Farenheit because the latter conversion adds the 32 degree offset | ||
# We must use Kelvin -> Rankine conversion instead of Celsius -> Fahrenheit because the latter conversion adds the 32 degree offset | ||
@metrics[:toleranceTimeHeatSetUnmetF] = OpenStudio.convert(@metrics[:toleranceTimeHeatSetUnmet], 'K', 'R').get | ||
@metrics[:toleranceTimeCoolSetUnmetF] = OpenStudio.convert(@metrics[:toleranceTimeCoolSetUnmet], 'K', 'R').get | ||
|
||
|
@@ -258,7 +259,7 @@ def plant_loop_temp_vs_setpoints(zoneMetrics) | |
|
||
rawMin, rawMax = getMinMaxForSchedule(schedule) | ||
|
||
exit_temp = plantloop.sizingPlant.getDesignLoopExitTemperature.value | ||
exit_temp = plantloop.sizingPlant.designLoopExitTemperature | ||
exit_temp = OpenStudio.convert(exit_temp, 'C', 'F').get | ||
|
||
maxSetpointValue = OpenStudio.convert(rawMax, 'C', 'F').get | ||
|
@@ -443,6 +444,8 @@ def time_series_setpoint_vs_temp(zoneMetrics) | |
@test_nine_data << graph | ||
end | ||
end | ||
|
||
attr_reader :measureMetrics | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed for the measure unit tests to work |
||
|
||
# define what happens when the measure is run | ||
def run(runner, user_arguments) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Primary bugfix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found this today again: #175 (comment)
via https://unmethours.com/question/100084/cannot-run-unmet-load-hours-troubleshooting-measure/