openstudio-calibration 0.3.1 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +3 -1
- data/CHANGELOG.md +18 -0
- data/Gemfile +6 -0
- data/Jenkinsfile +4 -3
- data/LICENSE.md +1 -1
- data/README.md +13 -2
- data/Rakefile +1 -1
- data/doc_templates/LICENSE.md +1 -1
- data/doc_templates/copyright_erb.txt +1 -1
- data/doc_templates/copyright_js.txt +1 -1
- data/doc_templates/copyright_ruby.txt +1 -1
- data/lib/measures/AddMonthlyJSONUtilityData/LICENSE.md +1 -1
- data/lib/measures/AddMonthlyJSONUtilityData/measure.rb +1 -1
- data/lib/measures/AddMonthlyJSONUtilityData/measure.xml +12 -11
- data/lib/measures/AddMonthlyUtilityData/LICENSE.md +1 -1
- data/lib/measures/AddMonthlyUtilityData/measure.rb +1 -1
- data/lib/measures/AddMonthlyUtilityData/measure.xml +13 -12
- data/lib/measures/CalibrationReports/LICENSE.md +1 -1
- data/lib/measures/CalibrationReports/README.md +2 -2
- data/lib/measures/CalibrationReports/measure.rb +1 -1
- data/lib/measures/CalibrationReports/measure.xml +11 -11
- data/lib/measures/CalibrationReportsEnhanced/LICENSE.md +1 -1
- data/lib/measures/CalibrationReportsEnhanced/measure.rb +2 -2
- data/lib/measures/CalibrationReportsEnhanced/measure.xml +18 -17
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/LICENSE.md +1 -1
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.rb +1 -1
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.xml +14 -13
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/LICENSE.md +1 -1
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.rb +1 -1
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.xml +14 -13
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/LICENSE.md +1 -1
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.rb +1 -1
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.xml +14 -13
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/LICENSE.md +1 -1
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.rb +1 -1
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.xml +14 -13
- data/lib/measures/CoilCoolingWaterMultiplier/LICENSE.md +1 -1
- data/lib/measures/CoilCoolingWaterMultiplier/measure.rb +1 -1
- data/lib/measures/CoilCoolingWaterMultiplier/measure.xml +14 -13
- data/lib/measures/CoilCoolingWaterPercentChange/LICENSE.md +1 -1
- data/lib/measures/CoilCoolingWaterPercentChange/measure.rb +1 -1
- data/lib/measures/CoilCoolingWaterPercentChange/measure.xml +14 -13
- data/lib/measures/CoilHeatingElectricMultiplier/LICENSE.md +1 -1
- data/lib/measures/CoilHeatingElectricMultiplier/measure.rb +1 -1
- data/lib/measures/CoilHeatingElectricMultiplier/measure.xml +14 -13
- data/lib/measures/CoilHeatingElectricPercentChange/LICENSE.md +1 -1
- data/lib/measures/CoilHeatingElectricPercentChange/measure.rb +1 -1
- data/lib/measures/CoilHeatingElectricPercentChange/measure.xml +14 -13
- data/lib/measures/CoilHeatingGasMultiplier/LICENSE.md +1 -1
- data/lib/measures/CoilHeatingGasMultiplier/measure.rb +1 -1
- data/lib/measures/CoilHeatingGasMultiplier/measure.xml +14 -13
- data/lib/measures/CoilHeatingGasPercentChange/LICENSE.md +1 -1
- data/lib/measures/CoilHeatingGasPercentChange/measure.rb +1 -1
- data/lib/measures/CoilHeatingGasPercentChange/measure.xml +14 -13
- data/lib/measures/CoilHeatingWaterMultiplier/LICENSE.md +1 -1
- data/lib/measures/CoilHeatingWaterMultiplier/measure.rb +1 -1
- data/lib/measures/CoilHeatingWaterMultiplier/measure.xml +14 -13
- data/lib/measures/CoilHeatingWaterPercentChange/LICENSE.md +1 -1
- data/lib/measures/CoilHeatingWaterPercentChange/measure.rb +1 -1
- data/lib/measures/CoilHeatingWaterPercentChange/measure.xml +14 -13
- data/lib/measures/ConstructionLayerZeroMaterialProperties/LICENSE.md +1 -1
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.rb +1 -1
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.xml +12 -11
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/LICENSE.md +1 -1
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb +1 -1
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.xml +12 -11
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/LICENSE.md +1 -1
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.rb +3 -3
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.xml +25 -13
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/LICENSE.md +1 -1
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.rb +3 -3
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.xml +25 -13
- data/lib/measures/FansMultiplier/LICENSE.md +1 -1
- data/lib/measures/FansMultiplier/measure.rb +1 -1
- data/lib/measures/FansMultiplier/measure.xml +14 -13
- data/lib/measures/FansPercentChange/LICENSE.md +1 -1
- data/lib/measures/FansPercentChange/measure.rb +1 -1
- data/lib/measures/FansPercentChange/measure.xml +14 -13
- data/lib/measures/GeneralCalibrationMeasureMultiplier/LICENSE.md +1 -1
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.rb +1 -1
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.xml +16 -15
- data/lib/measures/GeneralCalibrationMeasurePercentChange/LICENSE.md +1 -1
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.rb +1 -1
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.xml +16 -15
- data/lib/measures/HardSizeHvac/LICENSE.md +1 -1
- data/lib/measures/HardSizeHvac/measure.rb +9 -7
- data/lib/measures/HardSizeHvac/measure.xml +26 -13
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/LICENSE.md +1 -1
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.rb +1 -1
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.xml +12 -11
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/LICENSE.md +1 -1
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.rb +1 -1
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.xml +12 -11
- data/lib/measures/RoofThermalPropertiesMultiplier/LICENSE.md +1 -1
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.rb +3 -3
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.xml +25 -13
- data/lib/measures/RoofThermalPropertiesPercentChange/LICENSE.md +1 -1
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.rb +3 -3
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.xml +25 -13
- data/lib/measures/TimeseriesObjectiveFunction/LICENSE.md +1 -1
- data/lib/measures/TimeseriesObjectiveFunction/README.md +171 -5
- data/lib/measures/TimeseriesObjectiveFunction/measure.rb +2 -2
- data/lib/measures/TimeseriesObjectiveFunction/measure.xml +6 -81
- data/lib/measures/TimeseriesObjectiveFunction/resources/report.html.erb +4 -1
- data/lib/measures/TimeseriesPlot/LICENSE.md +1 -1
- data/lib/measures/TimeseriesPlot/README.md +35 -5
- data/lib/measures/TimeseriesPlot/measure.rb +2 -2
- data/lib/measures/TimeseriesPlot/measure.xml +11 -26
- data/lib/measures/TimeseriesPlot/resources/report.html.erb +4 -1
- data/lib/measures/WaterHeaterMixedMultiplier/LICENSE.md +1 -1
- data/lib/measures/WaterHeaterMixedMultiplier/measure.rb +1 -1
- data/lib/measures/WaterHeaterMixedMultiplier/measure.xml +14 -13
- data/lib/measures/WaterHeaterMixedPercentChange/LICENSE.md +1 -1
- data/lib/measures/WaterHeaterMixedPercentChange/measure.rb +1 -1
- data/lib/measures/WaterHeaterMixedPercentChange/measure.xml +14 -13
- data/lib/measures/{zone_report → inspect_and_edit_parametric_schedules}/LICENSE.md +1 -1
- data/lib/measures/inspect_and_edit_parametric_schedules/README.md +41 -0
- data/lib/measures/inspect_and_edit_parametric_schedules/README.md.erb +53 -0
- data/lib/measures/inspect_and_edit_parametric_schedules/docs/apply_measures_now.png +0 -0
- data/lib/measures/inspect_and_edit_parametric_schedules/measure.rb +224 -0
- data/lib/measures/inspect_and_edit_parametric_schedules/measure.xml +125 -0
- data/lib/measures/shift_hours_of_operation/LICENSE.md +27 -0
- data/lib/measures/shift_hours_of_operation/README.md +147 -0
- data/lib/measures/{zone_report → shift_hours_of_operation}/README.md.erb +5 -0
- data/lib/measures/shift_hours_of_operation/docs/.gitkeep +0 -0
- data/lib/measures/shift_hours_of_operation/measure.rb +525 -0
- data/lib/measures/shift_hours_of_operation/measure.xml +280 -0
- data/lib/openstudio/calibration/extension.rb +1 -1
- data/lib/openstudio/calibration/version.rb +2 -2
- data/lib/openstudio/calibration.rb +1 -1
- data/lib/openstudio-calibration.rb +1 -1
- data/openstudio-calibration.gemspec +3 -3
- metadata +23 -17
- data/lib/measures/zone_report/README.md +0 -26
- data/lib/measures/zone_report/measure.rb +0 -706
- data/lib/measures/zone_report/measure.xml +0 -69
- data/lib/measures/zone_report/resources/report.html.in +0 -342
@@ -1,9 +1,10 @@
|
|
1
|
+
<?xml version="1.0"?>
|
1
2
|
<measure>
|
2
3
|
<schema_version>3.0</schema_version>
|
3
4
|
<name>water_heater_mixed_multiplier</name>
|
4
5
|
<uid>1e4d5053-d2c1-400d-9192-7a470e5a7b5c</uid>
|
5
|
-
<version_id>
|
6
|
-
<version_modified>
|
6
|
+
<version_id>5e0e7f24-0658-44c6-90b8-4608b22ff73a</version_id>
|
7
|
+
<version_modified>20210304T152739Z</version_modified>
|
7
8
|
<xml_checksum>D28BCE9C</xml_checksum>
|
8
9
|
<class_name>WaterHeaterMixedMultiplier</class_name>
|
9
10
|
<display_name>Water Heater Mixed Multiplier</display_name>
|
@@ -16,10 +17,10 @@
|
|
16
17
|
<type>Choice</type>
|
17
18
|
<required>true</required>
|
18
19
|
<model_dependent>false</model_dependent>
|
19
|
-
<default_value
|
20
|
+
<default_value>{4532a450-ca0f-40ca-8abc-a32b301908ef}</default_value>
|
20
21
|
<choices>
|
21
22
|
<choice>
|
22
|
-
<value>{
|
23
|
+
<value>{4532a450-ca0f-40ca-8abc-a32b301908ef}</value>
|
23
24
|
<display_name>*All WaterHeaterMixeds*</display_name>
|
24
25
|
</choice>
|
25
26
|
<choice>
|
@@ -79,8 +80,8 @@
|
|
79
80
|
</choices>
|
80
81
|
</argument>
|
81
82
|
</arguments>
|
82
|
-
<outputs/>
|
83
|
-
<provenances/>
|
83
|
+
<outputs />
|
84
|
+
<provenances />
|
84
85
|
<tags>
|
85
86
|
<tag>Service Water Heating.Water Heating</tag>
|
86
87
|
</tags>
|
@@ -147,12 +148,6 @@
|
|
147
148
|
</attribute>
|
148
149
|
</attributes>
|
149
150
|
<files>
|
150
|
-
<file>
|
151
|
-
<filename>LICENSE.md</filename>
|
152
|
-
<filetype>md</filetype>
|
153
|
-
<usage_type>license</usage_type>
|
154
|
-
<checksum>E0468DD6</checksum>
|
155
|
-
</file>
|
156
151
|
<file>
|
157
152
|
<filename>README.md.erb</filename>
|
158
153
|
<filetype>erb</filetype>
|
@@ -165,6 +160,12 @@
|
|
165
160
|
<usage_type>readme</usage_type>
|
166
161
|
<checksum>1626F8CE</checksum>
|
167
162
|
</file>
|
163
|
+
<file>
|
164
|
+
<filename>LICENSE.md</filename>
|
165
|
+
<filetype>md</filetype>
|
166
|
+
<usage_type>license</usage_type>
|
167
|
+
<checksum>A21A3ED2</checksum>
|
168
|
+
</file>
|
168
169
|
<file>
|
169
170
|
<version>
|
170
171
|
<software_program>OpenStudio</software_program>
|
@@ -174,7 +175,7 @@
|
|
174
175
|
<filename>measure.rb</filename>
|
175
176
|
<filetype>rb</filetype>
|
176
177
|
<usage_type>script</usage_type>
|
177
|
-
<checksum>
|
178
|
+
<checksum>532ED73D</checksum>
|
178
179
|
</file>
|
179
180
|
</files>
|
180
181
|
</measure>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
OpenStudio(R), Copyright (c) 2008-
|
1
|
+
OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
2
2
|
|
3
3
|
Redistribution and use in source and binary forms, with or without modification, are permitted
|
4
4
|
provided that the following conditions are met:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c) 2008-
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
|
3
3
|
# All rights reserved.
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
5
5
|
# modification, are permitted provided that the following conditions are met:
|
@@ -1,9 +1,10 @@
|
|
1
|
+
<?xml version="1.0"?>
|
1
2
|
<measure>
|
2
3
|
<schema_version>3.0</schema_version>
|
3
4
|
<name>water_heater_mixed_percent_change</name>
|
4
5
|
<uid>c42bf4e7-2bbb-44c6-ab91-e6ddb53e050d</uid>
|
5
|
-
<version_id>
|
6
|
-
<version_modified>
|
6
|
+
<version_id>4ecbf2ff-a077-47f7-adf5-28d4bfe505ce</version_id>
|
7
|
+
<version_modified>20210304T152739Z</version_modified>
|
7
8
|
<xml_checksum>D28BCE9C</xml_checksum>
|
8
9
|
<class_name>WaterHeaterMixedPercentChange</class_name>
|
9
10
|
<display_name>Water Heater Mixed Percent Change</display_name>
|
@@ -16,10 +17,10 @@
|
|
16
17
|
<type>Choice</type>
|
17
18
|
<required>true</required>
|
18
19
|
<model_dependent>false</model_dependent>
|
19
|
-
<default_value
|
20
|
+
<default_value>{8ac93adb-afc4-4bb0-86c1-22b883aa3e06}</default_value>
|
20
21
|
<choices>
|
21
22
|
<choice>
|
22
|
-
<value>{
|
23
|
+
<value>{8ac93adb-afc4-4bb0-86c1-22b883aa3e06}</value>
|
23
24
|
<display_name>*All WaterHeaterMixeds*</display_name>
|
24
25
|
</choice>
|
25
26
|
<choice>
|
@@ -79,8 +80,8 @@
|
|
79
80
|
</choices>
|
80
81
|
</argument>
|
81
82
|
</arguments>
|
82
|
-
<outputs/>
|
83
|
-
<provenances/>
|
83
|
+
<outputs />
|
84
|
+
<provenances />
|
84
85
|
<tags>
|
85
86
|
<tag>Service Water Heating.Water Heating</tag>
|
86
87
|
</tags>
|
@@ -147,12 +148,6 @@
|
|
147
148
|
</attribute>
|
148
149
|
</attributes>
|
149
150
|
<files>
|
150
|
-
<file>
|
151
|
-
<filename>LICENSE.md</filename>
|
152
|
-
<filetype>md</filetype>
|
153
|
-
<usage_type>license</usage_type>
|
154
|
-
<checksum>E0468DD6</checksum>
|
155
|
-
</file>
|
156
151
|
<file>
|
157
152
|
<filename>README.md.erb</filename>
|
158
153
|
<filetype>erb</filetype>
|
@@ -165,6 +160,12 @@
|
|
165
160
|
<usage_type>readme</usage_type>
|
166
161
|
<checksum>04987893</checksum>
|
167
162
|
</file>
|
163
|
+
<file>
|
164
|
+
<filename>LICENSE.md</filename>
|
165
|
+
<filetype>md</filetype>
|
166
|
+
<usage_type>license</usage_type>
|
167
|
+
<checksum>A21A3ED2</checksum>
|
168
|
+
</file>
|
168
169
|
<file>
|
169
170
|
<version>
|
170
171
|
<software_program>OpenStudio</software_program>
|
@@ -174,7 +175,7 @@
|
|
174
175
|
<filename>measure.rb</filename>
|
175
176
|
<filetype>rb</filetype>
|
176
177
|
<usage_type>script</usage_type>
|
177
|
-
<checksum>
|
178
|
+
<checksum>0C7A776A</checksum>
|
178
179
|
</file>
|
179
180
|
</files>
|
180
181
|
</measure>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
OpenStudio(R), Copyright (c) 2008-
|
1
|
+
OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
2
2
|
|
3
3
|
Redistribution and use in source and binary forms, with or without modification, are permitted
|
4
4
|
provided that the following conditions are met:
|
@@ -0,0 +1,41 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
![Apply Measures Now Dialog](./docs/apply_measures_now.png?raw=true)
|
5
|
+
*Each parametric schedule will have a series of arguments including one or more profile, and optionally a ceiling and floor value which can be used in the profile formulas.*
|
6
|
+
|
7
|
+
Additional documentation will follow at a later date.
|
8
|
+
|
9
|
+
###### (Automatically generated documentation below)
|
10
|
+
|
11
|
+
# Inspect and Edit Parametric Schedules
|
12
|
+
|
13
|
+
## Description
|
14
|
+
This model will create arguments out of additional property inputs for parametric schedules in the model. You can use this just to inspect, or you can alter the inputs. It will not make parametric inputs for schedules that are not already setup as parametric. If you want to generate parametric schedules you can first run the Shift Hours of Operation Schedule with default 0 argument values for change in hours of operation.
|
15
|
+
|
16
|
+
## Modeler Description
|
17
|
+
This can be used in apply measure now, or can be used in a parametric workflow to load in any custom user profiles or floor/ceiling values.
|
18
|
+
|
19
|
+
## Measure Type
|
20
|
+
ModelMeasure
|
21
|
+
|
22
|
+
## Taxonomy
|
23
|
+
|
24
|
+
|
25
|
+
## Arguments
|
26
|
+
|
27
|
+
|
28
|
+
### Apply Parametric Schedules to the Model
|
29
|
+
When this is true the parametric schedules will be regenerated based on modified formulas, ceiling and floor values, and current horus of operation for building.
|
30
|
+
**Name:** apply_parametric_sch,
|
31
|
+
**Type:** Boolean,
|
32
|
+
**Units:** ,
|
33
|
+
**Required:** true,
|
34
|
+
**Model Dependent:** false
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<%#= README.md.erb is used to auto-generate README.md. %>
|
2
|
+
<%#= To manually maintain README.md throw away README.md.erb and manually edit README.md %>
|
3
|
+
|
4
|
+
![Apply Measures Now Dialog](./docs/apply_measures_now.png?raw=true)
|
5
|
+
*Each parametric schedule will have a series of arguments including one or more profile, and optionally a ceiling and floor value which can be used in the profile formulas.*
|
6
|
+
|
7
|
+
Additional documentation will follow at a later date.
|
8
|
+
|
9
|
+
###### (Automatically generated documentation below)
|
10
|
+
|
11
|
+
# <%= name %>
|
12
|
+
|
13
|
+
## Description
|
14
|
+
<%= description %>
|
15
|
+
|
16
|
+
## Modeler Description
|
17
|
+
<%= modelerDescription %>
|
18
|
+
|
19
|
+
## Measure Type
|
20
|
+
<%= measureType %>
|
21
|
+
|
22
|
+
## Taxonomy
|
23
|
+
<%= taxonomy %>
|
24
|
+
|
25
|
+
## Arguments
|
26
|
+
|
27
|
+
<% arguments.each do |argument| %>
|
28
|
+
### <%= argument[:display_name] %>
|
29
|
+
<%= argument[:description] %>
|
30
|
+
**Name:** <%= argument[:name] %>,
|
31
|
+
**Type:** <%= argument[:type] %>,
|
32
|
+
**Units:** <%= argument[:units] %>,
|
33
|
+
**Required:** <%= argument[:required] %>,
|
34
|
+
**Model Dependent:** <%= argument[:model_dependent] %>
|
35
|
+
|
36
|
+
<% if argument[:type] == "Choice" && !argument[:model_dependent]%>
|
37
|
+
**Choice Display Names** <%= argument[:choice_display_names] %>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<% if arguments.size == 0 %>
|
43
|
+
<%= "This measure does not have any user arguments" %>
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<% if outputs.size > 0 %>
|
47
|
+
## Outputs
|
48
|
+
<% output_names = [] %>
|
49
|
+
<% outputs.each do |output| %>
|
50
|
+
<% output_names << output[:display_name] %>
|
51
|
+
<% end %>
|
52
|
+
<%= output_names.join(", ") %>
|
53
|
+
<% end %>
|
Binary file
|
@@ -0,0 +1,224 @@
|
|
1
|
+
# *******************************************************************************
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
|
3
|
+
# All rights reserved.
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
#
|
7
|
+
# (1) Redistributions of source code must retain the above copyright notice,
|
8
|
+
# this list of conditions and the following disclaimer.
|
9
|
+
#
|
10
|
+
# (2) Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
# this list of conditions and the following disclaimer in the documentation
|
12
|
+
# and/or other materials provided with the distribution.
|
13
|
+
#
|
14
|
+
# (3) Neither the name of the copyright holder nor the names of any contributors
|
15
|
+
# may be used to endorse or promote products derived from this software without
|
16
|
+
# specific prior written permission from the respective party.
|
17
|
+
#
|
18
|
+
# (4) Other than as required in clauses (1) and (2), distributions in any form
|
19
|
+
# of modifications or other derivative works may not use the "OpenStudio"
|
20
|
+
# trademark, "OS", "os", or any other confusingly similar designation without
|
21
|
+
# specific prior written permission from Alliance for Sustainable Energy, LLC.
|
22
|
+
#
|
23
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
|
24
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
25
|
+
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
26
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
|
27
|
+
# UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
|
28
|
+
# THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
29
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
30
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
31
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
32
|
+
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
33
|
+
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
34
|
+
# *******************************************************************************
|
35
|
+
|
36
|
+
# insert your copyright here
|
37
|
+
|
38
|
+
# see the URL below for information on how to write OpenStudio measures
|
39
|
+
# http://nrel.github.io/OpenStudio-user-documentation/reference/measure_writing_guide/
|
40
|
+
|
41
|
+
require 'openstudio-standards'
|
42
|
+
|
43
|
+
# load OpenStudio measure libraries from openstudio-extension gem
|
44
|
+
require 'openstudio-extension'
|
45
|
+
require 'openstudio/extension/core/os_lib_helper_methods'
|
46
|
+
|
47
|
+
# start the measure
|
48
|
+
class InspectAndEditParametricSchedules < OpenStudio::Measure::ModelMeasure
|
49
|
+
# human readable name
|
50
|
+
def name
|
51
|
+
# Measure name should be the title case of the class name.
|
52
|
+
return 'Inspect and Edit Parametric Schedules'
|
53
|
+
end
|
54
|
+
|
55
|
+
# human readable description
|
56
|
+
def description
|
57
|
+
return 'This model will create arguments out of additional property inputs for parametric schedules in the model. You can use this just to inspect, or you can alter the inputs. It will not make parametric inputs for schedules that are not already setup as parametric. If you want to generate parametric schedules you can first run the Shift Hours of Operation Schedule with default 0 argument values for change in hours of operation.'
|
58
|
+
end
|
59
|
+
|
60
|
+
# human readable description of modeling approach
|
61
|
+
def modeler_description
|
62
|
+
return 'This can be used in apply measure now, or can be used in a parametric workflow to load in any custom user profiles or floor/ceiling values.'
|
63
|
+
end
|
64
|
+
|
65
|
+
# define the arguments that the user will input
|
66
|
+
def arguments(model)
|
67
|
+
args = OpenStudio::Measure::OSArgumentVector.new
|
68
|
+
|
69
|
+
# code to inspect formulas and code floor/ceiling values
|
70
|
+
model.getScheduleRulesets.sort.each do |sch|
|
71
|
+
# get ceiling and floor
|
72
|
+
floor = sch.additionalProperties.getFeatureAsDouble('param_sch_floor')
|
73
|
+
ceiling = sch.additionalProperties.getFeatureAsDouble('param_sch_ceiling')
|
74
|
+
if floor.is_initialized || ceiling.is_initialized
|
75
|
+
|
76
|
+
# argument for floor
|
77
|
+
arg_name = "#{sch.name} Floor Value"
|
78
|
+
floor_val = OpenStudio::Measure::OSArgument.makeDoubleArgument(arg_name.downcase.gsub(' ', '_'), true)
|
79
|
+
floor_val.setDisplayName(arg_name)
|
80
|
+
floor_val.setDescription('floor can be used by formulas')
|
81
|
+
floor_val.setDefaultValue(floor.get)
|
82
|
+
args << floor_val
|
83
|
+
|
84
|
+
# argument for floor
|
85
|
+
arg_name = "#{sch.name} Ceiling Value"
|
86
|
+
ceiling_val = OpenStudio::Measure::OSArgument.makeDoubleArgument(arg_name.downcase.gsub(' ', '_'), true)
|
87
|
+
ceiling_val.setDisplayName(arg_name)
|
88
|
+
ceiling_val.setDescription('ceiling can be used by formulas')
|
89
|
+
ceiling_val.setDefaultValue(ceiling.get)
|
90
|
+
args << ceiling_val
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
# loop through rules
|
95
|
+
sch_days = {}
|
96
|
+
sch.scheduleRules.each do |rule|
|
97
|
+
if rule.startDate.is_initialized
|
98
|
+
start_date = "#{rule.startDate.get.monthOfYear.value}/#{rule.startDate.get.dayOfMonth}"
|
99
|
+
else
|
100
|
+
start_date = 'na'
|
101
|
+
end
|
102
|
+
if rule.startDate.is_initialized
|
103
|
+
end_date = "#{rule.endDate.get.monthOfYear.value}/#{rule.endDate.get.dayOfMonth}"
|
104
|
+
else
|
105
|
+
end_date = 'na'
|
106
|
+
end
|
107
|
+
dow = []
|
108
|
+
if rule.applyMonday then dow << 'mon' end
|
109
|
+
if rule.applyTuesday then dow << 'tue' end
|
110
|
+
if rule.applyWednesday then dow << 'wed' end
|
111
|
+
if rule.applyThursday then dow << 'thur' end
|
112
|
+
if rule.applyFriday then dow << 'fri' end
|
113
|
+
if rule.applySaturday then dow << 'sat' end
|
114
|
+
if rule.applySunday then dow << 'sun' end
|
115
|
+
|
116
|
+
sch_days[rule.daySchedule] = "#{dow.inspect} from #{start_date} through #{end_date}"
|
117
|
+
end
|
118
|
+
|
119
|
+
# add default profile
|
120
|
+
sch_days[sch.defaultDaySchedule] = 'default profile'
|
121
|
+
|
122
|
+
# should appear in similar oder to GUI now with default on the bottom
|
123
|
+
sch_days.each do |sch_day, description|
|
124
|
+
prop = sch_day.additionalProperties.getFeatureAsString('param_day_profile')
|
125
|
+
if prop.is_initialized
|
126
|
+
|
127
|
+
# argument for formulas
|
128
|
+
arg_name = "#{sch.name}_#{sch_day.name}"
|
129
|
+
formula = OpenStudio::Measure::OSArgument.makeStringArgument(arg_name.downcase.gsub(' ', '_'), true)
|
130
|
+
formula.setDisplayName(arg_name)
|
131
|
+
formula.setDescription(description)
|
132
|
+
formula.setDefaultValue(prop.to_s)
|
133
|
+
args << formula
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
# merge internal loads
|
139
|
+
apply_parametric_sch = OpenStudio::Measure::OSArgument.makeBoolArgument('apply_parametric_sch', true)
|
140
|
+
apply_parametric_sch.setDisplayName('Apply Parametric Schedules to the Model')
|
141
|
+
apply_parametric_sch.setDescription('When this is true the parametric schedules will be regenerated based on modified formulas, ceiling and floor values, and current horus of operation for building.')
|
142
|
+
apply_parametric_sch.setDefaultValue(true)
|
143
|
+
args << apply_parametric_sch
|
144
|
+
|
145
|
+
return args
|
146
|
+
end
|
147
|
+
|
148
|
+
# define what happens when the measure is run
|
149
|
+
def run(model, runner, user_arguments)
|
150
|
+
super(model, runner, user_arguments)
|
151
|
+
|
152
|
+
# assign the user inputs to variables
|
153
|
+
args = OsLib_HelperMethods.createRunVariables(runner, model, user_arguments, arguments(model))
|
154
|
+
if !args then return false end
|
155
|
+
|
156
|
+
# setup log messages that will come from standards
|
157
|
+
OsLib_HelperMethods.setup_log_msgs(runner, true) # bool is debug
|
158
|
+
|
159
|
+
# load standards
|
160
|
+
standard = Standard.build('90.1-2004') # selected template doesn't matter
|
161
|
+
|
162
|
+
# change formulas, ceiling, adn floor values from arguments
|
163
|
+
counter_parametric_schedules = []
|
164
|
+
model.getScheduleRulesets.sort.each do |sch|
|
165
|
+
# get ceiling and floor
|
166
|
+
floor = sch.additionalProperties.getFeatureAsDouble('param_sch_floor')
|
167
|
+
ceiling = sch.additionalProperties.getFeatureAsDouble('param_sch_ceiling')
|
168
|
+
if floor.is_initialized || ceiling.is_initialized
|
169
|
+
|
170
|
+
# argument for floor
|
171
|
+
arg_name = "#{sch.name} Floor Value"
|
172
|
+
sch.additionalProperties.setFeature('param_sch_floor', args[arg_name.downcase.gsub(' ', '_')])
|
173
|
+
|
174
|
+
# argument for ceiling
|
175
|
+
arg_name = "#{sch.name} Ceiling Value"
|
176
|
+
sch.additionalProperties.setFeature('param_sch_ceiling', args[arg_name.downcase.gsub(' ', '_')])
|
177
|
+
end
|
178
|
+
|
179
|
+
# loop through rules
|
180
|
+
sch_days = {}
|
181
|
+
sch.scheduleRules.each do |rule|
|
182
|
+
sch_days[rule.daySchedule] = nil
|
183
|
+
end
|
184
|
+
|
185
|
+
# add default profile
|
186
|
+
sch_days[sch.defaultDaySchedule] = 'default profile'
|
187
|
+
|
188
|
+
# should appear in similar oder to GUI now with default on the bottom
|
189
|
+
sch_days.each do |sch_day, not_used|
|
190
|
+
prop = sch_day.additionalProperties.getFeatureAsString('param_day_profile')
|
191
|
+
if prop.is_initialized
|
192
|
+
|
193
|
+
# argument for formulas
|
194
|
+
arg_name = "#{sch.name}_#{sch_day.name}"
|
195
|
+
sch_day.additionalProperties.setFeature('param_day_profile', args[arg_name.downcase.gsub(' ', '_')])
|
196
|
+
|
197
|
+
# add to counter for initial condition
|
198
|
+
counter_parametric_schedules << sch
|
199
|
+
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
# report initial condition of model
|
205
|
+
runner.registerInitialCondition("The building started with #{counter_parametric_schedules.uniq.size.size} parametric schedules.")
|
206
|
+
|
207
|
+
# if requested re-generate schedules
|
208
|
+
if args['apply_parametric_sch']
|
209
|
+
parametric_schedules = standard.model_apply_parametric_schedules(model, ramp_frequency: nil, infer_hoo_for_non_assigned_objects: true, error_on_out_of_order: true)
|
210
|
+
runner.registerInfo("Applying #{parametric_schedules.size} parametric schedules.")
|
211
|
+
end
|
212
|
+
|
213
|
+
# report final condition of model
|
214
|
+
runner.registerFinalCondition("The building finished with #{parametric_schedules.size} parametric schedules.")
|
215
|
+
|
216
|
+
# report log messages from standards
|
217
|
+
OsLib_HelperMethods.log_msgs
|
218
|
+
|
219
|
+
return true
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
# register the measure to be used by the application
|
224
|
+
InspectAndEditParametricSchedules.new.registerWithApplication
|
@@ -0,0 +1,125 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<measure>
|
3
|
+
<schema_version>3.0</schema_version>
|
4
|
+
<name>inspect_and_edit_parametric_schedules</name>
|
5
|
+
<uid>4b5f610d-caac-47c2-bd5b-610e2fc0768e</uid>
|
6
|
+
<version_id>63f5e931-e682-4ed2-8f66-23c0e6f0b82f</version_id>
|
7
|
+
<version_modified>20210423T201850Z</version_modified>
|
8
|
+
<xml_checksum>57318DBA</xml_checksum>
|
9
|
+
<class_name>InspectAndEditParametricSchedules</class_name>
|
10
|
+
<display_name>Inspect and Edit Parametric Schedules</display_name>
|
11
|
+
<description>This model will create arguments out of additional property inputs for parametric schedules in the model. You can use this just to inspect, or you can alter the inputs. It will not make parametric inputs for schedules that are not already setup as parametric. If you want to generate parametric schedules you can first run the Shift Hours of Operation Schedule with default 0 argument values for change in hours of operation.</description>
|
12
|
+
<modeler_description>This can be used in apply measure now, or can be used in a parametric workflow to load in any custom user profiles or floor/ceiling values.</modeler_description>
|
13
|
+
<arguments>
|
14
|
+
<argument>
|
15
|
+
<name>apply_parametric_sch</name>
|
16
|
+
<display_name>Apply Parametric Schedules to the Model</display_name>
|
17
|
+
<description>When this is true the parametric schedules will be regenerated based on modified formulas, ceiling and floor values, and current horus of operation for building.</description>
|
18
|
+
<type>Boolean</type>
|
19
|
+
<required>true</required>
|
20
|
+
<model_dependent>false</model_dependent>
|
21
|
+
<default_value>true</default_value>
|
22
|
+
<choices>
|
23
|
+
<choice>
|
24
|
+
<value>true</value>
|
25
|
+
<display_name>true</display_name>
|
26
|
+
</choice>
|
27
|
+
<choice>
|
28
|
+
<value>false</value>
|
29
|
+
<display_name>false</display_name>
|
30
|
+
</choice>
|
31
|
+
</choices>
|
32
|
+
</argument>
|
33
|
+
</arguments>
|
34
|
+
<outputs />
|
35
|
+
<provenances />
|
36
|
+
<tags>
|
37
|
+
<tag>Whole Building.Whole Building Schedules</tag>
|
38
|
+
</tags>
|
39
|
+
<attributes>
|
40
|
+
<attribute>
|
41
|
+
<name>Measure Type</name>
|
42
|
+
<value>ModelMeasure</value>
|
43
|
+
<datatype>string</datatype>
|
44
|
+
</attribute>
|
45
|
+
<attribute>
|
46
|
+
<name>Intended Software Tool</name>
|
47
|
+
<value>Apply Measure Now</value>
|
48
|
+
<datatype>string</datatype>
|
49
|
+
</attribute>
|
50
|
+
<attribute>
|
51
|
+
<name>Intended Software Tool</name>
|
52
|
+
<value>OpenStudio Application</value>
|
53
|
+
<datatype>string</datatype>
|
54
|
+
</attribute>
|
55
|
+
<attribute>
|
56
|
+
<name>Intended Software Tool</name>
|
57
|
+
<value>Parametric Analysis Tool</value>
|
58
|
+
<datatype>string</datatype>
|
59
|
+
</attribute>
|
60
|
+
<attribute>
|
61
|
+
<name>Intended Use Case</name>
|
62
|
+
<value>Model Articulation</value>
|
63
|
+
<datatype>string</datatype>
|
64
|
+
</attribute>
|
65
|
+
<attribute>
|
66
|
+
<name>Intended Use Case</name>
|
67
|
+
<value>Calibration</value>
|
68
|
+
<datatype>string</datatype>
|
69
|
+
</attribute>
|
70
|
+
<attribute>
|
71
|
+
<name>Intended Use Case</name>
|
72
|
+
<value>Retrofit EE</value>
|
73
|
+
<datatype>string</datatype>
|
74
|
+
</attribute>
|
75
|
+
</attributes>
|
76
|
+
<files>
|
77
|
+
<file>
|
78
|
+
<filename>example_parametric_model.osm</filename>
|
79
|
+
<filetype>osm</filetype>
|
80
|
+
<usage_type>test</usage_type>
|
81
|
+
<checksum>A0C68C28</checksum>
|
82
|
+
</file>
|
83
|
+
<file>
|
84
|
+
<filename>apply_measures_now.png</filename>
|
85
|
+
<filetype>png</filetype>
|
86
|
+
<usage_type>doc</usage_type>
|
87
|
+
<checksum>2D9A8051</checksum>
|
88
|
+
</file>
|
89
|
+
<file>
|
90
|
+
<filename>README.md.erb</filename>
|
91
|
+
<filetype>erb</filetype>
|
92
|
+
<usage_type>readmeerb</usage_type>
|
93
|
+
<checksum>F073FF6D</checksum>
|
94
|
+
</file>
|
95
|
+
<file>
|
96
|
+
<filename>README.md</filename>
|
97
|
+
<filetype>md</filetype>
|
98
|
+
<usage_type>readme</usage_type>
|
99
|
+
<checksum>A551610E</checksum>
|
100
|
+
</file>
|
101
|
+
<file>
|
102
|
+
<filename>LICENSE.md</filename>
|
103
|
+
<filetype>md</filetype>
|
104
|
+
<usage_type>license</usage_type>
|
105
|
+
<checksum>A21A3ED2</checksum>
|
106
|
+
</file>
|
107
|
+
<file>
|
108
|
+
<filename>inspect_and_edit_parametric_schedules_test.rb</filename>
|
109
|
+
<filetype>rb</filetype>
|
110
|
+
<usage_type>test</usage_type>
|
111
|
+
<checksum>70619B79</checksum>
|
112
|
+
</file>
|
113
|
+
<file>
|
114
|
+
<version>
|
115
|
+
<software_program>OpenStudio</software_program>
|
116
|
+
<identifier>3.1.0</identifier>
|
117
|
+
<min_compatible>3.1.0</min_compatible>
|
118
|
+
</version>
|
119
|
+
<filename>measure.rb</filename>
|
120
|
+
<filetype>rb</filetype>
|
121
|
+
<usage_type>script</usage_type>
|
122
|
+
<checksum>6C4E596B</checksum>
|
123
|
+
</file>
|
124
|
+
</files>
|
125
|
+
</measure>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted
|
4
|
+
provided that the following conditions are met:
|
5
|
+
|
6
|
+
(1) Redistributions of source code must retain the above copyright notice, this list of conditions
|
7
|
+
and the following disclaimer.
|
8
|
+
|
9
|
+
(2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
10
|
+
and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
11
|
+
|
12
|
+
(3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse
|
13
|
+
or promote products derived from this software without specific prior written permission from the
|
14
|
+
respective party.
|
15
|
+
|
16
|
+
(4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other
|
17
|
+
derivative works may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar
|
18
|
+
designation without specific prior written permission from Alliance for Sustainable Energy, LLC.
|
19
|
+
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
21
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
22
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES GOVERNMENT,
|
23
|
+
OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
25
|
+
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
26
|
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|