openstudio-common-measures 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/openstudio/common_measures/version.rb +1 -1
- metadata +3 -63
- data/lib/measures/AddDaylightSensors/LICENSE.md +0 -27
- data/lib/measures/AddDaylightSensors/README.md +0 -136
- data/lib/measures/AddDaylightSensors/README.md.erb +0 -42
- data/lib/measures/AddDaylightSensors/measure.rb +0 -521
- data/lib/measures/AddDaylightSensors/measure.xml +0 -233
- data/lib/measures/EnableDemandControlledVentilation/LICENSE.md +0 -27
- data/lib/measures/EnableDemandControlledVentilation/README.md +0 -32
- data/lib/measures/EnableDemandControlledVentilation/README.md.erb +0 -42
- data/lib/measures/EnableDemandControlledVentilation/measure.rb +0 -154
- data/lib/measures/EnableDemandControlledVentilation/measure.xml +0 -99
- data/lib/measures/EnableEconomizerControl/LICENSE.md +0 -27
- data/lib/measures/EnableEconomizerControl/README.md +0 -48
- data/lib/measures/EnableEconomizerControl/README.md.erb +0 -42
- data/lib/measures/EnableEconomizerControl/measure.rb +0 -172
- data/lib/measures/EnableEconomizerControl/measure.xml +0 -124
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/LICENSE.md +0 -27
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md +0 -64
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md.erb +0 -42
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.rb +0 -422
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.xml +0 -150
- data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/LICENSE.md +0 -27
- data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/README.md +0 -32
- data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/README.md.erb +0 -42
- data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.rb +0 -328
- data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.xml +0 -98
- data/lib/measures/IncreaseInsulationRValueForRoofs/LICENSE.md +0 -27
- data/lib/measures/IncreaseInsulationRValueForRoofs/README.md +0 -64
- data/lib/measures/IncreaseInsulationRValueForRoofs/README.md.erb +0 -42
- data/lib/measures/IncreaseInsulationRValueForRoofs/measure.rb +0 -422
- data/lib/measures/IncreaseInsulationRValueForRoofs/measure.xml +0 -143
- data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/LICENSE.md +0 -27
- data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/README.md +0 -32
- data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/README.md.erb +0 -42
- data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/measure.rb +0 -328
- data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/measure.xml +0 -98
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/LICENSE.md +0 -27
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md +0 -97
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md.erb +0 -42
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.rb +0 -450
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.xml +0 -186
- data/lib/measures/ReduceLightingLoadsByPercentage/LICENSE.md +0 -27
- data/lib/measures/ReduceLightingLoadsByPercentage/README.md +0 -96
- data/lib/measures/ReduceLightingLoadsByPercentage/README.md.erb +0 -42
- data/lib/measures/ReduceLightingLoadsByPercentage/measure.rb +0 -513
- data/lib/measures/ReduceLightingLoadsByPercentage/measure.xml +0 -191
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/LICENSE.md +0 -27
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/README.md +0 -104
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/README.md.erb +0 -42
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.rb +0 -349
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +0 -181
- data/lib/measures/ReduceVentilationByPercentage/LICENSE.md +0 -27
- data/lib/measures/ReduceVentilationByPercentage/README.md +0 -40
- data/lib/measures/ReduceVentilationByPercentage/README.md.erb +0 -42
- data/lib/measures/ReduceVentilationByPercentage/measure.rb +0 -291
- data/lib/measures/ReduceVentilationByPercentage/measure.xml +0 -96
- data/lib/measures/create_variable_speed_rtu/LICENSE.md +0 -27
- data/lib/measures/create_variable_speed_rtu/README.md +0 -120
- data/lib/measures/create_variable_speed_rtu/README.md.erb +0 -42
- data/lib/measures/create_variable_speed_rtu/measure.rb +0 -539
- data/lib/measures/create_variable_speed_rtu/measure.xml +0 -207
@@ -1,181 +0,0 @@
|
|
1
|
-
<measure>
|
2
|
-
<schema_version>3.0</schema_version>
|
3
|
-
<name>reduce_space_infiltration_by_percentage</name>
|
4
|
-
<uid>6e9de4b1-aa97-4010-80c8-529e53ffe943</uid>
|
5
|
-
<version_id>9ef672ce-f7a6-479d-9f4c-8efa80b39f5b</version_id>
|
6
|
-
<version_modified>20200229T024316Z</version_modified>
|
7
|
-
<xml_checksum>EACB548E</xml_checksum>
|
8
|
-
<class_name>ReduceSpaceInfiltrationByPercentage</class_name>
|
9
|
-
<display_name>ReduceSpaceInfiltrationByPercentage</display_name>
|
10
|
-
<description>This measure will reduce space infiltration rates by the requested percentage. A cost per square foot of building area can be added to the model.</description>
|
11
|
-
<modeler_description>This can be run across a space type or the entire building. Costs will be associated with the building. If infiltration objects are removed at a later date, the costs will remain.</modeler_description>
|
12
|
-
<arguments>
|
13
|
-
<argument>
|
14
|
-
<name>space_type</name>
|
15
|
-
<display_name>Apply the Measure to a Specific Space Type or to the Entire Model.</display_name>
|
16
|
-
<type>Choice</type>
|
17
|
-
<required>true</required>
|
18
|
-
<model_dependent>false</model_dependent>
|
19
|
-
<default_value>*Entire Building*</default_value>
|
20
|
-
<choices>
|
21
|
-
<choice>
|
22
|
-
<value>{d0d83664-f46a-42ef-aeb8-e4554efbee21}</value>
|
23
|
-
<display_name>*Entire Building*</display_name>
|
24
|
-
</choice>
|
25
|
-
</choices>
|
26
|
-
</argument>
|
27
|
-
<argument>
|
28
|
-
<name>space_infiltration_reduction_percent</name>
|
29
|
-
<display_name>Space Infiltration Power Reduction</display_name>
|
30
|
-
<type>Double</type>
|
31
|
-
<units>%</units>
|
32
|
-
<required>true</required>
|
33
|
-
<model_dependent>false</model_dependent>
|
34
|
-
<default_value>30</default_value>
|
35
|
-
</argument>
|
36
|
-
<argument>
|
37
|
-
<name>constant_coefficient</name>
|
38
|
-
<display_name>Constant Coefficient</display_name>
|
39
|
-
<type>Double</type>
|
40
|
-
<required>true</required>
|
41
|
-
<model_dependent>false</model_dependent>
|
42
|
-
<default_value>1</default_value>
|
43
|
-
</argument>
|
44
|
-
<argument>
|
45
|
-
<name>temperature_coefficient</name>
|
46
|
-
<display_name>Temperature Coefficient</display_name>
|
47
|
-
<type>Double</type>
|
48
|
-
<required>true</required>
|
49
|
-
<model_dependent>false</model_dependent>
|
50
|
-
<default_value>0</default_value>
|
51
|
-
</argument>
|
52
|
-
<argument>
|
53
|
-
<name>wind_speed_coefficient</name>
|
54
|
-
<display_name>Wind Speed Coefficient</display_name>
|
55
|
-
<type>Double</type>
|
56
|
-
<required>true</required>
|
57
|
-
<model_dependent>false</model_dependent>
|
58
|
-
<default_value>0</default_value>
|
59
|
-
</argument>
|
60
|
-
<argument>
|
61
|
-
<name>wind_speed_squared_coefficient</name>
|
62
|
-
<display_name>Wind Speed Squared Coefficient</display_name>
|
63
|
-
<type>Double</type>
|
64
|
-
<required>true</required>
|
65
|
-
<model_dependent>false</model_dependent>
|
66
|
-
<default_value>0</default_value>
|
67
|
-
</argument>
|
68
|
-
<argument>
|
69
|
-
<name>alter_coef</name>
|
70
|
-
<display_name>Alter constant temperature and wind speed coefficients.</display_name>
|
71
|
-
<description>Setting this to false will result in infiltration objects that maintain the coefficients from the initial model. Setting this to true replaces the existing coefficients with the values entered for the coefficient arguments in this measure</description>
|
72
|
-
<type>Boolean</type>
|
73
|
-
<required>true</required>
|
74
|
-
<model_dependent>false</model_dependent>
|
75
|
-
<default_value>true</default_value>
|
76
|
-
<choices>
|
77
|
-
<choice>
|
78
|
-
<value>true</value>
|
79
|
-
<display_name>true</display_name>
|
80
|
-
</choice>
|
81
|
-
<choice>
|
82
|
-
<value>false</value>
|
83
|
-
<display_name>false</display_name>
|
84
|
-
</choice>
|
85
|
-
</choices>
|
86
|
-
</argument>
|
87
|
-
<argument>
|
88
|
-
<name>material_and_installation_cost</name>
|
89
|
-
<display_name>Increase in Material and Installation Costs for Building per Affected Floor Area</display_name>
|
90
|
-
<type>Double</type>
|
91
|
-
<units>$/ft^2</units>
|
92
|
-
<required>true</required>
|
93
|
-
<model_dependent>false</model_dependent>
|
94
|
-
<default_value>0</default_value>
|
95
|
-
</argument>
|
96
|
-
<argument>
|
97
|
-
<name>om_cost</name>
|
98
|
-
<display_name>O & M Costs for Construction per Affected Floor Area</display_name>
|
99
|
-
<type>Double</type>
|
100
|
-
<units>$/ft^2</units>
|
101
|
-
<required>true</required>
|
102
|
-
<model_dependent>false</model_dependent>
|
103
|
-
<default_value>0</default_value>
|
104
|
-
</argument>
|
105
|
-
<argument>
|
106
|
-
<name>om_frequency</name>
|
107
|
-
<display_name>O & M Frequency</display_name>
|
108
|
-
<type>Integer</type>
|
109
|
-
<units>whole years</units>
|
110
|
-
<required>true</required>
|
111
|
-
<model_dependent>false</model_dependent>
|
112
|
-
<default_value>1</default_value>
|
113
|
-
</argument>
|
114
|
-
</arguments>
|
115
|
-
<outputs/>
|
116
|
-
<provenances/>
|
117
|
-
<tags>
|
118
|
-
<tag>Envelope.Infiltration</tag>
|
119
|
-
</tags>
|
120
|
-
<attributes>
|
121
|
-
<attribute>
|
122
|
-
<name>Measure Type</name>
|
123
|
-
<value>ModelMeasure</value>
|
124
|
-
<datatype>string</datatype>
|
125
|
-
</attribute>
|
126
|
-
<attribute>
|
127
|
-
<name>Uses SketchUp API</name>
|
128
|
-
<value>false</value>
|
129
|
-
<datatype>boolean</datatype>
|
130
|
-
</attribute>
|
131
|
-
</attributes>
|
132
|
-
<files>
|
133
|
-
<file>
|
134
|
-
<filename>EnvelopeAndLoadTestModel_01.osm</filename>
|
135
|
-
<filetype>osm</filetype>
|
136
|
-
<usage_type>test</usage_type>
|
137
|
-
<checksum>E64096CB</checksum>
|
138
|
-
</file>
|
139
|
-
<file>
|
140
|
-
<filename>EnvelopeAndLoadTestModel_01_FullyCosted.osm</filename>
|
141
|
-
<filetype>osm</filetype>
|
142
|
-
<usage_type>test</usage_type>
|
143
|
-
<checksum>38E06CA8</checksum>
|
144
|
-
</file>
|
145
|
-
<file>
|
146
|
-
<filename>README.md.erb</filename>
|
147
|
-
<filetype>erb</filetype>
|
148
|
-
<usage_type>readmeerb</usage_type>
|
149
|
-
<checksum>703C9964</checksum>
|
150
|
-
</file>
|
151
|
-
<file>
|
152
|
-
<filename>README.md</filename>
|
153
|
-
<filetype>md</filetype>
|
154
|
-
<usage_type>readme</usage_type>
|
155
|
-
<checksum>864A4EE3</checksum>
|
156
|
-
</file>
|
157
|
-
<file>
|
158
|
-
<filename>ReduceSpaceInfiltrationByPercentage_Test.rb</filename>
|
159
|
-
<filetype>rb</filetype>
|
160
|
-
<usage_type>test</usage_type>
|
161
|
-
<checksum>1B488447</checksum>
|
162
|
-
</file>
|
163
|
-
<file>
|
164
|
-
<filename>LICENSE.md</filename>
|
165
|
-
<filetype>md</filetype>
|
166
|
-
<usage_type>license</usage_type>
|
167
|
-
<checksum>E0468DD6</checksum>
|
168
|
-
</file>
|
169
|
-
<file>
|
170
|
-
<version>
|
171
|
-
<software_program>OpenStudio</software_program>
|
172
|
-
<identifier>2.0.0</identifier>
|
173
|
-
<min_compatible>2.0.0</min_compatible>
|
174
|
-
</version>
|
175
|
-
<filename>measure.rb</filename>
|
176
|
-
<filetype>rb</filetype>
|
177
|
-
<usage_type>script</usage_type>
|
178
|
-
<checksum>80A67D65</checksum>
|
179
|
-
</file>
|
180
|
-
</files>
|
181
|
-
</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,40 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
###### (Automatically generated documentation)
|
4
|
-
|
5
|
-
# ReduceVentilationByPercentage
|
6
|
-
|
7
|
-
## Description
|
8
|
-
|
9
|
-
|
10
|
-
## Modeler Description
|
11
|
-
|
12
|
-
|
13
|
-
## Measure Type
|
14
|
-
ModelMeasure
|
15
|
-
|
16
|
-
## Taxonomy
|
17
|
-
|
18
|
-
|
19
|
-
## Arguments
|
20
|
-
|
21
|
-
|
22
|
-
### Apply the Measure to a Specific Space Type or to the Entire Model.
|
23
|
-
|
24
|
-
**Name:** space_type,
|
25
|
-
**Type:** Choice,
|
26
|
-
**Units:** ,
|
27
|
-
**Required:** true,
|
28
|
-
**Model Dependent:** false
|
29
|
-
|
30
|
-
### Design Specification Outdoor Air Reduction (%).
|
31
|
-
|
32
|
-
**Name:** design_spec_outdoor_air_reduction_percent,
|
33
|
-
**Type:** Double,
|
34
|
-
**Units:** ,
|
35
|
-
**Required:** true,
|
36
|
-
**Model Dependent:** false
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
@@ -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,291 +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
|
-
# see the URL below for information on how to write OpenStudio measures
|
37
|
-
# http://openstudio.nrel.gov/openstudio-measure-writing-guide
|
38
|
-
|
39
|
-
# see the URL below for information on using life cycle cost objects in OpenStudio
|
40
|
-
# http://openstudio.nrel.gov/openstudio-life-cycle-examples
|
41
|
-
|
42
|
-
# see the URL below for access to C++ documentation on model objects (click on "model" in the main window to view model objects)
|
43
|
-
# http://openstudio.nrel.gov/sites/openstudio.nrel.gov/files/nv_data/cpp_documentation_it/model/html/namespaces.html
|
44
|
-
|
45
|
-
# start the measure
|
46
|
-
class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
47
|
-
# define the name that a user will see, this method may be deprecated as
|
48
|
-
# the display name in PAT comes from the name field in measure.xml
|
49
|
-
def name
|
50
|
-
return 'ReduceVentilationByPercentage'
|
51
|
-
end
|
52
|
-
|
53
|
-
# define the arguments that the user will input
|
54
|
-
def arguments(model)
|
55
|
-
args = OpenStudio::Measure::OSArgumentVector.new
|
56
|
-
|
57
|
-
# make a choice argument for model objects
|
58
|
-
space_type_handles = OpenStudio::StringVector.new
|
59
|
-
space_type_display_names = OpenStudio::StringVector.new
|
60
|
-
|
61
|
-
# putting model object and names into hash
|
62
|
-
space_type_args = model.getSpaceTypes
|
63
|
-
space_type_args_hash = {}
|
64
|
-
space_type_args.each do |space_type_arg|
|
65
|
-
space_type_args_hash[space_type_arg.name.to_s] = space_type_arg
|
66
|
-
end
|
67
|
-
|
68
|
-
# looping through sorted hash of model objects
|
69
|
-
space_type_args_hash.sort.map do |key, value|
|
70
|
-
# only include if space type is used in the model
|
71
|
-
if !value.spaces.empty?
|
72
|
-
space_type_handles << value.handle.to_s
|
73
|
-
space_type_display_names << key
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
# add building to string vector with space type
|
78
|
-
building = model.getBuilding
|
79
|
-
space_type_handles << building.handle.to_s
|
80
|
-
space_type_display_names << '*Entire Building*'
|
81
|
-
|
82
|
-
# make a choice argument for space type
|
83
|
-
space_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('space_type', space_type_handles, space_type_display_names)
|
84
|
-
space_type.setDisplayName('Apply the Measure to a Specific Space Type or to the Entire Model.')
|
85
|
-
space_type.setDefaultValue('*Entire Building*') # if no space type is chosen this will run on the entire building
|
86
|
-
args << space_type
|
87
|
-
|
88
|
-
# make an argument for reduction percentage
|
89
|
-
design_spec_outdoor_air_reduction_percent = OpenStudio::Measure::OSArgument.makeDoubleArgument('design_spec_outdoor_air_reduction_percent', true)
|
90
|
-
design_spec_outdoor_air_reduction_percent.setDisplayName('Design Specification Outdoor Air Reduction (%).')
|
91
|
-
design_spec_outdoor_air_reduction_percent.setDefaultValue(30.0)
|
92
|
-
args << design_spec_outdoor_air_reduction_percent
|
93
|
-
|
94
|
-
# no cost required to reduce required amount of outdoor air. Cost increase or decrease will relate to system sizing and ongoing energy use due to change in outdoor air provided.
|
95
|
-
|
96
|
-
return args
|
97
|
-
end
|
98
|
-
|
99
|
-
# define what happens when the measure is run
|
100
|
-
def run(model, runner, user_arguments)
|
101
|
-
super(model, runner, user_arguments)
|
102
|
-
|
103
|
-
# use the built-in error checking
|
104
|
-
if !runner.validateUserArguments(arguments(model), user_arguments)
|
105
|
-
return false
|
106
|
-
end
|
107
|
-
|
108
|
-
# assign the user inputs to variables
|
109
|
-
object = runner.getOptionalWorkspaceObjectChoiceValue('space_type', user_arguments, model)
|
110
|
-
design_spec_outdoor_air_reduction_percent = runner.getDoubleArgumentValue('design_spec_outdoor_air_reduction_percent', user_arguments)
|
111
|
-
|
112
|
-
# check the space_type for reasonableness and see if measure should run on space type or on the entire building
|
113
|
-
apply_to_building = false
|
114
|
-
space_type = nil
|
115
|
-
if object.empty?
|
116
|
-
handle = runner.getStringArgumentValue('space_type', user_arguments)
|
117
|
-
if handle.empty?
|
118
|
-
runner.registerError('No space type was chosen.')
|
119
|
-
else
|
120
|
-
runner.registerError("The selected space type with handle '#{handle}' was not found in the model. It may have been removed by another measure.")
|
121
|
-
end
|
122
|
-
return false
|
123
|
-
else
|
124
|
-
if !object.get.to_SpaceType.empty?
|
125
|
-
space_type = object.get.to_SpaceType.get
|
126
|
-
elsif !object.get.to_Building.empty?
|
127
|
-
apply_to_building = true
|
128
|
-
else
|
129
|
-
runner.registerError('Script Error - argument not showing up as space type or building.')
|
130
|
-
return false
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
# check the design_spec_outdoor_air_reduction_percent and for reasonableness
|
135
|
-
if design_spec_outdoor_air_reduction_percent > 100
|
136
|
-
runner.registerError('Please enter a value less than or equal to 100 for the Outdoor Air Requirement reduction percentage.')
|
137
|
-
return false
|
138
|
-
elsif design_spec_outdoor_air_reduction_percent == 0
|
139
|
-
runner.registerInfo('No Outdoor Air Requirement adjustment requested, but some life cycle costs may still be affected.')
|
140
|
-
elsif (design_spec_outdoor_air_reduction_percent < 1) && (design_spec_outdoor_air_reduction_percent > -1)
|
141
|
-
runner.registerWarning("A Outdoor Air Requirement reduction percentage of #{design_spec_outdoor_air_reduction_percent} percent is abnormally low.")
|
142
|
-
elsif design_spec_outdoor_air_reduction_percent > 90
|
143
|
-
runner.registerWarning("A Outdoor Air Requirement reduction percentage of #{design_spec_outdoor_air_reduction_percent} percent is abnormally high.")
|
144
|
-
elsif design_spec_outdoor_air_reduction_percent < 0
|
145
|
-
runner.registerInfo('The requested value for Outdoor Air Requirement reduction percentage was negative. This will result in an increase in the Outdoor Air Requirement.')
|
146
|
-
end
|
147
|
-
|
148
|
-
# helper to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure.
|
149
|
-
def neat_numbers(number, roundto = 2) # round to 0 or 2)
|
150
|
-
if roundto == 2
|
151
|
-
number = format '%.2f', number
|
152
|
-
else
|
153
|
-
number = number.round
|
154
|
-
end
|
155
|
-
# regex to add commas
|
156
|
-
number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
|
157
|
-
end
|
158
|
-
|
159
|
-
# get space design_spec_outdoor_air_objects objects used in the model
|
160
|
-
design_spec_outdoor_air_objects = model.getDesignSpecificationOutdoorAirs
|
161
|
-
# TODO: - it would be nice to give ranges for different calculation methods but would take some work.
|
162
|
-
|
163
|
-
# counters needed for measure
|
164
|
-
altered_instances = 0
|
165
|
-
|
166
|
-
# reporting initial condition of model
|
167
|
-
if !design_spec_outdoor_air_objects.empty?
|
168
|
-
runner.registerInitialCondition("The initial model contained #{design_spec_outdoor_air_objects.size} design specification outdoor air objects.")
|
169
|
-
else
|
170
|
-
runner.registerInitialCondition('The initial model did not contain any design specification outdoor air.')
|
171
|
-
end
|
172
|
-
|
173
|
-
# get space types in model
|
174
|
-
building = model.building.get
|
175
|
-
if apply_to_building
|
176
|
-
space_types = model.getSpaceTypes
|
177
|
-
affected_area_si = building.floorArea
|
178
|
-
else
|
179
|
-
space_types = []
|
180
|
-
space_types << space_type # only run on a single space type
|
181
|
-
affected_area_si = space_type.floorArea
|
182
|
-
end
|
183
|
-
|
184
|
-
# split apart any shared uses of design specification outdoor air
|
185
|
-
design_spec_outdoor_air_objects.each do |design_spec_outdoor_air_object|
|
186
|
-
direct_use_count = design_spec_outdoor_air_object.directUseCount
|
187
|
-
next if direct_use_count <= 1
|
188
|
-
direct_uses = design_spec_outdoor_air_object.sources
|
189
|
-
original_cloned = false
|
190
|
-
|
191
|
-
# adjust count test for direct uses that are component data
|
192
|
-
direct_uses.each do |direct_use|
|
193
|
-
component_data_source = direct_use.to_ComponentData
|
194
|
-
if !component_data_source.empty?
|
195
|
-
direct_use_count -= 1
|
196
|
-
end
|
197
|
-
end
|
198
|
-
next if direct_use_count <= 1
|
199
|
-
|
200
|
-
direct_uses.each do |direct_use|
|
201
|
-
# clone and hookup design spec OA
|
202
|
-
space_type_source = direct_use.to_SpaceType
|
203
|
-
if !space_type_source.empty?
|
204
|
-
space_type_source = space_type_source.get
|
205
|
-
cloned_object = design_spec_outdoor_air_object.clone
|
206
|
-
space_type_source.setDesignSpecificationOutdoorAir(cloned_object.to_DesignSpecificationOutdoorAir.get)
|
207
|
-
original_cloned = true
|
208
|
-
end
|
209
|
-
|
210
|
-
space_source = direct_use.to_Space
|
211
|
-
if !space_source.empty?
|
212
|
-
space_source = space_source.get
|
213
|
-
cloned_object = design_spec_outdoor_air_object.clone
|
214
|
-
space_source.setDesignSpecificationOutdoorAir(cloned_object.to_DesignSpecificationOutdoorAir.get)
|
215
|
-
original_cloned = true
|
216
|
-
end
|
217
|
-
end
|
218
|
-
|
219
|
-
# delete the now unused design spec OA
|
220
|
-
if original_cloned
|
221
|
-
runner.registerInfo("Making shared object #{design_spec_outdoor_air_object.name} unique.")
|
222
|
-
design_spec_outdoor_air_object.remove
|
223
|
-
end
|
224
|
-
end
|
225
|
-
|
226
|
-
# def to alter performance and life cycle costs of objects
|
227
|
-
def alter_performance(object, design_spec_outdoor_air_reduction_percent, runner)
|
228
|
-
# edit instance based on percentage reduction
|
229
|
-
instance = object
|
230
|
-
|
231
|
-
# not checking if fields are empty because these are optional like values for space infiltration are.
|
232
|
-
new_outdoor_air_per_person = instance.setOutdoorAirFlowperPerson(instance.outdoorAirFlowperPerson - instance.outdoorAirFlowperPerson * design_spec_outdoor_air_reduction_percent * 0.01)
|
233
|
-
new_outdoor_air_per_floor_area = instance.setOutdoorAirFlowperFloorArea(instance.outdoorAirFlowperFloorArea - instance.outdoorAirFlowperFloorArea * design_spec_outdoor_air_reduction_percent * 0.01)
|
234
|
-
new_outdoor_air_ach = instance.setOutdoorAirFlowAirChangesperHour(instance.outdoorAirFlowAirChangesperHour - instance.outdoorAirFlowAirChangesperHour * design_spec_outdoor_air_reduction_percent * 0.01)
|
235
|
-
new_outdoor_air_rate = instance.setOutdoorAirFlowRate(instance.outdoorAirFlowRate - instance.outdoorAirFlowRate * design_spec_outdoor_air_reduction_percent * 0.01)
|
236
|
-
end
|
237
|
-
|
238
|
-
# array of instances to change
|
239
|
-
instances_array = []
|
240
|
-
|
241
|
-
# loop through space types
|
242
|
-
space_types.each do |space_type|
|
243
|
-
next if space_type.spaces.size <= 0
|
244
|
-
instances_array << space_type.designSpecificationOutdoorAir
|
245
|
-
end
|
246
|
-
|
247
|
-
# get spaces in model
|
248
|
-
if apply_to_building
|
249
|
-
spaces = model.getSpaces
|
250
|
-
else
|
251
|
-
if !space_type.spaces.empty?
|
252
|
-
spaces = space_type.spaces # only run on a single space type
|
253
|
-
end
|
254
|
-
end
|
255
|
-
|
256
|
-
spaces.each do |space|
|
257
|
-
instances_array << space.designSpecificationOutdoorAir
|
258
|
-
end
|
259
|
-
|
260
|
-
instance_processed = []
|
261
|
-
|
262
|
-
instances_array.each do |instance|
|
263
|
-
next if instance.empty?
|
264
|
-
instance = instance.get
|
265
|
-
|
266
|
-
# only continue if this instance has not been processed yet
|
267
|
-
next if instance_processed.include? instance
|
268
|
-
instance_processed << instance
|
269
|
-
|
270
|
-
# call def to alter performance and life cycle costs
|
271
|
-
alter_performance(instance, design_spec_outdoor_air_reduction_percent, runner)
|
272
|
-
|
273
|
-
# rename
|
274
|
-
updated_instance_name = instance.setName("#{instance.name} (#{design_spec_outdoor_air_reduction_percent} percent reduction)")
|
275
|
-
altered_instances += 1
|
276
|
-
end
|
277
|
-
|
278
|
-
if altered_instances == 0
|
279
|
-
runner.registerAsNotApplicable('No design specification outdoor air objects were found in the specified space type(s).')
|
280
|
-
end
|
281
|
-
|
282
|
-
# report final condition
|
283
|
-
affected_area_ip = OpenStudio.convert(affected_area_si, 'm^2', 'ft^2').get
|
284
|
-
runner.registerFinalCondition("#{altered_instances} design specification outdoor air objects in the model were altered affecting #{neat_numbers(affected_area_ip, 0)}(ft^2).")
|
285
|
-
|
286
|
-
return true
|
287
|
-
end
|
288
|
-
end
|
289
|
-
|
290
|
-
# this allows the measure to be use by the application
|
291
|
-
ReduceVentilationByPercentage.new.registerWithApplication
|