NREL / OpenStudio-HPXML

Modeling of residential buildings in EnergyPlus using OpenStudio/HPXML.
Other
39 stars 12 forks source link

`Get_space_temperature_schedule` fails when no heating and cooling #1614

Closed lixiliu closed 5 months ago

lixiliu commented 6 months ago

Get_space_temperature_schedule() fails when a building does not have any heating or cooling system. See error log below.

This issue came up from ResStock's Water Heater Location PR, where we are assigning the location of shared water heaters to Conditioned Mechanical Room (i.e., "LocationOtherHeatedSpace"). In project_testing, we are hitting a rare building that does not have heating or cooling.

However, the in.xml file of the building does have <HeatingSetpoint> and <CoolingSetpoint> prepopulated under <HVACSizingControl>, which probably just doesn't get passed through to the measure. Maybe one solution is to pass those info in even if the HVAC systems are absent.

With @jmaguire1 's help, we tested a version of the same building but with a heating system specified and the problem goes away. Here's the buildstock containing the two buildings for testing. Building 48 fails and 49 passes, using the Water Heater Location PR branch. buildstock_test.csv

@shorowit @joseph-robertson @afontani

Failed log:

[11:08:15.365020 ERROR] [openstudio.measure.OSRunner] Optional not initialized
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:2743:in `get'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:2743:in `get_space_temperature_schedule'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:2824:in `get_space_or_schedule_from_location'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:1534:in `block in add_hot_water_and_appliances'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:1533:in `each'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:1533:in `add_hot_water_and_appliances'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:458:in `create_unit_model'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:182:in `block in run'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:174:in `each'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:174:in `each_with_index'
/Users/lliu2/Documents/GitHub/resstock4/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:174:in `run'
shorowit commented 6 months ago

I provided a proposed solution here.