openstudio-common-measures 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -0
  3. data/Rakefile +3 -0
  4. data/lib/measures/ChangeBuildingLocation/measure.xml +11 -11
  5. data/lib/measures/ExportScheduleCSV/measure.rb +1 -1
  6. data/lib/measures/ExportScheduleCSV/measure.xml +16 -15
  7. data/lib/measures/ImportEnvelopeAndInternalLoadsFromIdf/measure.xml +7 -6
  8. data/lib/measures/MeterFlodPlot/measure.rb +1 -1
  9. data/lib/measures/MeterFlodPlot/measure.xml +16 -15
  10. data/lib/measures/ReportModelChanges/measure.xml +2 -2
  11. data/lib/measures/RunPeriodMultiple/measure.xml +12 -11
  12. data/lib/measures/ServerDirectoryCleanup/README.md +97 -3
  13. data/lib/measures/ServerDirectoryCleanup/measure.rb +1 -1
  14. data/lib/measures/ServerDirectoryCleanup/measure.xml +10 -59
  15. data/lib/measures/UnmetLoadHoursTroubleshooting/README.md +9 -3
  16. data/lib/measures/UnmetLoadHoursTroubleshooting/measure.rb +1 -1
  17. data/lib/measures/UnmetLoadHoursTroubleshooting/measure.xml +66 -17
  18. data/lib/measures/VentilationQAQC/README.md +9 -3
  19. data/lib/measures/VentilationQAQC/measure.rb +52 -45
  20. data/lib/measures/VentilationQAQC/measure.xml +25 -30
  21. data/lib/measures/ZoneReport/README.md +2 -2
  22. data/lib/measures/ZoneReport/measure.rb +1 -1
  23. data/lib/measures/ZoneReport/measure.xml +10 -11
  24. data/lib/measures/add_ems_to_control_ev_charging/LICENSE.MD.txt +15 -0
  25. data/lib/measures/{AddDaylightSensors → add_ems_to_control_ev_charging}/LICENSE.md +0 -0
  26. data/lib/measures/add_ems_to_control_ev_charging/ReadMe.MD +29 -0
  27. data/lib/measures/add_ems_to_control_ev_charging/measure.rb +288 -0
  28. data/lib/measures/add_ems_to_control_ev_charging/measure.xml +87 -0
  29. data/lib/measures/add_ev_load/LICENSE.MD.txt +15 -0
  30. data/lib/measures/{EnableDemandControlledVentilation → add_ev_load}/LICENSE.md +0 -0
  31. data/lib/measures/add_ev_load/ReadMe.MD +34 -0
  32. data/lib/measures/add_ev_load/measure.rb +328 -0
  33. data/lib/measures/add_ev_load/measure.xml +153 -0
  34. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/PSN_BuildingKey.csv +104 -0
  35. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/PSN_BuildingKey_v2.csv +104 -0
  36. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex1.csv +96 -0
  37. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex2.csv +96 -0
  38. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex3.csv +96 -0
  39. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex1.csv +96 -0
  40. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex2.csv +96 -0
  41. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex3.csv +96 -0
  42. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex1.csv +96 -0
  43. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex2.csv +96 -0
  44. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex3.csv +96 -0
  45. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex1.csv +96 -0
  46. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex2.csv +96 -0
  47. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex3.csv +96 -0
  48. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex1.csv +96 -0
  49. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex2.csv +96 -0
  50. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex3.csv +96 -0
  51. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex1.csv +96 -0
  52. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex2.csv +96 -0
  53. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex3.csv +96 -0
  54. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex1.csv +96 -0
  55. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex2.csv +96 -0
  56. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex3.csv +96 -0
  57. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex1.csv +96 -0
  58. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex2.csv +96 -0
  59. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex3.csv +96 -0
  60. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex1.csv +96 -0
  61. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex2.csv +96 -0
  62. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex3.csv +96 -0
  63. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Saturday.csv +96 -0
  64. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Sunday.csv +96 -0
  65. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Weekday.csv +96 -0
  66. data/lib/measures/envelope_and_internal_load_breakdown/README.md +4 -3
  67. data/lib/measures/envelope_and_internal_load_breakdown/measure.rb +7 -4
  68. data/lib/measures/envelope_and_internal_load_breakdown/measure.xml +16 -17
  69. data/lib/measures/envelope_and_internal_load_breakdown/resources/report.html.erb +1 -0
  70. data/lib/measures/example_report/README.md +27 -5
  71. data/lib/measures/example_report/measure.rb +7 -4
  72. data/lib/measures/example_report/measure.xml +16 -29
  73. data/lib/measures/example_report/resources/report.html.erb +1 -0
  74. data/lib/measures/gem_env_report/measure.xml +1 -1
  75. data/lib/measures/generic_qaqc/README.md +187 -5
  76. data/lib/measures/generic_qaqc/measure.rb +1 -1
  77. data/lib/measures/generic_qaqc/measure.xml +15 -85
  78. data/lib/measures/generic_qaqc/resources/report.html.erb +1 -0
  79. data/lib/measures/hvac_psychrometric_chart/README.md +11 -5
  80. data/lib/measures/hvac_psychrometric_chart/measure.rb +1 -1
  81. data/lib/measures/hvac_psychrometric_chart/measure.xml +13 -18
  82. data/lib/measures/hvac_psychrometric_chart/resources/report.html.erb +1 -0
  83. data/lib/measures/inject_idf_objects/measure.xml +25 -24
  84. data/lib/measures/openstudio_results/README.md +195 -5
  85. data/lib/measures/openstudio_results/measure.rb +2 -2
  86. data/lib/measures/openstudio_results/measure.xml +30 -154
  87. data/lib/measures/openstudio_results/resources/report.html.erb +1 -0
  88. data/lib/measures/set_run_period/measure.xml +2 -2
  89. data/lib/measures/{EnableEconomizerControl → view_data}/LICENSE.md +0 -0
  90. data/lib/measures/view_data/README.md +64 -0
  91. data/lib/measures/{AddDaylightSensors → view_data}/README.md.erb +0 -0
  92. data/lib/measures/view_data/measure.rb +454 -0
  93. data/lib/measures/view_data/measure.xml +159 -0
  94. data/lib/measures/view_data/resources/report.html.in +2881 -0
  95. data/lib/measures/view_data/resources/va3c.rb +1021 -0
  96. data/lib/measures/{ImproveFanBeltEfficiency → view_model}/LICENSE.md +0 -0
  97. data/lib/measures/view_model/README.md +26 -0
  98. data/lib/measures/{EnableDemandControlledVentilation → view_model}/README.md.erb +0 -0
  99. data/lib/measures/view_model/measure.rb +146 -0
  100. data/lib/measures/view_model/measure.xml +98 -0
  101. data/lib/measures/view_model/resources/report.html.in +2881 -0
  102. data/lib/measures/view_model/resources/va3c.rb +1021 -0
  103. data/lib/openstudio/common_measures/version.rb +1 -1
  104. data/openstudio-common-measures.gemspec +1 -1
  105. metadata +61 -71
  106. data/lib/measures/AddDaylightSensors/README.md +0 -136
  107. data/lib/measures/AddDaylightSensors/measure.rb +0 -521
  108. data/lib/measures/AddDaylightSensors/measure.xml +0 -233
  109. data/lib/measures/EnableDemandControlledVentilation/README.md +0 -32
  110. data/lib/measures/EnableDemandControlledVentilation/measure.rb +0 -154
  111. data/lib/measures/EnableDemandControlledVentilation/measure.xml +0 -99
  112. data/lib/measures/EnableEconomizerControl/README.md +0 -48
  113. data/lib/measures/EnableEconomizerControl/README.md.erb +0 -42
  114. data/lib/measures/EnableEconomizerControl/measure.rb +0 -172
  115. data/lib/measures/EnableEconomizerControl/measure.xml +0 -124
  116. data/lib/measures/ImproveFanBeltEfficiency/README.md +0 -104
  117. data/lib/measures/ImproveFanBeltEfficiency/README.md.erb +0 -42
  118. data/lib/measures/ImproveFanBeltEfficiency/measure.rb +0 -366
  119. data/lib/measures/ImproveFanBeltEfficiency/measure.xml +0 -185
  120. data/lib/measures/ImproveMotorEfficiency/LICENSE.md +0 -27
  121. data/lib/measures/ImproveMotorEfficiency/README.md +0 -104
  122. data/lib/measures/ImproveMotorEfficiency/README.md.erb +0 -42
  123. data/lib/measures/ImproveMotorEfficiency/measure.rb +0 -365
  124. data/lib/measures/ImproveMotorEfficiency/measure.xml +0 -182
  125. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/LICENSE.md +0 -27
  126. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md +0 -64
  127. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md.erb +0 -42
  128. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.rb +0 -422
  129. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.xml +0 -150
  130. data/lib/measures/IncreaseInsulationRValueForRoofs/LICENSE.md +0 -27
  131. data/lib/measures/IncreaseInsulationRValueForRoofs/README.md +0 -64
  132. data/lib/measures/IncreaseInsulationRValueForRoofs/README.md.erb +0 -42
  133. data/lib/measures/IncreaseInsulationRValueForRoofs/measure.rb +0 -422
  134. data/lib/measures/IncreaseInsulationRValueForRoofs/measure.xml +0 -143
  135. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/LICENSE.md +0 -27
  136. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md +0 -97
  137. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md.erb +0 -42
  138. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.rb +0 -450
  139. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.xml +0 -186
  140. data/lib/measures/ReduceLightingLoadsByPercentage/LICENSE.md +0 -27
  141. data/lib/measures/ReduceLightingLoadsByPercentage/README.md +0 -96
  142. data/lib/measures/ReduceLightingLoadsByPercentage/README.md.erb +0 -42
  143. data/lib/measures/ReduceLightingLoadsByPercentage/measure.rb +0 -513
  144. data/lib/measures/ReduceLightingLoadsByPercentage/measure.xml +0 -191
  145. data/lib/measures/ReduceSpaceInfiltrationByPercentage/LICENSE.md +0 -27
  146. data/lib/measures/ReduceSpaceInfiltrationByPercentage/README.md +0 -104
  147. data/lib/measures/ReduceSpaceInfiltrationByPercentage/README.md.erb +0 -42
  148. data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.rb +0 -349
  149. data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +0 -181
  150. data/lib/measures/ReduceVentilationByPercentage/LICENSE.md +0 -27
  151. data/lib/measures/ReduceVentilationByPercentage/README.md +0 -40
  152. data/lib/measures/ReduceVentilationByPercentage/README.md.erb +0 -42
  153. data/lib/measures/ReduceVentilationByPercentage/measure.rb +0 -291
  154. data/lib/measures/ReduceVentilationByPercentage/measure.xml +0 -96
  155. data/lib/measures/VentilationQAQC/ExampleModel.osm +0 -28468
  156. data/lib/measures/create_variable_speed_rtu/LICENSE.md +0 -27
  157. data/lib/measures/create_variable_speed_rtu/README.md +0 -120
  158. data/lib/measures/create_variable_speed_rtu/README.md.erb +0 -42
  159. data/lib/measures/create_variable_speed_rtu/measure.rb +0 -539
  160. data/lib/measures/create_variable_speed_rtu/measure.xml +0 -207
  161. data/lib/measures/radiant_slab_with_doas/LICENSE.md +0 -27
  162. data/lib/measures/radiant_slab_with_doas/README.md +0 -156
  163. data/lib/measures/radiant_slab_with_doas/README.md.erb +0 -42
  164. data/lib/measures/radiant_slab_with_doas/measure.rb +0 -403
  165. data/lib/measures/radiant_slab_with_doas/measure.xml +0 -345
