openstudio-calibration 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -1
- data/Jenkinsfile +1 -1
- data/README.md +1 -0
- data/Rakefile +3 -0
- data/lib/measures/AddMonthlyJSONUtilityData/measure.rb +3 -3
- data/lib/measures/AddMonthlyJSONUtilityData/measure.xml +3 -3
- data/lib/measures/AddMonthlyUtilityData/measure.xml +8 -8
- data/lib/measures/CalibrationReports/measure.rb +1 -3
- data/lib/measures/CalibrationReports/measure.xml +4 -4
- data/lib/measures/CalibrationReportsEnhanced/measure.rb +21 -22
- data/lib/measures/CalibrationReportsEnhanced/measure.xml +4 -4
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.rb +12 -12
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.xml +5 -5
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.rb +12 -12
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.xml +5 -5
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.rb +21 -23
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.xml +5 -5
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.rb +21 -23
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.xml +5 -5
- data/lib/measures/CoilCoolingWaterMultiplier/measure.rb +33 -43
- data/lib/measures/CoilCoolingWaterMultiplier/measure.xml +5 -5
- data/lib/measures/CoilCoolingWaterPercentChange/measure.rb +33 -43
- data/lib/measures/CoilCoolingWaterPercentChange/measure.xml +5 -5
- data/lib/measures/CoilHeatingElectricMultiplier/measure.rb +8 -8
- data/lib/measures/CoilHeatingElectricMultiplier/measure.xml +5 -5
- data/lib/measures/CoilHeatingElectricPercentChange/measure.rb +8 -8
- data/lib/measures/CoilHeatingElectricPercentChange/measure.xml +5 -5
- data/lib/measures/CoilHeatingGasMultiplier/measure.rb +8 -8
- data/lib/measures/CoilHeatingGasMultiplier/measure.xml +5 -5
- data/lib/measures/CoilHeatingGasPercentChange/measure.rb +8 -8
- data/lib/measures/CoilHeatingGasPercentChange/measure.xml +5 -5
- data/lib/measures/CoilHeatingWaterMultiplier/measure.rb +13 -15
- data/lib/measures/CoilHeatingWaterMultiplier/measure.xml +5 -5
- data/lib/measures/CoilHeatingWaterPercentChange/measure.rb +13 -15
- data/lib/measures/CoilHeatingWaterPercentChange/measure.xml +5 -5
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.rb +4 -4
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.xml +3 -3
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.rb +8 -5
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.xml +9 -9
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.rb +8 -5
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.xml +9 -9
- data/lib/measures/FansMultiplier/measure.rb +8 -8
- data/lib/measures/FansMultiplier/measure.xml +5 -5
- data/lib/measures/FansPercentChange/measure.rb +8 -8
- data/lib/measures/FansPercentChange/measure.xml +5 -5
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.rb +2 -2
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.xml +7 -7
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.rb +2 -2
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.xml +7 -7
- data/lib/measures/HardSizeHvac/measure.rb +2 -4
- data/lib/measures/HardSizeHvac/measure.xml +4 -4
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.rb +7 -9
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.xml +3 -3
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.rb +7 -9
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.xml +3 -3
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.rb +8 -5
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.xml +9 -9
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.rb +8 -5
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.xml +9 -9
- data/lib/measures/TimeseriesObjectiveFunction/README.md +51 -1
- data/lib/measures/TimeseriesObjectiveFunction/measure.rb +59 -53
- data/lib/measures/TimeseriesObjectiveFunction/measure.xml +26 -25
- data/lib/measures/TimeseriesObjectiveFunction/resources/report.html.erb +3 -0
- data/lib/measures/TimeseriesPlot/measure.rb +1 -3
- data/lib/measures/TimeseriesPlot/measure.xml +13 -13
- data/lib/measures/TimeseriesPlot/resources/report.html.erb +3 -0
- data/lib/measures/WaterHeaterMixedMultiplier/measure.rb +17 -22
- data/lib/measures/WaterHeaterMixedMultiplier/measure.xml +5 -5
- data/lib/measures/WaterHeaterMixedPercentChange/measure.rb +17 -22
- data/lib/measures/WaterHeaterMixedPercentChange/measure.xml +5 -5
- data/lib/measures/inspect_and_edit_parametric_schedules/measure.rb +13 -11
- data/lib/measures/inspect_and_edit_parametric_schedules/measure.xml +29 -29
- data/lib/measures/shift_hours_of_operation/measure.rb +31 -29
- data/lib/measures/shift_hours_of_operation/measure.xml +51 -37
- data/lib/openstudio/calibration/version.rb +1 -1
- data/openstudio-calibration.gemspec +13 -6
- metadata +69 -14
- data/lib/measures/TimeseriesObjectiveFunction/README.md.erb +0 -42
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>general_calibration_measure_multiplier</name>
|
5
5
|
<uid>d622534e-a3c9-4ba5-b616-53dce2a18ac8</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>acada3ad-5f82-494a-b8d2-1e68d12fe3a4</version_id>
|
7
|
+
<version_modified>20240428T231344Z</version_modified>
|
8
8
|
<xml_checksum>DEC0D835</xml_checksum>
|
9
9
|
<class_name>GeneralCalibrationMeasureMultiplier</class_name>
|
10
10
|
<display_name>General Calibration Measure Multiplier</display_name>
|
@@ -17,10 +17,10 @@
|
|
17
17
|
<type>Choice</type>
|
18
18
|
<required>true</required>
|
19
19
|
<model_dependent>false</model_dependent>
|
20
|
-
<default_value>{
|
20
|
+
<default_value>{82deef47-52ff-4598-a6fe-6dbfaef5dd4d}</default_value>
|
21
21
|
<choices>
|
22
22
|
<choice>
|
23
|
-
<value>{
|
23
|
+
<value>{82deef47-52ff-4598-a6fe-6dbfaef5dd4d}</value>
|
24
24
|
<display_name>*All SpaceTypes*</display_name>
|
25
25
|
</choice>
|
26
26
|
<choice>
|
@@ -35,10 +35,10 @@
|
|
35
35
|
<type>Choice</type>
|
36
36
|
<required>true</required>
|
37
37
|
<model_dependent>false</model_dependent>
|
38
|
-
<default_value>{
|
38
|
+
<default_value>{82deef47-52ff-4598-a6fe-6dbfaef5dd4d}</default_value>
|
39
39
|
<choices>
|
40
40
|
<choice>
|
41
|
-
<value>{
|
41
|
+
<value>{82deef47-52ff-4598-a6fe-6dbfaef5dd4d}</value>
|
42
42
|
<display_name>*All Spaces*</display_name>
|
43
43
|
</choice>
|
44
44
|
<choice>
|
@@ -225,7 +225,7 @@
|
|
225
225
|
<filename>measure.rb</filename>
|
226
226
|
<filetype>rb</filetype>
|
227
227
|
<usage_type>script</usage_type>
|
228
|
-
<checksum>
|
228
|
+
<checksum>D8F7D718</checksum>
|
229
229
|
</file>
|
230
230
|
</files>
|
231
231
|
</measure>
|
@@ -464,7 +464,7 @@ class GeneralCalibrationMeasurePercentChange < OpenStudio::Measure::ModelMeasure
|
|
464
464
|
runner.registerInfo("Skipping change to #{internalmass_def.name.get}")
|
465
465
|
end
|
466
466
|
end
|
467
|
-
end
|
467
|
+
end
|
468
468
|
|
469
469
|
runner.registerInfo("altered_lights_definitions: #{altered_lights_definitions}")
|
470
470
|
runner.registerInfo("altered_luminaires_definitions: #{altered_luminaires_definitions}")
|
@@ -697,7 +697,7 @@ class GeneralCalibrationMeasurePercentChange < OpenStudio::Measure::ModelMeasure
|
|
697
697
|
runner.registerInfo("Skipping change to #{internalmass_def.name.get}")
|
698
698
|
end
|
699
699
|
end
|
700
|
-
end
|
700
|
+
end
|
701
701
|
|
702
702
|
runner.registerInfo("altered_lights_definitions: #{altered_lights_definitions}")
|
703
703
|
runner.registerInfo("altered_luminaires_definitions: #{altered_luminaires_definitions}")
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>general_calibration_measure_percent_change</name>
|
5
5
|
<uid>0f583ac1-fa7e-48bc-9f80-12ed17180669</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>eba32481-a76a-4dba-a375-95a3156d4fe1</version_id>
|
7
|
+
<version_modified>20240428T231345Z</version_modified>
|
8
8
|
<xml_checksum>DEC0D835</xml_checksum>
|
9
9
|
<class_name>GeneralCalibrationMeasurePercentChange</class_name>
|
10
10
|
<display_name>General Calibration Measure Percent Change</display_name>
|
@@ -17,10 +17,10 @@
|
|
17
17
|
<type>Choice</type>
|
18
18
|
<required>true</required>
|
19
19
|
<model_dependent>false</model_dependent>
|
20
|
-
<default_value>{
|
20
|
+
<default_value>{7b2b167b-35c5-4a11-b8fb-e8b5d4fe21e5}</default_value>
|
21
21
|
<choices>
|
22
22
|
<choice>
|
23
|
-
<value>{
|
23
|
+
<value>{7b2b167b-35c5-4a11-b8fb-e8b5d4fe21e5}</value>
|
24
24
|
<display_name>*All SpaceTypes*</display_name>
|
25
25
|
</choice>
|
26
26
|
<choice>
|
@@ -35,10 +35,10 @@
|
|
35
35
|
<type>Choice</type>
|
36
36
|
<required>true</required>
|
37
37
|
<model_dependent>false</model_dependent>
|
38
|
-
<default_value>{
|
38
|
+
<default_value>{7b2b167b-35c5-4a11-b8fb-e8b5d4fe21e5}</default_value>
|
39
39
|
<choices>
|
40
40
|
<choice>
|
41
|
-
<value>{
|
41
|
+
<value>{7b2b167b-35c5-4a11-b8fb-e8b5d4fe21e5}</value>
|
42
42
|
<display_name>*All Spaces*</display_name>
|
43
43
|
</choice>
|
44
44
|
<choice>
|
@@ -224,7 +224,7 @@
|
|
224
224
|
<filename>measure.rb</filename>
|
225
225
|
<filetype>rb</filetype>
|
226
226
|
<usage_type>script</usage_type>
|
227
|
-
<checksum>
|
227
|
+
<checksum>5EAD059F</checksum>
|
228
228
|
</file>
|
229
229
|
</files>
|
230
230
|
</measure>
|
@@ -27,9 +27,7 @@ class HardSizeHVAC < OpenStudio::Measure::ModelMeasure
|
|
27
27
|
|
28
28
|
# define the arguments that the user will input
|
29
29
|
def arguments(_model)
|
30
|
-
|
31
|
-
|
32
|
-
args
|
30
|
+
OpenStudio::Measure::OSArgumentVector.new
|
33
31
|
end
|
34
32
|
|
35
33
|
# define what happens when the measure is run
|
@@ -40,7 +38,7 @@ class HardSizeHVAC < OpenStudio::Measure::ModelMeasure
|
|
40
38
|
standard = Standard.build('90.1-2004') # template choice doesn't matter
|
41
39
|
|
42
40
|
# Perform a sizing run (2.5.1 and later)
|
43
|
-
sizing_run_path = OpenStudio::Path.new(File.dirname(__FILE__)
|
41
|
+
sizing_run_path = OpenStudio::Path.new("#{File.dirname(__FILE__)}/output/SR1").to_s
|
44
42
|
runner.registerInfo("Performing sizing run at #{sizing_run_path}.")
|
45
43
|
if standard.model_run_sizing_run(model, sizing_run_path) == false
|
46
44
|
return false
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>hard_size_hvac</name>
|
5
5
|
<uid>d7da749f-6318-4077-b502-25994a713b27</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>3a26969f-2d60-4448-bc4a-60c4619078e9</version_id>
|
7
|
+
<version_modified>20240428T231349Z</version_modified>
|
8
8
|
<xml_checksum>2B526343</xml_checksum>
|
9
9
|
<class_name>HardSizeHVAC</class_name>
|
10
10
|
<display_name>Hard Size HVAC</display_name>
|
@@ -82,13 +82,13 @@
|
|
82
82
|
<filename>measure.rb</filename>
|
83
83
|
<filetype>rb</filetype>
|
84
84
|
<usage_type>script</usage_type>
|
85
|
-
<checksum>
|
85
|
+
<checksum>56DF50B7</checksum>
|
86
86
|
</file>
|
87
87
|
<file>
|
88
88
|
<filename>hard_size_hvac_test.rb</filename>
|
89
89
|
<filetype>rb</filetype>
|
90
90
|
<usage_type>test</usage_type>
|
91
|
-
<checksum>
|
91
|
+
<checksum>4A195AEA</checksum>
|
92
92
|
</file>
|
93
93
|
</files>
|
94
94
|
</measure>
|
@@ -63,7 +63,7 @@ class RValueOfInsulationForConstructionMultiplier < OpenStudio::Measure::ModelMe
|
|
63
63
|
args << r_value_multplier
|
64
64
|
|
65
65
|
args
|
66
|
-
end
|
66
|
+
end
|
67
67
|
|
68
68
|
# define what happens when the measure is run
|
69
69
|
def run(model, runner, user_arguments)
|
@@ -94,7 +94,7 @@ class RValueOfInsulationForConstructionMultiplier < OpenStudio::Measure::ModelMe
|
|
94
94
|
runner.registerError('Script Error - argument not showing up as construction.')
|
95
95
|
return false
|
96
96
|
end
|
97
|
-
end
|
97
|
+
end
|
98
98
|
|
99
99
|
# set limit for minimum insulation. This is used to limit input and for inferring insulation layer in construction.
|
100
100
|
min_expected_r_value_multplier_ip = 1 # ip units
|
@@ -114,11 +114,9 @@ class RValueOfInsulationForConstructionMultiplier < OpenStudio::Measure::ModelMe
|
|
114
114
|
# loop through construction layers and infer insulation layer/material
|
115
115
|
construction_layers.each do |construction_layer|
|
116
116
|
construction_layer_r_value = construction_layer.to_OpaqueMaterial.get.thermalResistance
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
max_thermal_resistance_material_index = counter
|
121
|
-
end
|
117
|
+
if !thermal_resistance_values.empty? && (construction_layer_r_value > thermal_resistance_values.max)
|
118
|
+
max_thermal_resistance_material = construction_layer
|
119
|
+
max_thermal_resistance_material_index = counter
|
122
120
|
end
|
123
121
|
thermal_resistance_values << construction_layer_r_value
|
124
122
|
counter += 1
|
@@ -159,8 +157,8 @@ class RValueOfInsulationForConstructionMultiplier < OpenStudio::Measure::ModelMe
|
|
159
157
|
runner.registerFinalCondition("The Final R-value of #{construction.name} is #{final_r_value_ip} (ft^2*h*R/Btu).")
|
160
158
|
runner.registerValue('final_r_value_ip', final_r_value_ip.to_f, 'ft^2*h*R/Btu')
|
161
159
|
true
|
162
|
-
end
|
163
|
-
end
|
160
|
+
end
|
161
|
+
end
|
164
162
|
|
165
163
|
# this allows the measure to be used by the application
|
166
164
|
RValueOfInsulationForConstructionMultiplier.new.registerWithApplication
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>r_value_of_insulation_for_construction_multiplier</name>
|
5
5
|
<uid>3c7a6751-bb54-4600-9410-8f042e1a513b</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>55c500d1-80a4-4f4b-a09f-6a9a473c8b3a</version_id>
|
7
|
+
<version_modified>20240428T231344Z</version_modified>
|
8
8
|
<xml_checksum>0BF71A3E</xml_checksum>
|
9
9
|
<class_name>RValueOfInsulationForConstructionMultiplier</class_name>
|
10
10
|
<display_name>Change R-value of Insulation Layer for Construction By a Multiplier</display_name>
|
@@ -127,7 +127,7 @@
|
|
127
127
|
<filename>measure.rb</filename>
|
128
128
|
<filetype>rb</filetype>
|
129
129
|
<usage_type>script</usage_type>
|
130
|
-
<checksum>
|
130
|
+
<checksum>2C93B86A</checksum>
|
131
131
|
</file>
|
132
132
|
</files>
|
133
133
|
</measure>
|
@@ -56,7 +56,7 @@ class RValueOfInsulationForConstructionPercentageChange < OpenStudio::Measure::M
|
|
56
56
|
args << r_value_prct_inc
|
57
57
|
|
58
58
|
args
|
59
|
-
end
|
59
|
+
end
|
60
60
|
|
61
61
|
# define what happens when the measure is run
|
62
62
|
def run(model, runner, user_arguments)
|
@@ -87,7 +87,7 @@ class RValueOfInsulationForConstructionPercentageChange < OpenStudio::Measure::M
|
|
87
87
|
runner.registerError('Script Error - argument not showing up as construction.')
|
88
88
|
return false
|
89
89
|
end
|
90
|
-
end
|
90
|
+
end
|
91
91
|
|
92
92
|
# set limit for minimum insulation. This is used to limit input and for inferring insulation layer in construction.
|
93
93
|
min_expected_r_value_prct_inc_ip = 1 # ip units
|
@@ -107,11 +107,9 @@ class RValueOfInsulationForConstructionPercentageChange < OpenStudio::Measure::M
|
|
107
107
|
# loop through construction layers and infer insulation layer/material
|
108
108
|
construction_layers.each do |construction_layer|
|
109
109
|
construction_layer_r_value = construction_layer.to_OpaqueMaterial.get.thermalResistance
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
max_thermal_resistance_material_index = counter
|
114
|
-
end
|
110
|
+
if !thermal_resistance_values.empty? && (construction_layer_r_value > thermal_resistance_values.max)
|
111
|
+
max_thermal_resistance_material = construction_layer
|
112
|
+
max_thermal_resistance_material_index = counter
|
115
113
|
end
|
116
114
|
thermal_resistance_values << construction_layer_r_value
|
117
115
|
counter += 1
|
@@ -152,8 +150,8 @@ class RValueOfInsulationForConstructionPercentageChange < OpenStudio::Measure::M
|
|
152
150
|
runner.registerFinalCondition("The Final R-value of #{construction.name} is #{final_r_value_ip} (ft^2*h*R/Btu).")
|
153
151
|
runner.registerValue('final_r_value_ip', final_r_value_ip.to_f, 'ft^2*h*R/Btu')
|
154
152
|
true
|
155
|
-
end
|
156
|
-
end
|
153
|
+
end
|
154
|
+
end
|
157
155
|
|
158
156
|
# this allows the measure to be used by the application
|
159
157
|
RValueOfInsulationForConstructionPercentageChange.new.registerWithApplication
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>r_value_of_insulation_for_construction_percentage_change</name>
|
5
5
|
<uid>7ee248fd-052a-48d6-a8eb-b1fc6a0dc348</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>af995773-d9c9-470c-9566-59b4951952e7</version_id>
|
7
|
+
<version_modified>20240428T231348Z</version_modified>
|
8
8
|
<xml_checksum>0BF71A3E</xml_checksum>
|
9
9
|
<class_name>RValueOfInsulationForConstructionPercentageChange</class_name>
|
10
10
|
<display_name>Change R-value of Insulation Layer for Construction By a Specified Percentage</display_name>
|
@@ -127,7 +127,7 @@
|
|
127
127
|
<filename>measure.rb</filename>
|
128
128
|
<filetype>rb</filetype>
|
129
129
|
<usage_type>script</usage_type>
|
130
|
-
<checksum>
|
130
|
+
<checksum>ED427A87</checksum>
|
131
131
|
</file>
|
132
132
|
</files>
|
133
133
|
</measure>
|
@@ -21,7 +21,8 @@ class RoofThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasure
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# short def to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure
|
24
|
-
|
24
|
+
# round to 0 or 2)
|
25
|
+
def neat_numbers(number, roundto = 2)
|
25
26
|
number = if roundto == 2
|
26
27
|
format '%.2f', number
|
27
28
|
else
|
@@ -29,7 +30,7 @@ class RoofThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasure
|
|
29
30
|
end
|
30
31
|
# regex to add commas
|
31
32
|
number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
|
32
|
-
end
|
33
|
+
end
|
33
34
|
|
34
35
|
# helper to make it easier to do unit conversions on the fly
|
35
36
|
def unit_helper(number, from_unit_string, to_unit_string)
|
@@ -64,7 +65,7 @@ class RoofThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasure
|
|
64
65
|
args << thermal_mass_mult
|
65
66
|
|
66
67
|
args
|
67
|
-
end
|
68
|
+
end
|
68
69
|
|
69
70
|
# define what happens when the measure is run
|
70
71
|
def run(model, runner, user_arguments)
|
@@ -89,6 +90,7 @@ class RoofThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasure
|
|
89
90
|
roof_surface_constructions = []
|
90
91
|
surfaces.each do |surface|
|
91
92
|
next unless surface.outsideBoundaryCondition == 'Outdoors' && surface.surfaceType == 'RoofCeiling'
|
93
|
+
|
92
94
|
roof_surfaces << surface
|
93
95
|
roof_surface_const = surface.construction.get
|
94
96
|
# only add construction if it hasn't been added yet
|
@@ -155,6 +157,7 @@ class RoofThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasure
|
|
155
157
|
end
|
156
158
|
initial_sol_abs.each_index do |index1|
|
157
159
|
next unless initial_sol_abs[index1]
|
160
|
+
|
158
161
|
desired_sol_abs[index1] = initial_sol_abs[index1] * solar_abs_mult
|
159
162
|
if desired_sol_abs[index1] > 1
|
160
163
|
desired_sol_abs[index1] = 1
|
@@ -226,8 +229,8 @@ class RoofThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasure
|
|
226
229
|
runner.registerFinalCondition("Applied R #{r_value_mult.round(1)}x Solar #{solar_abs_mult.round(1)}x Therm #{thermal_mass_mult.round(1)}x change")
|
227
230
|
|
228
231
|
true
|
229
|
-
end
|
230
|
-
end
|
232
|
+
end
|
233
|
+
end
|
231
234
|
|
232
235
|
# this allows the measure to be used by the application
|
233
236
|
RoofThermalPropertiesMultiplier.new.registerWithApplication
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>roof_thermal_properties_multiplier</name>
|
5
5
|
<uid>6c4eb22b-770f-456c-bcd1-084cfad89eeb</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>1087cde3-4f8c-48fb-b877-556c37bfca77</version_id>
|
7
|
+
<version_modified>20240428T231349Z</version_modified>
|
8
8
|
<xml_checksum>EB1A0C08</xml_checksum>
|
9
9
|
<class_name>RoofThermalPropertiesMultiplier</class_name>
|
10
10
|
<display_name>Roof Thermal Properties Multiplier</display_name>
|
@@ -88,6 +88,12 @@
|
|
88
88
|
<usage_type>license</usage_type>
|
89
89
|
<checksum>BFFB1AA6</checksum>
|
90
90
|
</file>
|
91
|
+
<file>
|
92
|
+
<filename>RoofThermalPropertiesMultiplier_test.rb</filename>
|
93
|
+
<filetype>rb</filetype>
|
94
|
+
<usage_type>test</usage_type>
|
95
|
+
<checksum>7197D29B</checksum>
|
96
|
+
</file>
|
91
97
|
<file>
|
92
98
|
<version>
|
93
99
|
<software_program>OpenStudio</software_program>
|
@@ -97,13 +103,7 @@
|
|
97
103
|
<filename>measure.rb</filename>
|
98
104
|
<filetype>rb</filetype>
|
99
105
|
<usage_type>script</usage_type>
|
100
|
-
<checksum>
|
101
|
-
</file>
|
102
|
-
<file>
|
103
|
-
<filename>RoofThermalPropertiesMultiplier_test.rb</filename>
|
104
|
-
<filetype>rb</filetype>
|
105
|
-
<usage_type>test</usage_type>
|
106
|
-
<checksum>7197D29B</checksum>
|
106
|
+
<checksum>1E5855C1</checksum>
|
107
107
|
</file>
|
108
108
|
</files>
|
109
109
|
</measure>
|
@@ -21,7 +21,8 @@ class RoofThermalPropertiesPercentChange < OpenStudio::Measure::ModelMeasure
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# short def to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure
|
24
|
-
|
24
|
+
# round to 0 or 2)
|
25
|
+
def neat_numbers(number, roundto = 2)
|
25
26
|
number = if roundto == 2
|
26
27
|
format '%.2f', number
|
27
28
|
else
|
@@ -29,7 +30,7 @@ class RoofThermalPropertiesPercentChange < OpenStudio::Measure::ModelMeasure
|
|
29
30
|
end
|
30
31
|
# regex to add commas
|
31
32
|
number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
|
32
|
-
end
|
33
|
+
end
|
33
34
|
|
34
35
|
# helper to make it easier to do unit conversions on the fly
|
35
36
|
def unit_helper(number, from_unit_string, to_unit_string)
|
@@ -57,7 +58,7 @@ class RoofThermalPropertiesPercentChange < OpenStudio::Measure::ModelMeasure
|
|
57
58
|
args << thermal_mass_perc_change
|
58
59
|
|
59
60
|
args
|
60
|
-
end
|
61
|
+
end
|
61
62
|
|
62
63
|
# define what happens when the measure is run
|
63
64
|
def run(model, runner, user_arguments)
|
@@ -79,6 +80,7 @@ class RoofThermalPropertiesPercentChange < OpenStudio::Measure::ModelMeasure
|
|
79
80
|
roof_surface_constructions = []
|
80
81
|
surfaces.each do |surface|
|
81
82
|
next unless surface.outsideBoundaryCondition == 'Outdoors' && surface.surfaceType == 'RoofCeiling'
|
83
|
+
|
82
84
|
roof_surfaces << surface
|
83
85
|
roof_surface_const = surface.construction.get
|
84
86
|
# only add construction if it hasn't been added yet
|
@@ -145,6 +147,7 @@ class RoofThermalPropertiesPercentChange < OpenStudio::Measure::ModelMeasure
|
|
145
147
|
end
|
146
148
|
initial_sol_abs.each_index do |index1|
|
147
149
|
next unless initial_sol_abs[index1]
|
150
|
+
|
148
151
|
desired_sol_abs[index1] = initial_sol_abs[index1] + initial_sol_abs[index1] * solar_abs_perc_change * 0.01
|
149
152
|
if desired_sol_abs[index1] > 1
|
150
153
|
desired_sol_abs[index1] = 1
|
@@ -216,8 +219,8 @@ class RoofThermalPropertiesPercentChange < OpenStudio::Measure::ModelMeasure
|
|
216
219
|
runner.registerFinalCondition("Applied R #{r_value_perc_change.round(1)} Solar #{solar_abs_perc_change.round(1)} Therm #{thermal_mass_perc_change.round(1)} Percent change")
|
217
220
|
|
218
221
|
true
|
219
|
-
end
|
220
|
-
end
|
222
|
+
end
|
223
|
+
end
|
221
224
|
|
222
225
|
# this allows the measure to be used by the application
|
223
226
|
RoofThermalPropertiesPercentChange.new.registerWithApplication
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>roof_thermal_properties_percent_change</name>
|
5
5
|
<uid>07516685-60fd-4da8-9872-1154a995047d</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>6c9d8dec-0134-4f58-924b-b12ba6ecb8cb</version_id>
|
7
|
+
<version_modified>20240428T231348Z</version_modified>
|
8
8
|
<xml_checksum>EB1A0C08</xml_checksum>
|
9
9
|
<class_name>RoofThermalPropertiesPercentChange</class_name>
|
10
10
|
<display_name>Roof Thermal Properties Percent Change</display_name>
|
@@ -88,6 +88,12 @@
|
|
88
88
|
<usage_type>license</usage_type>
|
89
89
|
<checksum>BFFB1AA6</checksum>
|
90
90
|
</file>
|
91
|
+
<file>
|
92
|
+
<filename>RoofThermalPropertiesMultiplier_test.rb</filename>
|
93
|
+
<filetype>rb</filetype>
|
94
|
+
<usage_type>test</usage_type>
|
95
|
+
<checksum>3F4E0142</checksum>
|
96
|
+
</file>
|
91
97
|
<file>
|
92
98
|
<version>
|
93
99
|
<software_program>OpenStudio</software_program>
|
@@ -97,13 +103,7 @@
|
|
97
103
|
<filename>measure.rb</filename>
|
98
104
|
<filetype>rb</filetype>
|
99
105
|
<usage_type>script</usage_type>
|
100
|
-
<checksum>
|
101
|
-
</file>
|
102
|
-
<file>
|
103
|
-
<filename>RoofThermalPropertiesMultiplier_test.rb</filename>
|
104
|
-
<filetype>rb</filetype>
|
105
|
-
<usage_type>test</usage_type>
|
106
|
-
<checksum>3F4E0142</checksum>
|
106
|
+
<checksum>D0AD2402</checksum>
|
107
107
|
</file>
|
108
108
|
</files>
|
109
109
|
</measure>
|
@@ -18,6 +18,56 @@ ReportingMeasure
|
|
18
18
|
|
19
19
|
## Arguments
|
20
20
|
|
21
|
+
**verbose_messages** will display all the runner.registerInfo statements for the metered value, simulated value and their difference at EVERY timestep. while this is useful for debugging the usage of the Measure, it has a MAJOR impact on performance and will slow the running of the measure. Turn to False for production runs.
|
22
|
+
|
23
|
+
**csv_name** is the file path, relative to the Measure at runtime, to the CSV data. If this run is taking place on an OS-Server or (OSAF) instance, where the project data is zipped up into an OSA.zip file and posted to the OS-Server Web node (in a directory called **calibration_data**), then relative path to the data would be: '../../../lib/calibration_data/electric_json.json'. Notice the **lib** in the path name for the OSAF use case.
|
24
|
+
|
25
|
+
**csv_time_header** is the Header Value in the CSV file with metered data for the TIMESTAMP, ex: "timestamp"
|
26
|
+
|
27
|
+
**csv_var**, is the column name of the metered data, ex: "Electricity:Facility[J]"
|
28
|
+
|
29
|
+
**convert_data** is used to convert the units in the CSV from 'F to C', 'WH to J', 'CFM to m3/s', 'PSI to Pa' or **None**
|
30
|
+
|
31
|
+
The timestamp of the CSV data should follow a mm/dd/yyyy hh:mm:ss format with NO AM/PM
|
32
|
+
|
33
|
+
**year** (true) Is the Year in the csv data timestamp => mm/dd/yyyy or mm/dd
|
34
|
+
|
35
|
+
**seconds** (true) Is the Seconds in the csv data timestamp => hh:mm:ss or hh:mm
|
36
|
+
|
37
|
+
The model output variables/meters are listed in the eplusout.rdd and .mdd files.
|
38
|
+
|
39
|
+
The Measure argument **find_avail** (true) will print out ALL the available RunPeriods (EnvPeriod), ReportingFrequencies, Variables and key values in the run.log file:
|
40
|
+
|
41
|
+
`[15:11:26.640379 INFO] environment_periods: ["Run Period 1"]`\
|
42
|
+
`[15:11:26.640418 INFO] available timeseries: ["Electricity:Facility", "NaturalGas:Facility", "Surface Inside Face Temperature", "Zone Outdoor Air Drybulb Temperature"]`\
|
43
|
+
`[15:11:26.640424 INFO] `\
|
44
|
+
`[15:11:26.640443 INFO] available EnvPeriod: Run Period 1, available ReportingFrequencies: ["Daily", "Hourly", "Zone Timestep"]`\
|
45
|
+
`[15:11:26.640454 INFO] available ReportingFrequency: Daily, available variable names: ["Electricity:Facility", "NaturalGas:Facility"]`\
|
46
|
+
`[15:11:26.640463 INFO] variable names: Electricity:Facility`\
|
47
|
+
`[15:11:26.640469 INFO] available key value: [""]`\
|
48
|
+
`[15:11:26.640476 INFO] variable names: NaturalGas:Facility`\
|
49
|
+
`[15:11:26.640481 INFO] available key value: [""]`\
|
50
|
+
`[15:11:26.640493 INFO] available ReportingFrequency: Hourly, available variable names: ["Electricity:Facility", "NaturalGas:Facility", "Surface Inside Face Temperature", "Zone Outdoor Air Drybulb Temperature"]`\
|
51
|
+
`[15:11:26.640499 INFO] variable names: Electricity:Facility`\
|
52
|
+
`[15:11:26.640505 INFO] available key value: [""]`\
|
53
|
+
`[15:11:26.640511 INFO] variable names: NaturalGas:Facility`\
|
54
|
+
`[15:11:26.640516 INFO] available key value: [""]`\
|
55
|
+
`[15:11:26.640526 INFO] variable names: Surface Inside Face Temperature`\
|
56
|
+
`[15:11:26.640539 INFO] available key value: ["SUB SURFACE 1", "SUB SURFACE 2", "SURFACE 1"]`\
|
57
|
+
`[15:11:26.640546 INFO] variable names: Zone Outdoor Air Drybulb Temperature`\
|
58
|
+
`[15:11:26.640552 INFO] available key value: ["THERMAL ZONE 1"]`\
|
59
|
+
`[15:11:26.640561 INFO] available ReportingFrequency: Zone Timestep, available variable names: ["Electricity:Facility", "NaturalGas:Facility"]`\
|
60
|
+
`[15:11:26.640567 INFO] variable names: Electricity:Facility`\
|
61
|
+
`[15:11:26.640573 INFO] available key value: [""]`\
|
62
|
+
`[15:11:26.640579 INFO] variable names: NaturalGas:Facility`\
|
63
|
+
`[15:11:26.640585 INFO] available key value: [""]`\
|
64
|
+
|
65
|
+
* The name of the variable/timeseries to be compared is used in the **timeseries_name** measure argument.
|
66
|
+
* Some variables require a further **key_value** to narrow down the results to a specific object like a Surface or Zone. Some Meter based outputs have no key, i.e, Electricity:Facility. For those, use the value **no_key**
|
67
|
+
* RunPeriods/EnvPeriod are set in the **environment_period** measure argument.
|
68
|
+
* ReportingFrequencies ["Daily", "Hourly", "Zone Timestep"] are set in the **reporting_frequency** measure argument.
|
69
|
+
|
70
|
+
|
21
71
|
|
22
72
|
### Path to CSV file for the metered data
|
23
73
|
Path to CSV file including file name.
|
@@ -60,7 +110,7 @@ CSV variable display name. Not yet Implemented
|
|
60
110
|
**Model Dependent:** false
|
61
111
|
|
62
112
|
### Year in csv data timestamp
|
63
|
-
Is the Year in the csv data timestamp => mm
|
113
|
+
Is the Year in the csv data timestamp => mm/dd/yyyy or mm/dd (true/false)
|
64
114
|
**Name:** year,
|
65
115
|
**Type:** Boolean,
|
66
116
|
**Units:** ,
|