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

defaults apply_water_heaters crashing #1874

Closed
rajeee opened this issue Oct 30, 2024 · 3 comments
Closed

defaults apply_water_heaters crashing #1874

rajeee opened this issue Oct 30, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rajeee
Copy link
Collaborator

rajeee commented Oct 30, 2024

I am getting the following errors in 9 samples in most recent run of NREL/resstock#1299.

[16:05:33.315833 ERROR] [openstudio.workflow.OSWorkflow] Found error in state 'OpenStudioMeasures' with message: 'Measure 'BuildExistingModel' reported an error with [Measure Failed with Error: nil can't be coerced into Float
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/defaults.rb:2918:in `*'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/defaults.rb:2918:in `block in apply_water_heaters'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/defaults.rb:2866:in `each'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/defaults.rb:2866:in `apply_water_heaters'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/defaults.rb:81:in `apply'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/BuildResidentialHPXML/measure.rb:4048:in `create'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/BuildResidentialHPXML/measure.rb:3672:in `run'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure.rb:425:in `run_measure'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure.rb:225:in `block (2 levels) in apply_measures'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure.rb:217:in `each'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure.rb:217:in `block in apply_measures'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure.rb:212:in `each'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure.rb:212:in `apply_measures'
/Users/radhikar/Documents/resstock/measures/BuildExistingModel/measure.rb:731:in `block in run'
/Users/radhikar/Documents/resstock/measures/BuildExistingModel/measure.rb:359:in `each'
/Users/radhikar/Documents/resstock/measures/BuildExistingModel/measure.rb:359:in `run']'

From the out.osw, these were the arguments passed to the BuildResidentialHPXML:

