Skip to content

Commit

Permalink
Squashed 'resources/hpxml-measures/' changes from ca81d5adc..abe59f87e
Browse files Browse the repository at this point in the history
abe59f87e Add schedule args for refrigerator, range.
f8afa69be Merge branch 'master' into build-res-hpxml-v3
036948c90 Merge pull request #408 from NREL/appl-schedules
2905a5c22 Clarify that elements are on the CookingRange, not Oven, element. [ci skip]
7f7a9a5c3 Small update to docs. [ci skip]
12728f67d Update docs for optional schedules.
402655e73 Update epvalidator for optional schedules.
a3ca8fdfb Remove hardcoded schedules for refrigerator, cooking range.
65f888e71 Default refrigerator, cooking range schedules.
bd0821073 Add schedule fracs and mults to refrigerator, cooking range classes.
a5392f2e0 Merge pull request #405 from NREL/cleanup_sample_files
4b8caa56d Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into cleanup_sample_files
0459c7238 Merge pull request #406 from NREL/conditioned_ducts_lto_warning
88208ff0f Update test.
b1d5070d0 Adds a warning if a HVACDistribution system has ducts entirely within conditioned space and non-zero leakage to the outside.
415dc76f8 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into cleanup_sample_files
354755974 Cleanup sample files.
fd3526eda Merge pull request #403 from NREL/hp_defrost_control
d5474a4bd Changes heat pump defrost control from OnDemand to Timed.

git-subtree-dir: resources/hpxml-measures
git-subtree-split: abe59f87e214dea8c1a4a0b34365520aba0c353b
  • Loading branch information
joseph-robertson committed Jun 4, 2020
1 parent 323f5b2 commit f495538
Show file tree
Hide file tree
Showing 196 changed files with 1,432 additions and 9,566 deletions.
118 changes: 97 additions & 21 deletions BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2041,6 +2041,24 @@ def arguments(model)
arg.setDefaultValue(1.0)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('refrigerator_weekday_fractions', true)
arg.setDisplayName('Refrigerator: Weekday Schedule')
arg.setDescription('Specify the 24-hour weekday schedule.')
arg.setDefaultValue(Constants.Auto)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('refrigerator_weekend_fractions', true)
arg.setDisplayName('Refrigerator: Weekend Schedule')
arg.setDescription('Specify the 24-hour weekend schedule.')
arg.setDefaultValue(Constants.Auto)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('refrigerator_monthly_multipliers', true)
arg.setDisplayName('Refrigerator: Month Schedule')
arg.setDescription('Specify the 12-month schedule.')
arg.setDefaultValue(Constants.Auto)
args << arg

arg = OpenStudio::Measure::OSArgument::makeBoolArgument('extra_refrigerator_present', true)
arg.setDisplayName('Extra Refrigerator: Present')
arg.setDescription('Whether there is an extra refrigerator.')
Expand Down Expand Up @@ -2109,6 +2127,24 @@ def arguments(model)
arg.setDefaultValue(1.0)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('cooking_range_oven_weekday_fractions', true)
arg.setDisplayName('Cooking Range/Oven: Weekday Schedule')
arg.setDescription('Specify the 24-hour weekday schedule.')
arg.setDefaultValue(Constants.Auto)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('cooking_range_oven_weekend_fractions', true)
arg.setDisplayName('Cooking Range/Oven: Weekend Schedule')
arg.setDescription('Specify the 24-hour weekend schedule.')
arg.setDefaultValue(Constants.Auto)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('cooking_range_oven_monthly_multipliers', true)
arg.setDisplayName('Cooking Range/Oven: Month Schedule')
arg.setDescription('Specify the 12-month schedule.')
arg.setDefaultValue(Constants.Auto)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('ceiling_fan_efficiency', true)
arg.setDisplayName('Ceiling Fan: Efficiency')
arg.setUnits('CFM/watt')
Expand Down Expand Up @@ -2158,34 +2194,28 @@ def arguments(model)
arg.setDefaultValue(0.045)
args << arg

