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

Assign detailed schedules using the lookup #1166

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 44 additions & 0 deletions measures/ResStockArguments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5666,6 +5666,50 @@ Whether the heat pump uses the existing system as backup.

<br/>

**Heating Setpoint: Schedule CSV File Path**

Absolute/relative path of csv file containing user-specified detailed heating setpoint schedule.

- **Name:** ``heating_setpoint_schedule``
- **Type:** ``String``

- **Required:** ``false``

<br/>

**Cooling Setpoint: Schedule CSV File Path**

Absolute/relative path of csv file containing user-specified detailed cooling setpoint schedule.

- **Name:** ``cooling_setpoint_schedule``
- **Type:** ``String``

- **Required:** ``false``

<br/>

**Water Heater Setpoint: Schedule CSV File Path**

Absolute/relative path of csv file containing user-specified detailed water heater setpoint schedule.

- **Name:** ``water_heater_setpoint_schedule``
- **Type:** ``String``

- **Required:** ``false``

<br/>

**Battery: Schedule CSV File Path**

Absolute/relative path of csv file containing user-specified detailed battery schedule.

- **Name:** ``battery_schedule``
- **Type:** ``String``

- **Required:** ``false``

<br/>




Expand Down
30 changes: 30 additions & 0 deletions measures/ResStockArguments/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,26 @@ def arguments(model)
arg.setDescription('Whether the heat pump uses the existing system as backup.')
args << arg

arg = OpenStudio::Measure::OSArgument.makeStringArgument('heating_setpoint_schedule', false)
arg.setDisplayName('Heating Setpoint: Schedule CSV File Path')
arg.setDescription('Absolute/relative path of csv file containing user-specified detailed heating setpoint schedule.')
args << arg

arg = OpenStudio::Measure::OSArgument.makeStringArgument('cooling_setpoint_schedule', false)
arg.setDisplayName('Cooling Setpoint: Schedule CSV File Path')
arg.setDescription('Absolute/relative path of csv file containing user-specified detailed cooling setpoint schedule.')
args << arg

arg = OpenStudio::Measure::OSArgument.makeStringArgument('water_heater_setpoint_schedule', false)
arg.setDisplayName('Water Heater Setpoint: Schedule CSV File Path')
arg.setDescription('Absolute/relative path of csv file containing user-specified detailed water heater setpoint schedule.')
args << arg

arg = OpenStudio::Measure::OSArgument.makeStringArgument('battery_schedule', false)
arg.setDisplayName('Battery: Schedule CSV File Path')
arg.setDescription('Absolute/relative path of csv file containing user-specified detailed battery schedule.')
args << arg

return args
end

Expand Down Expand Up @@ -766,6 +786,16 @@ def run(model, runner, user_arguments)
end
args[:rim_joist_assembly_r] = rim_joist_assembly_r

# Detailed Schedules
schedules_filepaths = []
schedules_filepaths << args[:heating_setpoint_schedule] if !args[:heating_setpoint_schedule].nil?
schedules_filepaths << args[:cooling_setpoint_schedule] if !args[:cooling_setpoint_schedule].nil?
schedules_filepaths << args[:water_heater_setpoint_schedule] if !args[:water_heater_setpoint_schedule].nil?
schedules_filepaths << args[:battery_schedule] if !args[:battery_schedule].nil?

args[:schedules_filepaths] = schedules_filepaths.join(',') if !schedules_filepaths.empty?

# Register argument values
args.each do |arg_name, arg_value|
if args_to_delete.include?(arg_name) || (arg_value == Constants.Auto)
arg_value = '' # don't assign these to BuildResidentialHPXML or BuildResidentialScheduleFile
Expand Down
42 changes: 37 additions & 5 deletions measures/ResStockArguments/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>res_stock_arguments</name>
<uid>c984bb9e-4ac4-4930-a399-9d23f8f6936a</uid>
<version_id>13eb1e73-e190-422f-b871-d681c4629b43</version_id>
<version_modified>2024-07-19T23:49:15Z</version_modified>
<version_id>19e97c83-7910-4d84-a170-af3324a7358f</version_id>
<version_modified>2024-07-29T20:03:25Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>ResStockArguments</class_name>
<display_name>ResStock Arguments</display_name>
Expand Down Expand Up @@ -7500,6 +7500,38 @@
</choice>
</choices>
</argument>
<argument>
<name>heating_setpoint_schedule</name>
<display_name>Heating Setpoint: Schedule CSV File Path</display_name>
<description>Absolute/relative path of csv file containing user-specified detailed heating setpoint schedule.</description>
<type>String</type>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>cooling_setpoint_schedule</name>
<display_name>Cooling Setpoint: Schedule CSV File Path</display_name>
<description>Absolute/relative path of csv file containing user-specified detailed cooling setpoint schedule.</description>
<type>String</type>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>water_heater_setpoint_schedule</name>
<display_name>Water Heater Setpoint: Schedule CSV File Path</display_name>
<description>Absolute/relative path of csv file containing user-specified detailed water heater setpoint schedule.</description>
<type>String</type>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>battery_schedule</name>
<display_name>Battery: Schedule CSV File Path</display_name>
<description>Absolute/relative path of csv file containing user-specified detailed battery schedule.</description>
<type>String</type>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
</arguments>
<outputs />
<provenances />
Expand All @@ -7518,7 +7550,7 @@
<filename>README.md</filename>
<filetype>md</filetype>
<usage_type>readme</usage_type>
<checksum>1402050A</checksum>
<checksum>7D0E06F6</checksum>
</file>
<file>
<filename>README.md.erb</filename>
Expand All @@ -7535,13 +7567,13 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>4D84A86B</checksum>
<checksum>9C9DB5D4</checksum>
</file>
<file>
<filename>constants.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>21A87806</checksum>
<checksum>FA535657</checksum>
</file>
<file>
<filename>resstock_arguments_test.rb</filename>
Expand Down
5 changes: 4 additions & 1 deletion measures/ResStockArguments/resources/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def self.build_residential_schedule_file_excludes

def self.other_excludes
# these are ResStockArguments that haven't made their way into options_lookup.tsv yet
return ['heating_system_actual_cfm_per_ton',
return ['heating_setpoint_schedule',
'cooling_setpoint_schedule',
'water_heater_setpoint_schedule',
'heating_system_actual_cfm_per_ton',
'heating_system_rated_cfm_per_ton']
end

Expand Down
Loading
Loading