Calling BuildResidentialHPXML measure with arguments:
hpxml_path -> /Users/radhikar/Documents/resstock/bldg0038488/run/existing.xml
air_leakage_house_pressure -> 50.0
air_leakage_type -> unit total
air_leakage_units -> ACH
air_leakage_value -> 15.0
bathroom_fans_start_hour -> 20
battery_present -> false
ceiling_assembly_r -> 31.6
ceiling_fan_cooling_setpoint_temp_offset -> 0.0
ceiling_fan_efficiency -> 70.4
ceiling_fan_present -> true
ceiling_fan_quantity -> 1
clothes_dryer_efficiency -> 2.7
clothes_dryer_efficiency_type -> CombinedEnergyFactor
clothes_dryer_fuel_type -> electricity
clothes_dryer_present -> true
clothes_dryer_usage_multiplier -> 1.0
clothes_washer_capacity -> 3.68
clothes_washer_efficiency -> 2.07
clothes_washer_efficiency_type -> IntegratedModifiedEnergyFactor
clothes_washer_label_annual_gas_cost -> 9.0
clothes_washer_label_electric_rate -> 0.1065
clothes_washer_label_gas_rate -> 1.218
clothes_washer_label_usage -> 7.538462
clothes_washer_present -> true
clothes_washer_rated_annual_kwh -> 123.0
clothes_washer_usage_multiplier -> 1.0
cooking_range_oven_fuel_type -> electricity
cooking_range_oven_is_induction -> false
cooking_range_oven_present -> true
cooking_range_oven_usage_multiplier -> 1.0
cooling_system_cooling_efficiency -> 13.0
cooling_system_cooling_efficiency_type -> SEER
cooling_system_fraction_cool_load_served -> 1.0
cooling_system_is_ducted -> false
cooling_system_type -> central air conditioner
dehumidifier_capacity -> 40.0
dehumidifier_efficiency -> 0.0
dehumidifier_efficiency_type -> EnergyFactor
dehumidifier_fraction_dehumidification_load_served -> 1.0
dehumidifier_rh_setpoint -> 0.5
dehumidifier_type -> none
dishwasher_efficiency -> 318.0
dishwasher_efficiency_type -> RatedAnnualkWh
dishwasher_label_annual_gas_cost -> 25.0
dishwasher_label_electric_rate -> 0.12
dishwasher_label_gas_rate -> 1.09
dishwasher_label_usage -> 4.0
dishwasher_place_setting_capacity -> 12
dishwasher_present -> true
dishwasher_usage_multiplier -> 1.0
door_area -> 20.0
door_rvalue -> 5.0
ducts_leakage_units -> Percent
ducts_return_insulation_r -> 0.0
ducts_return_leakage_to_outside_value -> 0.1
ducts_return_location -> crawlspace
ducts_supply_insulation_r -> 0.0
ducts_supply_leakage_to_outside_value -> 0.2
ducts_supply_location -> crawlspace
dwhr_efficiency -> 0.0
dwhr_equal_flow -> true
dwhr_facilities_connected -> none
ev_battery_present -> true
ev_battery_usable_capacity -> 53.503
ev_charger_power -> 5690.0
ev_charger_present -> true
ev_energy_efficiency -> 0.267513
ev_fraction_charged_home -> 1.0
ev_miles_per_year -> 19000.0
extra_refrigerator_present -> true
extra_refrigerator_rated_annual_kwh -> 383.0
extra_refrigerator_usage_multiplier -> 1.0
floor_over_foundation_assembly_r -> 5.3
floor_over_garage_assembly_r -> 5.3
floor_type -> WoodFrame
foundation_wall_insulation_distance_to_bottom -> 0.0
foundation_wall_insulation_distance_to_top -> 0.0
foundation_wall_insulation_location -> exterior
foundation_wall_insulation_r -> 0.0
foundation_wall_type -> solid concrete
freezer_present -> false
freezer_rated_annual_kwh -> 0.0
freezer_usage_multiplier -> 0.0
geometry_attic_type -> VentedAttic
geometry_average_ceiling_height -> 8.0
geometry_eaves_depth -> 2.0
geometry_foundation_height -> 4.0
geometry_foundation_height_above_grade -> 1.0
geometry_foundation_type -> VentedCrawlspace
geometry_garage_depth -> 24.0
geometry_garage_position -> Right
geometry_garage_protrusion -> 0.5
geometry_garage_width -> 0.0
geometry_rim_joist_height -> 9.25
geometry_roof_pitch -> 6:12
geometry_roof_type -> gable
geometry_unit_aspect_ratio -> 1.8
geometry_unit_cfa -> 1228.0
geometry_unit_num_bedrooms -> 3
geometry_unit_num_occupants -> 2.0
geometry_unit_orientation -> 180.0
geometry_unit_type -> single-family detached
geothermal_loop_configuration -> none
heat_pump_backup_fuel -> electricity
heat_pump_backup_heating_efficiency -> 1.0
heat_pump_backup_type -> none
heat_pump_cooling_efficiency -> 0.0
heat_pump_cooling_efficiency_type -> SEER
heat_pump_fraction_cool_load_served -> 1.0
heat_pump_fraction_heat_load_served -> 1.0
heat_pump_heating_efficiency -> 0.0
heat_pump_heating_efficiency_type -> HSPF
heat_pump_sizing_methodology -> ACCA
heat_pump_type -> none
heating_system_2_fraction_heat_load_served -> 0.0
heating_system_2_fuel -> electricity
heating_system_2_heating_efficiency -> 0.0
heating_system_2_type -> none
heating_system_fraction_heat_load_served -> 1.0
heating_system_fuel -> fuel oil
heating_system_heating_efficiency -> 0.925
heating_system_type -> Furnace
holiday_lighting_daily_kwh -> 0.0
holiday_lighting_present -> false
hot_water_distribution_pipe_r -> 0.0
hot_water_distribution_recirc_branch_piping_length -> 0.0
hot_water_distribution_recirc_control_type -> no control
hot_water_distribution_recirc_piping_length -> 0.0
hot_water_distribution_recirc_pump_power -> 0.0
hot_water_distribution_system_type -> Standard
kitchen_fans_start_hour -> 13
lighting_exterior_fraction_cfl -> 0.0
lighting_exterior_fraction_led -> 0.0
lighting_exterior_fraction_lfl -> 0.0
lighting_exterior_usage_multiplier -> 1.0
lighting_garage_fraction_cfl -> 0.0
lighting_garage_fraction_led -> 0.0
lighting_garage_fraction_lfl -> 0.0
lighting_garage_usage_multiplier -> 1.0
lighting_interior_fraction_cfl -> 0.0
lighting_interior_fraction_led -> 0.0
lighting_interior_fraction_lfl -> 0.0
lighting_interior_usage_multiplier -> 1.0
lighting_present -> true
mech_vent_2_fan_power -> 0.0
mech_vent_2_fan_type -> none
mech_vent_2_flow_rate -> 0.0
mech_vent_2_hours_in_operation -> 0.0
mech_vent_2_recovery_efficiency_type -> Unadjusted
mech_vent_2_sensible_recovery_efficiency -> 0.0
mech_vent_2_total_recovery_efficiency -> 0.0
mech_vent_fan_power -> 0.0
mech_vent_fan_type -> none
mech_vent_flow_rate -> 0.0
mech_vent_hours_in_operation -> 0.0
mech_vent_num_units_served -> 0
mech_vent_recovery_efficiency_type -> Unadjusted
mech_vent_sensible_recovery_efficiency -> 0.0
mech_vent_total_recovery_efficiency -> 0.0
misc_fuel_loads_fireplace_annual_therm -> 0.0
misc_fuel_loads_fireplace_fuel_type -> natural gas
misc_fuel_loads_fireplace_present -> false
misc_fuel_loads_fireplace_usage_multiplier -> 0.0
misc_fuel_loads_grill_annual_therm -> 0.0
misc_fuel_loads_grill_fuel_type -> natural gas
misc_fuel_loads_grill_present -> false
misc_fuel_loads_grill_usage_multiplier -> 0.0
misc_fuel_loads_lighting_annual_therm -> 0.0
misc_fuel_loads_lighting_fuel_type -> natural gas
misc_fuel_loads_lighting_present -> false
misc_fuel_loads_lighting_usage_multiplier -> 0.0
misc_plug_loads_other_annual_kwh -> 1707.02
misc_plug_loads_other_frac_latent -> 0.021
misc_plug_loads_other_frac_sensible -> 0.93
misc_plug_loads_other_usage_multiplier -> 1.06
misc_plug_loads_television_present -> true
misc_plug_loads_television_usage_multiplier -> 1.06
misc_plug_loads_well_pump_annual_kwh -> 0.0
misc_plug_loads_well_pump_present -> false
misc_plug_loads_well_pump_usage_multiplier -> 0.0
neighbor_back_distance -> 0.0
neighbor_front_distance -> 0.0
neighbor_left_distance -> 15.0
neighbor_right_distance -> 15.0
overhangs_back_depth -> 0.0
overhangs_back_distance_to_bottom_of_window -> 4.0
overhangs_back_distance_to_top_of_window -> 0.0
overhangs_front_depth -> 0.0
overhangs_front_distance_to_bottom_of_window -> 4.0
overhangs_front_distance_to_top_of_window -> 0.0
overhangs_left_depth -> 0.0
overhangs_left_distance_to_bottom_of_window -> 4.0
overhangs_left_distance_to_top_of_window -> 0.0
overhangs_right_depth -> 0.0
overhangs_right_distance_to_bottom_of_window -> 4.0
overhangs_right_distance_to_top_of_window -> 0.0
permanent_spa_heater_annual_kwh -> 0.0
permanent_spa_heater_annual_therm -> 0.0
permanent_spa_heater_type -> none
permanent_spa_heater_usage_multiplier -> 0.0
permanent_spa_present -> false
permanent_spa_pump_annual_kwh -> 0.0
permanent_spa_pump_usage_multiplier -> 0.0
pool_heater_annual_kwh -> 0.0
pool_heater_annual_therm -> 0.0
pool_heater_type -> none
pool_heater_usage_multiplier -> 0.0
pool_present -> false
pool_pump_annual_kwh -> 0.0
pool_pump_usage_multiplier -> 0.0
pv_system_2_array_azimuth -> 0.0
pv_system_2_array_tilt -> roofpitch
pv_system_2_max_power_output -> 0.0
pv_system_2_present -> false
pv_system_array_azimuth -> 180.0
pv_system_array_tilt -> roofpitch
pv_system_location -> roof
pv_system_max_power_output -> 0.0
pv_system_present -> false
radiant_barrier_attic_location -> none
radiant_barrier_grade -> 1
refrigerator_present -> true
refrigerator_rated_annual_kwh -> 383.0
refrigerator_usage_multiplier -> 1.0
rim_joist_assembly_r -> 3.2
roof_assembly_r -> 2.3
roof_color -> medium
roof_material_type -> asphalt or fiberglass shingles
simulation_control_daylight_saving_enabled -> true
site_ground_conductivity -> 1.1
site_iecc_zone -> 4A
site_shielding_of_home -> normal
site_state_code -> MD
site_time_zone_utc_offset -> -5.0
site_zip_code -> 20906
skylight_area_back -> 0.0
skylight_area_front -> 0.0
skylight_area_left -> 0.0
skylight_area_right -> 0.0
skylight_shgc -> 0.3
skylight_ufactor -> 0.37
slab_exterior_horizontal_insulation_depth_below_grade -> 0.0
slab_exterior_horizontal_insulation_r -> 0.0
slab_exterior_horizontal_insulation_width -> 0.0
slab_perimeter_insulation_depth -> 0.0
slab_perimeter_insulation_r -> 0.0
slab_under_insulation_r -> 0.0
slab_under_insulation_width -> 0.0
solar_thermal_collector_area -> 40.0
solar_thermal_collector_azimuth -> 180.0
solar_thermal_collector_loop_type -> liquid indirect
solar_thermal_collector_rated_optical_efficiency -> 0.77
solar_thermal_collector_rated_thermal_losses -> 0.793
solar_thermal_collector_tilt -> roofpitch
solar_thermal_collector_type -> single glazing black
solar_thermal_solar_fraction -> 0.0
solar_thermal_system_type -> none
wall_assembly_r -> 4.1
wall_color -> medium dark
wall_siding_type -> brick veneer
wall_type -> WoodStud
water_fixtures_shower_low_flow -> false
water_fixtures_sink_low_flow -> false
water_fixtures_usage_multiplier -> 0.9
water_heater_efficiency -> 3.45
water_heater_efficiency_type -> UniformEnergyFactor
water_heater_fuel_type -> electricity
water_heater_jacket_rvalue -> 0.0
water_heater_location -> conditioned space
water_heater_recovery_efficiency -> 0.0
water_heater_setpoint_temperature -> 125.0
water_heater_standby_loss -> 0.0
water_heater_tank_volume -> 50.0
water_heater_type -> heat pump water heater
weather_station_epw_filepath -> ../../../weather/G2400310.epw
whole_house_fan_flow_rate -> 0.0
whole_house_fan_power -> 0.0
whole_house_fan_present -> false
window_area_back -> 0.0
window_area_front -> 0.0
window_area_left -> 0.0
window_area_right -> 0.0
window_aspect_ratio -> 1.333
window_back_wwr -> 0.18
window_fraction_operable -> 0.67
window_front_wwr -> 0.18
window_interior_shading_summer -> 0.7
window_interior_shading_winter -> 0.85
window_left_wwr -> 0.18
window_right_wwr -> 0.18
window_shgc -> 0.56
window_ufactor -> 0.49
year_built -> 1970
misc_plug_loads_vehicle_present -> false
pv_system_num_bedrooms_served -> 0
battery_num_bedrooms_served -> 0
hvac_control_heating_weekday_setpoint -> 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0
hvac_control_heating_weekend_setpoint -> 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0, 72.0
hvac_control_cooling_weekday_setpoint -> 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0
hvac_control_cooling_weekend_setpoint -> 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0
geometry_unit_left_wall_is_adiabatic -> false
geometry_unit_right_wall_is_adiabatic -> false
geometry_unit_front_wall_is_adiabatic -> false
geometry_unit_back_wall_is_adiabatic -> false
geometry_unit_num_floors_above_grade -> 1
ev_hours_per_week -> 16.562889165628892
whole_sfa_or_mf_building_sim -> false
additional_properties -> ceiling_insulation_r=30
software_info_program_used -> ResStock
software_info_program_version -> 3.3.0
simulation_control_timestep -> 15
simulation_control_run_period -> Jan 1 - Dec 31
simulation_control_run_period_calendar_year -> 2007
apply_defaults -> true
apply_validation -> true
@rajeee rajeee added the bug Something isn't working label Oct 30, 2024
@joseph-robertson
Copy link
Collaborator

