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

Detailed HVAC setpoints (GEB), try 3 #931

Open
wants to merge 35 commits into
base: resstock-args-refactor
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
776597d
Add tsvs and setpoint args.
joseph-robertson May 13, 2022
fe2a2ab
Move setpoint args over to new measure.
joseph-robertson May 13, 2022
6086f61
Retrieve the generated schedules.
joseph-robertson May 13, 2022
433eb34
Initialize new hash.
joseph-robertson May 14, 2022
5f1d3fc
Latest results.
May 14, 2022
4847d8a
Update os-hpxml to export sleep schedule.
joseph-robertson May 16, 2022
a5460ac
Update meta and server dir cleanup measures.
joseph-robertson May 16, 2022
56ceb5d
First cut at exporting new setpoint schedules.
joseph-robertson May 16, 2022
4ee9165
Reorganize meta measures a bit.
joseph-robertson May 16, 2022
3658afb
Typo.
joseph-robertson May 16, 2022
e203121
Merge branch 'resstock-args-refactor' into detailed-hvac-setpoints-3
joseph-robertson May 17, 2022
6d74258
Merge conflicts.
joseph-robertson May 17, 2022
83bf869
Use deadband averaging approach.
joseph-robertson May 17, 2022
c32d13d
Merge branch 'resstock-args-refactor' into detailed-hvac-setpoints-3
joseph-robertson May 17, 2022
2127744
Remove fixme.
joseph-robertson May 17, 2022
6854bd0
Catch no hvac control.
joseph-robertson May 17, 2022
53bd63b
Optionally skip measure before reading occupancy schedules.
joseph-robertson May 17, 2022
8f4837e
Temp check output.
joseph-robertson May 17, 2022
a5ab98f
More temp debug statements.
joseph-robertson May 17, 2022
fb1f470
Use a shared method for getting epw path.
joseph-robertson May 18, 2022
bae9769
Missed an update.
joseph-robertson May 18, 2022
fd6dfbe
Latest results.
May 18, 2022
dee3854
Pull in upstream sleep schedule changes.
joseph-robertson May 18, 2022
05d75f9
Few updates.
joseph-robertson May 18, 2022
0b4e86e
Fix setpoints for smooth occupancy schedules.
joseph-robertson May 18, 2022
33aeac6
Use old setpoint tsv files.
joseph-robertson May 18, 2022
a3c0098
Latest results.
May 18, 2022
caa71ae
Merge branch 'resstock-args-refactor' into detailed-hvac-setpoints-3
joseph-robertson May 19, 2022
44ea000
Merge branch 'resstock-args-refactor' into detailed-hvac-setpoints-3
joseph-robertson May 20, 2022
ee8679d
Merge branch 'resstock-args-refactor' into detailed-hvac-setpoints-3
joseph-robertson May 20, 2022
6cc5cdf
Latest results.
May 21, 2022
712c99b
Merge branch 'resstock-args-refactor' into detailed-hvac-setpoints-3
joseph-robertson May 23, 2022
05a670f
Add optional arg for cooling setup or setback.
joseph-robertson May 27, 2022
5d9f0c2
Latest results.
May 28, 2022
e9e2d4e
Merge branch 'resstock-args-refactor' into detailed-hvac-setpoints-3
joseph-robertson Jun 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions measures/ApplyUpgrade/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ def run(model, runner, user_arguments)
# BuildResidentialScheduleFile
measures['BuildResidentialScheduleFile'][0]['schedules_random_seed'] = values['building_id']
measures['BuildResidentialScheduleFile'][0]['output_csv_path'] = File.expand_path('../schedules.csv')
measures['BuildResidentialScheduleFile'][0]['debug'] = true