@@ -1,143 +0,0 @@
1
- <measure>
2
- <schema_version>3.0</schema_version>
3
- <name>increase_insulation_r_value_for_roofs</name>
4
- <uid>65b798f4-207f-4aed-987a-386c865d0ccd</uid>
5
- <version_id>f9eb0028-6f7e-47a8-bf77-b786f4d89dd7</version_id>
6
- <version_modified>20200229T024304Z</version_modified>
7
- <xml_checksum>0F858D9E</xml_checksum>
8
- <class_name>IncreaseInsulationRValueForRoofs</class_name>
9
- <display_name>Increase R-value of Insulation for Roofs to a Specific Value</display_name>
10
- <description>Set the R-Value of roof insulation to a specified value. Higher R-Values provide better insulation, lowering heat loss and heat gain through the roof.</description>
11
- <modeler_description>Set the R-Value (ft^2*h*R/Btu) of the insulation material layer in all roofs in the model to a specified value. Find constructions used for roofs, make copies of these and assign them to the appropriate construction sets or surfaces. Identify which layer of the construction is the insulation layer. This could be a Material, No Mass Material, or Air Gap Material. If the Insulation layer is "Material? the thickness will be changed to attain the desired R-Value. If the insulation layer is "No Mass Material? or "Air Gap Material? the Thermal Resistance will be directly entered. If the construction doesn't appear to have an insulation layer, it will not be altered. Surfaces with "Adiabatic" boundary conditions are not specifically assumed to be interior or exterior. As a result constructions used on "Adiabatic" surfaces will not be altered. Constructions used on attic floors will not be altered.&#xd;&#xd;&#xd;&#xd;&#xd;&#xd;
12
- &#xd;&#xd;&#xd;&#xd;&#xd;&#xd;
13
- The resulting construction will retain the cost data from the source construction, however material and installation cost can be increased which will affect replacement cost if it happens during the analysis period. Additionally a one-time cost can be added to reflect any retrofit costs that occur at some point prior to replacement.&#xd;&#xd;&#xd;&#xd;&#xd;&#xd;
14
- </modeler_description>
15
- <arguments>
16
- <argument>
17
- <name>r_value</name>
18
- <display_name>Insulation R-value (ft^2*h*R/Btu).</display_name>
19
- <type>Double</type>
20
- <required>true</required>
21
- <model_dependent>false</model_dependent>
22
- <default_value>30</default_value>
23
- </argument>
24
- <argument>
25
- <name>allow_reduction</name>
26
- <display_name>Allow both increase and decrease in R-value to reach requested target?</display_name>
27
- <type>Boolean</type>
28
- <required>true</required>
29
- <model_dependent>false</model_dependent>
30
- <default_value>false</default_value>
31
- <choices>
32
- <choice>
33
- <value>true</value>
34
- <display_name>true</display_name>
35
- </choice>
36
- <choice>
37
- <value>false</value>
38
- <display_name>false</display_name>
39
- </choice>
40
- </choices>
41
- </argument>
42
- <argument>
43
- <name>material_cost_increase_ip</name>
44
- <display_name>Increase in Material and Installation Costs for Construction per Area Used ($/ft^2).</display_name>
45
- <type>Double</type>
46
- <required>true</required>
47
- <model_dependent>false</model_dependent>
48
- <default_value>0</default_value>
49
- </argument>
50
- <argument>
51
- <name>one_time_retrofit_cost_ip</name>
52
- <display_name>One Time Retrofit Cost to Add Insulation to Construction ($/ft^2).</display_name>
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>years_until_retrofit_cost</name>
60
- <display_name>Year to Incur One Time Retrofit Cost (whole years).</display_name>
61
- <type>Integer</type>
62
- <required>true</required>
63
- <model_dependent>false</model_dependent>
64
- <default_value>0</default_value>
65
- </argument>
66
- </arguments>
67
- <outputs/>
68
- <provenances/>
69
- <tags>
70
- <tag>Envelope.Opaque</tag>
71
- </tags>
72
- <attributes>
73
- <attribute>
74
- <name>Measure Type</name>
75
- <value>ModelMeasure</value>
76
- <datatype>string</datatype>
77
- </attribute>
78
- <attribute>
79
- <name>Measure Function</name>
80
- <value>Measure</value>
81
- <datatype>string</datatype>
82
- </attribute>
83
- <attribute>
84
- <name>Requires EnergyPlus Results</name>
85
- <value>false</value>
86
- <datatype>boolean</datatype>
87
- </attribute>
88
- <attribute>
89
- <name>Uses SketchUp API</name>
90
- <value>false</value>
91
- <datatype>boolean</datatype>
92
- </attribute>
93
- </attributes>
94
- <files>
95
- <file>
96
- <filename>EnvelopeAndLoadTestModel_01.osm</filename>
97
- <filetype>osm</filetype>
98
- <usage_type>test</usage_type>
99
- <checksum>10AA8866</checksum>
100
- </file>
101
- <file>
102
- <filename>ReverseTranslatedModel.osm</filename>
103
- <filetype>osm</filetype>
104
- <usage_type>test</usage_type>
105
- <checksum>0B94403D</checksum>
106
- </file>
107
- <file>
108
- <filename>README.md.erb</filename>
109
- <filetype>erb</filetype>
110
- <usage_type>readmeerb</usage_type>
111
- <checksum>703C9964</checksum>
112
- </file>
113
- <file>
114
- <filename>README.md</filename>
115
- <filetype>md</filetype>
116
- <usage_type>readme</usage_type>
117
- <checksum>62C992A9</checksum>
118
- </file>
119
- <file>
120
- <filename>IncreaseInsulationRValueForRoofs_Test.rb</filename>
121
- <filetype>rb</filetype>
122
- <usage_type>test</usage_type>
123
- <checksum>4021A34F</checksum>
124
- </file>
125
- <file>
126
- <filename>LICENSE.md</filename>
127
- <filetype>md</filetype>
128
- <usage_type>license</usage_type>
129
- <checksum>E0468DD6</checksum>
130
- </file>
131
- <file>
132
- <version>
133
- <software_program>OpenStudio</software_program>
134
- <identifier>2.0.0</identifier>
135
- <min_compatible>2.0.0</min_compatible>
136
- </version>
137
- <filename>measure.rb</filename>
138
- <filetype>rb</filetype>
139
- <usage_type>script</usage_type>
140
- <checksum>1496AE9B</checksum>
141
- </file>
142
- </files>
143
- </measure>
@@ -1,27 +0,0 @@
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.
@@ -1,97 +0,0 @@
1
-
2
-
3
- ###### (Automatically generated documentation)
4
-
5
- # Reduce Electric Equipment Loads by Percentage
6
-
7
- ## Description
8
- Reduce Electric Equipment Loads by Percentage</display_name>
9
- <description>Reduce electric equipment loads. This will affect equipment that have a, power, power per area (LPD), or power per person value. This can be applied to the entire building or a specific space type. A positive percentage represents an increase electric equipment power, while a negative percentage can be used for an increase in electric equipment power.
10
-
11
- ## Modeler Description
12
- Loop through all electric equipment objects in the specified space type or the entire building. Clone the definition if it has not already been cloned, rename and adjust the power based on the specified percentage. Link the new definition to the existing electric equipment instance. Loop through objects first in space types and then in spaces, but only for spaces that are in the specified space type, unless entire building has been chosen.
13
-
14
- ## Measure Type
15
- ModelMeasure
16
-
17
- ## Taxonomy
18
-
19
-
20
- ## Arguments
21
-
22
-
23
- ### Apply the Measure to a Specific Space Type or to the Entire Model
24
-
25
- **Name:** space_type,
26
- **Type:** Choice,
27
- **Units:** ,
28
- **Required:** true,
29
- **Model Dependent:** false
30
-
31
- ### Electric Equipment Power Reduction
32
-
33
- **Name:** elecequip_power_reduction_percent,
34
- **Type:** Double,
35
- **Units:** %,
36
- **Required:** true,
37
- **Model Dependent:** false
38
-
39
- ### Increase in Material and Installation Cost for Electric Equipment per Floor Area
40
-
41
- **Name:** material_and_installation_cost,
42
- **Type:** Double,
43
- **Units:** %,
44
- **Required:** true,
45
- **Model Dependent:** false
46
-
47
- ### Increase in Demolition Costs for Electric Equipment per Floor Area
48
-
49
- **Name:** demolition_cost,
50
- **Type:** Double,
51
- **Units:** %,
52
- **Required:** true,
53
- **Model Dependent:** false
54
-
55
- ### Years Until Costs Start
56
-
57
- **Name:** years_until_costs_start,
58
- **Type:** Integer,
59
- **Units:** whole years,
60
- **Required:** true,
61
- **Model Dependent:** false
62
-
63
- ### Demolition Costs Occur During Initial Construction
64
-
65
- **Name:** demo_cost_initial_const,
66
- **Type:** Boolean,
67
- **Units:** ,
68
- **Required:** true,
69
- **Model Dependent:** false
70
-
71
- ### Expected Life
72
-
73
- **Name:** expected_life,
74
- **Type:** Integer,
75
- **Units:** whole years,
76
- **Required:** true,
77
- **Model Dependent:** false
78
-
79
- ### Increase O & M Costs for Electric Equipment per Floor Area
80
-
81
- **Name:** om_cost,
82
- **Type:** Double,
83
- **Units:** %,
84
- **Required:** true,
85
- **Model Dependent:** false
86
-
87
- ### O & M Frequency
88
-
89
- **Name:** om_frequency,
90
- **Type:** Integer,
91
- **Units:** whole years,
92
- **Required:** true,
93
- **Model Dependent:** false
94
-
95
-
96
-
97
-
@@ -1,42 +0,0 @@
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 %>
@@ -1,450 +0,0 @@
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 ReduceElectricEquipmentLoadsByPercentage < OpenStudio::Measure::ModelMeasure
38
- # define the name that a user will see
39
- def name
40
- return 'Reduce Electric Equipment Loads by Percentage'
41
- end
42
-
43
- # human readable description
44
- def description
45
- return 'Reduce Electric Equipment Loads by Percentage</display_name>
46
- <description>Reduce electric equipment loads. This will affect equipment that have a, power, power per area (LPD), or power per person value. This can be applied to the entire building or a specific space type. A positive percentage represents an increase electric equipment power, while a negative percentage can be used for an increase in electric equipment power.'
47
- end
48
-
49
- # human readable description of modeling approach
50
- def modeler_description
51
- return 'Loop through all electric equipment objects in the specified space type or the entire building. Clone the definition if it has not already been cloned, rename and adjust the power based on the specified percentage. Link the new definition to the existing electric equipment instance. Loop through objects first in space types and then in spaces, but only for spaces that are in the specified space type, unless entire building has been chosen.'
52
- end
53
-
54
- # define the arguments that the user will input
55
- def arguments(model)
56
- args = OpenStudio::Measure::OSArgumentVector.new
57
-
58
- # make a choice argument for model objects
59
- space_type_handles = OpenStudio::StringVector.new
60
- space_type_display_names = OpenStudio::StringVector.new
61
-
62
- # putting model object and names into hash
63
- space_type_args = model.getSpaceTypes
64
- space_type_args_hash = {}
65
- space_type_args.each do |space_type_arg|
66
- space_type_args_hash[space_type_arg.name.to_s] = space_type_arg
67
- end
68
-
69
- # looping through sorted hash of model objects
70
- space_type_args_hash.sort.map do |key, value|
71
- # only include if space type is used in the model
72
- if !value.spaces.empty?
73
- space_type_handles << value.handle.to_s
74
- space_type_display_names << key
75
- end
76
- end
77
-
78
- # add building to string vector with space type
79
- building = model.getBuilding
80
- space_type_handles << building.handle.to_s
81
- space_type_display_names << '*Entire Building*'
82
-
83
- # make a choice argument for space type
84
- space_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('space_type', space_type_handles, space_type_display_names)
85
- space_type.setDisplayName('Apply the Measure to a Specific Space Type or to the Entire Model')
86
- space_type.setDefaultValue('*Entire Building*') # if no space type is chosen this will run on the entire building
87
- args << space_type
88
-
89
- # make an argument for reduction percentage
90
- elecequip_power_reduction_percent = OpenStudio::Measure::OSArgument.makeDoubleArgument('elecequip_power_reduction_percent', true)
91
- elecequip_power_reduction_percent.setDisplayName('Electric Equipment Power Reduction')
92
- elecequip_power_reduction_percent.setDefaultValue(30.0)
93
- elecequip_power_reduction_percent.setUnits('%')
94
- args << elecequip_power_reduction_percent
95
-
96
- # make an argument for material and installation cost
97
- material_and_installation_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('material_and_installation_cost', true)
98
- material_and_installation_cost.setDisplayName('Increase in Material and Installation Cost for Electric Equipment per Floor Area')
99
- material_and_installation_cost.setDefaultValue(0.0)
100
- material_and_installation_cost.setUnits('%')
101
- args << material_and_installation_cost
102
-
103
- # make an argument for demolition cost
104
- demolition_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('demolition_cost', true)
105
- demolition_cost.setDisplayName('Increase in Demolition Costs for Electric Equipment per Floor Area')
106
- demolition_cost.setDefaultValue(0.0)
107
- demolition_cost.setUnits('%')
108
- args << demolition_cost
109
-
110
- # make an argument for years until costs start
111
- years_until_costs_start = OpenStudio::Measure::OSArgument.makeIntegerArgument('years_until_costs_start', true)
112
- years_until_costs_start.setDisplayName('Years Until Costs Start')
113
- years_until_costs_start.setDefaultValue(0)
114
- years_until_costs_start.setUnits('whole years')
115
- args << years_until_costs_start
116
-
117
- # make a choice argument for when demo costs occur
118
- demo_cost_initial_const = OpenStudio::Measure::OSArgument.makeBoolArgument('demo_cost_initial_const', true)
119
- demo_cost_initial_const.setDisplayName('Demolition Costs Occur During Initial Construction')
120
- demo_cost_initial_const.setDefaultValue(false)
121
- args << demo_cost_initial_const
122
-
123
- # make an argument for expected life
124
- expected_life = OpenStudio::Measure::OSArgument.makeIntegerArgument('expected_life', true)
125
- expected_life.setDisplayName('Expected Life')
126
- expected_life.setDefaultValue(15)
127
- expected_life.setUnits('whole years')
128
- args << expected_life
129
-
130
- # make an argument for O & M cost
131
- om_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('om_cost', true)
132
- om_cost.setDisplayName('Increase O & M Costs for Electric Equipment per Floor Area')
133
- om_cost.setDefaultValue(0.0)
134
- om_cost.setUnits('%')
135
- args << om_cost
136
-
137
- # make an argument for O & M frequency
138
- om_frequency = OpenStudio::Measure::OSArgument.makeIntegerArgument('om_frequency', true)
139
- om_frequency.setDisplayName('O & M Frequency')
140
- om_frequency.setDefaultValue(1)
141
- om_frequency.setUnits('whole years')
142
- args << om_frequency
143
-
144
- return args
145
- end
146
-
147
- # define what happens when the measure is run
148
- def run(model, runner, user_arguments)
149
- super(model, runner, user_arguments)
150
-
151
- # use the built-in error checking
152
- if !runner.validateUserArguments(arguments(model), user_arguments)
153
- return false
154
- end
155
-
156
- # assign the user inputs to variables
157
- object = runner.getOptionalWorkspaceObjectChoiceValue('space_type', user_arguments, model)
158
- elecequip_power_reduction_percent = runner.getDoubleArgumentValue('elecequip_power_reduction_percent', user_arguments)
159
- material_and_installation_cost = runner.getDoubleArgumentValue('material_and_installation_cost', user_arguments)
160
- demolition_cost = runner.getDoubleArgumentValue('demolition_cost', user_arguments)
161
- years_until_costs_start = runner.getIntegerArgumentValue('years_until_costs_start', user_arguments)
162
- demo_cost_initial_const = runner.getBoolArgumentValue('demo_cost_initial_const', user_arguments)
163
- expected_life = runner.getIntegerArgumentValue('expected_life', user_arguments)
164
- om_cost = runner.getDoubleArgumentValue('om_cost', user_arguments)
165
- om_frequency = runner.getIntegerArgumentValue('om_frequency', user_arguments)
166
-
167
- # check the space_type for reasonableness and see if measure should run on space type or on the entire building
168
- apply_to_building = false
169
- space_type = nil
170
- if object.empty?
171
- handle = runner.getStringArgumentValue('space_type', user_arguments)
172
- if handle.empty?
173
- runner.registerError('No space type was chosen.')
174
- else
175
- runner.registerError("The selected space type with handle '#{handle}' was not found in the model. It may have been removed by another measure.")
176
- end
177
- return false
178
- else
179
- if !object.get.to_SpaceType.empty?
180
- space_type = object.get.to_SpaceType.get
181
- elsif !object.get.to_Building.empty?
182
- apply_to_building = true
183
- else
184
- runner.registerError('Script Error - argument not showing up as space type or building.')
185
- return false
186
- end
187
- end
188
-
189
- # check the elecequip_power_reduction_percent and for reasonableness
190
- if elecequip_power_reduction_percent > 100
191
- runner.registerError('Please Enter a Value less than or equal to 100 for the Electric Equipment Power Reduction Percentage.')
192
- return false
193
- elsif elecequip_power_reduction_percent == 0
194
- runner.registerInfo('No electric electric equipment power adjustment requested, but some life cycle costs may still be affected.')
195
- elsif (elecequip_power_reduction_percent < 1) && (elecequip_power_reduction_percent > -1)
196
- runner.registerWarning("A Electric Equipment Power Reduction Percentage of #{elecequip_power_reduction_percent} percent is abnormally low.")
197
- elsif elecequip_power_reduction_percent > 90
198
- runner.registerWarning("A Electric Equipment Power Reduction Percentage of #{elecequip_power_reduction_percent} percent is abnormally high.")
199
- elsif elecequip_power_reduction_percent < 0
200
- runner.registerInfo('The requested value for electric equipment power reduction percentage was negative. This will result in an increase in electric eqipment power.')
201
- end
202
-
203
- # check lifecycle cost arguments for reasonableness
204
- if material_and_installation_cost < -100
205
- runner.registerError("Material and Installation Cost percentage increase can't be less than -100.")
206
- return false
207
- end
208
-
209
- if demolition_cost < -100
210
- runner.registerError("Demolition Cost percentage increase can't be less than -100.")
211
- return false
212
- end
213
-
214
- if years_until_costs_start < 0
215
- runner.registerError('Enter an integer greater than or equal to 0 for Years Until Costs Start.')
216
- return false
217
- end
218
-
219
- if expected_life < 1
220
- runner.registerError('Enter an integer greater than or equal to 1 for Expected Life.')
221
- return false
222
- end
223
-
224
- if om_cost < -100
225
- runner.registerError("O & M Cost percentage increase can't be less than -100.")
226
- return false
227
- end
228
-
229
- if om_frequency < 1
230
- runner.registerError('Choose an integer greater than 0 for O & M Frequency.')
231
- end
232
-
233
- # helper to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure.
234
- def neat_numbers(number, roundto = 2) # round to 0 or 2)
235
- if roundto == 2
236
- number = format '%.2f', number
237
- else
238
- number = number.round
239
- end
240
- # regex to add commas
241
- number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
242
- end
243
-
244
- # helper to make it easier to do unit conversions on the fly. The definition be called through this measure.
245
- def unit_helper(number, from_unit_string, to_unit_string)
246
- converted_number = OpenStudio.convert(OpenStudio::Quantity.new(number, OpenStudio.createUnit(from_unit_string).get), OpenStudio.createUnit(to_unit_string).get).get.value
247
- end
248
-
249
- # helper that loops through lifecycle costs getting total costs under "Construction" or "Salvage" category and add to counter if occurs during year 0
250
- def get_total_costs_for_objects(objects)
251
- counter = 0
252
- objects.each do |object|
253
- object_LCCs = object.lifeCycleCosts
254
- object_LCCs.each do |object_LCC|
255
- if (object_LCC.category == 'Construction') || (object_LCC.category == 'Salvage')
256
- if object_LCC.yearsFromStart == 0
257
- counter += object_LCC.totalCost
258
- end
259
- end
260
- end
261
- end
262
- return counter
263
- end
264
-
265
- # counter for demo cost of baseline objects
266
- demo_costs_of_baseline_objects = 0
267
-
268
- # counter for year 0 capital costs
269
- yr0_capital_totalCosts = 0
270
-
271
- # get initial electric equipment costs and multiply by -1
272
- yr0_capital_totalCosts += get_total_costs_for_objects(model.getElectricEquipmentDefinitions) * -1
273
-
274
- # report initial condition
275
- building = model.getBuilding
276
- building_equip_power = building.electricEquipmentPower
277
- building_EPD = unit_helper(building.electricEquipmentPowerPerFloorArea, 'W/m^2', 'W/ft^2')
278
- runner.registerInitialCondition("The model's initial building electric equipment power was #{neat_numbers(building_equip_power, 0)} watts, an electric equipment power density of #{neat_numbers(building_EPD)} w/ft^2.")
279
-
280
- # get space types in model
281
- if apply_to_building
282
- space_types = model.getSpaceTypes
283
-
284
- else
285
- space_types = []
286
- space_types << space_type # only run on a single space type
287
- end
288
-
289
- # helper def to add to demo cost related to baseline objects
290
- def add_to_baseline_demo_cost_counter(baseline_object, demo_cost_initial_const)
291
- counter = 0
292
- if demo_cost_initial_const == true
293
- baseline_object_LCCs = baseline_object.lifeCycleCosts
294
- baseline_object_LCCs.each do |baseline_object_LCC|
295
- if baseline_object_LCC.category == 'Salvage'
296
- counter += baseline_object_LCC.totalCost
297
- end
298
- end
299
- end
300
- return counter
301
- end
302
-
303
- # def to alter performance and life cycle costs of objects
304
- def alter_performance_and_lcc(object, elecequip_power_reduction_percent, material_and_installation_cost, demolition_cost, om_cost, years_until_costs_start, expected_life, om_frequency, runner)
305
- # edit clone based on percentage reduction
306
- new_def = object
307
- if !new_def.designLevel.empty?
308
- new_electric_equipment_level = new_def.setDesignLevel(new_def.designLevel.get - new_def.designLevel.get * elecequip_power_reduction_percent * 0.01)
309
- elsif !new_def.wattsperSpaceFloorArea.empty?
310
- new_electric_equipment_per_area = new_def.setWattsperSpaceFloorArea(new_def.wattsperSpaceFloorArea.get - new_def.wattsperSpaceFloorArea.get * elecequip_power_reduction_percent * 0.01)
311
- elsif !new_def.wattsperPerson.empty?
312
- new_electric_equipment_per_person = new_def.setWattsperPerson(new_def.wattsperPerson.get - new_def.wattsperPerson.get * elecequip_power_reduction_percent * 0.01)
313
- else
314
- runner.registerWarning("'#{new_def.name}' is used by one or more instances and has no load values. Its performance was not altered.")
315
- end
316
-
317
- new_def_LCCs = new_def.lifeCycleCosts
318
- if new_def_LCCs.empty?
319
- if material_and_installation_cost.abs + demolition_cost.abs + om_cost.abs != 0
320
- runner.registerWarning("'#{new_def.name}' had no life cycle cost objects. No cost was added for it.")
321
- end
322
- else
323
- new_def_LCCs.each do |new_def_LCC|
324
- if new_def_LCC.category == 'Construction'
325
- new_def_LCC.setCost(new_def_LCC.cost * (1 + material_and_installation_cost / 100))
326
- new_def_LCC.setYearsFromStart(years_until_costs_start) # just uses argument value, does not need existing value
327
- new_def_LCC.setRepeatPeriodYears(expected_life) # just uses argument value, does not need existing value
328
- elsif new_def_LCC.category == 'Salvage'
329
- new_def_LCC.setCost(new_def_LCC.cost * (1 + demolition_cost / 100))
330
- new_def_LCC.setYearsFromStart(years_until_costs_start + expected_life) # just uses argument value, does not need existing value
331
- new_def_LCC.setRepeatPeriodYears(expected_life) # just uses argument value, does not need existing value
332
- elsif new_def_LCC.category == 'Maintenance'
333
- new_def_LCC.setCost(new_def_LCC.cost * (1 + om_cost / 100))
334
- new_def_LCC.setRepeatPeriodYears(om_frequency) # just uses argument value, does not need existing value
335
- end
336
-
337
- # reset any month durations
338
- new_def_LCC.resetRepeatPeriodMonths
339
- new_def_LCC.resetMonthsFromStart
340
- end
341
-
342
- end
343
- end
344
-
345
- # make a hash of old defs and new electric equipment defs
346
- cloned_elecequip_defs = {}
347
-
348
- # loop through space types
349
- space_types.each do |space_type|
350
- next if space_type.spaces.size <= 0
351
- space_type_equipments = space_type.electricEquipment
352
- space_type_equipments.each do |space_type_equipment|
353
- new_def = nil
354
-
355
- # clone def if it has not already been cloned
356
- exist_def = space_type_equipment.electricEquipmentDefinition
357
- if !cloned_elecequip_defs[exist_def.name.get.to_s].nil?
358
- new_def = cloned_elecequip_defs[exist_def.name.get.to_s]
359
- else
360
- # clone rename and add to hash
361
- new_def = exist_def.clone(model)
362
- new_def_name = new_def.setName("#{exist_def.name.get} - #{elecequip_power_reduction_percent} percent reduction")
363
- new_def = new_def.to_ElectricEquipmentDefinition.get
364
- cloned_elecequip_defs[exist_def.name.get.to_s] = new_def
365
-
366
- # add demo cost of object being removed to one counter for one time demo cost for baseline objects
367
- demo_costs_of_baseline_objects += add_to_baseline_demo_cost_counter(exist_def, demo_cost_initial_const)
368
-
369
- # call def to alter performance and life cycle costs
370
- alter_performance_and_lcc(new_def, elecequip_power_reduction_percent, material_and_installation_cost, demolition_cost, om_cost, years_until_costs_start, expected_life, om_frequency, runner)
371
-
372
- end
373
-
374
- # link instance with clone and rename
375
- updated_instance = space_type_equipment.setElectricEquipmentDefinition(new_def.to_ElectricEquipmentDefinition.get)
376
- updated_instance_name = space_type_equipment.setName("#{space_type_equipment.name} #{elecequip_power_reduction_percent} percent reduction")
377
- end
378
- end
379
-
380
- # getting spaces in the model
381
- spaces = model.getSpaces
382
-
383
- # get space types in model
384
- if apply_to_building
385
- spaces = model.getSpaces
386
- else
387
- if !space_type.spaces.empty?
388
- spaces = space_type.spaces # only run on a single space type
389
- end
390
- end
391
-
392
- spaces.each do |space|
393
- space_equipments = space.electricEquipment
394
- space_equipments.each do |space_equipment|
395
- # clone def if it has not already been cloned
396
- exist_def = space_equipment.electricEquipmentDefinition
397
- if cloned_elecequip_defs.any? { |k, v| k.to_s == exist_def.name.get.to_s }
398
- new_def = cloned_elecequip_defs[exist_def.name.get.to_s]
399
- else
400
- # clone rename and add to hash
401
- new_def = exist_def.clone(model)
402
- new_def_name = new_def.setName("#{new_def.name} - #{elecequip_power_reduction_percent} percent reduction")
403
- cloned_elecequip_defs[exist_def.name.get] = new_def
404
- new_def = new_def.to_ElectricEquipmentDefinition.get
405
-
406
- # add demo cost of object being removed to one counter for one time demo cost for baseline objects
407
- demo_costs_of_baseline_objects += add_to_baseline_demo_cost_counter(exist_def, demo_cost_initial_const)
408
-
409
- # call def to alter performance and life cycle costs
410
- alter_performance_and_lcc(new_def, elecequip_power_reduction_percent, material_and_installation_cost, demolition_cost, om_cost, years_until_costs_start, expected_life, om_frequency, runner)
411
-
412
- end
413
-
414
- # link instance with clone and rename
415
- updated_instance = space_equipment.setElectricEquipmentDefinition(new_def.to_ElectricEquipmentDefinition.get)
416
- updated_instance_name = space_equipment.setName("#{space_equipment.name} #{elecequip_power_reduction_percent} percent reduction")
417
- end
418
- end
419
-
420
- if cloned_elecequip_defs.empty?
421
- runner.registerAsNotApplicable('No electric equipment objects were found in the specified space type(s).')
422
- end
423
-
424
- # get final electric equipment costs to use in final condition
425
- yr0_capital_totalCosts += get_total_costs_for_objects(model.getElectricEquipmentDefinitions)
426
-
427
- # add one time demo cost of removed electric equipment if appropriate
428
- if demo_cost_initial_const == true
429
- building = model.getBuilding
430
- lcc_baseline_demo = OpenStudio::Model::LifeCycleCost.createLifeCycleCost('LCC_baseline_demo', building, demo_costs_of_baseline_objects, 'CostPerEach', 'Salvage', 0, years_until_costs_start).get # using 0 for repeat period since one time cost.
431
- runner.registerInfo("Adding one time cost of $#{neat_numbers(lcc_baseline_demo.totalCost, 0)} related to demolition of baseline objects.")
432
-
433
- # if demo occurs on year 0 then add to initial capital cost counter
434
- if lcc_baseline_demo.yearsFromStart == 0
435
- yr0_capital_totalCosts += lcc_baseline_demo.totalCost
436
- end
437
- end
438
-
439
- # report final condition
440
- final_building = model.getBuilding
441
- final_building_equip_power = final_building.electricEquipmentPower
442
- final_building_EPD = unit_helper(final_building.electricEquipmentPowerPerFloorArea, 'W/m^2', 'W/ft^2')
443
- runner.registerFinalCondition("The model's final building electric equipment power was #{neat_numbers(final_building_equip_power, 0)} watts, an electric equipment power density of #{neat_numbers(final_building_EPD)} w/ft^2. Initial capital costs associated with the improvements are $#{neat_numbers(yr0_capital_totalCosts, 0)}.")
444
-
445
- return true
446
- end
447
- end
448
-
449
- # this allows the measure to be used by the application
450
- ReduceElectricEquipmentLoadsByPercentage.new.registerWithApplication