openstudio-calibration 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +29 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile +20 -0
- data/Jenkinsfile +6 -0
- data/LICENSE.md +27 -0
- data/README.md +33 -0
- data/Rakefile +50 -0
- data/doc_templates/LICENSE.md +27 -0
- data/doc_templates/README.md.erb +42 -0
- data/doc_templates/copyright_erb.txt +36 -0
- data/doc_templates/copyright_js.txt +4 -0
- data/doc_templates/copyright_ruby.txt +34 -0
- data/lib/files/.gitkeep +0 -0
- data/lib/measures/AddMonthlyJSONUtilityData/LICENSE.md +27 -0
- data/lib/measures/AddMonthlyJSONUtilityData/README.md +96 -0
- data/lib/measures/AddMonthlyJSONUtilityData/README.md.erb +42 -0
- data/lib/measures/AddMonthlyJSONUtilityData/measure.rb +280 -0
- data/lib/measures/AddMonthlyJSONUtilityData/measure.xml +163 -0
- data/lib/measures/AddMonthlyUtilityData/LICENSE.md +27 -0
- data/lib/measures/AddMonthlyUtilityData/README.md +64 -0
- data/lib/measures/AddMonthlyUtilityData/README.md.erb +42 -0
- data/lib/measures/AddMonthlyUtilityData/measure.rb +312 -0
- data/lib/measures/AddMonthlyUtilityData/measure.xml +115 -0
- data/lib/measures/AddMonthlyUtilityData/tests/AddMonthlyUtilityData_Test.rb +88 -0
- data/lib/measures/AddMonthlyUtilityData/tests/electric_billed_usages.json +198 -0
- data/lib/measures/AddMonthlyUtilityData/tests/gas_billed_usages.json +198 -0
- data/lib/measures/CalibrationReports/LICENSE.md +27 -0
- data/lib/measures/CalibrationReports/README.md +26 -0
- data/lib/measures/CalibrationReports/README.md.erb +42 -0
- data/lib/measures/CalibrationReports/measure.rb +511 -0
- data/lib/measures/CalibrationReports/measure.xml +98 -0
- data/lib/measures/CalibrationReports/resources/report.html.in +379 -0
- data/lib/measures/CalibrationReports/tests/CalibrationReports_Test.rb +523 -0
- data/lib/measures/CalibrationReports/tests/ExampleModel.osm +10497 -0
- data/lib/measures/CalibrationReports/tests/ExampleModelNoDemandInput.osm +10560 -0
- data/lib/measures/CalibrationReports/tests/ExampleModelNoGasInput.osm +10456 -0
- data/lib/measures/CalibrationReports/tests/USA_CO_Golden-NREL.724666_TMY3.epw +8768 -0
- data/lib/measures/CalibrationReportsEnhanced/LICENSE.md +27 -0
- data/lib/measures/CalibrationReportsEnhanced/README.md +143 -0
- data/lib/measures/CalibrationReportsEnhanced/README.md.erb +42 -0
- data/lib/measures/CalibrationReportsEnhanced/measure.rb +798 -0
- data/lib/measures/CalibrationReportsEnhanced/measure.xml +372 -0
- data/lib/measures/CalibrationReportsEnhanced/resources/report.html.in +380 -0
- data/lib/measures/CalibrationReportsEnhanced/tests/CalibrationReportsEnhanced_Test.rb +734 -0
- data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel.osm +10497 -0
- data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel_FuelOil.osm +12740 -0
- data/lib/measures/CalibrationReportsEnhanced/tests/USA_CO_Golden-NREL.724666_TMY3.epw +8768 -0
- data/lib/measures/CalibrationReportsEnhanced21/LICENSE.md +27 -0
- data/lib/measures/CalibrationReportsEnhanced21/README.md +109 -0
- data/lib/measures/CalibrationReportsEnhanced21/README.md.erb +42 -0
- data/lib/measures/CalibrationReportsEnhanced21/measure.rb +690 -0
- data/lib/measures/CalibrationReportsEnhanced21/measure.xml +269 -0
- data/lib/measures/CalibrationReportsEnhanced21/resources/report.html.in +380 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/README.md +48 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.rb +237 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.xml +93 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/README.md +48 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.rb +228 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.xml +93 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/README.md +64 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.rb +280 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.xml +111 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/README.md +64 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.rb +270 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.xml +111 -0
- data/lib/measures/CoilCoolingWaterMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingWaterMultiplier/README.md +80 -0
- data/lib/measures/CoilCoolingWaterMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilCoolingWaterMultiplier/measure.rb +324 -0
- data/lib/measures/CoilCoolingWaterMultiplier/measure.xml +129 -0
- data/lib/measures/CoilCoolingWaterPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingWaterPercentChange/README.md +80 -0
- data/lib/measures/CoilCoolingWaterPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilCoolingWaterPercentChange/measure.rb +311 -0
- data/lib/measures/CoilCoolingWaterPercentChange/measure.xml +129 -0
- data/lib/measures/CoilHeatingElectricMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingElectricMultiplier/README.md +48 -0
- data/lib/measures/CoilHeatingElectricMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilHeatingElectricMultiplier/measure.rb +240 -0
- data/lib/measures/CoilHeatingElectricMultiplier/measure.xml +93 -0
- data/lib/measures/CoilHeatingElectricPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingElectricPercentChange/README.md +48 -0
- data/lib/measures/CoilHeatingElectricPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilHeatingElectricPercentChange/measure.rb +231 -0
- data/lib/measures/CoilHeatingElectricPercentChange/measure.xml +93 -0
- data/lib/measures/CoilHeatingGasMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingGasMultiplier/README.md +64 -0
- data/lib/measures/CoilHeatingGasMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilHeatingGasMultiplier/measure.rb +282 -0
- data/lib/measures/CoilHeatingGasMultiplier/measure.xml +111 -0
- data/lib/measures/CoilHeatingGasPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingGasPercentChange/README.md +64 -0
- data/lib/measures/CoilHeatingGasPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilHeatingGasPercentChange/measure.rb +271 -0
- data/lib/measures/CoilHeatingGasPercentChange/measure.xml +111 -0
- data/lib/measures/CoilHeatingWaterMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingWaterMultiplier/README.md +48 -0
- data/lib/measures/CoilHeatingWaterMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilHeatingWaterMultiplier/measure.rb +235 -0
- data/lib/measures/CoilHeatingWaterMultiplier/measure.xml +93 -0
- data/lib/measures/CoilHeatingWaterPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingWaterPercentChange/README.md +48 -0
- data/lib/measures/CoilHeatingWaterPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilHeatingWaterPercentChange/measure.rb +226 -0
- data/lib/measures/CoilHeatingWaterPercentChange/measure.xml +93 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/LICENSE.md +27 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/README.md +88 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/README.md.erb +42 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.rb +221 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.xml +194 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/LICENSE.md +27 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/README.md +40 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/README.md.erb +42 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb +102 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.xml +78 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/LICENSE.md +27 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/README.md +48 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/README.md.erb +42 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.rb +263 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.xml +97 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/LICENSE.md +27 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/README.md +48 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/README.md.erb +42 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.rb +253 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.xml +97 -0
- data/lib/measures/FansMultiplier/LICENSE.md +27 -0
- data/lib/measures/FansMultiplier/README.md +64 -0
- data/lib/measures/FansMultiplier/README.md.erb +42 -0
- data/lib/measures/FansMultiplier/measure.rb +297 -0
- data/lib/measures/FansMultiplier/measure.xml +166 -0
- data/lib/measures/FansPercentChange/LICENSE.md +27 -0
- data/lib/measures/FansPercentChange/README.md +64 -0
- data/lib/measures/FansPercentChange/README.md.erb +42 -0
- data/lib/measures/FansPercentChange/measure.rb +286 -0
- data/lib/measures/FansPercentChange/measure.xml +166 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/LICENSE.md +27 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/README.md +112 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/README.md.erb +42 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.rb +639 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.xml +229 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/LICENSE.md +27 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/README.md +112 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/README.md.erb +42 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.rb +756 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.xml +229 -0
- data/lib/measures/HardSizeHvac/LICENSE.md +27 -0
- data/lib/measures/HardSizeHvac/README.md +26 -0
- data/lib/measures/HardSizeHvac/README.md.erb +42 -0
- data/lib/measures/HardSizeHvac/measure.rb +88 -0
- data/lib/measures/HardSizeHvac/measure.xml +81 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/LICENSE.md +27 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md +104 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md.erb +42 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.rb +304 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.xml +216 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/LICENSE.md +27 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/README.md +40 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/README.md.erb +42 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.rb +196 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.xml +132 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/LICENSE.md +27 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/README.md +40 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/README.md.erb +42 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.rb +189 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.xml +132 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/LICENSE.md +27 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/README.md +48 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/README.md.erb +42 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.rb +263 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.xml +97 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/LICENSE.md +27 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/README.md +48 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/README.md.erb +42 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.rb +253 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.xml +97 -0
- data/lib/measures/TimeseriesObjectiveFunction/LICENSE.md +27 -0
- data/lib/measures/TimeseriesObjectiveFunction/README.md +207 -0
- data/lib/measures/TimeseriesObjectiveFunction/README.md.erb +42 -0
- data/lib/measures/TimeseriesObjectiveFunction/measure.rb +748 -0
- data/lib/measures/TimeseriesObjectiveFunction/measure.xml +435 -0
- data/lib/measures/TimeseriesObjectiveFunction/resources/report.html.erb +288 -0
- data/lib/measures/TimeseriesPlot/LICENSE.md +27 -0
- data/lib/measures/TimeseriesPlot/README.md +56 -0
- data/lib/measures/TimeseriesPlot/README.md.erb +42 -0
- data/lib/measures/TimeseriesPlot/measure.rb +302 -0
- data/lib/measures/TimeseriesPlot/measure.xml +137 -0
- data/lib/measures/TimeseriesPlot/resources/report.html.erb +270 -0
- data/lib/measures/WaterHeaterMixedMultiplier/LICENSE.md +27 -0
- data/lib/measures/WaterHeaterMixedMultiplier/README.md +64 -0
- data/lib/measures/WaterHeaterMixedMultiplier/README.md.erb +42 -0
- data/lib/measures/WaterHeaterMixedMultiplier/measure.rb +255 -0
- data/lib/measures/WaterHeaterMixedMultiplier/measure.xml +180 -0
- data/lib/measures/WaterHeaterMixedPercentChange/LICENSE.md +27 -0
- data/lib/measures/WaterHeaterMixedPercentChange/README.md +64 -0
- data/lib/measures/WaterHeaterMixedPercentChange/README.md.erb +42 -0
- data/lib/measures/WaterHeaterMixedPercentChange/measure.rb +245 -0
- data/lib/measures/WaterHeaterMixedPercentChange/measure.xml +180 -0
- data/lib/measures/zone_report/LICENSE.md +27 -0
- data/lib/measures/zone_report/README.md +26 -0
- data/lib/measures/zone_report/README.md.erb +42 -0
- data/lib/measures/zone_report/measure.rb +706 -0
- data/lib/measures/zone_report/measure.xml +67 -0
- data/lib/measures/zone_report/resources/report.html.in +342 -0
- data/lib/openstudio-calibration-measures.rb +36 -0
- data/lib/openstudio/calibration_measures.rb +37 -0
- data/lib/openstudio/calibration_measures/extension.rb +49 -0
- data/lib/openstudio/calibration_measures/version.rb +40 -0
- data/openstudio-calibration.gemspec +30 -0
- metadata +331 -0
@@ -0,0 +1,166 @@
|
|
1
|
+
<measure>
|
2
|
+
<schema_version>3.0</schema_version>
|
3
|
+
<name>fans_percent_change</name>
|
4
|
+
<uid>4c13a935-976b-4d54-bf7f-a4064fb6e11d</uid>
|
5
|
+
<version_id>434ac5d5-e956-4423-a83d-bb742e15f67a</version_id>
|
6
|
+
<version_modified>20200325T030944Z</version_modified>
|
7
|
+
<xml_checksum>3C1DA54F</xml_checksum>
|
8
|
+
<class_name>FansPercentChange</class_name>
|
9
|
+
<display_name>Fans Percent Change</display_name>
|
10
|
+
<description>This is a general purpose measure to calibrate Fans with a Percent Change.</description>
|
11
|
+
<modeler_description>It will be used for calibration maximum flow rate, efficiency, pressure rise and motor efficiency. User can choose between a SINGLE Fan or ALL the Fans.</modeler_description>
|
12
|
+
<arguments>
|
13
|
+
<argument>
|
14
|
+
<name>fan</name>
|
15
|
+
<display_name>Apply the Measure to a SINGLE Fan, ALL the Fans or NONE.</display_name>
|
16
|
+
<type>Choice</type>
|
17
|
+
<required>true</required>
|
18
|
+
<model_dependent>false</model_dependent>
|
19
|
+
<default_value>*All Fans*</default_value>
|
20
|
+
<choices>
|
21
|
+
<choice>
|
22
|
+
<value>{41c1feeb-9382-4b35-a8b9-6f0ed3955191}</value>
|
23
|
+
<display_name>*All Fans*</display_name>
|
24
|
+
</choice>
|
25
|
+
<choice>
|
26
|
+
<value>0</value>
|
27
|
+
<display_name>*None*</display_name>
|
28
|
+
</choice>
|
29
|
+
</choices>
|
30
|
+
</argument>
|
31
|
+
<argument>
|
32
|
+
<name>max_flowrate_perc_change</name>
|
33
|
+
<display_name>Percent Change for Maximum FlowRate.</display_name>
|
34
|
+
<description>Percent Change for Maximum FlowRate.</description>
|
35
|
+
<type>Double</type>
|
36
|
+
<required>true</required>
|
37
|
+
<model_dependent>false</model_dependent>
|
38
|
+
<default_value>0</default_value>
|
39
|
+
</argument>
|
40
|
+
<argument>
|
41
|
+
<name>fan_efficiency_perc_change</name>
|
42
|
+
<display_name>Percent Change for Fan Efficiency.</display_name>
|
43
|
+
<description>Percent Change for Fan Efficiency.</description>
|
44
|
+
<type>Double</type>
|
45
|
+
<required>true</required>
|
46
|
+
<model_dependent>false</model_dependent>
|
47
|
+
<default_value>0</default_value>
|
48
|
+
</argument>
|
49
|
+
<argument>
|
50
|
+
<name>pressure_rise_perc_change</name>
|
51
|
+
<display_name>Percent Change for Pressure Rise.</display_name>
|
52
|
+
<description>Percent Change for Pressure Rise.</description>
|
53
|
+
<type>Double</type>
|
54
|
+
<required>true</required>
|
55
|
+
<model_dependent>false</model_dependent>
|
56
|
+
<default_value>0</default_value>
|
57
|
+
</argument>
|
58
|
+
<argument>
|
59
|
+
<name>motor_efficiency_perc_change</name>
|
60
|
+
<display_name>Percent Change for Motor Efficiency.</display_name>
|
61
|
+
<description>Percent Change for Motor Efficiency.</description>
|
62
|
+
<type>Double</type>
|
63
|
+
<required>true</required>
|
64
|
+
<model_dependent>false</model_dependent>
|
65
|
+
<default_value>0</default_value>
|
66
|
+
</argument>
|
67
|
+
</arguments>
|
68
|
+
<outputs/>
|
69
|
+
<provenances/>
|
70
|
+
<tags>
|
71
|
+
<tag>HVAC.Whole System</tag>
|
72
|
+
</tags>
|
73
|
+
<attributes>
|
74
|
+
<attribute>
|
75
|
+
<name>Intended Software Tool</name>
|
76
|
+
<value>Analysis Spreadsheet</value>
|
77
|
+
<datatype>string</datatype>
|
78
|
+
</attribute>
|
79
|
+
<attribute>
|
80
|
+
<name>Intended Use Case</name>
|
81
|
+
<value>Model Articulation</value>
|
82
|
+
<datatype>string</datatype>
|
83
|
+
</attribute>
|
84
|
+
<attribute>
|
85
|
+
<name>Intended Use Case</name>
|
86
|
+
<value>Calibration</value>
|
87
|
+
<datatype>string</datatype>
|
88
|
+
</attribute>
|
89
|
+
<attribute>
|
90
|
+
<name>Intended Use Case</name>
|
91
|
+
<value>Sensitivity Analysis</value>
|
92
|
+
<datatype>string</datatype>
|
93
|
+
</attribute>
|
94
|
+
<attribute>
|
95
|
+
<name>Measure Type</name>
|
96
|
+
<value>ModelMeasure</value>
|
97
|
+
<datatype>string</datatype>
|
98
|
+
</attribute>
|
99
|
+
<attribute>
|
100
|
+
<name>Intended Software Tool</name>
|
101
|
+
<value>Apply Measure Now</value>
|
102
|
+
<datatype>string</datatype>
|
103
|
+
</attribute>
|
104
|
+
<attribute>
|
105
|
+
<name>Intended Software Tool</name>
|
106
|
+
<value>OpenStudio Application</value>
|
107
|
+
<datatype>string</datatype>
|
108
|
+
</attribute>
|
109
|
+
<attribute>
|
110
|
+
<name>Intended Software Tool</name>
|
111
|
+
<value>Parametric Analysis Tool</value>
|
112
|
+
<datatype>string</datatype>
|
113
|
+
</attribute>
|
114
|
+
<attribute>
|
115
|
+
<name>Intended Software Tool</name>
|
116
|
+
<value>Analysis Spreadsheet</value>
|
117
|
+
<datatype>string</datatype>
|
118
|
+
</attribute>
|
119
|
+
<attribute>
|
120
|
+
<name>Intended Use Case</name>
|
121
|
+
<value>Model Articulation</value>
|
122
|
+
<datatype>string</datatype>
|
123
|
+
</attribute>
|
124
|
+
<attribute>
|
125
|
+
<name>Intended Use Case</name>
|
126
|
+
<value>Calibration</value>
|
127
|
+
<datatype>string</datatype>
|
128
|
+
</attribute>
|
129
|
+
<attribute>
|
130
|
+
<name>Intended Use Case</name>
|
131
|
+
<value>Sensitivity Analysis</value>
|
132
|
+
<datatype>string</datatype>
|
133
|
+
</attribute>
|
134
|
+
</attributes>
|
135
|
+
<files>
|
136
|
+
<file>
|
137
|
+
<filename>LICENSE.md</filename>
|
138
|
+
<filetype>md</filetype>
|
139
|
+
<usage_type>license</usage_type>
|
140
|
+
<checksum>E0468DD6</checksum>
|
141
|
+
</file>
|
142
|
+
<file>
|
143
|
+
<filename>README.md.erb</filename>
|
144
|
+
<filetype>erb</filetype>
|
145
|
+
<usage_type>readmeerb</usage_type>
|
146
|
+
<checksum>703C9964</checksum>
|
147
|
+
</file>
|
148
|
+
<file>
|
149
|
+
<filename>README.md</filename>
|
150
|
+
<filetype>md</filetype>
|
151
|
+
<usage_type>readme</usage_type>
|
152
|
+
<checksum>B44AC277</checksum>
|
153
|
+
</file>
|
154
|
+
<file>
|
155
|
+
<version>
|
156
|
+
<software_program>OpenStudio</software_program>
|
157
|
+
<identifier>2.1.0</identifier>
|
158
|
+
<min_compatible>2.1.0</min_compatible>
|
159
|
+
</version>
|
160
|
+
<filename>measure.rb</filename>
|
161
|
+
<filetype>rb</filetype>
|
162
|
+
<usage_type>script</usage_type>
|
163
|
+
<checksum>18992A73</checksum>
|
164
|
+
</file>
|
165
|
+
</files>
|
166
|
+
</measure>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
OpenStudio(R), Copyright (c) 2008-2020, 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.
|
@@ -0,0 +1,112 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
###### (Automatically generated documentation)
|
4
|
+
|
5
|
+
# General Calibration Measure Multiplier
|
6
|
+
|
7
|
+
## Description
|
8
|
+
This is a general purpose measure to calibrate space and space type elements with a Multiplier.
|
9
|
+
|
10
|
+
## Modeler Description
|
11
|
+
It will be used for calibration of space and spaceType loads as well as infiltration, and outdoor air. User can choose between a SINGLE SpaceType or ALL the SpaceTypes as well as a SINGLE Space or ALL the Spaces.
|
12
|
+
|
13
|
+
## Measure Type
|
14
|
+
ModelMeasure
|
15
|
+
|
16
|
+
## Taxonomy
|
17
|
+
|
18
|
+
|
19
|
+
## Arguments
|
20
|
+
|
21
|
+
|
22
|
+
### Apply the Measure to a SINGLE SpaceType, ALL the SpaceTypes or NONE.
|
23
|
+
|
24
|
+
**Name:** space_type,
|
25
|
+
**Type:** Choice,
|
26
|
+
**Units:** ,
|
27
|
+
**Required:** true,
|
28
|
+
**Model Dependent:** false
|
29
|
+
|
30
|
+
### Apply the Measure to a SINGLE Space, ALL the Spaces or NONE.
|
31
|
+
|
32
|
+
**Name:** space,
|
33
|
+
**Type:** Choice,
|
34
|
+
**Units:** ,
|
35
|
+
**Required:** true,
|
36
|
+
**Model Dependent:** false
|
37
|
+
|
38
|
+
### Multiplier for Lights.
|
39
|
+
Multiplier for Lights.
|
40
|
+
**Name:** Lights_multiplier,
|
41
|
+
**Type:** Double,
|
42
|
+
**Units:** ,
|
43
|
+
**Required:** true,
|
44
|
+
**Model Dependent:** false
|
45
|
+
|
46
|
+
### Multiplier for Luminaire.
|
47
|
+
Multiplier for Luminaire.
|
48
|
+
**Name:** Luminaire_multiplier,
|
49
|
+
**Type:** Double,
|
50
|
+
**Units:** ,
|
51
|
+
**Required:** true,
|
52
|
+
**Model Dependent:** false
|
53
|
+
|
54
|
+
### Multiplier for Electric Equipment.
|
55
|
+
Multiplier for Electric Equipment.
|
56
|
+
**Name:** ElectricEquipment_multiplier,
|
57
|
+
**Type:** Double,
|
58
|
+
**Units:** ,
|
59
|
+
**Required:** true,
|
60
|
+
**Model Dependent:** false
|
61
|
+
|
62
|
+
### Multiplier for Gas Equipment.
|
63
|
+
Multiplier for Gas Equipment.
|
64
|
+
**Name:** GasEquipment_multiplier,
|
65
|
+
**Type:** Double,
|
66
|
+
**Units:** ,
|
67
|
+
**Required:** true,
|
68
|
+
**Model Dependent:** false
|
69
|
+
|
70
|
+
### Multiplier for OtherEquipment.
|
71
|
+
Multiplier for OtherEquipment.
|
72
|
+
**Name:** OtherEquipment_multiplier,
|
73
|
+
**Type:** Double,
|
74
|
+
**Units:** ,
|
75
|
+
**Required:** true,
|
76
|
+
**Model Dependent:** false
|
77
|
+
|
78
|
+
### Multiplier for number of people.
|
79
|
+
Multiplier for number of people.
|
80
|
+
**Name:** People_multiplier,
|
81
|
+
**Type:** Double,
|
82
|
+
**Units:** ,
|
83
|
+
**Required:** true,
|
84
|
+
**Model Dependent:** false
|
85
|
+
|
86
|
+
### Multiplier for Internal Mass.
|
87
|
+
Multiplier for Internal Mass.
|
88
|
+
**Name:** InternalMass_multiplier,
|
89
|
+
**Type:** Double,
|
90
|
+
**Units:** ,
|
91
|
+
**Required:** true,
|
92
|
+
**Model Dependent:** false
|
93
|
+
|
94
|
+
### Multiplier for infiltration.
|
95
|
+
Multiplier for infiltration.
|
96
|
+
**Name:** Infiltration_multiplier,
|
97
|
+
**Type:** Double,
|
98
|
+
**Units:** ,
|
99
|
+
**Required:** true,
|
100
|
+
**Model Dependent:** false
|
101
|
+
|
102
|
+
### Multiplier for Ventilation.
|
103
|
+
Multiplier for Ventilation.
|
104
|
+
**Name:** Ventilation_multiplier,
|
105
|
+
**Type:** Double,
|
106
|
+
**Units:** ,
|
107
|
+
**Required:** true,
|
108
|
+
**Model Dependent:** false
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
@@ -0,0 +1,42 @@
|
|
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
|
+
###### (Automatically generated documentation)
|
4
|
+
|
5
|
+
# <%= name %>
|
6
|
+
|
7
|
+
## Description
|
8
|
+
<%= description %>
|
9
|
+
|
10
|
+
## Modeler Description
|
11
|
+
<%= modelerDescription %>
|
12
|
+
|
13
|
+
## Measure Type
|
14
|
+
<%= measureType %>
|
15
|
+
|
16
|
+
## Taxonomy
|
17
|
+
<%= taxonomy %>
|
18
|
+
|
19
|
+
## Arguments
|
20
|
+
|
21
|
+
<% arguments.each do |argument| %>
|
22
|
+
### <%= argument[:display_name] %>
|
23
|
+
<%= argument[:description] %>
|
24
|
+
**Name:** <%= argument[:name] %>,
|
25
|
+
**Type:** <%= argument[:type] %>,
|
26
|
+
**Units:** <%= argument[:units] %>,
|
27
|
+
**Required:** <%= argument[:required] %>,
|
28
|
+
**Model Dependent:** <%= argument[:model_dependent] %>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<% if arguments.size == 0 %>
|
32
|
+
<%= "This measure does not have any user arguments" %>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% if outputs.size > 0 %>
|
36
|
+
## Outputs
|
37
|
+
<% output_names = [] %>
|
38
|
+
<% outputs.each do |output| %>
|
39
|
+
<% output_names << output[:display_name] %>
|
40
|
+
<% end %>
|
41
|
+
<%= output_names.join(", ") %>
|
42
|
+
<% end %>
|
@@ -0,0 +1,639 @@
|
|
1
|
+
# *******************************************************************************
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2020, 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
|
+
# start the measure
|
37
|
+
class GeneralCalibrationMeasureMultiplier < OpenStudio::Measure::ModelMeasure
|
38
|
+
# human readable name
|
39
|
+
def name
|
40
|
+
'General Calibration Measure Multiplier'
|
41
|
+
end
|
42
|
+
|
43
|
+
# human readable description
|
44
|
+
def description
|
45
|
+
'This is a general purpose measure to calibrate space and space type elements with a Multiplier.'
|
46
|
+
end
|
47
|
+
|
48
|
+
# human readable description of modeling approach
|
49
|
+
def modeler_description
|
50
|
+
'It will be used for calibration of space and spaceType loads as well as infiltration, and outdoor air. User can choose between a SINGLE SpaceType or ALL the SpaceTypes as well as a SINGLE Space or ALL the Spaces.'
|
51
|
+
end
|
52
|
+
|
53
|
+
def change_name(object, multiplier)
|
54
|
+
if multiplier != 1
|
55
|
+
object.setName("#{object.name.get} #{multiplier.round(2)}x Multiplier")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def check_multiplier(runner, multiplier)
|
60
|
+
if multiplier < 0
|
61
|
+
runner.registerError("Multiplier #{multiplier} cannot be negative.")
|
62
|
+
false
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# define the arguments that the user will input
|
67
|
+
def arguments(model)
|
68
|
+
args = OpenStudio::Measure::OSArgumentVector.new
|
69
|
+
|
70
|
+
# make a choice argument for model objects
|
71
|
+
space_type_handles = OpenStudio::StringVector.new
|
72
|
+
space_type_display_names = OpenStudio::StringVector.new
|
73
|
+
|
74
|
+
# putting model object and names into hash
|
75
|
+
space_type_args = model.getSpaceTypes
|
76
|
+
space_type_args_hash = {}
|
77
|
+
space_type_args.each do |space_type_arg|
|
78
|
+
space_type_args_hash[space_type_arg.name.to_s] = space_type_arg
|
79
|
+
end
|
80
|
+
|
81
|
+
# looping through sorted hash of model objects
|
82
|
+
space_type_args_hash.sort.map do |key, value|
|
83
|
+
# only include if space type is used in the model
|
84
|
+
unless value.spaces.empty?
|
85
|
+
space_type_handles << value.handle.to_s
|
86
|
+
space_type_display_names << key
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# add building to string vector with space type
|
91
|
+
building = model.getBuilding
|
92
|
+
space_type_handles << building.handle.to_s
|
93
|
+
space_type_display_names << '*All SpaceTypes*'
|
94
|
+
space_type_handles << '0'
|
95
|
+
space_type_display_names << '*None*'
|
96
|
+
|
97
|
+
# make a choice argument for space type
|
98
|
+
space_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('space_type', space_type_handles, space_type_display_names)
|
99
|
+
space_type.setDisplayName('Apply the Measure to a SINGLE SpaceType, ALL the SpaceTypes or NONE.')
|
100
|
+
space_type.setDefaultValue('*All SpaceTypes*') # if no space type is chosen this will run on the entire building
|
101
|
+
args << space_type
|
102
|
+
|
103
|
+
# make a choice argument for model objects
|
104
|
+
space_handles = OpenStudio::StringVector.new
|
105
|
+
space_display_names = OpenStudio::StringVector.new
|
106
|
+
|
107
|
+
# putting model object and names into hash
|
108
|
+
space_args = model.getSpaces
|
109
|
+
space_args_hash = {}
|
110
|
+
space_args.each do |space_arg|
|
111
|
+
space_args_hash[space_arg.name.to_s] = space_arg
|
112
|
+
end
|
113
|
+
|
114
|
+
# looping through sorted hash of model objects
|
115
|
+
space_args_hash.sort.map do |key, value|
|
116
|
+
space_handles << value.handle.to_s
|
117
|
+
space_display_names << key
|
118
|
+
end
|
119
|
+
|
120
|
+
# add building to string vector with spaces
|
121
|
+
building = model.getBuilding
|
122
|
+
space_handles << building.handle.to_s
|
123
|
+
space_display_names << '*All Spaces*'
|
124
|
+
space_handles << '0'
|
125
|
+
space_display_names << '*None*'
|
126
|
+
|
127
|
+
# make a choice argument for space type
|
128
|
+
space = OpenStudio::Measure::OSArgument.makeChoiceArgument('space', space_handles, space_display_names)
|
129
|
+
space.setDisplayName('Apply the Measure to a SINGLE Space, ALL the Spaces or NONE.')
|
130
|
+
space.setDefaultValue('*All Spaces*') # if no space type is chosen this will run on the entire building
|
131
|
+
args << space
|
132
|
+
|
133
|
+
# Lights multiplier
|
134
|
+
lights_multiplier = OpenStudio::Measure::OSArgument.makeDoubleArgument('Lights_multiplier', true)
|
135
|
+
lights_multiplier.setDisplayName('Multiplier for Lights.')
|
136
|
+
lights_multiplier.setDescription('Multiplier for Lights.')
|
137
|
+
lights_multiplier.setDefaultValue(1.0)
|
138
|
+
lights_multiplier.setMinValue(0.0)
|
139
|
+
args << lights_multiplier
|
140
|
+
|
141
|
+
# Luminaire multiplier
|
142
|
+
luminaire_multiplier = OpenStudio::Measure::OSArgument.makeDoubleArgument('Luminaire_multiplier', true)
|
143
|
+
luminaire_multiplier.setDisplayName('Multiplier for Luminaire.')
|
144
|
+
luminaire_multiplier.setDescription('Multiplier for Luminaire.')
|
145
|
+
luminaire_multiplier.setDefaultValue(1.0)
|
146
|
+
args << luminaire_multiplier
|
147
|
+
|
148
|
+
# Electric Equipment multiplier
|
149
|
+
electric_equip_multiplier = OpenStudio::Measure::OSArgument.makeDoubleArgument('ElectricEquipment_multiplier', true)
|
150
|
+
electric_equip_multiplier.setDisplayName('Multiplier for Electric Equipment.')
|
151
|
+
electric_equip_multiplier.setDescription('Multiplier for Electric Equipment.')
|
152
|
+
electric_equip_multiplier.setDefaultValue(1.0)
|
153
|
+
args << electric_equip_multiplier
|
154
|
+
|
155
|
+
# Gas Equipment multiplier
|
156
|
+
gas_equip_multiplier = OpenStudio::Measure::OSArgument.makeDoubleArgument('GasEquipment_multiplier', true)
|
157
|
+
gas_equip_multiplier.setDisplayName('Multiplier for Gas Equipment.')
|
158
|
+
gas_equip_multiplier.setDescription('Multiplier for Gas Equipment.')
|
159
|
+
gas_equip_multiplier.setDefaultValue(1.0)
|
160
|
+
args << gas_equip_multiplier
|
161
|
+
|
162
|
+
# OtherEquipment multiplier
|
163
|
+
other_equip_multiplier = OpenStudio::Measure::OSArgument.makeDoubleArgument('OtherEquipment_multiplier', true)
|
164
|
+
other_equip_multiplier.setDisplayName('Multiplier for OtherEquipment.')
|
165
|
+
other_equip_multiplier.setDescription('Multiplier for OtherEquipment.')
|
166
|
+
other_equip_multiplier.setDefaultValue(1.0)
|
167
|
+
args << other_equip_multiplier
|
168
|
+
|
169
|
+
# occupancy multiplier
|
170
|
+
occ_multiplier = OpenStudio::Measure::OSArgument.makeDoubleArgument('People_multiplier', true)
|
171
|
+
occ_multiplier.setDisplayName('Multiplier for number of people.')
|
172
|
+
occ_multiplier.setDescription('Multiplier for number of people.')
|
173
|
+
occ_multiplier.setDefaultValue(1.0)
|
174
|
+
args << occ_multiplier
|
175
|
+
|
176
|
+
# internalMass multiplier
|
177
|
+
mass_multiplier = OpenStudio::Measure::OSArgument.makeDoubleArgument('InternalMass_multiplier', true)
|
178
|
+
mass_multiplier.setDisplayName('Multiplier for Internal Mass.')
|
179
|
+
mass_multiplier.setDescription('Multiplier for Internal Mass.')
|
180
|
+
mass_multiplier.setDefaultValue(1.0)
|
181
|
+
args << mass_multiplier
|
182
|
+
|
183
|
+
# infiltration multiplier
|
184
|
+
infil_multiplier = OpenStudio::Measure::OSArgument.makeDoubleArgument('Infiltration_multiplier', true)
|
185
|
+
infil_multiplier.setDisplayName('Multiplier for infiltration.')
|
186
|
+
infil_multiplier.setDescription('Multiplier for infiltration.')
|
187
|
+
infil_multiplier.setDefaultValue(1.0)
|
188
|
+
args << infil_multiplier
|
189
|
+
|
190
|
+
# ventilation multiplier
|
191
|
+
vent_multiplier = OpenStudio::Measure::OSArgument.makeDoubleArgument('Ventilation_multiplier', true)
|
192
|
+
vent_multiplier.setDisplayName('Multiplier for Ventilation.')
|
193
|
+
vent_multiplier.setDescription('Multiplier for Ventilation.')
|
194
|
+
vent_multiplier.setDefaultValue(1.0)
|
195
|
+
args << vent_multiplier
|
196
|
+
|
197
|
+
args
|
198
|
+
end
|
199
|
+
|
200
|
+
# define what happens when the measure is run
|
201
|
+
def run(model, runner, user_arguments)
|
202
|
+
super(model, runner, user_arguments)
|
203
|
+
|
204
|
+
# use the built-in error checking
|
205
|
+
unless runner.validateUserArguments(arguments(model), user_arguments)
|
206
|
+
return false
|
207
|
+
end
|
208
|
+
|
209
|
+
# assign the user inputs to variables
|
210
|
+
space_type_object = runner.getOptionalWorkspaceObjectChoiceValue('space_type', user_arguments, model)
|
211
|
+
space_type_handle = runner.getStringArgumentValue('space_type', user_arguments)
|
212
|
+
space_object = runner.getOptionalWorkspaceObjectChoiceValue('space', user_arguments, model)
|
213
|
+
space_handle = runner.getStringArgumentValue('space', user_arguments)
|
214
|
+
occ_multiplier = runner.getDoubleArgumentValue('People_multiplier', user_arguments)
|
215
|
+
check_multiplier(runner, occ_multiplier)
|
216
|
+
infil_multiplier = runner.getDoubleArgumentValue('Infiltration_multiplier', user_arguments)
|
217
|
+
check_multiplier(runner, infil_multiplier)
|
218
|
+
vent_multiplier = runner.getDoubleArgumentValue('Ventilation_multiplier', user_arguments)
|
219
|
+
check_multiplier(runner, vent_multiplier)
|
220
|
+
mass_multiplier = runner.getDoubleArgumentValue('InternalMass_multiplier', user_arguments)
|
221
|
+
check_multiplier(runner, mass_multiplier)
|
222
|
+
electric_equip_multiplier = runner.getDoubleArgumentValue('ElectricEquipment_multiplier', user_arguments)
|
223
|
+
check_multiplier(runner, electric_equip_multiplier)
|
224
|
+
gas_equip_multiplier = runner.getDoubleArgumentValue('GasEquipment_multiplier', user_arguments)
|
225
|
+
check_multiplier(runner, gas_equip_multiplier)
|
226
|
+
other_equip_multiplier = runner.getDoubleArgumentValue('OtherEquipment_multiplier', user_arguments)
|
227
|
+
check_multiplier(runner, other_equip_multiplier)
|
228
|
+
lights_multiplier = runner.getDoubleArgumentValue('Lights_multiplier', user_arguments)
|
229
|
+
check_multiplier(runner, lights_multiplier)
|
230
|
+
luminaire_multiplier = runner.getDoubleArgumentValue('Luminaire_multiplier', user_arguments)
|
231
|
+
check_multiplier(runner, luminaire_multiplier)
|
232
|
+
|
233
|
+
# find objects to change
|
234
|
+
space_types = []
|
235
|
+
spaces = []
|
236
|
+
building = model.getBuilding
|
237
|
+
building_handle = building.handle.to_s
|
238
|
+
runner.registerInfo("space_type_handle: #{space_type_handle}")
|
239
|
+
runner.registerInfo("space_handle: #{space_handle}")
|
240
|
+
# setup space_types
|
241
|
+
if space_type_handle == building_handle
|
242
|
+
# Use ALL SpaceTypes
|
243
|
+
runner.registerInfo('Applying change to ALL SpaceTypes')
|
244
|
+
space_types = model.getSpaceTypes
|
245
|
+
elsif space_type_handle == 0.to_s
|
246
|
+
# SpaceTypes set to NONE so do nothing
|
247
|
+
runner.registerInfo('Applying change to NONE SpaceTypes')
|
248
|
+
elsif !space_type_handle.empty?
|
249
|
+
# Single SpaceType handle found, check if object is good
|
250
|
+
if !space_type_object.get.to_SpaceType.empty?
|
251
|
+
runner.registerInfo("Applying change to #{space_type_object.get.name} SpaceType")
|
252
|
+
space_types << space_type_object.get.to_SpaceType.get
|
253
|
+
else
|
254
|
+
runner.registerError("SpaceType with handle #{space_type_handle} could not be found.")
|
255
|
+
end
|
256
|
+
else
|
257
|
+
runner.registerError('SpaceType handle is empty.')
|
258
|
+
return false
|
259
|
+
end
|
260
|
+
|
261
|
+
# setup spaces
|
262
|
+
if space_handle == building_handle
|
263
|
+
# Use ALL Spaces
|
264
|
+
runner.registerInfo('Applying change to ALL Spaces')
|
265
|
+
spaces = model.getSpaces
|
266
|
+
elsif space_handle == 0.to_s
|
267
|
+
# Spaces set to NONE so do nothing
|
268
|
+
runner.registerInfo('Applying change to NONE Spaces')
|
269
|
+
elsif !space_handle.empty?
|
270
|
+
# Single Space handle found, check if object is good
|
271
|
+
if !space_object.get.to_Space.empty?
|
272
|
+
runner.registerInfo("Applying change to #{space_object.get.name} Space")
|
273
|
+
spaces << space_object.get.to_Space.get
|
274
|
+
else
|
275
|
+
runner.registerError("Space with handle #{space_handle} could not be found.")
|
276
|
+
end
|
277
|
+
else
|
278
|
+
runner.registerError('Space handle is empty.')
|
279
|
+
return false
|
280
|
+
end
|
281
|
+
|
282
|
+
altered_people_objects = []
|
283
|
+
altered_infiltration_objects = []
|
284
|
+
altered_outdoor_air_objects = []
|
285
|
+
altered_internalmass_objects = []
|
286
|
+
altered_lights_objects = []
|
287
|
+
altered_luminaires_objects = []
|
288
|
+
altered_electric_equip_objects = []
|
289
|
+
altered_gas_equip_objects = []
|
290
|
+
altered_other_equip_objects = []
|
291
|
+
|
292
|
+
# report initial condition of model
|
293
|
+
runner.registerInitialCondition("Applying Multiplier to #{space_types.size} space types and #{spaces.size} spaces.")
|
294
|
+
runner.registerInfo("Applying Multiplier to #{space_types.size} space types.")
|
295
|
+
|
296
|
+
# loop through space types
|
297
|
+
space_types.each do |space_type|
|
298
|
+
# modify lights
|
299
|
+
space_type.lights.each do |light|
|
300
|
+
# get and alter multiplier
|
301
|
+
if !altered_lights_objects.include? light.handle.to_s
|
302
|
+
runner.registerInfo("Applying #{lights_multiplier}x multiplier to #{light.name.get}.")
|
303
|
+
light.setMultiplier(lights_multiplier)
|
304
|
+
# update hash and change name
|
305
|
+
change_name(light, lights_multiplier)
|
306
|
+
altered_lights_objects << light.handle.to_s
|
307
|
+
else
|
308
|
+
runner.registerInfo("Skipping change to #{light.name.get}")
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
# modify luminaire
|
313
|
+
space_type.luminaires.each do |light|
|
314
|
+
# get and alter multiplier
|
315
|
+
if !altered_luminaires_objects.include? light.handle.to_s
|
316
|
+
runner.registerInfo("Applying #{luminaire_multiplier}x multiplier to #{light.name.get}.")
|
317
|
+
light.setMultiplier(luminaire_multiplier)
|
318
|
+
# update hash and change name
|
319
|
+
change_name(light, luminaire_multiplier)
|
320
|
+
altered_luminaires_objects << light.handle.to_s
|
321
|
+
else
|
322
|
+
runner.registerInfo("Skipping change to #{light.name.get}")
|
323
|
+
end
|
324
|
+
end
|
325
|
+
|
326
|
+
# modify electric equip
|
327
|
+
space_type.electricEquipment.each do |equip|
|
328
|
+
# get and alter multiplier
|
329
|
+
if !altered_electric_equip_objects.include? equip.handle.to_s
|
330
|
+
runner.registerInfo("Applying #{electric_equip_multiplier}x multiplier to #{equip.name.get}.")
|
331
|
+
equip.setMultiplier(electric_equip_multiplier)
|
332
|
+
# update hash and change name
|
333
|
+
change_name(equip, electric_equip_multiplier)
|
334
|
+
altered_electric_equip_objects << equip.handle.to_s
|
335
|
+
else
|
336
|
+
runner.registerInfo("Skipping change to #{equip.name.get}")
|
337
|
+
end
|
338
|
+
end
|
339
|
+
|
340
|
+
# modify gas equip
|
341
|
+
space_type.gasEquipment.each do |equip|
|
342
|
+
# get and alter multiplier
|
343
|
+
if !altered_gas_equip_objects.include? equip.handle.to_s
|
344
|
+
runner.registerInfo("Applying #{gas_equip_multiplier}x multiplier to #{equip.name.get}.")
|
345
|
+
equip.setMultiplier(gas_equip_multiplier)
|
346
|
+
# update hash and change name
|
347
|
+
change_name(equip, gas_equip_multiplier)
|
348
|
+
altered_gas_equip_objects << equip.handle.to_s
|
349
|
+
else
|
350
|
+
runner.registerInfo("Skipping change to #{equip.name.get}")
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
# modify other equip
|
355
|
+
space_type.otherEquipment.each do |equip|
|
356
|
+
# get and alter multiplier
|
357
|
+
if !altered_other_equip_objects.include? equip.handle.to_s
|
358
|
+
runner.registerInfo("Applying #{other_equip_multiplier}x multiplier to #{equip.name.get}.")
|
359
|
+
equip.setMultiplier(other_equip_multiplier)
|
360
|
+
# update hash and change name
|
361
|
+
change_name(equip, other_equip_multiplier)
|
362
|
+
altered_other_equip_objects << equip.handle.to_s
|
363
|
+
else
|
364
|
+
runner.registerInfo("Skipping change to #{equip.name.get}")
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
# modify occupancy
|
369
|
+
space_type.people.each do |peps|
|
370
|
+
# get and alter multiplier
|
371
|
+
if !altered_people_objects.include? peps.handle.to_s
|
372
|
+
runner.registerInfo("Applying #{occ_multiplier}x multiplier to #{peps.name.get}.")
|
373
|
+
peps.setMultiplier(occ_multiplier)
|
374
|
+
# update hash and change name
|
375
|
+
change_name(peps, occ_multiplier)
|
376
|
+
altered_people_objects << peps.handle.to_s
|
377
|
+
else
|
378
|
+
runner.registerInfo("Skipping change to #{peps.name.get}")
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
# modify infiltration
|
383
|
+
space_type.spaceInfiltrationDesignFlowRates.each do |infiltration|
|
384
|
+
if !altered_infiltration_objects.include? infiltration.handle.to_s
|
385
|
+
if infiltration.flowperExteriorSurfaceArea.is_initialized
|
386
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} FlowperExteriorSurfaceArea.")
|
387
|
+
infiltration.setFlowperExteriorSurfaceArea(infiltration.flowperExteriorSurfaceArea.get * infil_multiplier)
|
388
|
+
end
|
389
|
+
if infiltration.airChangesperHour.is_initialized
|
390
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} AirChangesperHour.")
|
391
|
+
infiltration.setAirChangesperHour(infiltration.airChangesperHour.get * infil_multiplier)
|
392
|
+
end
|
393
|
+
if infiltration.designFlowRate.is_initialized
|
394
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} designFlowRate.")
|
395
|
+
infiltration.setDesignFlowRate(infiltration.designFlowRate.get * infil_multiplier)
|
396
|
+
end
|
397
|
+
if infiltration.flowperSpaceFloorArea.is_initialized
|
398
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} flowperSpaceFloorArea.")
|
399
|
+
infiltration.setFlowperSpaceFloorArea(infiltration.flowperSpaceFloorArea.get * infil_multiplier)
|
400
|
+
end
|
401
|
+
if infiltration.flowperExteriorWallArea.is_initialized
|
402
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} flowperExteriorWallArea.")
|
403
|
+
infiltration.setFlowperExteriorWallArea(infiltration.flowperExteriorWallArea.get * infil_multiplier)
|
404
|
+
end
|
405
|
+
# add to hash and change name
|
406
|
+
change_name(infiltration, infil_multiplier)
|
407
|
+
altered_infiltration_objects << infiltration.handle.to_s
|
408
|
+
else
|
409
|
+
runner.registerInfo("Skipping change to #{infiltration.name.get}")
|
410
|
+
end
|
411
|
+
end
|
412
|
+
|
413
|
+
# modify outdoor air
|
414
|
+
if space_type.designSpecificationOutdoorAir.is_initialized
|
415
|
+
outdoor_air = space_type.designSpecificationOutdoorAir.get
|
416
|
+
# alter values if not already done
|
417
|
+
if !altered_outdoor_air_objects.include? outdoor_air.handle.to_s
|
418
|
+
runner.registerInfo("Applying #{vent_multiplier}x Multiplier to #{outdoor_air.name.get} OutdoorAirFlowperPerson.")
|
419
|
+
outdoor_air.setOutdoorAirFlowperPerson(outdoor_air.outdoorAirFlowperPerson * vent_multiplier)
|
420
|
+
runner.registerInfo("Applying #{vent_multiplier}x Multiplier to #{outdoor_air.name.get} OutdoorAirFlowperFloorArea.")
|
421
|
+
outdoor_air.setOutdoorAirFlowperFloorArea(outdoor_air.outdoorAirFlowperFloorArea * vent_multiplier)
|
422
|
+
runner.registerInfo("Applying #{vent_multiplier}x Multiplier to #{outdoor_air.name.get} OutdoorAirFlowAirChangesperHour.")
|
423
|
+
outdoor_air.setOutdoorAirFlowAirChangesperHour(outdoor_air.outdoorAirFlowAirChangesperHour * vent_multiplier)
|
424
|
+
runner.registerInfo("Applying #{vent_multiplier}x Multiplier to #{outdoor_air.name.get} OutdoorAirFlowRate.")
|
425
|
+
outdoor_air.setOutdoorAirFlowRate(outdoor_air.outdoorAirFlowRate * vent_multiplier)
|
426
|
+
# add to hash and change name
|
427
|
+
change_name(outdoor_air, vent_multiplier)
|
428
|
+
altered_outdoor_air_objects << outdoor_air.handle.to_s
|
429
|
+
else
|
430
|
+
runner.registerInfo("Skipping change to #{outdoor_air.name.get}")
|
431
|
+
end
|
432
|
+
end
|
433
|
+
|
434
|
+
# modify internal mass
|
435
|
+
space_type.internalMass.each do |internalmass|
|
436
|
+
# get and alter multiplier
|
437
|
+
if !altered_internalmass_objects.include? internalmass.handle.to_s
|
438
|
+
runner.registerInfo("Applying #{mass_multiplier}x multiplier to #{internalmass.name.get}.")
|
439
|
+
internalmass.setMultiplier(mass_multiplier)
|
440
|
+
# update hash and change name
|
441
|
+
change_name(internalmass, mass_multiplier)
|
442
|
+
altered_internalmass_objects << internalmass.handle.to_s
|
443
|
+
else
|
444
|
+
runner.registerInfo("Skipping change to #{internalmass.name.get}")
|
445
|
+
end
|
446
|
+
end
|
447
|
+
end # end space_type loop
|
448
|
+
|
449
|
+
runner.registerInfo("altered_lights_objects: #{altered_lights_objects}")
|
450
|
+
runner.registerInfo("altered_luminaires_objects: #{altered_luminaires_objects}")
|
451
|
+
runner.registerInfo("altered_electric_equip_objects: #{altered_electric_equip_objects}")
|
452
|
+
runner.registerInfo("altered_gas_equip_objects: #{altered_gas_equip_objects}")
|
453
|
+
runner.registerInfo("altered_other_equip_objects: #{altered_other_equip_objects}")
|
454
|
+
runner.registerInfo("altered_people_objects: #{altered_people_objects}")
|
455
|
+
runner.registerInfo("altered_infiltration_objects: #{altered_infiltration_objects}")
|
456
|
+
runner.registerInfo("altered_outdoor_air_objects: #{altered_outdoor_air_objects}")
|
457
|
+
runner.registerInfo("altered_internalmass_objects: #{altered_internalmass_objects}")
|
458
|
+
|
459
|
+
# report initial condition of model
|
460
|
+
runner.registerInfo("Applying Variable Multipliers to #{spaces.size} spaces.")
|
461
|
+
|
462
|
+
# loop through space types
|
463
|
+
spaces.each do |space|
|
464
|
+
# modify lights
|
465
|
+
space.lights.each do |light|
|
466
|
+
# get and alter multiplier
|
467
|
+
if !altered_lights_objects.include? light.handle.to_s
|
468
|
+
runner.registerInfo("Applying #{lights_multiplier}x multiplier to #{light.name.get}.")
|
469
|
+
light.setMultiplier(lights_multiplier)
|
470
|
+
# update hash and change name
|
471
|
+
change_name(light, lights_multiplier)
|
472
|
+
altered_lights_objects << light.handle.to_s
|
473
|
+
else
|
474
|
+
runner.registerInfo("Skipping change to #{light.name.get}")
|
475
|
+
end
|
476
|
+
end
|
477
|
+
|
478
|
+
# modify luminaire
|
479
|
+
space.luminaires.each do |light|
|
480
|
+
# get and alter multiplier
|
481
|
+
if !altered_luminaires_objects.include? light.handle.to_s
|
482
|
+
runner.registerInfo("Applying #{luminaire_multiplier}x multiplier to #{light.name.get}.")
|
483
|
+
light.setMultiplier(luminaire_multiplier)
|
484
|
+
# update hash and change name
|
485
|
+
change_name(light, luminaire_multiplier)
|
486
|
+
altered_luminaires_objects << light.handle.to_s
|
487
|
+
else
|
488
|
+
runner.registerInfo("Skipping change to #{light.name.get}")
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
# modify electric equip
|
493
|
+
space.electricEquipment.each do |equip|
|
494
|
+
# get and alter multiplier
|
495
|
+
if !altered_electric_equip_objects.include? equip.handle.to_s
|
496
|
+
runner.registerInfo("Applying #{electric_equip_multiplier}x multiplier to #{equip.name.get}.")
|
497
|
+
equip.setMultiplier(electric_equip_multiplier)
|
498
|
+
# update hash and change name
|
499
|
+
change_name(equip, electric_equip_multiplier)
|
500
|
+
altered_electric_equip_objects << equip.handle.to_s
|
501
|
+
else
|
502
|
+
runner.registerInfo("Skipping change to #{equip.name.get}")
|
503
|
+
end
|
504
|
+
end
|
505
|
+
|
506
|
+
# modify gas equip
|
507
|
+
space.gasEquipment.each do |equip|
|
508
|
+
# get and alter multiplier
|
509
|
+
if !altered_gas_equip_objects.include? equip.handle.to_s
|
510
|
+
runner.registerInfo("Applying #{gas_equip_multiplier}x multiplier to #{equip.name.get}.")
|
511
|
+
equip.setMultiplier(gas_equip_multiplier)
|
512
|
+
# update hash and change name
|
513
|
+
change_name(equip, gas_equip_multiplier)
|
514
|
+
altered_gas_equip_objects << equip.handle.to_s
|
515
|
+
else
|
516
|
+
runner.registerInfo("Skipping change to #{equip.name.get}")
|
517
|
+
end
|
518
|
+
end
|
519
|
+
|
520
|
+
# modify other equip
|
521
|
+
space.otherEquipment.each do |equip|
|
522
|
+
# get and alter multiplier
|
523
|
+
if !altered_other_equip_objects.include? equip.handle.to_s
|
524
|
+
runner.registerInfo("Applying #{other_equip_multiplier}x multiplier to #{equip.name.get}.")
|
525
|
+
equip.setMultiplier(other_equip_multiplier)
|
526
|
+
# update hash and change name
|
527
|
+
change_name(equip, other_equip_multiplier)
|
528
|
+
altered_other_equip_objects << equip.handle.to_s
|
529
|
+
else
|
530
|
+
runner.registerInfo("Skipping change to #{equip.name.get}")
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
534
|
+
# modify occupancy
|
535
|
+
space.people.each do |peps|
|
536
|
+
# get and alter multiplier
|
537
|
+
if !altered_people_objects.include? peps.handle.to_s
|
538
|
+
runner.registerInfo("Applying #{occ_multiplier}x multiplier to #{peps.name.get}.")
|
539
|
+
peps.setMultiplier(occ_multiplier)
|
540
|
+
# update hash and change name
|
541
|
+
change_name(peps, occ_multiplier)
|
542
|
+
altered_people_objects << peps.handle.to_s
|
543
|
+
else
|
544
|
+
runner.registerInfo("Skipping change to #{peps.name.get}")
|
545
|
+
end
|
546
|
+
end
|
547
|
+
|
548
|
+
# modify infiltration
|
549
|
+
space.spaceInfiltrationDesignFlowRates.each do |infiltration|
|
550
|
+
if !altered_infiltration_objects.include? infiltration.handle.to_s
|
551
|
+
if infiltration.flowperExteriorSurfaceArea.is_initialized
|
552
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} FlowperExteriorSurfaceArea.")
|
553
|
+
infiltration.setFlowperExteriorSurfaceArea(infiltration.flowperExteriorSurfaceArea.get * infil_multiplier)
|
554
|
+
end
|
555
|
+
if infiltration.airChangesperHour.is_initialized
|
556
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} AirChangesperHour.")
|
557
|
+
infiltration.setAirChangesperHour(infiltration.airChangesperHour.get * infil_multiplier)
|
558
|
+
end
|
559
|
+
if infiltration.designFlowRate.is_initialized
|
560
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} designFlowRate.")
|
561
|
+
infiltration.setDesignFlowRate(infiltration.designFlowRate.get * infil_multiplier)
|
562
|
+
end
|
563
|
+
if infiltration.flowperSpaceFloorArea.is_initialized
|
564
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} flowperSpaceFloorArea.")
|
565
|
+
infiltration.setFlowperSpaceFloorArea(infiltration.flowperSpaceFloorArea.get * infil_multiplier)
|
566
|
+
end
|
567
|
+
if infiltration.flowperExteriorWallArea.is_initialized
|
568
|
+
runner.registerInfo("Applying #{infil_multiplier}x Multiplier to #{infiltration.name.get} flowperExteriorWallArea.")
|
569
|
+
infiltration.setFlowperExteriorWallArea(infiltration.flowperExteriorWallArea.get * infil_multiplier)
|
570
|
+
end
|
571
|
+
# add to hash and change name
|
572
|
+
change_name(infiltration, infil_multiplier)
|
573
|
+
altered_infiltration_objects << infiltration.handle.to_s
|
574
|
+
else
|
575
|
+
runner.registerInfo("Skipping change to #{infiltration.name.get}")
|
576
|
+
end
|
577
|
+
end
|
578
|
+
|
579
|
+
# modify outdoor air
|
580
|
+
if space.designSpecificationOutdoorAir.is_initialized
|
581
|
+
outdoor_air = space.designSpecificationOutdoorAir.get
|
582
|
+
# alter values if not already done
|
583
|
+
if !altered_outdoor_air_objects.include? outdoor_air.handle.to_s
|
584
|
+
runner.registerInfo("Applying #{vent_multiplier}x Multiplier to #{outdoor_air.name.get} OutdoorAirFlowperPerson.")
|
585
|
+
outdoor_air.setOutdoorAirFlowperPerson(outdoor_air.outdoorAirFlowperPerson * vent_multiplier)
|
586
|
+
runner.registerInfo("Applying #{vent_multiplier}x Multiplier to #{outdoor_air.name.get} OutdoorAirFlowperFloorArea.")
|
587
|
+
outdoor_air.setOutdoorAirFlowperFloorArea(outdoor_air.outdoorAirFlowperFloorArea * vent_multiplier)
|
588
|
+
runner.registerInfo("Applying #{vent_multiplier}x Multiplier to #{outdoor_air.name.get} OutdoorAirFlowAirChangesperHour.")
|
589
|
+
outdoor_air.setOutdoorAirFlowAirChangesperHour(outdoor_air.outdoorAirFlowAirChangesperHour * vent_multiplier)
|
590
|
+
runner.registerInfo("Applying #{vent_multiplier}x Multiplier to #{outdoor_air.name.get} OutdoorAirFlowRate.")
|
591
|
+
outdoor_air.setOutdoorAirFlowRate(outdoor_air.outdoorAirFlowRate * vent_multiplier)
|
592
|
+
# add to hash and change name
|
593
|
+
change_name(outdoor_air, vent_multiplier)
|
594
|
+
altered_outdoor_air_objects << outdoor_air.handle.to_s
|
595
|
+
else
|
596
|
+
runner.registerInfo("Skipping change to #{outdoor_air.name.get}")
|
597
|
+
end
|
598
|
+
end
|
599
|
+
|
600
|
+
# modify internal mass
|
601
|
+
space.internalMass.each do |internalmass|
|
602
|
+
# get and alter multiplier
|
603
|
+
if !altered_internalmass_objects.include? internalmass.handle.to_s
|
604
|
+
runner.registerInfo("Applying #{mass_multiplier}x multiplier to #{internalmass.name.get}.")
|
605
|
+
internalmass.setMultiplier(mass_multiplier)
|
606
|
+
# update hash and change name
|
607
|
+
change_name(internalmass, mass_multiplier)
|
608
|
+
altered_internalmass_objects << internalmass.handle.to_s
|
609
|
+
else
|
610
|
+
runner.registerInfo("Skipping change to #{internalmass.name.get}")
|
611
|
+
end
|
612
|
+
end
|
613
|
+
end # end spaces loop
|
614
|
+
|
615
|
+
runner.registerInfo("altered_lights_objects: #{altered_lights_objects}")
|
616
|
+
runner.registerInfo("altered_luminaires_objects: #{altered_luminaires_objects}")
|
617
|
+
runner.registerInfo("altered_electric_equip_objects: #{altered_electric_equip_objects}")
|
618
|
+
runner.registerInfo("altered_gas_equip_objects: #{altered_gas_equip_objects}")
|
619
|
+
runner.registerInfo("altered_other_equip_objects: #{altered_other_equip_objects}")
|
620
|
+
runner.registerInfo("altered_people_objects: #{altered_people_objects}")
|
621
|
+
runner.registerInfo("altered_infiltration_objects: #{altered_infiltration_objects}")
|
622
|
+
runner.registerInfo("altered_outdoor_air_objects: #{altered_outdoor_air_objects}")
|
623
|
+
runner.registerInfo("altered_internalmass_objects: #{altered_internalmass_objects}")
|
624
|
+
|
625
|
+
# na if nothing in model to look at
|
626
|
+
if altered_lights_objects.size + altered_luminaires_objects.size + altered_electric_equip_objects.size + altered_gas_equip_objects.size + altered_other_equip_objects.size + altered_people_objects.size + altered_infiltration_objects.size + altered_outdoor_air_objects.size + altered_internalmass_objects.size == 0
|
627
|
+
runner.registerAsNotApplicable('No objects to alter were found in the model')
|
628
|
+
return true
|
629
|
+
end
|
630
|
+
|
631
|
+
# report final condition of model
|
632
|
+
runner.registerFinalCondition("#{altered_lights_objects.size} light objects were altered. #{altered_luminaires_objects.size} luminaire objects were altered. #{altered_electric_equip_objects.size} electric Equipment objects were altered. #{altered_gas_equip_objects.size} gas Equipment objects were altered. #{altered_other_equip_objects.size} otherEquipment objects were altered. #{altered_people_objects.size} people objects were altered. #{altered_infiltration_objects.size} infiltration objects were altered. #{altered_outdoor_air_objects.size} ventilation objects were altered. #{altered_internalmass_objects.size} internal mass objects were altered.")
|
633
|
+
|
634
|
+
true
|
635
|
+
end
|
636
|
+
end
|
637
|
+
|
638
|
+
# register the measure to be used by the application
|
639
|
+
GeneralCalibrationMeasureMultiplier.new.registerWithApplication
|