# ResStockArgumentsPostHPXML
measures['ResStockArgumentsPostHPXML'][0]['hpxml_path'] = hpxml_path
Expand Down
6 changes: 3 additions & 3 deletions measures/ApplyUpgrade/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>apply_upgrade</name>
<uid>33f1654c-f734-43d1-b35d-9d2856e41b5a</uid>
<version_id>5130f835-2770-4796-bd4a-c0261471af6f</version_id>
<version_modified>20220516T191518Z</version_modified>
<version_id>7247ad1a-6eb5-45fe-b186-3613b4e890c3</version_id>
<version_modified>20220518T172910Z</version_modified>
<xml_checksum>9339BE01</xml_checksum>
<class_name>ApplyUpgrade</class_name>
<display_name>Apply Upgrade</display_name>
Expand Down Expand Up @@ -6342,7 +6342,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>6BFF1DE7</checksum>
<checksum>CE6F3E0E</checksum>
</file>
</files>
</measure>
2 changes: 1 addition & 1 deletion measures/BuildExistingModel/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@ def run(model, runner, user_arguments)
# BuildResidentialScheduleFile
measures['BuildResidentialScheduleFile'][0]['schedules_random_seed'] = args['building_id']
measures['BuildResidentialScheduleFile'][0]['output_csv_path'] = File.expand_path('../schedules.csv')
measures['BuildResidentialScheduleFile'][0]['debug'] = true

# ResStockArgumentsPostHPXML
measures['ResStockArgumentsPostHPXML'] = [{}] if !measures.keys.include?('ResStockArgumentsPostHPXML') # FIXME: remove when ResStockArgumentsPostHPXML is introduced into options_lookup.tsv
measures['ResStockArgumentsPostHPXML'][0]['hpxml_path'] = hpxml_path
measures['ResStockArgumentsPostHPXML'][0]['output_csv_path'] = File.expand_path('../schedules.csv')

Expand Down
6 changes: 3 additions & 3 deletions measures/BuildExistingModel/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_existing_model</name>
<uid>dedf59bb-3b88-4f16-8755-2c1ff5519cbf</uid>
<version_id>d4bed91f-29cc-403d-a127-77695f9bcfb4</version_id>
<version_modified>20220517T184619Z</version_modified>
<version_id>ddd16b4e-246b-4099-bba5-1c3763712ecd</version_id>
<version_modified>20220518T172910Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildExistingModel</class_name>
<display_name>Build Existing Model</display_name>
Expand Down Expand Up @@ -228,7 +228,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>FD4E13FE</checksum>
<checksum>C7DB341C</checksum>
</file>
</files>
</measure>
129 changes: 4 additions & 125 deletions measures/ResStockArguments/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,98 +192,6 @@ def arguments(model)
arg.setDefaultValue(0.0)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('hvac_control_heating_weekday_setpoint_temp', true)
arg.setDisplayName('Heating Setpoint: Weekday Temperature')
arg.setDescription('Specify the weekday heating setpoint temperature.')
arg.setUnits('deg-F')
arg.setDefaultValue(71)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('hvac_control_heating_weekend_setpoint_temp', true)
arg.setDisplayName('Heating Setpoint: Weekend Temperature')
arg.setDescription('Specify the weekend heating setpoint temperature.')
arg.setUnits('deg-F')
arg.setDefaultValue(71)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('hvac_control_heating_weekday_setpoint_offset_magnitude', true)
arg.setDisplayName('Heating Setpoint: Weekday Offset Magnitude')
arg.setDescription('Specify the weekday heating offset magnitude.')
arg.setUnits('deg-F')
arg.setDefaultValue(0)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('hvac_control_heating_weekend_setpoint_offset_magnitude', true)
arg.setDisplayName('Heating Setpoint: Weekend Offset Magnitude')
arg.setDescription('Specify the weekend heating offset magnitude.')
arg.setUnits('deg-F')
arg.setDefaultValue(0)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('hvac_control_heating_weekday_setpoint_schedule', true)
arg.setDisplayName('Heating Setpoint: Weekday Schedule')
arg.setDescription('Specify the 24-hour comma-separated weekday heating schedule of 0s and 1s.')
arg.setDefaultValue('0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0')
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('hvac_control_heating_weekend_setpoint_schedule', true)
arg.setDisplayName('Heating Setpoint: Weekend Schedule')
arg.setDescription('Specify the 24-hour comma-separated weekend heating schedule of 0s and 1s.')
arg.setDefaultValue('0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0')
args << arg

arg = OpenStudio::Measure::OSArgument::makeBoolArgument('use_auto_heating_season', true)
arg.setDisplayName('Use Auto Heating Season')
arg.setDescription('Specifies whether to automatically define the heating season based on the weather file.')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('hvac_control_cooling_weekday_setpoint_temp', true)
arg.setDisplayName('Cooling Setpoint: Weekday Temperature')
arg.setDescription('Specify the weekday cooling setpoint temperature.')
arg.setUnits('deg-F')
arg.setDefaultValue(76)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('hvac_control_cooling_weekend_setpoint_temp', true)
arg.setDisplayName('Cooling Setpoint: Weekend Temperature')
arg.setDescription('Specify the weekend cooling setpoint temperature.')
arg.setUnits('deg-F')
arg.setDefaultValue(76)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('hvac_control_cooling_weekday_setpoint_offset_magnitude', true)
arg.setDisplayName('Cooling Setpoint: Weekday Offset Magnitude')
arg.setDescription('Specify the weekday cooling offset magnitude.')
arg.setUnits('deg-F')
arg.setDefaultValue(0)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('hvac_control_cooling_weekend_setpoint_offset_magnitude', true)
arg.setDisplayName('Cooling Setpoint: Weekend Offset Magnitude')
arg.setDescription('Specify the weekend cooling offset magnitude.')
arg.setUnits('deg-F')
arg.setDefaultValue(0)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('hvac_control_cooling_weekday_setpoint_schedule', true)
arg.setDisplayName('Cooling Setpoint: Weekday Schedule')
arg.setDescription('Specify the 24-hour comma-separated weekday cooling schedule of 0s and 1s.')
arg.setDefaultValue('0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0')
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('hvac_control_cooling_weekend_setpoint_schedule', true)
arg.setDisplayName('Cooling Setpoint: Weekend Schedule')
arg.setDescription('Specify the 24-hour comma-separated weekend cooling schedule of 0s and 1s.')
arg.setDefaultValue('0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0')
args << arg

arg = OpenStudio::Measure::OSArgument::makeBoolArgument('use_auto_cooling_season', true)
arg.setDisplayName('Use Auto Cooling Season')
arg.setDescription('Specifies whether to automatically define the cooling season based on the weather file.')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('heating_system_has_flue_or_chimney', true)
arg.setDisplayName('Heating System: Has Flue or Chimney')
arg.setDescription('Whether the heating system has a flue or chimney.')
Expand Down Expand Up @@ -452,32 +360,10 @@ def run(model, runner, user_arguments)
end

# Setpoints
weekday_heating_setpoints = [args['hvac_control_heating_weekday_setpoint_temp']] * 24
weekend_heating_setpoints = [args['hvac_control_heating_weekend_setpoint_temp']] * 24

weekday_cooling_setpoints = [args['hvac_control_cooling_weekday_setpoint_temp']] * 24
weekend_cooling_setpoints = [args['hvac_control_cooling_weekend_setpoint_temp']] * 24

hvac_control_heating_weekday_setpoint_offset_magnitude = args['hvac_control_heating_weekday_setpoint_offset_magnitude']
hvac_control_heating_weekday_setpoint_schedule = args['hvac_control_heating_weekday_setpoint_schedule'].split(',').map { |i| Float(i) }
weekday_heating_setpoints = modify_setpoint_schedule(weekday_heating_setpoints, hvac_control_heating_weekday_setpoint_offset_magnitude, hvac_control_heating_weekday_setpoint_schedule)

hvac_control_heating_weekend_setpoint_offset_magnitude = args['hvac_control_heating_weekend_setpoint_offset_magnitude']
hvac_control_heating_weekend_setpoint_schedule = args['hvac_control_heating_weekend_setpoint_schedule'].split(',').map { |i| Float(i) }
weekend_heating_setpoints = modify_setpoint_schedule(weekend_heating_setpoints, hvac_control_heating_weekend_setpoint_offset_magnitude, hvac_control_heating_weekend_setpoint_schedule)

