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

UnmetLoadHoursTroubleshooting measure should handle failures more gracefully #175

Open
jmarrec opened this issue Sep 23, 2024 · 1 comment

Comments

@jmarrec
Copy link
Contributor

jmarrec commented Sep 23, 2024

User on https://unmethours.com/question/100084/cannot-run-unmet-load-hours-troubleshooting-measure/

AirLoopHVAC does not have a setpoint manager on the supply outlet node, so it crashes here:

loopName = airloop.name.to_s
supplyOutletNode = airloop.supplyOutletNode
setPointManagers = supplyOutletNode.setpointManagers
type = setPointManagers[0].iddObjectType.valueDescription

Screenshot from 2024-09-23 10-57-57

@jmarrec
Copy link
Contributor Author

jmarrec commented Sep 24, 2024

After adjusting the SPMs, the measure will throw here, because the name has comas and the SQL query fails.

zoneMetrics[:zone_mean_air_temp_vals] = getTimeSeries('Zone Mean Air Temperature', zone_name.upcase, @annEnvPd, 'Hourly')
zoneMetrics[:zone_mean_air_temp_vals].map! { |v| OpenStudio.convert(v, 'C', 'F').get }

No data found for 'Zone Mean Air Temperature' 'THERMAL ZONE: 2FL_OFFICE203,204,205' 
SWIG director method error. NoMethodError: undefined method map!' for nil:NilClass
Traceback (most recent call last): /tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb:591:ininitZoneMetric

Then if I fix this, it fails on

Making time series for envPeriod = 'RUN PERIOD 1', reportingFrequency = 'Hourly', timeSeriesName = 'Zone People Occupant Count', keyValue = 'THERMAL ZONE: ELEVATOR2'
Tuple: RUN PERIOD 1, Hourly, Zone People Occupant Count, THERMAL ZONE: ELEVATOR2 not found in data dictionary.
No time series found
No data found for 'Zone People Occupant Count' 'THERMAL ZONE: ELEVATOR2'
SWIG director method error. NoMethodError: undefined method `getDesignLoopExitTemperature' for #<OpenStudio::Model::SizingPlant:0x00007f11f2028040 @__swigtype__="_p_openstudio__model__SizingPlant">
Traceback (most recent call last):
/tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb:261:in `block in plant_loop_temp_vs_setpoints'
/tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb:244:in `each'
/tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb:244:in `plant_loop_temp_vs_setpoints'
/tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb:528:in `run'
Found error in state 'ReportingMeasures' with message: 'Runner error: Measure '/tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb' reported an error with [SWIG director method error. NoMethodError: undefined method `getDesignLoopExitTemperature' for #<OpenStudio::Model::SizingPlant:0x00007f11f2028040 @__swigtype__="_p_openstudio__model__SizingPlant">
Traceback (most recent call last):
/tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb:261:in `block in plant_loop_temp_vs_setpoints'
/tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb:244:in `each'
/tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb:244:in `plant_loop_temp_vs_setpoints'
/tmp/osmodel-c616-91e0-d2d2-bb62-1727164398-0/resources/measures/UnmetLoadHoursTroubleshooting/measure.rb:528:in `run']'

The proper SizingPlant getter is double designLoopExitTemperature() const. https://github.com/NREL/OpenStudio/blob/ba1b94b6542c1f1d4cdcdb775886852b9a82bc4f/src/model/SizingPlant.hpp#L53

I'm not sure when the Quantity getDesignLoopExitTemperature() was removed in 3.0.0

https://github.com/NREL/OpenStudio/blob/58ed43d0b1d36eec28d167b1a82a4af9e0446c2a/openstudiocore/src/model/SizingPlant.hpp#L80

Edit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant