Skip to content

Commit

Permalink
Merge pull request #659 from NREL/v151
Browse files Browse the repository at this point in the history
Prepare for v1.5.1
  • Loading branch information
shorowit committed Dec 8, 2022
2 parents a05cba3 + 882b8d8 commit 775c4f2
Show file tree
Hide file tree
Showing 26 changed files with 386 additions and 321 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

__Bugfixes__
- Fixes incorrect warning about zip code not found in eGRID/Cambium lookup table.
- Fixes error when a non-electric water heater has jacket insulation and the UEF metric is used.

## OpenStudio-ERI v1.5.0

Expand Down
20 changes: 11 additions & 9 deletions docs/source/workflow_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ If a central air conditioner is specified, additional information is entered in
``DistributionSystem`` idref See [#]_ Yes ID of attached distribution system
``AnnualCoolingEfficiency[Units="SEER" or Units="SEER2"]/Value`` double Btu/Wh > 0 Yes Rated efficiency [#]_
``CoolingCapacity`` double Btu/hr >= 0 Yes Cooling output capacity
``SensibleHeatFraction`` double frac 0 - 1 No Sensible heat fraction
``SensibleHeatFraction`` double frac 0 - 1 No See [#]_ Sensible heat fraction
``CompressorType`` string See [#]_ No See [#]_ Type of compressor
``extension/FanPowerWattsPerCFM`` double W/cfm >= 0 [#]_ Yes Blower fan efficiency at maximum fan speed [#]_
``extension/AirflowDefectRatio`` double frac -0.9 - 9 Yes Deviation between design/installed airflows [#]_
Expand All @@ -746,6 +746,7 @@ If a central air conditioner is specified, additional information is entered in
.. [#] HVACDistribution type must be AirDistribution (type: "regular velocity") or DSE.
.. [#] If SEER2 provided, converted to SEER using ANSI/RESNET/ICC 301-2022 Addendum C, where SEER = SEER2 / 0.95 (assumed to be a split system).
If not a split system, provide SEER using the appropriate conversion factor.
.. [#] If not provided, defaults to 0.73 for single/two stage and 0.78 for variable speed.
.. [#] CompressorType choices are "single stage", "two stage", or "variable speed".
.. [#] If CompressorType not provided, defaults to "single stage" if SEER <= 15, else "two stage" if SEER <= 21, else "variable speed".
.. [#] If there is a heating system attached to the DistributionSystem, the heating and cooling systems cannot have different values for FanPowerWattsPerCFM.
Expand Down Expand Up @@ -774,7 +775,7 @@ If a room air conditioner is specified, additional information is entered in ``C
============================================================== ======== ====== =========== ======== ========= ==============================
``AnnualCoolingEfficiency[Units="EER" or Units="CEER"]/Value`` double Btu/Wh > 0 Yes Rated efficiency
``CoolingCapacity`` double Btu/hr >= 0 Yes Cooling output capacity
``SensibleHeatFraction`` double frac 0 - 1 No Sensible heat fraction
``SensibleHeatFraction`` double frac 0 - 1 No 0.65 Sensible heat fraction
``IntegratedHeatingSystemFuel`` string See [#]_ No <none> Fuel type of integrated heater
============================================================== ======== ====== =========== ======== ========= ==============================

Expand Down Expand Up @@ -803,7 +804,7 @@ If a PTAC is specified, additional information is entered in ``CoolingSystem``.
============================================================== ======== ====== =========== ======== ========= ==============================
``AnnualCoolingEfficiency[Units="EER" or Units="CEER"]/Value`` double Btu/Wh > 0 Yes Rated cooling efficiency
``CoolingCapacity`` double Btu/hr >= 0 Yes Cooling output capacity
``SensibleHeatFraction`` double frac 0 - 1 No Sensible heat fraction
``SensibleHeatFraction`` double frac 0 - 1 No 0.65 Sensible heat fraction
``IntegratedHeatingSystemFuel`` string See [#]_ No <none> Fuel type of integrated heater
============================================================== ======== ====== =========== ======== ========= ==============================

Expand Down Expand Up @@ -847,7 +848,7 @@ If a mini-split air conditioner is specified, additional information is entered
``DistributionSystem`` idref See [#]_ No ID of attached distribution system
``AnnualCoolingEfficiency[Units="SEER" or Units="SEER2"]/Value`` double Btu/Wh > 0 Yes Rated cooling efficiency [#]_
``CoolingCapacity`` double Btu/hr >= 0 Yes Cooling output capacity
``SensibleHeatFraction`` double frac 0 - 1 No Sensible heat fraction
``SensibleHeatFraction`` double frac 0 - 1 No 0.73 Sensible heat fraction
``extension/FanPowerWattsPerCFM`` double W/cfm >= 0 Yes Blower fan efficiency at maximum fan speed [#]_
``extension/AirflowDefectRatio`` double frac -0.9 - 9 Yes Deviation between design/installed airflows [#]_
``extension/ChargeDefectRatio`` double frac -0.25, 0, 0.25 Yes Deviation between design/installed charges [#]_
Expand Down Expand Up @@ -967,7 +968,7 @@ If an air-to-air heat pump is specified, additional information is entered in ``
``HeatingCapacity`` double Btu/hr >= 0 Yes Heating output capacity (excluding any backup heating)
``HeatingCapacity17F`` double Btu/hr >= 0, <= HeatingCapacity No Heating output capacity at 17F, if available
``CoolingCapacity`` double Btu/hr >= 0 Yes Cooling output capacity
``CoolingSensibleHeatFraction`` double frac 0 - 1 No Sensible heat fraction
``CoolingSensibleHeatFraction`` double frac 0 - 1 No See [#]_ Sensible heat fraction
``FractionHeatLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of heating load served
``FractionCoolLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of cooling load served
``AnnualCoolingEfficiency[Units="SEER" or Units="SEER2"]/Value`` double Btu/Wh > 0 Yes Rated cooling efficiency [#]_
Expand All @@ -980,6 +981,7 @@ If an air-to-air heat pump is specified, additional information is entered in ``
.. [#] HVACDistribution type must be AirDistribution (type: "regular velocity") or DSE.
.. [#] CompressorType choices are "single stage", "two stage", or "variable speed".
.. [#] If CompressorType not provided, defaults to "single stage" if SEER <= 15, else "two stage" if SEER <= 21, else "variable speed".
.. [#] If not provided, defaults to 0.73 for single/two stage and 0.78 for variable speed.
.. [#] The sum of all ``FractionHeatLoadServed`` (across all HVAC systems) must be less than or equal to 1.
.. [#] The sum of all ``FractionCoolLoadServed`` (across all HVAC systems) must be less than or equal to 1.
.. [#] If SEER2 provided, converted to SEER using ANSI/RESNET/ICC 301-2022 Addendum C, where SEER = SEER2 / 0.95 (assumed to be a split system).
Expand Down Expand Up @@ -1013,7 +1015,7 @@ If a mini-split heat pump is specified, additional information is entered in ``H
``HeatingCapacity`` double Btu/hr >= 0 Yes Heating output capacity (excluding any backup heating)
``HeatingCapacity17F`` double Btu/hr >= 0, <= HeatingCapacity No Heating output capacity at 17F, if available
``CoolingCapacity`` double Btu/hr >= 0 Yes Cooling output capacity
``CoolingSensibleHeatFraction`` double frac 0 - 1 No Sensible heat fraction
``CoolingSensibleHeatFraction`` double frac 0 - 1 No 0.73 Sensible heat fraction
``FractionHeatLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of heating load served
``FractionCoolLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of cooling load served
``AnnualCoolingEfficiency[Units="SEER" or Units="SEER2"]/Value`` double Btu/Wh > 0 Yes Rated cooling efficiency [#]_
Expand Down Expand Up @@ -1059,7 +1061,7 @@ If a packaged terminal heat pump is specified, additional information is entered
=============================================================== ======== ====== =========== ======== ========= ==============================================
``HeatingCapacity`` double Btu/hr >= 0 Yes Heating output capacity (excluding any backup heating)
``CoolingCapacity`` double Btu/hr >= 0 Yes Cooling output capacity
``CoolingSensibleHeatFraction`` double frac 0 - 1 No Sensible heat fraction
``CoolingSensibleHeatFraction`` double frac 0 - 1 No 0.65 Sensible heat fraction
``FractionHeatLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of heating load served
``FractionCoolLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of cooling load served
``AnnualCoolingEfficiency[Units="EER" or Units="CEER"]/Value`` double Btu/Wh > 0 Yes Rated cooling efficiency
Expand All @@ -1081,7 +1083,7 @@ If a room air conditioner with reverse cycle is specified, additional informatio
=============================================================== ======== ====== =========== ======== ========= ==============================================
``HeatingCapacity`` double Btu/hr >= 0 Yes Heating output capacity (excluding any backup heating)
``CoolingCapacity`` double Btu/hr >= 0 Yes Cooling output capacity
``CoolingSensibleHeatFraction`` double frac 0 - 1 No Sensible heat fraction
``CoolingSensibleHeatFraction`` double frac 0 - 1 No 0.65 Sensible heat fraction
``FractionHeatLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of heating load served
``FractionCoolLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of cooling load served
``AnnualCoolingEfficiency[Units="EER" or Units="CEER"]/Value`` double Btu/Wh > 0 Yes Rated cooling efficiency
Expand All @@ -1103,7 +1105,7 @@ If a ground-to-air heat pump is specified, additional information is entered in
``DistributionSystem`` idref See [#]_ Yes ID of attached distribution system
``HeatingCapacity`` double Btu/hr >= 0 Yes Heating output capacity (excluding any backup heating)
``CoolingCapacity`` double Btu/hr >= 0 Yes Cooling output capacity
``CoolingSensibleHeatFraction`` double frac 0 - 1 No Sensible heat fraction
``CoolingSensibleHeatFraction`` double frac 0 - 1 No 0.73 Sensible heat fraction
``FractionHeatLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of heating load served
``FractionCoolLoadServed`` double frac 0 - 1 [#]_ Yes Fraction of cooling load served
``AnnualCoolingEfficiency[Units="EER"]/Value`` double Btu/Wh > 0 Yes Rated cooling efficiency
Expand Down
7 changes: 7 additions & 0 deletions hpxml-measures/BuildResidentialScheduleFile/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
arg.setDefaultValue('smooth')
args << arg

arg = OpenStudio::Measure::OSArgument.makeStringArgument('schedules_column_names', false)
arg.setDisplayName('Schedules: Column Names')
arg.setDescription("A comma-separated list of the column names to generate. If not provided, defaults to all columns. Possible column names are: #{SchedulesFile.OccupancyColumnNames.join(', ')}.")
args << arg

arg = OpenStudio::Measure::OSArgument.makeStringArgument('schedules_vacancy_period', false)
arg.setDisplayName('Schedules: Vacancy Period')
arg.setDescription('Specifies the vacancy period. Enter a date like "Dec 15 - Jan 15".')
Expand Down Expand Up @@ -161,6 +166,7 @@ def create_schedules(runner, hpxml, epw_file, args)
info_msgs << "RandomSeed=#{args[:random_seed]}" if args[:schedules_random_seed].is_initialized
info_msgs << "GeometryNumOccupants=#{args[:geometry_num_occupants]}"
info_msgs << "VacancyPeriod=#{args[:schedules_vacancy_period].get}" if args[:schedules_vacancy_period].is_initialized
info_msgs << "ColumnNames=#{args[:column_names]}" if args[:schedules_column_names].is_initialized

runner.registerInfo("Created #{args[:schedules_type]} schedule with #{info_msgs.join(', ')}")

Expand Down Expand Up @@ -188,6 +194,7 @@ def get_generator_inputs(hpxml, epw_file, args)
args[:state] = hpxml.header.state_code if !hpxml.header.state_code.nil?

args[:random_seed] = args[:schedules_random_seed].get if args[:schedules_random_seed].is_initialized
args[:column_names] = args[:schedules_column_names].get.split(',').map(&:strip) if args[:schedules_column_names].is_initialized

if hpxml.building_occupancy.number_of_residents.nil?
args[:geometry_num_occupants] = Geometry.get_occupancy_default_num(hpxml.building_construction.number_of_bedrooms)
Expand Down
28 changes: 18 additions & 10 deletions hpxml-measures/BuildResidentialScheduleFile/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.0</schema_version>
<name>build_residential_schedule_file</name>
<uid>f770b2db-1a9f-4e99-99a7-7f3161a594b1</uid>
<version_id>b9ab9559-30d8-4b1c-9757-8c911f80e937</version_id>
<version_modified>20221031T233528Z</version_modified>
<version_id>3a88a262-1431-4bb9-a577-cd235aed6b1e</version_id>
<version_modified>20221201T013247Z</version_modified>
<xml_checksum>03F02484</xml_checksum>
<class_name>BuildResidentialScheduleFile</class_name>
<display_name>Schedule File Builder</display_name>
Expand Down Expand Up @@ -38,6 +38,14 @@
</choice>
</choices>
</argument>
<argument>
<name>schedules_column_names</name>
<display_name>Schedules: Column Names</display_name>
<description>A comma-separated list of the column names to generate. If not provided, defaults to all columns. Possible column names are: occupants, lighting_interior, lighting_exterior, lighting_garage, lighting_exterior_holiday, cooking_range, refrigerator, extra_refrigerator, freezer, dishwasher, clothes_washer, clothes_dryer, ceiling_fan, plug_loads_other, plug_loads_tv, plug_loads_vehicle, plug_loads_well_pump, fuel_loads_grill, fuel_loads_lighting, fuel_loads_fireplace, pool_pump, pool_heater, hot_tub_pump, hot_tub_heater, hot_water_dishwasher, hot_water_clothes_washer, hot_water_fixtures.</description>
<type>String</type>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>schedules_vacancy_period</name>
<display_name>Schedules: Vacancy Period</display_name>
Expand Down Expand Up @@ -890,11 +898,17 @@
<usage_type>resource</usage_type>
<checksum>127D96AC</checksum>
</file>
<file>
<filename>schedules.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>AC348B70</checksum>
</file>
<file>
<filename>build_residential_schedule_file_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>41CA164F</checksum>
<checksum>10DD8842</checksum>
</file>
<file>
<version>
Expand All @@ -905,13 +919,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>8FF07C66</checksum>
</file>
<file>
<filename>schedules.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>F2E6EBB8</checksum>
<checksum>3D8ADC7F</checksum>
</file>
</files>
</measure>
15 changes: 15 additions & 0 deletions hpxml-measures/BuildResidentialScheduleFile/resources/schedules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class ScheduleGenerator
def initialize(runner:,
epw_file:,
state:,
column_names: nil,
random_seed: nil,
minutes_per_step:,
steps_in_day:,
Expand All @@ -21,6 +22,7 @@ def initialize(runner:,
@runner = runner
@epw_file = epw_file
@state = state
@column_names = column_names
@random_seed = random_seed
@minutes_per_step = minutes_per_step
@steps_in_day = steps_in_day
Expand Down Expand Up @@ -60,6 +62,16 @@ def schedules
def create(args:)
initialize_schedules

if @column_names.nil?
@column_names = SchedulesFile.ColumnNames
end

invalid_columns = (@column_names - SchedulesFile.ColumnNames)
invalid_columns.each do |invalid_column|
@runner.registerError("Invalid column name specified: '#{invalid_column}'.")
end
return false unless invalid_columns.empty?

success = create_average_schedules
return false if not success

Expand Down Expand Up @@ -963,6 +975,9 @@ def sample_activity_duration(prng, activity_duration_prob_map, occ_type_id, acti
end

def export(schedules_path:)
(SchedulesFile.ColumnNames - @column_names).each do |col_to_remove|
@schedules.delete(col_to_remove)
end
CSV.open(schedules_path, 'w') do |csv|
csv << @schedules.keys
rows = @schedules.values.transpose
Expand Down

0 comments on commit 775c4f2

Please sign in to comment.