arg = OpenStudio::Measure::OSArgument::makeBoolArgument('plug_loads_schedule_values', true)
arg.setDisplayName('Plug Loads: Use Schedule Values')
arg.setDescription('Whether to use the schedule values.')
arg.setDefaultValue(false)
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('plug_loads_usage_multiplier', true)
arg.setDisplayName('Plug Loads: Usage Multiplier')
arg.setDescription('Multiplier on the energy usage that can reflect, e.g., high/low usage occupants.')
arg.setDefaultValue(1.0)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('plug_loads_weekday_fractions', true)
arg.setDisplayName('Plug Loads: Weekday Schedule')
arg.setDescription('Specify the 24-hour weekday schedule.')
arg.setDefaultValue('0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036')
arg.setDefaultValue(Constants.Auto)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('plug_loads_weekend_fractions', true)
arg.setDisplayName('Plug Loads: Weekend Schedule')
arg.setDescription('Specify the 24-hour weekend schedule.')
arg.setDefaultValue('0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036')
arg.setDefaultValue(Constants.Auto)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('plug_loads_monthly_multipliers', true)
arg.setDisplayName('Plug Loads: Month Schedule')
arg.setDescription('Specify the 12-month schedule.')
arg.setDefaultValue('1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248')
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('plug_loads_usage_multiplier', true)
arg.setDisplayName('Plug Loads: Usage Multiplier')
arg.setDescription('Multiplier on the energy usage that can reflect, e.g., high/low usage occupants.')
arg.setDefaultValue(1.0)
arg.setDefaultValue(Constants.Auto)
args << arg

return args
Expand Down Expand Up @@ -2471,6 +2501,9 @@ def run(model, runner, user_arguments)
refrigerator_location: runner.getStringArgumentValue('refrigerator_location', user_arguments),
refrigerator_rated_annual_kwh: runner.getDoubleArgumentValue('refrigerator_rated_annual_kwh', user_arguments),
refrigerator_usage_multiplier: runner.getDoubleArgumentValue('refrigerator_usage_multiplier', user_arguments),
refrigerator_weekday_fractions: runner.getStringArgumentValue('refrigerator_weekday_fractions', user_arguments),
refrigerator_weekend_fractions: runner.getStringArgumentValue('refrigerator_weekend_fractions', user_arguments),
refrigerator_monthly_multipliers: runner.getStringArgumentValue('refrigerator_monthly_multipliers', user_arguments),
extra_refrigerator_present: runner.getBoolArgumentValue('extra_refrigerator_present', user_arguments),
extra_refrigerator_location: runner.getStringArgumentValue('extra_refrigerator_location', user_arguments),
extra_refrigerator_rated_annual_kwh: runner.getDoubleArgumentValue('extra_refrigerator_rated_annual_kwh', user_arguments),
Expand All @@ -2481,18 +2514,20 @@ def run(model, runner, user_arguments)
cooking_range_oven_is_induction: runner.getStringArgumentValue('cooking_range_oven_is_induction', user_arguments),
cooking_range_oven_is_convection: runner.getStringArgumentValue('cooking_range_oven_is_convection', user_arguments),
cooking_range_oven_usage_multiplier: runner.getDoubleArgumentValue('cooking_range_oven_usage_multiplier', user_arguments),
cooking_range_oven_weekday_fractions: runner.getStringArgumentValue('cooking_range_oven_weekday_fractions', user_arguments),
cooking_range_oven_weekend_fractions: runner.getStringArgumentValue('cooking_range_oven_weekend_fractions', user_arguments),
cooking_range_oven_monthly_multipliers: runner.getStringArgumentValue('cooking_range_oven_monthly_multipliers', user_arguments),
ceiling_fan_efficiency: runner.getDoubleArgumentValue('ceiling_fan_efficiency', user_arguments),
ceiling_fan_quantity: runner.getStringArgumentValue('ceiling_fan_quantity', user_arguments),
ceiling_fan_cooling_setpoint_temp_offset: runner.getDoubleArgumentValue('ceiling_fan_cooling_setpoint_temp_offset', user_arguments),
plug_loads_television_annual_kwh: runner.getStringArgumentValue('plug_loads_television_annual_kwh', user_arguments),
plug_loads_other_annual_kwh: runner.getStringArgumentValue('plug_loads_other_annual_kwh', user_arguments),
plug_loads_other_frac_sensible: runner.getDoubleArgumentValue('plug_loads_other_frac_sensible', user_arguments),
plug_loads_other_frac_latent: runner.getDoubleArgumentValue('plug_loads_other_frac_latent', user_arguments),
plug_loads_schedule_values: runner.getBoolArgumentValue('plug_loads_schedule_values', user_arguments),
plug_loads_usage_multiplier: runner.getDoubleArgumentValue('plug_loads_usage_multiplier', user_arguments),
plug_loads_weekday_fractions: runner.getStringArgumentValue('plug_loads_weekday_fractions', user_arguments),
plug_loads_weekend_fractions: runner.getStringArgumentValue('plug_loads_weekend_fractions', user_arguments),
plug_loads_monthly_multipliers: runner.getStringArgumentValue('plug_loads_monthly_multipliers', user_arguments),
plug_loads_usage_multiplier: runner.getDoubleArgumentValue('plug_loads_usage_multiplier', user_arguments) }
plug_loads_monthly_multipliers: runner.getStringArgumentValue('plug_loads_monthly_multipliers', user_arguments) }