On branch electric_vehicles in resstock, I see hpxml_defaults.rb and not defaults.rb (the latter is the new file name): https://github.com/NREL/resstock/tree/electric_vehicles/resources/hpxml-measures/HPXMLtoOpenStudio/resources

@shorowit
Copy link
Contributor

Agreed, it doesn't seem possible that it was run with that branch.

@rajeee
Copy link
Collaborator Author

rajeee commented Oct 30, 2024

Sorry, I had diverged from this on my local checkout (I was using more recent version of OS-HPXML locally).

I tested again after brining NREL/resstock#1299 up to date with develop (and it's resources/hpxml-measures folder up to date with ev_schedules branch in os_hpxml which is up to date with os_hpxml/master).

I ran into a new problem:

[openstudio.measure.OSRunner] <Error> SWIG director method error. NoMethodError: undefined method `update_args_hash' for #<BuildExistingModel:0x00000001107d8a00 @__swigtype__="_p_openstudio__measure__ModelMeasure">

Traceback (most recent call last):
/Users/radhikar/Documents/resstock/measures/BuildExistingModel/measure.rb:326:in `block (2 levels) in run'
/Users/radhikar/Documents/resstock/measures/BuildExistingModel/measure.rb:325:in `each'
/Users/radhikar/Documents/resstock/measures/BuildExistingModel/measure.rb:325:in `block in run'
/Users/radhikar/Documents/resstock/measures/BuildExistingModel/measure.rb:321:in `each'
/Users/radhikar/Documents/resstock/measures/BuildExistingModel/measure.rb:321:in `run'
[openstudio.workflow.OSWorkflow] <Error> Found error in state 'OpenStudioMeasures' with message: 'Runner error: Measure '/Users/radhikar/Documents/resstock/measures/BuildExistingModel/measure.rb' reported an error with [SWIG director method error. NoMethodError: undefined method `update_args_hash' for #<BuildExistingModel:0x00000001107d8a00 @__swigtype__="_p_openstudio__measure__ModelMeasure"> 