hvac_control_cooling_weekday_setpoint_offset_magnitude = args['hvac_control_cooling_weekday_setpoint_offset_magnitude']
hvac_control_cooling_weekday_setpoint_schedule = args['hvac_control_cooling_weekday_setpoint_schedule'].split(',').map { |i| Float(i) }
weekday_cooling_setpoints = modify_setpoint_schedule(weekday_cooling_setpoints, hvac_control_cooling_weekday_setpoint_offset_magnitude, hvac_control_cooling_weekday_setpoint_schedule)

hvac_control_cooling_weekend_setpoint_offset_magnitude = args['hvac_control_cooling_weekend_setpoint_offset_magnitude']
hvac_control_cooling_weekend_setpoint_schedule = args['hvac_control_cooling_weekend_setpoint_schedule'].split(',').map { |i| Float(i) }
weekend_cooling_setpoints = modify_setpoint_schedule(weekend_cooling_setpoints, hvac_control_cooling_weekend_setpoint_offset_magnitude, hvac_control_cooling_weekend_setpoint_schedule)

args['hvac_control_heating_weekday_setpoint'] = weekday_heating_setpoints.join(', ')
args['hvac_control_heating_weekend_setpoint'] = weekend_heating_setpoints.join(', ')
args['hvac_control_cooling_weekday_setpoint'] = weekday_cooling_setpoints.join(', ')
args['hvac_control_cooling_weekend_setpoint'] = weekend_cooling_setpoints.join(', ')
args['hvac_control_heating_weekday_setpoint'] = Constants.Auto
args['hvac_control_heating_weekend_setpoint'] = Constants.Auto
args['hvac_control_cooling_weekday_setpoint'] = Constants.Auto
args['hvac_control_cooling_weekend_setpoint'] = Constants.Auto

# Seasons
if args['use_auto_heating_season'] || args['use_auto_cooling_season']
Expand Down Expand Up @@ -743,13 +629,6 @@ def run(model, runner, user_arguments)
return true
end

def modify_setpoint_schedule(schedule, offset_magnitude, offset_schedule)
offset_schedule.each_with_index do |direction, i|
schedule[i] += offset_magnitude * direction
end
return schedule
end

def process_weather(weather_station_epw_filepath, runner, model, hpxml_path)
epw_path = weather_station_epw_filepath