# Argument error checks
warnings, errors = validate_arguments(args)
Expand Down Expand Up @@ -3983,10 +4018,25 @@ def self.set_refrigerator(hpxml, runner, args)
usage_multiplier = args[:refrigerator_usage_multiplier]
end

if args[:refrigerator_weekday_fractions] != Constants.Auto
refrigerator_weekday_fractions = args[:refrigerator_weekday_fractions]
end

if args[:refrigerator_weekend_fractions] != Constants.Auto
refrigerator_weekend_fractions = args[:refrigerator_weekend_fractions]
end

if args[:refrigerator_monthly_multipliers] != Constants.Auto
refrigerator_monthly_multipliers = args[:refrigerator_monthly_multipliers]
end

hpxml.refrigerators.add(id: 'Refrigerator',
location: location,
rated_annual_kwh: args[:refrigerator_rated_annual_kwh],
usage_multiplier: usage_multiplier,
weekday_fractions: refrigerator_weekday_fractions,
weekend_fractions: refrigerator_weekend_fractions,
monthly_multipliers: refrigerator_monthly_multipliers,
schedules_output_path: args[:schedules_output_path],
schedules_column_name: 'refrigerator')
end
Expand Down Expand Up @@ -4021,11 +4071,27 @@ def self.set_cooking_range_oven(hpxml, runner, args)
usage_multiplier = args[:cooking_range_oven_usage_multiplier]
end

if args[:cooking_range_oven_weekday_fractions] != Constants.Auto
cooking_range_oven_weekday_fractions = args[:cooking_range_oven_weekday_fractions]
end

if args[:cooking_range_oven_weekend_fractions] != Constants.Auto
cooking_range_oven_weekend_fractions = args[:cooking_range_oven_weekend_fractions]
end

if args[:cooking_range_oven_monthly_multipliers] != Constants.Auto
cooking_range_oven_monthly_multipliers = args[:cooking_range_oven_monthly_multipliers]
end

hpxml.cooking_ranges.add(id: 'CookingRange',
location: location,
fuel_type: args[:cooking_range_oven_fuel_type],
is_induction: args[:cooking_range_oven_is_induction],
usage_multiplier: usage_multiplier)
usage_multiplier: usage_multiplier,
weekday_fractions: cooking_range_oven_weekday_fractions,
weekend_fractions: cooking_range_oven_weekend_fractions,
monthly_multipliers: cooking_range_oven_monthly_multipliers)

hpxml.ovens.add(id: 'Oven',
is_convection: args[:cooking_range_oven_is_convection])
end
Expand Down Expand Up @@ -4071,11 +4137,21 @@ def self.set_plug_loads(hpxml, runner, args)
end

def self.set_misc_loads_schedule(hpxml, runner, args)
return unless args[:plug_loads_schedule_values]
if args[:plug_loads_weekday_fractions] != Constants.Auto
plug_loads_weekday_fractions = args[:plug_loads_weekday_fractions]
end

if args[:plug_loads_weekend_fractions] != Constants.Auto
plug_loads_weekend_fractions = args[:plug_loads_weekend_fractions]
end

if args[:plug_loads_monthly_multipliers] != Constants.Auto
plug_loads_monthly_multipliers = args[:plug_loads_monthly_multipliers]
end

hpxml.misc_loads_schedule.weekday_fractions = args[:plug_loads_weekday_fractions]
hpxml.misc_loads_schedule.weekend_fractions = args[:plug_loads_weekend_fractions]
hpxml.misc_loads_schedule.monthly_multipliers = args[:plug_loads_monthly_multipliers]
hpxml.misc_loads_schedule.weekday_fractions = plug_loads_weekday_fractions
hpxml.misc_loads_schedule.weekend_fractions = plug_loads_weekend_fractions
hpxml.misc_loads_schedule.monthly_multipliers = plug_loads_monthly_multipliers
end
end

Expand Down
Loading

0 comments on commit f495538

Please sign in to comment.