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,229 @@
|
|
1
|
+
<measure>
|
2
|
+
<schema_version>3.0</schema_version>
|
3
|
+
<name>general_calibration_measure_multiplier</name>
|
4
|
+
<uid>d622534e-a3c9-4ba5-b616-53dce2a18ac8</uid>
|
5
|
+
<version_id>1425fa83-08e1-4154-a7ee-27960c7c89ad</version_id>
|
6
|
+
<version_modified>20200325T030943Z</version_modified>
|
7
|
+
<xml_checksum>DEC0D835</xml_checksum>
|
8
|
+
<class_name>GeneralCalibrationMeasureMultiplier</class_name>
|
9
|
+
<display_name>General Calibration Measure Multiplier</display_name>
|
10
|
+
<description>This is a general purpose measure to calibrate space and space type elements with a Multiplier.</description>
|
11
|
+
<modeler_description>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.</modeler_description>
|
12
|
+
<arguments>
|
13
|
+
<argument>
|
14
|
+
<name>space_type</name>
|
15
|
+
<display_name>Apply the Measure to a SINGLE SpaceType, ALL the SpaceTypes or NONE.</display_name>
|
16
|
+
<type>Choice</type>
|
17
|
+
<required>true</required>
|
18
|
+
<model_dependent>false</model_dependent>
|
19
|
+
<default_value>*All SpaceTypes*</default_value>
|
20
|
+
<choices>
|
21
|
+
<choice>
|
22
|
+
<value>{91f0e603-1a49-4ba6-89e6-f693855eabef}</value>
|
23
|
+
<display_name>*All SpaceTypes*</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>space</name>
|
33
|
+
<display_name>Apply the Measure to a SINGLE Space, ALL the Spaces or NONE.</display_name>
|
34
|
+
<type>Choice</type>
|
35
|
+
<required>true</required>
|
36
|
+
<model_dependent>false</model_dependent>
|
37
|
+
<default_value>*All Spaces*</default_value>
|
38
|
+
<choices>
|
39
|
+
<choice>
|
40
|
+
<value>{91f0e603-1a49-4ba6-89e6-f693855eabef}</value>
|
41
|
+
<display_name>*All Spaces*</display_name>
|
42
|
+
</choice>
|
43
|
+
<choice>
|
44
|
+
<value>0</value>
|
45
|
+
<display_name>*None*</display_name>
|
46
|
+
</choice>
|
47
|
+
</choices>
|
48
|
+
</argument>
|
49
|
+
<argument>
|
50
|
+
<name>Lights_multiplier</name>
|
51
|
+
<display_name>Multiplier for Lights.</display_name>
|
52
|
+
<description>Multiplier for Lights.</description>
|
53
|
+
<type>Double</type>
|
54
|
+
<required>true</required>
|
55
|
+
<model_dependent>false</model_dependent>
|
56
|
+
<default_value>1</default_value>
|
57
|
+
</argument>
|
58
|
+
<argument>
|
59
|
+
<name>Luminaire_multiplier</name>
|
60
|
+
<display_name>Multiplier for Luminaire.</display_name>
|
61
|
+
<description>Multiplier for Luminaire.</description>
|
62
|
+
<type>Double</type>
|
63
|
+
<required>true</required>
|
64
|
+
<model_dependent>false</model_dependent>
|
65
|
+
<default_value>1</default_value>
|
66
|
+
</argument>
|
67
|
+
<argument>
|
68
|
+
<name>ElectricEquipment_multiplier</name>
|
69
|
+
<display_name>Multiplier for Electric Equipment.</display_name>
|
70
|
+
<description>Multiplier for Electric Equipment.</description>
|
71
|
+
<type>Double</type>
|
72
|
+
<required>true</required>
|
73
|
+
<model_dependent>false</model_dependent>
|
74
|
+
<default_value>1</default_value>
|
75
|
+
</argument>
|
76
|
+
<argument>
|
77
|
+
<name>GasEquipment_multiplier</name>
|
78
|
+
<display_name>Multiplier for Gas Equipment.</display_name>
|
79
|
+
<description>Multiplier for Gas Equipment.</description>
|
80
|
+
<type>Double</type>
|
81
|
+
<required>true</required>
|
82
|
+
<model_dependent>false</model_dependent>
|
83
|
+
<default_value>1</default_value>
|
84
|
+
</argument>
|
85
|
+
<argument>
|
86
|
+
<name>OtherEquipment_multiplier</name>
|
87
|
+
<display_name>Multiplier for OtherEquipment.</display_name>
|
88
|
+
<description>Multiplier for OtherEquipment.</description>
|
89
|
+
<type>Double</type>
|
90
|
+
<required>true</required>
|
91
|
+
<model_dependent>false</model_dependent>
|
92
|
+
<default_value>1</default_value>
|
93
|
+
</argument>
|
94
|
+
<argument>
|
95
|
+
<name>People_multiplier</name>
|
96
|
+
<display_name>Multiplier for number of people.</display_name>
|
97
|
+
<description>Multiplier for number of people.</description>
|
98
|
+
<type>Double</type>
|
99
|
+
<required>true</required>
|
100
|
+
<model_dependent>false</model_dependent>
|
101
|
+
<default_value>1</default_value>
|
102
|
+
</argument>
|
103
|
+
<argument>
|
104
|
+
<name>InternalMass_multiplier</name>
|
105
|
+
<display_name>Multiplier for Internal Mass.</display_name>
|
106
|
+
<description>Multiplier for Internal Mass.</description>
|
107
|
+
<type>Double</type>
|
108
|
+
<required>true</required>
|
109
|
+
<model_dependent>false</model_dependent>
|
110
|
+
<default_value>1</default_value>
|
111
|
+
</argument>
|
112
|
+
<argument>
|
113
|
+
<name>Infiltration_multiplier</name>
|
114
|
+
<display_name>Multiplier for infiltration.</display_name>
|
115
|
+
<description>Multiplier for infiltration.</description>
|
116
|
+
<type>Double</type>
|
117
|
+
<required>true</required>
|
118
|
+
<model_dependent>false</model_dependent>
|
119
|
+
<default_value>1</default_value>
|
120
|
+
</argument>
|
121
|
+
<argument>
|
122
|
+
<name>Ventilation_multiplier</name>
|
123
|
+
<display_name>Multiplier for Ventilation.</display_name>
|
124
|
+
<description>Multiplier for Ventilation.</description>
|
125
|
+
<type>Double</type>
|
126
|
+
<required>true</required>
|
127
|
+
<model_dependent>false</model_dependent>
|
128
|
+
<default_value>1</default_value>
|
129
|
+
</argument>
|
130
|
+
</arguments>
|
131
|
+
<outputs/>
|
132
|
+
<provenances/>
|
133
|
+
<tags>
|
134
|
+
<tag>Whole Building.Space Types</tag>
|
135
|
+
</tags>
|
136
|
+
<attributes>
|
137
|
+
<attribute>
|
138
|
+
<name>Intended Software Tool</name>
|
139
|
+
<value>Analysis Spreadsheet</value>
|
140
|
+
<datatype>string</datatype>
|
141
|
+
</attribute>
|
142
|
+
<attribute>
|
143
|
+
<name>Intended Use Case</name>
|
144
|
+
<value>Model Articulation</value>
|
145
|
+
<datatype>string</datatype>
|
146
|
+
</attribute>
|
147
|
+
<attribute>
|
148
|
+
<name>Intended Use Case</name>
|
149
|
+
<value>Calibration</value>
|
150
|
+
<datatype>string</datatype>
|
151
|
+
</attribute>
|
152
|
+
<attribute>
|
153
|
+
<name>Intended Use Case</name>
|
154
|
+
<value>Sensitivity Analysis</value>
|
155
|
+
<datatype>string</datatype>
|
156
|
+
</attribute>
|
157
|
+
<attribute>
|
158
|
+
<name>Measure Type</name>
|
159
|
+
<value>ModelMeasure</value>
|
160
|
+
<datatype>string</datatype>
|
161
|
+
</attribute>
|
162
|
+
<attribute>
|
163
|
+
<name>Intended Software Tool</name>
|
164
|
+
<value>Apply Measure Now</value>
|
165
|
+
<datatype>string</datatype>
|
166
|
+
</attribute>
|
167
|
+
<attribute>
|
168
|
+
<name>Intended Software Tool</name>
|
169
|
+
<value>OpenStudio Application</value>
|
170
|
+
<datatype>string</datatype>
|
171
|
+
</attribute>
|
172
|
+
<attribute>
|
173
|
+
<name>Intended Software Tool</name>
|
174
|
+
<value>Parametric Analysis Tool</value>
|
175
|
+
<datatype>string</datatype>
|
176
|
+
</attribute>
|
177
|
+
<attribute>
|
178
|
+
<name>Intended Software Tool</name>
|
179
|
+
<value>Analysis Spreadsheet</value>
|
180
|
+
<datatype>string</datatype>
|
181
|
+
</attribute>
|
182
|
+
<attribute>
|
183
|
+
<name>Intended Use Case</name>
|
184
|
+
<value>Model Articulation</value>
|
185
|
+
<datatype>string</datatype>
|
186
|
+
</attribute>
|
187
|
+
<attribute>
|
188
|
+
<name>Intended Use Case</name>
|
189
|
+
<value>Calibration</value>
|
190
|
+
<datatype>string</datatype>
|
191
|
+
</attribute>
|
192
|
+
<attribute>
|
193
|
+
<name>Intended Use Case</name>
|
194
|
+
<value>Sensitivity Analysis</value>
|
195
|
+
<datatype>string</datatype>
|
196
|
+
</attribute>
|
197
|
+
</attributes>
|
198
|
+
<files>
|
199
|
+
<file>
|
200
|
+
<filename>LICENSE.md</filename>
|
201
|
+
<filetype>md</filetype>
|
202
|
+
<usage_type>license</usage_type>
|
203
|
+
<checksum>E0468DD6</checksum>
|
204
|
+
</file>
|
205
|
+
<file>
|
206
|
+
<filename>README.md.erb</filename>
|
207
|
+
<filetype>erb</filetype>
|
208
|
+
<usage_type>readmeerb</usage_type>
|
209
|
+
<checksum>703C9964</checksum>
|
210
|
+
</file>
|
211
|
+
<file>
|
212
|
+
<filename>README.md</filename>
|
213
|
+
<filetype>md</filetype>
|
214
|
+
<usage_type>readme</usage_type>
|
215
|
+
<checksum>E3E6128D</checksum>
|
216
|
+
</file>
|
217
|
+
<file>
|
218
|
+
<version>
|
219
|
+
<software_program>OpenStudio</software_program>
|
220
|
+
<identifier>2.1.0</identifier>
|
221
|
+
<min_compatible>2.1.0</min_compatible>
|
222
|
+
</version>
|
223
|
+
<filename>measure.rb</filename>
|
224
|
+
<filetype>rb</filetype>
|
225
|
+
<usage_type>script</usage_type>
|
226
|
+
<checksum>0B6B9749</checksum>
|
227
|
+
</file>
|
228
|
+
</files>
|
229
|
+
</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 Percent Change
|
6
|
+
|
7
|
+
## Description
|
8
|
+
This is a general purpose measure to calibrate space and space type elements with a percent change.
|
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
|
+
### Percent Change in the default Lights Definition.
|
39
|
+
Percent Change in the default Lights Definition.
|
40
|
+
**Name:** lights_perc_change,
|
41
|
+
**Type:** Double,
|
42
|
+
**Units:** ,
|
43
|
+
**Required:** true,
|
44
|
+
**Model Dependent:** false
|
45
|
+
|
46
|
+
### Percent Change in the default Luminaire Definition.
|
47
|
+
Percent Change in the default Luminaire Definition.
|
48
|
+
**Name:** luminaire_perc_change,
|
49
|
+
**Type:** Double,
|
50
|
+
**Units:** ,
|
51
|
+
**Required:** true,
|
52
|
+
**Model Dependent:** false
|
53
|
+
|
54
|
+
### Percent Change in the default Electric Equipment Definition.
|
55
|
+
Percent Change in the default Electric Equipment Definition.
|
56
|
+
**Name:** ElectricEquipment_perc_change,
|
57
|
+
**Type:** Double,
|
58
|
+
**Units:** ,
|
59
|
+
**Required:** true,
|
60
|
+
**Model Dependent:** false
|
61
|
+
|
62
|
+
### Percent Change in the default Gas Equipment Definition.
|
63
|
+
Percent Change in the default Gas Equipment Definition.
|
64
|
+
**Name:** GasEquipment_perc_change,
|
65
|
+
**Type:** Double,
|
66
|
+
**Units:** ,
|
67
|
+
**Required:** true,
|
68
|
+
**Model Dependent:** false
|
69
|
+
|
70
|
+
### Percent Change in the default OtherEquipment Definition.
|
71
|
+
Percent Change in the default OtherEquipment Definition.
|
72
|
+
**Name:** OtherEquipment_perc_change,
|
73
|
+
**Type:** Double,
|
74
|
+
**Units:** ,
|
75
|
+
**Required:** true,
|
76
|
+
**Model Dependent:** false
|
77
|
+
|
78
|
+
### Percent Change in the default People Definition.
|
79
|
+
Percent Change in the default People Definition.
|
80
|
+
**Name:** people_perc_change,
|
81
|
+
**Type:** Double,
|
82
|
+
**Units:** ,
|
83
|
+
**Required:** true,
|
84
|
+
**Model Dependent:** false
|
85
|
+
|
86
|
+
### Percent Change in the default Internal Mass Definition.
|
87
|
+
Percent Change in the default Internal Mass Definition.
|
88
|
+
**Name:** mass_perc_change,
|
89
|
+
**Type:** Double,
|
90
|
+
**Units:** ,
|
91
|
+
**Required:** true,
|
92
|
+
**Model Dependent:** false
|
93
|
+
|
94
|
+
### Percent Change in the default Design Infiltration Outdoor Air.
|
95
|
+
Percent Change in the default Design Infiltration Outdoor Air.
|
96
|
+
**Name:** infil_perc_change,
|
97
|
+
**Type:** Double,
|
98
|
+
**Units:** ,
|
99
|
+
**Required:** true,
|
100
|
+
**Model Dependent:** false
|
101
|
+
|
102
|
+
### Percent Change in the default Design Specification Outdoor Air.
|
103
|
+
Percent Change in the default Design Specification Outdoor Air.
|
104
|
+
**Name:** vent_perc_change,
|
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,756 @@
|
|
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 GeneralCalibrationMeasurePercentChange < OpenStudio::Measure::ModelMeasure
|
38
|
+
# human readable name
|
39
|
+
def name
|
40
|
+
'General Calibration Measure Percent Change'
|
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 percent change.'
|
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, perc_change)
|
54
|
+
if perc_change != 0
|
55
|
+
object.setName("#{object.name.get} (#{perc_change.round(2)} percent change)")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# define the arguments that the user will input
|
60
|
+
def arguments(model)
|
61
|
+
args = OpenStudio::Measure::OSArgumentVector.new
|
62
|
+
|
63
|
+
# make a choice argument for model objects
|
64
|
+
space_type_handles = OpenStudio::StringVector.new
|
65
|
+
space_type_display_names = OpenStudio::StringVector.new
|
66
|
+
|
67
|
+
# putting model object and names into hash
|
68
|
+
space_type_args = model.getSpaceTypes
|
69
|
+
space_type_args_hash = {}
|
70
|
+
space_type_args.each do |space_type_arg|
|
71
|
+
space_type_args_hash[space_type_arg.name.to_s] = space_type_arg
|
72
|
+
end
|
73
|
+
|
74
|
+
# looping through sorted hash of model objects
|
75
|
+
space_type_args_hash.sort.map do |key, value|
|
76
|
+
# only include if space type is used in the model
|
77
|
+
unless value.spaces.empty?
|
78
|
+
space_type_handles << value.handle.to_s
|
79
|
+
space_type_display_names << key
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# add building to string vector with space type
|
84
|
+
building = model.getBuilding
|
85
|
+
space_type_handles << building.handle.to_s
|
86
|
+
space_type_display_names << '*All SpaceTypes*'
|
87
|
+
space_type_handles << '0'
|
88
|
+
space_type_display_names << '*None*'
|
89
|
+
|
90
|
+
# make a choice argument for space type
|
91
|
+
space_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('space_type', space_type_handles, space_type_display_names)
|
92
|
+
space_type.setDisplayName('Apply the Measure to a SINGLE SpaceType, ALL the SpaceTypes or NONE.')
|
93
|
+
space_type.setDefaultValue('*All SpaceTypes*') # if no space type is chosen this will run on the entire building
|
94
|
+
args << space_type
|
95
|
+
|
96
|
+
# make a choice argument for model objects
|
97
|
+
space_handles = OpenStudio::StringVector.new
|
98
|
+
space_display_names = OpenStudio::StringVector.new
|
99
|
+
|
100
|
+
# putting model object and names into hash
|
101
|
+
space_args = model.getSpaces
|
102
|
+
space_args_hash = {}
|
103
|
+
space_args.each do |space_arg|
|
104
|
+
space_args_hash[space_arg.name.to_s] = space_arg
|
105
|
+
end
|
106
|
+
|
107
|
+
# looping through sorted hash of model objects
|
108
|
+
space_args_hash.sort.map do |key, value|
|
109
|
+
space_handles << value.handle.to_s
|
110
|
+
space_display_names << key
|
111
|
+
end
|
112
|
+
|
113
|
+
# add building to string vector with spaces
|
114
|
+
building = model.getBuilding
|
115
|
+
space_handles << building.handle.to_s
|
116
|
+
space_display_names << '*All Spaces*'
|
117
|
+
space_handles << '0'
|
118
|
+
space_display_names << '*None*'
|
119
|
+
|
120
|
+
# make a choice argument for space type
|
121
|
+
space = OpenStudio::Measure::OSArgument.makeChoiceArgument('space', space_handles, space_display_names)
|
122
|
+
space.setDisplayName('Apply the Measure to a SINGLE Space, ALL the Spaces or NONE.')
|
123
|
+
space.setDefaultValue('*All Spaces*') # if no space type is chosen this will run on the entire building
|
124
|
+
args << space
|
125
|
+
|
126
|
+
# Lights multiplier
|
127
|
+
lights_perc_change = OpenStudio::Measure::OSArgument.makeDoubleArgument('lights_perc_change', true)
|
128
|
+
lights_perc_change.setDisplayName('Percent Change in the default Lights Definition.')
|
129
|
+
lights_perc_change.setDescription('Percent Change in the default Lights Definition.')
|
130
|
+
lights_perc_change.setDefaultValue(0.0)
|
131
|
+
args << lights_perc_change
|
132
|
+
|
133
|
+
# Luminaire multiplier
|
134
|
+
luminaire_perc_change = OpenStudio::Measure::OSArgument.makeDoubleArgument('luminaire_perc_change', true)
|
135
|
+
luminaire_perc_change.setDisplayName('Percent Change in the default Luminaire Definition.')
|
136
|
+
luminaire_perc_change.setDescription('Percent Change in the default Luminaire Definition.')
|
137
|
+
luminaire_perc_change.setDefaultValue(0.0)
|
138
|
+
args << luminaire_perc_change
|
139
|
+
|
140
|
+
# Electric Equipment multiplier
|
141
|
+
electric_equip_perc_change = OpenStudio::Measure::OSArgument.makeDoubleArgument('ElectricEquipment_perc_change', true)
|
142
|
+
electric_equip_perc_change.setDisplayName('Percent Change in the default Electric Equipment Definition.')
|
143
|
+
electric_equip_perc_change.setDescription('Percent Change in the default Electric Equipment Definition.')
|
144
|
+
electric_equip_perc_change.setDefaultValue(0.0)
|
145
|
+
args << electric_equip_perc_change
|
146
|
+
|
147
|
+
# Gas Equipment multiplier
|
148
|
+
gas_equip_perc_change = OpenStudio::Measure::OSArgument.makeDoubleArgument('GasEquipment_perc_change', true)
|
149
|
+
gas_equip_perc_change.setDisplayName('Percent Change in the default Gas Equipment Definition.')
|
150
|
+
gas_equip_perc_change.setDescription('Percent Change in the default Gas Equipment Definition.')
|
151
|
+
gas_equip_perc_change.setDefaultValue(0.0)
|
152
|
+
args << gas_equip_perc_change
|
153
|
+
|
154
|
+
# OtherEquipment multiplier
|
155
|
+
other_equip_perc_change = OpenStudio::Measure::OSArgument.makeDoubleArgument('OtherEquipment_perc_change', true)
|
156
|
+
other_equip_perc_change.setDisplayName('Percent Change in the default OtherEquipment Definition.')
|
157
|
+
other_equip_perc_change.setDescription('Percent Change in the default OtherEquipment Definition.')
|
158
|
+
other_equip_perc_change.setDefaultValue(0.0)
|
159
|
+
args << other_equip_perc_change
|
160
|
+
|
161
|
+
# occupancy % change
|
162
|
+
people_perc_change = OpenStudio::Measure::OSArgument.makeDoubleArgument('people_perc_change', true)
|
163
|
+
people_perc_change.setDisplayName('Percent Change in the default People Definition.')
|
164
|
+
people_perc_change.setDescription('Percent Change in the default People Definition.')
|
165
|
+
people_perc_change.setDefaultValue(0.0)
|
166
|
+
args << people_perc_change
|
167
|
+
|
168
|
+
# internalMass % change
|
169
|
+
mass_perc_change = OpenStudio::Measure::OSArgument.makeDoubleArgument('mass_perc_change', true)
|
170
|
+
mass_perc_change.setDisplayName('Percent Change in the default Internal Mass Definition.')
|
171
|
+
mass_perc_change.setDescription('Percent Change in the default Internal Mass Definition.')
|
172
|
+
mass_perc_change.setDefaultValue(0.0)
|
173
|
+
args << mass_perc_change
|
174
|
+
|
175
|
+
# infiltration % change
|
176
|
+
infil_perc_change = OpenStudio::Measure::OSArgument.makeDoubleArgument('infil_perc_change', true)
|
177
|
+
infil_perc_change.setDisplayName('Percent Change in the default Design Infiltration Outdoor Air.')
|
178
|
+
infil_perc_change.setDescription('Percent Change in the default Design Infiltration Outdoor Air.')
|
179
|
+
infil_perc_change.setDefaultValue(0.0)
|
180
|
+
args << infil_perc_change
|
181
|
+
|
182
|
+
# ventilation % change
|
183
|
+
vent_perc_change = OpenStudio::Measure::OSArgument.makeDoubleArgument('vent_perc_change', true)
|
184
|
+
vent_perc_change.setDisplayName('Percent Change in the default Design Specification Outdoor Air.')
|
185
|
+
vent_perc_change.setDescription('Percent Change in the default Design Specification Outdoor Air.')
|
186
|
+
vent_perc_change.setDefaultValue(0.0)
|
187
|
+
args << vent_perc_change
|
188
|
+
|
189
|
+
args
|
190
|
+
end
|
191
|
+
|
192
|
+
# define what happens when the measure is run
|
193
|
+
def run(model, runner, user_arguments)
|
194
|
+
super(model, runner, user_arguments)
|
195
|
+
|
196
|
+
# use the built-in error checking
|
197
|
+
unless runner.validateUserArguments(arguments(model), user_arguments)
|
198
|
+
return false
|
199
|
+
end
|
200
|
+
|
201
|
+
# assign the user inputs to variables
|
202
|
+
space_type_object = runner.getOptionalWorkspaceObjectChoiceValue('space_type', user_arguments, model)
|
203
|
+
space_type_handle = runner.getStringArgumentValue('space_type', user_arguments)
|
204
|
+
space_object = runner.getOptionalWorkspaceObjectChoiceValue('space', user_arguments, model)
|
205
|
+
space_handle = runner.getStringArgumentValue('space', user_arguments)
|
206
|
+
people_perc_change = runner.getDoubleArgumentValue('people_perc_change', user_arguments)
|
207
|
+
infil_perc_change = runner.getDoubleArgumentValue('infil_perc_change', user_arguments)
|
208
|
+
vent_perc_change = runner.getDoubleArgumentValue('vent_perc_change', user_arguments)
|
209
|
+
mass_perc_change = runner.getDoubleArgumentValue('mass_perc_change', user_arguments)
|
210
|
+
electric_equip_perc_change = runner.getDoubleArgumentValue('ElectricEquipment_perc_change', user_arguments)
|
211
|
+
gas_equip_perc_change = runner.getDoubleArgumentValue('GasEquipment_perc_change', user_arguments)
|
212
|
+
other_equip_perc_change = runner.getDoubleArgumentValue('OtherEquipment_perc_change', user_arguments)
|
213
|
+
lights_perc_change = runner.getDoubleArgumentValue('lights_perc_change', user_arguments)
|
214
|
+
luminaire_perc_change = runner.getDoubleArgumentValue('luminaire_perc_change', user_arguments)
|
215
|
+
|
216
|
+
# find objects to change
|
217
|
+
space_types = []
|
218
|
+
spaces = []
|
219
|
+
building = model.getBuilding
|
220
|
+
building_handle = building.handle.to_s
|
221
|
+
runner.registerInfo("space_type_handle: #{space_type_handle}")
|
222
|
+
runner.registerInfo("space_handle: #{space_handle}")
|
223
|
+
# setup space_types
|
224
|
+
if space_type_handle == building_handle
|
225
|
+
# Use ALL SpaceTypes
|
226
|
+
runner.registerInfo('Applying change to ALL SpaceTypes')
|
227
|
+
space_types = model.getSpaceTypes
|
228
|
+
elsif space_type_handle == 0.to_s
|
229
|
+
# SpaceTypes set to NONE so do nothing
|
230
|
+
runner.registerInfo('Applying change to NONE SpaceTypes')
|
231
|
+
elsif !space_type_handle.empty?
|
232
|
+
# Single SpaceType handle found, check if object is good
|
233
|
+
if !space_type_object.get.to_SpaceType.empty?
|
234
|
+
runner.registerInfo("Applying change to #{space_type_object.get.name} SpaceType")
|
235
|
+
space_types << space_type_object.get.to_SpaceType.get
|
236
|
+
else
|
237
|
+
runner.registerError("SpaceType with handle #{space_type_handle} could not be found.")
|
238
|
+
end
|
239
|
+
else
|
240
|
+
runner.registerError('SpaceType handle is empty.')
|
241
|
+
return false
|
242
|
+
end
|
243
|
+
|
244
|
+
# setup spaces
|
245
|
+
if space_handle == building_handle
|
246
|
+
# Use ALL Spaces
|
247
|
+
runner.registerInfo('Applying change to ALL Spaces')
|
248
|
+
spaces = model.getSpaces
|
249
|
+
elsif space_handle == 0.to_s
|
250
|
+
# Spaces set to NONE so do nothing
|
251
|
+
runner.registerInfo('Applying change to NONE Spaces')
|
252
|
+
elsif !space_handle.empty?
|
253
|
+
# Single Space handle found, check if object is good
|
254
|
+
if !space_object.get.to_Space.empty?
|
255
|
+
runner.registerInfo("Applying change to #{space_object.get.name} Space")
|
256
|
+
spaces << space_object.get.to_Space.get
|
257
|
+
else
|
258
|
+
runner.registerError("Space with handle #{space_handle} could not be found.")
|
259
|
+
end
|
260
|
+
else
|
261
|
+
runner.registerError('Space handle is empty.')
|
262
|
+
return false
|
263
|
+
end
|
264
|
+
|
265
|
+
altered_people_definitions = []
|
266
|
+
altered_infiltration_objects = []
|
267
|
+
altered_outdoor_air_objects = []
|
268
|
+
altered_internalmass_definitions = []
|
269
|
+
altered_lights_definitions = []
|
270
|
+
altered_luminaires_definitions = []
|
271
|
+
altered_electric_equip_definitions = []
|
272
|
+
altered_gas_equip_definitions = []
|
273
|
+
altered_other_equip_definitions = []
|
274
|
+
|
275
|
+
# report initial condition of model
|
276
|
+
runner.registerInitialCondition("Applying Variable % Changes to #{space_types.size} space types and #{spaces.size} spaces.")
|
277
|
+
runner.registerInfo("Applying Variable % Changes to #{space_types.size} space types.")
|
278
|
+
|
279
|
+
# loop through space types
|
280
|
+
space_types.each do |space_type|
|
281
|
+
# modify lights
|
282
|
+
space_type.lights.each do |light|
|
283
|
+
equip_def = light.lightsDefinition
|
284
|
+
# get and alter multiplier
|
285
|
+
if !altered_lights_definitions.include? equip_def.handle.to_s
|
286
|
+
if equip_def.lightingLevel.is_initialized
|
287
|
+
runner.registerInfo("Applying #{lights_perc_change} % Change to #{equip_def.name.get} LightingLevel.")
|
288
|
+
equip_def.setLightingLevel(equip_def.lightingLevel.get + equip_def.lightingLevel.get * lights_perc_change * 0.01)
|
289
|
+
end
|
290
|
+
if equip_def.wattsperSpaceFloorArea.is_initialized
|
291
|
+
runner.registerInfo("Applying #{lights_perc_change} % Change to #{equip_def.name.get} wattsperSpaceFloorArea.")
|
292
|
+
equip_def.setWattsperSpaceFloorArea(equip_def.wattsperSpaceFloorArea.get + equip_def.wattsperSpaceFloorArea.get * lights_perc_change * 0.01)
|
293
|
+
end
|
294
|
+
if equip_def.wattsperPerson.is_initialized
|
295
|
+
runner.registerInfo("Applying #{lights_perc_change} % Change to #{equip_def.name.get} wattsperPerson.")
|
296
|
+
equip_def.setWattsperPerson(equip_def.wattsperPerson.get + equip_def.wattsperPerson.get * lights_perc_change * 0.01)
|
297
|
+
end
|
298
|
+
# update hash and change name
|
299
|
+
change_name(equip_def, lights_perc_change)
|
300
|
+
altered_lights_definitions << equip_def.handle.to_s
|
301
|
+
else
|
302
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
# modify luminaire
|
307
|
+
space_type.luminaires.each do |light|
|
308
|
+
equip_def = light.luminaireDefinition
|
309
|
+
# get and alter multiplier
|
310
|
+
if !altered_luminaires_definitions.include? equip_def.handle.to_s
|
311
|
+
runner.registerInfo("Applying #{luminaire_perc_change} % Change to #{equip_def.name.get} LightingPower.")
|
312
|
+
equip_def.setLightingPower(equip_def.lightingPower + equip_def.lightingPower * luminaire_perc_change * 0.01)
|
313
|
+
# update hash and change name
|
314
|
+
change_name(equip_def, luminaire_perc_change)
|
315
|
+
altered_luminaires_definitions << equip_def.handle.to_s
|
316
|
+
else
|
317
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
# modify electric equip
|
322
|
+
space_type.electricEquipment.each do |equip|
|
323
|
+
# get and alter definition
|
324
|
+
equip_def = equip.electricEquipmentDefinition
|
325
|
+
if !altered_electric_equip_definitions.include? equip_def.handle.to_s
|
326
|
+
if equip_def.designLevel.is_initialized
|
327
|
+
runner.registerInfo("Applying #{electric_equip_perc_change} % Change to #{equip_def.name.get} DesignLevel.")
|
328
|
+
equip_def.setDesignLevel(equip_def.designLevel.get + equip_def.designLevel.get * electric_equip_perc_change * 0.01)
|
329
|
+
end
|
330
|
+
if equip_def.wattsperSpaceFloorArea.is_initialized
|
331
|
+
runner.registerInfo("Applying #{electric_equip_perc_change} % Change to #{equip_def.name.get} wattsperSpaceFloorArea.")
|
332
|
+
equip_def.setWattsperSpaceFloorArea(equip_def.wattsperSpaceFloorArea.get + equip_def.wattsperSpaceFloorArea.get * electric_equip_perc_change * 0.01)
|
333
|
+
end
|
334
|
+
if equip_def.wattsperPerson.is_initialized
|
335
|
+
runner.registerInfo("Applying #{electric_equip_perc_change} % Change to #{equip_def.name.get} wattsperPerson.")
|
336
|
+
equip_def.setWattsperPerson(equip_def.wattsperPerson.get + equip_def.wattsperPerson.get * electric_equip_perc_change * 0.01)
|
337
|
+
end
|
338
|
+
# update hash and change name
|
339
|
+
change_name(equip_def, electric_equip_perc_change)
|
340
|
+
altered_electric_equip_definitions << equip_def.handle.to_s
|
341
|
+
else
|
342
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
343
|
+
end
|
344
|
+
end
|
345
|
+
|
346
|
+
# modify gas equip
|
347
|
+
space_type.gasEquipment.each do |equip|
|
348
|
+
# get and alter definition
|
349
|
+
equip_def = equip.gasEquipmentDefinition
|
350
|
+
if !altered_gas_equip_definitions.include? equip_def.handle.to_s
|
351
|
+
if equip_def.designLevel.is_initialized
|
352
|
+
runner.registerInfo("Applying #{gas_equip_perc_change} % Change to #{equip_def.name.get} designlevel.")
|
353
|
+
equip_def.setDesignLevel(equip_def.designLevel.get + equip_def.designLevel.get * gas_equip_perc_change * 0.01)
|
354
|
+
end
|
355
|
+
if equip_def.wattsperSpaceFloorArea.is_initialized
|
356
|
+
runner.registerInfo("Applying #{gas_equip_perc_change} % Change to #{equip_def.name.get} WattsperSpaceFloorArea.")
|
357
|
+
equip_def.setWattsperSpaceFloorArea(equip_def.wattsperSpaceFloorArea.get + equip_def.wattsperSpaceFloorArea.get * gas_equip_perc_change * 0.01)
|
358
|
+
end
|
359
|
+
if equip_def.wattsperPerson.is_initialized
|
360
|
+
runner.registerInfo("Applying #{gas_equip_perc_change} % Change to #{equip_def.name.get} WattsperPerson.")
|
361
|
+
equip_def.setWattsperPerson(equip_def.wattsperPerson.get + equip_def.wattsperPerson.get * gas_equip_perc_change * 0.01)
|
362
|
+
end
|
363
|
+
# update hash and change name
|
364
|
+
change_name(equip_def, gas_equip_perc_change)
|
365
|
+
altered_gas_equip_definitions << equip_def.handle.to_s
|
366
|
+
else
|
367
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
# modify other equip
|
372
|
+
space_type.otherEquipment.each do |equip|
|
373
|
+
# get and alter definition
|
374
|
+
equip_def = equip.otherEquipmentDefinition
|
375
|
+
if !altered_other_equip_definitions.include? equip_def.handle.to_s
|
376
|
+
if equip_def.designLevel.is_initialized
|
377
|
+
runner.registerInfo("Applying #{other_equip_perc_change} % Change to #{equip_def.name.get} designLevel.")
|
378
|
+
equip_def.setDesignLevel(equip_def.designLevel.get + equip_def.designLevel.get * other_equip_perc_change * 0.01)
|
379
|
+
end
|
380
|
+
if equip_def.wattsperSpaceFloorArea.is_initialized
|
381
|
+
runner.registerInfo("Applying #{other_equip_perc_change} % Change to #{equip_def.name.get} wattsperSpaceFloorArea.")
|
382
|
+
equip_def.setWattsperSpaceFloorArea(equip_def.wattsperSpaceFloorArea.get + equip_def.wattsperSpaceFloorArea.get * other_equip_perc_change * 0.01)
|
383
|
+
end
|
384
|
+
if equip_def.wattsperPerson.is_initialized
|
385
|
+
runner.registerInfo("Applying #{other_equip_perc_change} % Change to #{equip_def.name.get} wattsperPerson.")
|
386
|
+
equip_def.setWattsperPerson(equip_def.wattsperPerson.get + equip_def.wattsperPerson.get * other_equip_perc_change * 0.01)
|
387
|
+
end
|
388
|
+
# update hash and change name
|
389
|
+
change_name(equip_def, other_equip_perc_change)
|
390
|
+
altered_other_equip_definitions << equip_def.handle.to_s
|
391
|
+
else
|
392
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
# modify occupancy
|
397
|
+
space_type.people.each do |people_inst|
|
398
|
+
# get and alter definition
|
399
|
+
people_def = people_inst.peopleDefinition
|
400
|
+
if !altered_people_definitions.include? people_def.handle.to_s
|
401
|
+
if people_def.peopleperSpaceFloorArea.is_initialized
|
402
|
+
runner.registerInfo("Applying #{people_perc_change} % Change to #{people_def.name.get} PeopleperSpaceFloorArea.")
|
403
|
+
people_def.setPeopleperSpaceFloorArea(people_def.peopleperSpaceFloorArea.get + people_def.peopleperSpaceFloorArea.get * people_perc_change * 0.01)
|
404
|
+
end
|
405
|
+
if people_def.numberofPeople.is_initialized
|
406
|
+
runner.registerInfo("Applying #{people_perc_change} % Change to #{people_def.name.get} numberofPeople.")
|
407
|
+
people_def.setNumberofPeople(people_def.numberofPeople.get + people_def.numberofPeople.get * people_perc_change * 0.01)
|
408
|
+
end
|
409
|
+
if people_def.spaceFloorAreaperPerson.is_initialized
|
410
|
+
runner.registerInfo("Applying #{people_perc_change} % Change to #{people_def.name.get} spaceFloorAreaperPerson.")
|
411
|
+
people_def.setSpaceFloorAreaperPerson(people_def.spaceFloorAreaperPerson.get + people_def.spaceFloorAreaperPerson.get * people_perc_change * 0.01)
|
412
|
+
end
|
413
|
+
# update hash and change name
|
414
|
+
change_name(people_def, people_perc_change)
|
415
|
+
altered_people_definitions << people_def.handle.to_s
|
416
|
+
else
|
417
|
+
runner.registerInfo("Skipping change to #{people_def.name.get}")
|
418
|
+
end
|
419
|
+
end
|
420
|
+
|
421
|
+
# modify infiltration
|
422
|
+
space_type.spaceInfiltrationDesignFlowRates.each do |infiltration|
|
423
|
+
if !altered_infiltration_objects.include? infiltration.handle.to_s
|
424
|
+
if infiltration.flowperExteriorSurfaceArea.is_initialized
|
425
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} FlowperExteriorSurfaceArea.")
|
426
|
+
infiltration.setFlowperExteriorSurfaceArea(infiltration.flowperExteriorSurfaceArea.get + infiltration.flowperExteriorSurfaceArea.get * infil_perc_change * 0.01)
|
427
|
+
end
|
428
|
+
if infiltration.airChangesperHour.is_initialized
|
429
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} AirChangesperHour.")
|
430
|
+
infiltration.setAirChangesperHour(infiltration.airChangesperHour.get + infiltration.airChangesperHour.get * infil_perc_change * 0.01)
|
431
|
+
end
|
432
|
+
if infiltration.designFlowRate.is_initialized
|
433
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} designFlowRate.")
|
434
|
+
infiltration.setDesignFlowRate(infiltration.designFlowRate.get + infiltration.designFlowRate.get * infil_perc_change * 0.01)
|
435
|
+
end
|
436
|
+
if infiltration.flowperSpaceFloorArea.is_initialized
|
437
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} flowperSpaceFloorArea.")
|
438
|
+
infiltration.setFlowperSpaceFloorArea(infiltration.flowperSpaceFloorArea.get + infiltration.flowperSpaceFloorArea.get * infil_perc_change * 0.01)
|
439
|
+
end
|
440
|
+
if infiltration.flowperExteriorWallArea.is_initialized
|
441
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} flowperExteriorWallArea.")
|
442
|
+
infiltration.setFlowperExteriorWallArea(infiltration.flowperExteriorWallArea.get + infiltration.flowperExteriorWallArea.get * infil_perc_change * 0.01)
|
443
|
+
end
|
444
|
+
# add to hash and change name
|
445
|
+
change_name(infiltration, infil_perc_change)
|
446
|
+
altered_infiltration_objects << infiltration.handle.to_s
|
447
|
+
else
|
448
|
+
runner.registerInfo("Skipping change to #{infiltration.name.get}")
|
449
|
+
end
|
450
|
+
end
|
451
|
+
|
452
|
+
# modify outdoor air
|
453
|
+
if space_type.designSpecificationOutdoorAir.is_initialized
|
454
|
+
outdoor_air = space_type.designSpecificationOutdoorAir.get
|
455
|
+
# alter values if not already done
|
456
|
+
if !altered_outdoor_air_objects.include? outdoor_air.handle.to_s
|
457
|
+
runner.registerInfo("Applying #{vent_perc_change} % Change to #{outdoor_air.name.get} OutdoorAirFlowperPerson.")
|
458
|
+
outdoor_air.setOutdoorAirFlowperPerson(outdoor_air.outdoorAirFlowperPerson + outdoor_air.outdoorAirFlowperPerson * vent_perc_change * 0.01)
|
459
|
+
runner.registerInfo("Applying #{vent_perc_change} % Change to #{outdoor_air.name.get} OutdoorAirFlowperFloorArea.")
|
460
|
+
outdoor_air.setOutdoorAirFlowperFloorArea(outdoor_air.outdoorAirFlowperFloorArea + outdoor_air.outdoorAirFlowperFloorArea * vent_perc_change * 0.01)
|
461
|
+
runner.registerInfo("Applying #{vent_perc_change} % Change to #{outdoor_air.name.get} OutdoorAirFlowAirChangesperHour.")
|
462
|
+
outdoor_air.setOutdoorAirFlowAirChangesperHour(outdoor_air.outdoorAirFlowAirChangesperHour + outdoor_air.outdoorAirFlowAirChangesperHour * vent_perc_change * 0.01)
|
463
|
+
runner.registerInfo("Applying #{vent_perc_change} % Change to #{outdoor_air.name.get} OutdoorAirFlowRate.")
|
464
|
+
outdoor_air.setOutdoorAirFlowRate(outdoor_air.outdoorAirFlowRate + outdoor_air.outdoorAirFlowRate * vent_perc_change * 0.01)
|
465
|
+
# add to hash and change name
|
466
|
+
change_name(outdoor_air, vent_perc_change)
|
467
|
+
altered_outdoor_air_objects << outdoor_air.handle.to_s
|
468
|
+
else
|
469
|
+
runner.registerInfo("Skipping change to #{outdoor_air.name.get}")
|
470
|
+
end
|
471
|
+
end
|
472
|
+
|
473
|
+
# modify internal mass
|
474
|
+
space_type.internalMass.each do |internalmass|
|
475
|
+
# get and alter definition
|
476
|
+
internalmass_def = internalmass.internalMassDefinition
|
477
|
+
if !altered_internalmass_definitions.include? internalmass_def.handle.to_s
|
478
|
+
if internalmass_def.surfaceAreaperSpaceFloorArea.is_initialized
|
479
|
+
runner.registerInfo("Applying #{mass_perc_change} % Change to #{internalmass_def.name.get} surfaceAreaperSpaceFloorArea.")
|
480
|
+
internalmass_def.setSurfaceAreaperSpaceFloorArea(internalmass_def.surfaceAreaperSpaceFloorArea.get + internalmass_def.surfaceAreaperSpaceFloorArea.get * mass_perc_change * 0.01)
|
481
|
+
end
|
482
|
+
if internalmass_def.surfaceArea.is_initialized
|
483
|
+
runner.registerInfo("Applying #{mass_perc_change} % Change to #{internalmass_def.name.get} surfaceArea.")
|
484
|
+
internalmass_def.setSurfaceArea(internalmass_def.surfaceArea.get + internalmass_def.surfaceArea.get * mass_perc_change * 0.01)
|
485
|
+
end
|
486
|
+
if internalmass_def.surfaceAreaperPerson.is_initialized
|
487
|
+
runner.registerInfo("Applying #{mass_perc_change} % Change to #{internalmass_def.name.get} surfaceAreaperPerson.")
|
488
|
+
internalmass_def.setSurfaceAreaperPerson(internalmass_def.surfaceAreaperPerson.get + internalmass_def.surfaceAreaperPerson.get * mass_perc_change * 0.01)
|
489
|
+
end
|
490
|
+
# update hash and change name
|
491
|
+
change_name(internalmass_def, mass_perc_change)
|
492
|
+
altered_internalmass_definitions << internalmass_def.handle.to_s
|
493
|
+
else
|
494
|
+
runner.registerInfo("Skipping change to #{internalmass_def.name.get}")
|
495
|
+
end
|
496
|
+
end
|
497
|
+
end # end space_type loop
|
498
|
+
|
499
|
+
runner.registerInfo("altered_lights_definitions: #{altered_lights_definitions}")
|
500
|
+
runner.registerInfo("altered_luminaires_definitions: #{altered_luminaires_definitions}")
|
501
|
+
runner.registerInfo("altered_electric_equip_definitions: #{altered_electric_equip_definitions}")
|
502
|
+
runner.registerInfo("altered_gas_equip_definitions: #{altered_gas_equip_definitions}")
|
503
|
+
runner.registerInfo("altered_other_equip_definitions: #{altered_other_equip_definitions}")
|
504
|
+
runner.registerInfo("altered_people_definitions: #{altered_people_definitions}")
|
505
|
+
runner.registerInfo("altered_infiltration_objects: #{altered_infiltration_objects}")
|
506
|
+
runner.registerInfo("altered_outdoor_air_objects: #{altered_outdoor_air_objects}")
|
507
|
+
runner.registerInfo("altered_internalmass_definitions: #{altered_internalmass_definitions}")
|
508
|
+
|
509
|
+
# report initial condition of model
|
510
|
+
runner.registerInfo("Applying Variable % Changes to #{spaces.size} spaces.")
|
511
|
+
|
512
|
+
# loop through space types
|
513
|
+
spaces.each do |space|
|
514
|
+
# modify lights
|
515
|
+
space.lights.each do |light|
|
516
|
+
equip_def = light.lightsDefinition
|
517
|
+
# get and alter definition
|
518
|
+
if !altered_lights_definitions.include? equip_def.handle.to_s
|
519
|
+
if equip_def.lightingLevel.is_initialized
|
520
|
+
runner.registerInfo("Applying #{lights_perc_change} % Change to #{equip_def.name.get} LightingLevel.")
|
521
|
+
equip_def.setLightingLevel(equip_def.lightingLevel.get + equip_def.lightingLevel.get * lights_perc_change * 0.01)
|
522
|
+
end
|
523
|
+
if equip_def.wattsperSpaceFloorArea.is_initialized
|
524
|
+
runner.registerInfo("Applying #{lights_perc_change} % Change to #{equip_def.name.get} wattsperSpaceFloorArea.")
|
525
|
+
equip_def.setWattsperSpaceFloorArea(equip_def.wattsperSpaceFloorArea.get + equip_def.wattsperSpaceFloorArea.get * lights_perc_change * 0.01)
|
526
|
+
end
|
527
|
+
if equip_def.wattsperPerson.is_initialized
|
528
|
+
runner.registerInfo("Applying #{lights_perc_change} % Change to #{equip_def.name.get} wattsperPerson.")
|
529
|
+
equip_def.setWattsperPerson(equip_def.wattsperPerson.get + equip_def.wattsperPerson.get * lights_perc_change * 0.01)
|
530
|
+
end
|
531
|
+
# update hash and change name
|
532
|
+
change_name(equip_def, lights_perc_change)
|
533
|
+
altered_lights_definitions << equip_def.handle.to_s
|
534
|
+
else
|
535
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
536
|
+
end
|
537
|
+
end
|
538
|
+
|
539
|
+
# modify luminaire
|
540
|
+
space.luminaires.each do |light|
|
541
|
+
equip_def = light.luminaireDefinition
|
542
|
+
# get and alter definition
|
543
|
+
if !altered_luminaires_definitions.include? equip_def.handle.to_s
|
544
|
+
runner.registerInfo("Applying #{luminaire_perc_change} % Change to #{equip_def.name.get} LightingPower.")
|
545
|
+
equip_def.setLightingPower(equip_def.lightingPower + equip_def.lightingPower * luminaire_perc_change * 0.01)
|
546
|
+
# update hash and change name
|
547
|
+
change_name(equip_def, luminaire_perc_change)
|
548
|
+
altered_luminaires_definitions << equip_def.handle.to_s
|
549
|
+
else
|
550
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
554
|
+
# modify electric equip
|
555
|
+
space.electricEquipment.each do |equip|
|
556
|
+
# get and alter definition
|
557
|
+
equip_def = equip.electricEquipmentDefinition
|
558
|
+
if !altered_electric_equip_definitions.include? equip_def.handle.to_s
|
559
|
+
if equip_def.designLevel.is_initialized
|
560
|
+
runner.registerInfo("Applying #{electric_equip_perc_change} % Change to #{equip_def.name.get} DesignLevel.")
|
561
|
+
equip_def.setDesignLevel(equip_def.designLevel.get + equip_def.designLevel.get * electric_equip_perc_change * 0.01)
|
562
|
+
end
|
563
|
+
if equip_def.wattsperSpaceFloorArea.is_initialized
|
564
|
+
runner.registerInfo("Applying #{electric_equip_perc_change} % Change to #{equip_def.name.get} wattsperSpaceFloorArea.")
|
565
|
+
equip_def.setWattsperSpaceFloorArea(equip_def.wattsperSpaceFloorArea.get + equip_def.wattsperSpaceFloorArea.get * electric_equip_perc_change * 0.01)
|
566
|
+
end
|
567
|
+
if equip_def.wattsperPerson.is_initialized
|
568
|
+
runner.registerInfo("Applying #{electric_equip_perc_change} % Change to #{equip_def.name.get} wattsperPerson.")
|
569
|
+
equip_def.setWattsperPerson(equip_def.wattsperPerson.get + equip_def.wattsperPerson.get * electric_equip_perc_change * 0.01)
|
570
|
+
end
|
571
|
+
# update hash and change name
|
572
|
+
change_name(equip_def, electric_equip_perc_change)
|
573
|
+
altered_electric_equip_definitions << equip_def.handle.to_s
|
574
|
+
else
|
575
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
576
|
+
end
|
577
|
+
end
|
578
|
+
|
579
|
+
# modify gas equip
|
580
|
+
space.gasEquipment.each do |equip|
|
581
|
+
# get and alter definition
|
582
|
+
equip_def = equip.gasEquipmentDefinition
|
583
|
+
if !altered_gas_equip_definitions.include? equip_def.handle.to_s
|
584
|
+
if equip_def.designLevel.is_initialized
|
585
|
+
runner.registerInfo("Applying #{gas_equip_perc_change} % Change to #{equip_def.name.get} designlevel.")
|
586
|
+
equip_def.setDesignLevel(equip_def.designLevel.get + equip_def.designLevel.get * gas_equip_perc_change * 0.01)
|
587
|
+
end
|
588
|
+
if equip_def.wattsperSpaceFloorArea.is_initialized
|
589
|
+
runner.registerInfo("Applying #{gas_equip_perc_change} % Change to #{equip_def.name.get} WattsperSpaceFloorArea.")
|
590
|
+
equip_def.setWattsperSpaceFloorArea(equip_def.wattsperSpaceFloorArea.get + equip_def.wattsperSpaceFloorArea.get * gas_equip_perc_change * 0.01)
|
591
|
+
end
|
592
|
+
if equip_def.wattsperPerson.is_initialized
|
593
|
+
runner.registerInfo("Applying #{gas_equip_perc_change} % Change to #{equip_def.name.get} WattsperPerson.")
|
594
|
+
equip_def.setWattsperPerson(equip_def.wattsperPerson.get + equip_def.wattsperPerson.get * gas_equip_perc_change * 0.01)
|
595
|
+
end
|
596
|
+
# update hash and change name
|
597
|
+
change_name(equip_def, gas_equip_perc_change)
|
598
|
+
altered_gas_equip_definitions << equip_def.handle.to_s
|
599
|
+
else
|
600
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
601
|
+
end
|
602
|
+
end
|
603
|
+
|
604
|
+
# modify other equip
|
605
|
+
space.otherEquipment.each do |equip|
|
606
|
+
# get and alter definition
|
607
|
+
equip_def = equip.otherEquipmentDefinition
|
608
|
+
if !altered_other_equip_definitions.include? equip_def.handle.to_s
|
609
|
+
if equip_def.designLevel.is_initialized
|
610
|
+
runner.registerInfo("Applying #{other_equip_perc_change} % Change to #{equip_def.name.get} designLevel.")
|
611
|
+
equip_def.setDesignLevel(equip_def.designLevel.get + equip_def.designLevel.get * other_equip_perc_change * 0.01)
|
612
|
+
end
|
613
|
+
if equip_def.wattsperSpaceFloorArea.is_initialized
|
614
|
+
runner.registerInfo("Applying #{other_equip_perc_change} % Change to #{equip_def.name.get} wattsperSpaceFloorArea.")
|
615
|
+
equip_def.setWattsperSpaceFloorArea(equip_def.wattsperSpaceFloorArea.get + equip_def.wattsperSpaceFloorArea.get * other_equip_perc_change * 0.01)
|
616
|
+
end
|
617
|
+
if equip_def.wattsperPerson.is_initialized
|
618
|
+
runner.registerInfo("Applying #{other_equip_perc_change} % Change to #{equip_def.name.get} wattsperPerson.")
|
619
|
+
equip_def.setWattsperPerson(equip_def.wattsperPerson.get + equip_def.wattsperPerson.get * other_equip_perc_change * 0.01)
|
620
|
+
end
|
621
|
+
# update hash and change name
|
622
|
+
change_name(equip_def, other_equip_perc_change)
|
623
|
+
altered_other_equip_definitions << equip_def.handle.to_s
|
624
|
+
else
|
625
|
+
runner.registerInfo("Skipping change to #{equip_def.name.get}")
|
626
|
+
end
|
627
|
+
end
|
628
|
+
|
629
|
+
# modify occupancy
|
630
|
+
space.people.each do |people_inst|
|
631
|
+
# get and alter definition
|
632
|
+
people_def = people_inst.peopleDefinition
|
633
|
+
if !altered_people_definitions.include? people_def.handle.to_s
|
634
|
+
if people_def.peopleperSpaceFloorArea.is_initialized
|
635
|
+
runner.registerInfo("Applying #{people_perc_change} % Change to #{people_def.name.get} PeopleperSpaceFloorArea.")
|
636
|
+
people_def.setPeopleperSpaceFloorArea(people_def.peopleperSpaceFloorArea.get + people_def.peopleperSpaceFloorArea.get * people_perc_change * 0.01)
|
637
|
+
end
|
638
|
+
if people_def.numberofPeople.is_initialized
|
639
|
+
runner.registerInfo("Applying #{people_perc_change} % Change to #{people_def.name.get} numberofPeople.")
|
640
|
+
people_def.setNumberofPeople(people_def.numberofPeople.get + people_def.numberofPeople.get * people_perc_change * 0.01)
|
641
|
+
end
|
642
|
+
if people_def.spaceFloorAreaperPerson.is_initialized
|
643
|
+
runner.registerInfo("Applying #{people_perc_change} % Change to #{people_def.name.get} spaceFloorAreaperPerson.")
|
644
|
+
people_def.setSpaceFloorAreaperPerson(people_def.spaceFloorAreaperPerson.get + people_def.spaceFloorAreaperPerson.get * people_perc_change * 0.01)
|
645
|
+
end
|
646
|
+
# update hash and change name
|
647
|
+
change_name(people_def, people_perc_change)
|
648
|
+
altered_people_definitions << people_def.handle.to_s
|
649
|
+
else
|
650
|
+
runner.registerInfo("Skipping change to #{people_def.name.get}")
|
651
|
+
end
|
652
|
+
end
|
653
|
+
|
654
|
+
# modify infiltration
|
655
|
+
space.spaceInfiltrationDesignFlowRates.each do |infiltration|
|
656
|
+
if !altered_infiltration_objects.include? infiltration.handle.to_s
|
657
|
+
if infiltration.flowperExteriorSurfaceArea.is_initialized
|
658
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} FlowperExteriorSurfaceArea.")
|
659
|
+
infiltration.setFlowperExteriorSurfaceArea(infiltration.flowperExteriorSurfaceArea.get + infiltration.flowperExteriorSurfaceArea.get * infil_perc_change * 0.01)
|
660
|
+
end
|
661
|
+
if infiltration.airChangesperHour.is_initialized
|
662
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} AirChangesperHour.")
|
663
|
+
infiltration.setAirChangesperHour(infiltration.airChangesperHour.get + infiltration.airChangesperHour.get * infil_perc_change * 0.01)
|
664
|
+
end
|
665
|
+
if infiltration.designFlowRate.is_initialized
|
666
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} designFlowRate.")
|
667
|
+
infiltration.setDesignFlowRate(infiltration.designFlowRate.get + infiltration.designFlowRate.get * infil_perc_change * 0.01)
|
668
|
+
end
|
669
|
+
if infiltration.flowperSpaceFloorArea.is_initialized
|
670
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} flowperSpaceFloorArea.")
|
671
|
+
infiltration.setFlowperSpaceFloorArea(infiltration.flowperSpaceFloorArea.get + infiltration.flowperSpaceFloorArea.get * infil_perc_change * 0.01)
|
672
|
+
end
|
673
|
+
if infiltration.flowperExteriorWallArea.is_initialized
|
674
|
+
runner.registerInfo("Applying #{infil_perc_change} % Change to #{infiltration.name.get} flowperExteriorWallArea.")
|
675
|
+
infiltration.setFlowperExteriorWallArea(infiltration.flowperExteriorWallArea.get + infiltration.flowperExteriorWallArea.get * infil_perc_change * 0.01)
|
676
|
+
end
|
677
|
+
# add to hash and change name
|
678
|
+
change_name(infiltration, infil_perc_change)
|
679
|
+
altered_infiltration_objects << infiltration.handle.to_s
|
680
|
+
else
|
681
|
+
runner.registerInfo("Skipping change to #{infiltration.name.get}")
|
682
|
+
end
|
683
|
+
end
|
684
|
+
|
685
|
+
# modify outdoor air
|
686
|
+
if space.designSpecificationOutdoorAir.is_initialized
|
687
|
+
outdoor_air = space.designSpecificationOutdoorAir.get
|
688
|
+
# alter values if not already done
|
689
|
+
if !altered_outdoor_air_objects.include? outdoor_air.handle.to_s
|
690
|
+
runner.registerInfo("Applying #{vent_perc_change} % Change to #{outdoor_air.name.get} OutdoorAirFlowperPerson.")
|
691
|
+
outdoor_air.setOutdoorAirFlowperPerson(outdoor_air.outdoorAirFlowperPerson + outdoor_air.outdoorAirFlowperPerson * vent_perc_change * 0.01)
|
692
|
+
runner.registerInfo("Applying #{vent_perc_change} % Change to #{outdoor_air.name.get} OutdoorAirFlowperFloorArea.")
|
693
|
+
outdoor_air.setOutdoorAirFlowperFloorArea(outdoor_air.outdoorAirFlowperFloorArea + outdoor_air.outdoorAirFlowperFloorArea * vent_perc_change * 0.01)
|
694
|
+
runner.registerInfo("Applying #{vent_perc_change} % Change to #{outdoor_air.name.get} OutdoorAirFlowAirChangesperHour.")
|
695
|
+
outdoor_air.setOutdoorAirFlowAirChangesperHour(outdoor_air.outdoorAirFlowAirChangesperHour + outdoor_air.outdoorAirFlowAirChangesperHour * vent_perc_change * 0.01)
|
696
|
+
runner.registerInfo("Applying #{vent_perc_change} % Change to #{outdoor_air.name.get} OutdoorAirFlowRate.")
|
697
|
+
outdoor_air.setOutdoorAirFlowRate(outdoor_air.outdoorAirFlowRate + outdoor_air.outdoorAirFlowRate * vent_perc_change * 0.01)
|
698
|
+
# add to hash and change name
|
699
|
+
change_name(outdoor_air, vent_perc_change)
|
700
|
+
altered_outdoor_air_objects << outdoor_air.handle.to_s
|
701
|
+
else
|
702
|
+
runner.registerInfo("Skipping change to #{outdoor_air.name.get}")
|
703
|
+
end
|
704
|
+
end
|
705
|
+
|
706
|
+
# modify internal mass
|
707
|
+
space.internalMass.each do |internalmass|
|
708
|
+
# get and alter definition
|
709
|
+
internalmass_def = internalmass.internalMassDefinition
|
710
|
+
if !altered_internalmass_definitions.include? internalmass_def.handle.to_s
|
711
|
+
if internalmass_def.surfaceAreaperSpaceFloorArea.is_initialized
|
712
|
+
runner.registerInfo("Applying #{mass_perc_change} % Change to #{internalmass_def.name.get} surfaceAreaperSpaceFloorArea.")
|
713
|
+
internalmass_def.setSurfaceAreaperSpaceFloorArea(internalmass_def.surfaceAreaperSpaceFloorArea.get + internalmass_def.surfaceAreaperSpaceFloorArea.get * mass_perc_change * 0.01)
|
714
|
+
end
|
715
|
+
if internalmass_def.surfaceArea.is_initialized
|
716
|
+
runner.registerInfo("Applying #{mass_perc_change} % Change to #{internalmass_def.name.get} surfaceArea.")
|
717
|
+
internalmass_def.setSurfaceArea(internalmass_def.surfaceArea.get + internalmass_def.surfaceArea.get * mass_perc_change * 0.01)
|
718
|
+
end
|
719
|
+
if internalmass_def.surfaceAreaperPerson.is_initialized
|
720
|
+
runner.registerInfo("Applying #{mass_perc_change} % Change to #{internalmass_def.name.get} surfaceAreaperPerson.")
|
721
|
+
internalmass_def.setSurfaceAreaperPerson(internalmass_def.surfaceAreaperPerson.get + internalmass_def.surfaceAreaperPerson.get * mass_perc_change * 0.01)
|
722
|
+
end
|
723
|
+
# update hash and change name
|
724
|
+
change_name(internalmass_def, mass_perc_change)
|
725
|
+
altered_internalmass_definitions << internalmass_def.handle.to_s
|
726
|
+
else
|
727
|
+
runner.registerInfo("Skipping change to #{internalmass_def.name.get}")
|
728
|
+
end
|
729
|
+
end
|
730
|
+
end # end spaces loop
|
731
|
+
|
732
|
+
runner.registerInfo("altered_lights_definitions: #{altered_lights_definitions}")
|
733
|
+
runner.registerInfo("altered_luminaires_definitions: #{altered_luminaires_definitions}")
|
734
|
+
runner.registerInfo("altered_electric_equip_definitions: #{altered_electric_equip_definitions}")
|
735
|
+
runner.registerInfo("altered_gas_equip_definitions: #{altered_gas_equip_definitions}")
|
736
|
+
runner.registerInfo("altered_other_equip_definitions: #{altered_other_equip_definitions}")
|
737
|
+
runner.registerInfo("altered_people_definitions: #{altered_people_definitions}")
|
738
|
+
runner.registerInfo("altered_infiltration_objects: #{altered_infiltration_objects}")
|
739
|
+
runner.registerInfo("altered_outdoor_air_objects: #{altered_outdoor_air_objects}")
|
740
|
+
runner.registerInfo("altered_internalmass_definitions: #{altered_internalmass_definitions}")
|
741
|
+
|
742
|
+
# na if nothing in model to look at
|
743
|
+
if altered_lights_definitions.size + altered_luminaires_definitions.size + altered_electric_equip_definitions.size + altered_gas_equip_definitions.size + altered_other_equip_definitions.size + altered_people_definitions.size + altered_infiltration_objects.size + altered_outdoor_air_objects.size + altered_internalmass_definitions.size == 0
|
744
|
+
runner.registerAsNotApplicable('No objects to alter were found in the model')
|
745
|
+
return true
|
746
|
+
end
|
747
|
+
|
748
|
+
# report final condition of model
|
749
|
+
runner.registerFinalCondition("#{altered_lights_definitions.size} light objects were altered. #{altered_luminaires_definitions.size} luminaire objects were altered. #{altered_electric_equip_definitions.size} electric Equipment objects were altered. #{altered_gas_equip_definitions.size} gas Equipment objects were altered. #{altered_other_equip_definitions.size} otherEquipment objects were altered. #{altered_people_definitions.size} people definitions were altered. #{altered_infiltration_objects.size} infiltration objects were altered. #{altered_outdoor_air_objects.size} ventilation objects were altered. #{altered_internalmass_definitions.size} internal mass objects were altered.")
|
750
|
+
|
751
|
+
true
|
752
|
+
end
|
753
|
+
end
|
754
|
+
|
755
|
+
# register the measure to be used by the application
|
756
|
+
GeneralCalibrationMeasurePercentChange.new.registerWithApplication
|