Expand Down
160 changes: 3 additions & 157 deletions measures/ResStockArguments/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>res_stock_arguments</name>
<uid>c984bb9e-4ac4-4930-a399-9d23f8f6936a</uid>
<version_id>ab571ddb-62a8-47ce-bf44-5ae953f0c2c6</version_id>
<version_modified>20220519T212731Z</version_modified>
<version_id>d10e4a37-6c1b-4569-b3aa-bf0cb292829e</version_id>
<version_modified>20220520T145847Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>ResStockArguments</class_name>
<display_name>ResStock Arguments</display_name>
Expand Down Expand Up @@ -4604,160 +4604,6 @@
<model_dependent>false</model_dependent>
<default_value>0</default_value>
</argument>
<argument>
<name>hvac_control_heating_weekday_setpoint_temp</name>
<display_name>Heating Setpoint: Weekday Temperature</display_name>
<description>Specify the weekday heating setpoint temperature.</description>
<type>Double</type>
<units>deg-F</units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>71</default_value>
</argument>
<argument>
<name>hvac_control_heating_weekend_setpoint_temp</name>
<display_name>Heating Setpoint: Weekend Temperature</display_name>
<description>Specify the weekend heating setpoint temperature.</description>
<type>Double</type>
<units>deg-F</units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>71</default_value>
</argument>
<argument>
<name>hvac_control_heating_weekday_setpoint_offset_magnitude</name>
<display_name>Heating Setpoint: Weekday Offset Magnitude</display_name>
<description>Specify the weekday heating offset magnitude.</description>
<type>Double</type>
<units>deg-F</units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>0</default_value>
</argument>
<argument>
<name>hvac_control_heating_weekend_setpoint_offset_magnitude</name>
<display_name>Heating Setpoint: Weekend Offset Magnitude</display_name>
<description>Specify the weekend heating offset magnitude.</description>
<type>Double</type>
<units>deg-F</units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>0</default_value>
</argument>
<argument>
<name>hvac_control_heating_weekday_setpoint_schedule</name>
<display_name>Heating Setpoint: Weekday Schedule</display_name>
<description>Specify the 24-hour comma-separated weekday heating schedule of 0s and 1s.</description>
<type>String</type>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</default_value>
</argument>
<argument>
<name>hvac_control_heating_weekend_setpoint_schedule</name>
<display_name>Heating Setpoint: Weekend Schedule</display_name>
<description>Specify the 24-hour comma-separated weekend heating schedule of 0s and 1s.</description>
<type>String</type>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</default_value>
</argument>
<argument>
<name>use_auto_heating_season</name>
<display_name>Use Auto Heating Season</display_name>
<description>Specifies whether to automatically define the heating season based on the weather file.</description>
<type>Boolean</type>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>false</default_value>
<choices>
<choice>
<value>true</value>
<display_name>true</display_name>
</choice>
<choice>
<value>false</value>
<display_name>false</display_name>
</choice>
</choices>
</argument>
<argument>
<name>hvac_control_cooling_weekday_setpoint_temp</name>
<display_name>Cooling Setpoint: Weekday Temperature</display_name>
<description>Specify the weekday cooling setpoint temperature.</description>
<type>Double</type>
<units>deg-F</units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>76</default_value>
</argument>
<argument>
<name>hvac_control_cooling_weekend_setpoint_temp</name>
<display_name>Cooling Setpoint: Weekend Temperature</display_name>
<description>Specify the weekend cooling setpoint temperature.</description>
<type>Double</type>
<units>deg-F</units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>76</default_value>
</argument>
<argument>
<name>hvac_control_cooling_weekday_setpoint_offset_magnitude</name>
<display_name>Cooling Setpoint: Weekday Offset Magnitude</display_name>
<description>Specify the weekday cooling offset magnitude.</description>
<type>Double</type>
<units>deg-F</units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>0</default_value>
</argument>
<argument>
<name>hvac_control_cooling_weekend_setpoint_offset_magnitude</name>
<display_name>Cooling Setpoint: Weekend Offset Magnitude</display_name>
<description>Specify the weekend cooling offset magnitude.</description>
<type>Double</type>
<units>deg-F</units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>0</default_value>
</argument>
<argument>
<name>hvac_control_cooling_weekday_setpoint_schedule</name>
<display_name>Cooling Setpoint: Weekday Schedule</display_name>
<description>Specify the 24-hour comma-separated weekday cooling schedule of 0s and 1s.</description>
<type>String</type>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</default_value>
</argument>
<argument>
<name>hvac_control_cooling_weekend_setpoint_schedule</name>
<display_name>Cooling Setpoint: Weekend Schedule</display_name>
<description>Specify the 24-hour comma-separated weekend cooling schedule of 0s and 1s.</description>
<type>String</type>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</default_value>
</argument>
<argument>
<name>use_auto_cooling_season</name>
<display_name>Use Auto Cooling Season</display_name>
<description>Specifies whether to automatically define the cooling season based on the weather file.</description>
<type>Boolean</type>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>false</default_value>
<choices>
<choice>
<value>true</value>
<display_name>true</display_name>
</choice>
<choice>
<value>false</value>
<display_name>false</display_name>
</choice>
</choices>
</argument>
<argument>
<name>heating_system_has_flue_or_chimney</name>
<display_name>Heating System: Has Flue or Chimney</display_name>
Expand Down Expand Up @@ -4878,7 +4724,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>6863C7CD</checksum>
<checksum>8CA5C677</checksum>
</file>
</files>
</measure>
Loading