After I fixed this by manually adding update_args_hash function to the meta_measure.rb locally, I got another error:

Traceback (most recent call last):
/Users/radhikar/Documents/resstock/resources/hpxml-measures/ReportSimulationOutput/measure.rb:2083:in `get_report_meter_data_timeseries'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/ReportSimulationOutput/measure.rb:890:in `block (2 levels) in get_outputs'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/ReportSimulationOutput/measure.rb:883:in `each'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/ReportSimulationOutput/measure.rb:883:in `block in get_outputs'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/ReportSimulationOutput/measure.rb:867:in `each'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/ReportSimulationOutput/measure.rb:867:in `get_outputs'
/Users/radhikar/Documents/resstock/resources/hpxml-measures/ReportSimulationOutput/measure.rb:640:in `run'
[openstudio.workflow.OSWorkflow] <Error> Found error in state 'ReportingMeasures' with message: 'Runner error: Measure '/Users/radhikar/Documents/resstock/resources/hpxml-measures/ReportSimulationOutput/measure.rb' reported an error with [SWIG director method error. NoMethodError: undefined method `[]' for nil:NilClass

So, looks like the original error is resolved. There seems to be some issues that need to be solved in ResStock side to accomodate the changes in OS-HPXML side but I assume it will be taken care by: NREL/resstock#1308. We can close this issue.

@rajeee rajeee closed this as completed Oct 30, 2024
@github-project-automation github-project-automation bot moved this from Triage to Done in OpenStudio-HPXML Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants