openstudio-extension 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +29 -26
- data/.rspec +3 -3
- data/.rubocop.yml +10 -9
- data/CHANGELOG.md +16 -0
- data/Gemfile +6 -6
- data/Jenkinsfile +10 -10
- data/README.md +251 -250
- data/Rakefile +119 -119
- data/bin/console +14 -14
- data/bin/setup +8 -8
- data/doc_templates/LICENSE.md +26 -26
- data/doc_templates/README.md.erb +41 -41
- data/doc_templates/copyright_erb.txt +35 -35
- data/doc_templates/copyright_js.txt +3 -3
- data/doc_templates/copyright_ruby.txt +33 -33
- data/init_templates/README.md +37 -37
- data/init_templates/gemspec.txt +32 -32
- data/init_templates/openstudio_module.rb +50 -50
- data/init_templates/spec.rb +47 -47
- data/init_templates/spec_helper.rb +49 -49
- data/init_templates/template_gemfile.txt +17 -17
- data/init_templates/template_rakefile.txt +15 -15
- data/init_templates/version.rb +40 -40
- data/lib/files/openstudio-extension-gem-test.ddy +536 -536
- data/lib/files/openstudio-extension-gem-test.epw +8768 -8768
- data/lib/files/openstudio-extension-gem-test.stat +554 -554
- data/lib/measures/openstudio_extension_test_measure/LICENSE.md +26 -26
- data/lib/measures/openstudio_extension_test_measure/README.md +26 -26
- data/lib/measures/openstudio_extension_test_measure/README.md.erb +41 -41
- data/lib/measures/openstudio_extension_test_measure/measure.rb +72 -72
- data/lib/measures/openstudio_extension_test_measure/measure.xml +83 -83
- data/lib/measures/openstudio_extension_test_measure/resources/os_lib_helper_methods.rb +399 -399
- data/lib/measures/openstudio_extension_test_measure/tests/{OpenStudioExtensionTestMeasure_Test.rb → openstudio_extension_test_measure_test.rb} +74 -75
- data/lib/openstudio-extension.rb +1 -1
- data/lib/openstudio/extension.rb +234 -229
- data/lib/openstudio/extension/core/CreateResults.rb +886 -886
- data/lib/openstudio/extension/core/check_air_sys_temps.rb +190 -190
- data/lib/openstudio/extension/core/check_calibration.rb +155 -155
- data/lib/openstudio/extension/core/check_cond_zns.rb +84 -84
- data/lib/openstudio/extension/core/check_domestic_hot_water.rb +334 -334
- data/lib/openstudio/extension/core/check_envelope_conductance.rb +453 -453
- data/lib/openstudio/extension/core/check_eui_by_end_use.rb +162 -162
- data/lib/openstudio/extension/core/check_eui_reasonableness.rb +135 -135
- data/lib/openstudio/extension/core/check_fan_pwr.rb +98 -98
- data/lib/openstudio/extension/core/check_internal_loads.rb +393 -393
- data/lib/openstudio/extension/core/check_mech_sys_capacity.rb +226 -226
- data/lib/openstudio/extension/core/check_mech_sys_efficiency.rb +326 -326
- data/lib/openstudio/extension/core/check_mech_sys_part_load_eff.rb +464 -464
- data/lib/openstudio/extension/core/check_mech_sys_type.rb +139 -139
- data/lib/openstudio/extension/core/check_part_loads.rb +451 -451
- data/lib/openstudio/extension/core/check_placeholder.rb +75 -75
- data/lib/openstudio/extension/core/check_plant_cap.rb +123 -123
- data/lib/openstudio/extension/core/check_plant_temps.rb +159 -159
- data/lib/openstudio/extension/core/check_plenum_loads.rb +87 -87
- data/lib/openstudio/extension/core/check_pump_pwr.rb +108 -108
- data/lib/openstudio/extension/core/check_sch_coord.rb +241 -241
- data/lib/openstudio/extension/core/check_schedules.rb +311 -311
- data/lib/openstudio/extension/core/check_simultaneous_heating_and_cooling.rb +158 -158
- data/lib/openstudio/extension/core/check_supply_air_and_thermostat_temp_difference.rb +148 -148
- data/lib/openstudio/extension/core/check_weather_files.rb +132 -132
- data/lib/openstudio/extension/core/deer_vintages.rb +311 -311
- data/lib/openstudio/extension/core/os_lib_aedg_measures.rb +491 -491
- data/lib/openstudio/extension/core/os_lib_cofee.rb +258 -258
- data/lib/openstudio/extension/core/os_lib_constructions.rb +378 -378
- data/lib/openstudio/extension/core/os_lib_geometry.rb +1022 -1022
- data/lib/openstudio/extension/core/os_lib_helper_methods.rb +399 -399
- data/lib/openstudio/extension/core/os_lib_hvac.rb +2171 -2171
- data/lib/openstudio/extension/core/os_lib_lighting_and_equipment.rb +214 -214
- data/lib/openstudio/extension/core/os_lib_model_generation.rb +817 -817
- data/lib/openstudio/extension/core/os_lib_model_simplification.rb +1049 -1049
- data/lib/openstudio/extension/core/os_lib_outdoorair_and_infiltration.rb +165 -165
- data/lib/openstudio/extension/core/os_lib_reporting.rb +4651 -4651
- data/lib/openstudio/extension/core/os_lib_reporting_qaqc.rb +200 -200
- data/lib/openstudio/extension/core/os_lib_schedules.rb +963 -963
- data/lib/openstudio/extension/rake_task.rb +159 -149
- data/lib/openstudio/extension/runner.rb +667 -644
- data/lib/openstudio/extension/runner_config.rb +114 -0
- data/lib/openstudio/extension/version.rb +40 -40
- data/openstudio-extension.gemspec +34 -33
- metadata +39 -37
@@ -1,27 +1,27 @@
|
|
1
|
-
OpenStudio(R), Copyright (c) 2008-2018, 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
|
1
|
+
OpenStudio(R), Copyright (c) 2008-2018, 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
27
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -1,26 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
###### (Automatically generated documentation)
|
4
|
-
|
5
|
-
# OpenStudio Extension Test Measure
|
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
|
-
|
23
|
-
|
24
|
-
This measure does not have any user arguments
|
25
|
-
|
26
|
-
|
1
|
+
|
2
|
+
|
3
|
+
###### (Automatically generated documentation)
|
4
|
+
|
5
|
+
# OpenStudio Extension Test Measure
|
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
|
+
|
23
|
+
|
24
|
+
This measure does not have any user arguments
|
25
|
+
|
26
|
+
|
@@ -1,42 +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(", ") %>
|
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
42
|
<% end %>
|
@@ -1,72 +1,72 @@
|
|
1
|
-
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c) 2008-2019, 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
|
-
begin
|
37
|
-
#load OpenStudio measure libraries from common location
|
38
|
-
require 'openstudio/extension/core/os_lib_helper_methods'
|
39
|
-
rescue LoadError
|
40
|
-
# common location unavailable, load from local resources
|
41
|
-
require_relative 'resources/os_lib_helper_methods'
|
42
|
-
end
|
43
|
-
|
44
|
-
# start the measure
|
45
|
-
class OpenStudioExtensionTestMeasure < OpenStudio::Measure::ModelMeasure
|
46
|
-
# define the name that a user will see
|
47
|
-
def name
|
48
|
-
return 'OpenStudio Extension Test Measure'
|
49
|
-
end
|
50
|
-
|
51
|
-
# define the arguments that the user will input
|
52
|
-
def arguments(model)
|
53
|
-
args = OpenStudio::Measure::OSArgumentVector.new
|
54
|
-
|
55
|
-
return args
|
56
|
-
end
|
57
|
-
|
58
|
-
# define what happens when the measure is run
|
59
|
-
def run(model, runner, user_arguments)
|
60
|
-
super(model, runner, user_arguments)
|
61
|
-
|
62
|
-
# use the built-in error checking
|
63
|
-
if !runner.validateUserArguments(arguments(model), user_arguments)
|
64
|
-
return false
|
65
|
-
end
|
66
|
-
|
67
|
-
return true
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
# this allows the measure to be used by the application
|
72
|
-
OpenStudioExtensionTestMeasure.new.registerWithApplication
|
1
|
+
# *******************************************************************************
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2019, 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
|
+
begin
|
37
|
+
# load OpenStudio measure libraries from common location
|
38
|
+
require 'openstudio/extension/core/os_lib_helper_methods'
|
39
|
+
rescue LoadError
|
40
|
+
# common location unavailable, load from local resources
|
41
|
+
require_relative 'resources/os_lib_helper_methods'
|
42
|
+
end
|
43
|
+
|
44
|
+
# start the measure
|
45
|
+
class OpenStudioExtensionTestMeasure < OpenStudio::Measure::ModelMeasure
|
46
|
+
# define the name that a user will see
|
47
|
+
def name
|
48
|
+
return 'OpenStudio Extension Test Measure'
|
49
|
+
end
|
50
|
+
|
51
|
+
# define the arguments that the user will input
|
52
|
+
def arguments(model)
|
53
|
+
args = OpenStudio::Measure::OSArgumentVector.new
|
54
|
+
|
55
|
+
return args
|
56
|
+
end
|
57
|
+
|
58
|
+
# define what happens when the measure is run
|
59
|
+
def run(model, runner, user_arguments)
|
60
|
+
super(model, runner, user_arguments)
|
61
|
+
|
62
|
+
# use the built-in error checking
|
63
|
+
if !runner.validateUserArguments(arguments(model), user_arguments)
|
64
|
+
return false
|
65
|
+
end
|
66
|
+
|
67
|
+
return true
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# this allows the measure to be used by the application
|
72
|
+
OpenStudioExtensionTestMeasure.new.registerWithApplication
|
@@ -1,83 +1,83 @@
|
|
1
|
-
<measure>
|
2
|
-
<schema_version>3.0</schema_version>
|
3
|
-
<name>openstudio_extension_test_measure</name>
|
4
|
-
<uid>36b99a29-41e1-4d85-9272-85d43b966e5a</uid>
|
5
|
-
<version_id>e9fedf04-7619-4c93-a865-0e54adfe3507</version_id>
|
6
|
-
<version_modified>20190430T155209Z</version_modified>
|
7
|
-
<xml_checksum>49BEF039</xml_checksum>
|
8
|
-
<class_name>OpenStudioExtensionTestMeasure</class_name>
|
9
|
-
<display_name>OpenStudio Extension Test Measure</display_name>
|
10
|
-
<description>Rotate your building relative to its current orientation. This will not rotate site shading objects.</description>
|
11
|
-
<modeler_description>Get the North Axis field for the OS:Building object and adjusted it based on the user specified value. If the starting value is 20 degrees and the user value is 5 degrees, then the resulting value is 25 degrees.</modeler_description>
|
12
|
-
<arguments/>
|
13
|
-
<outputs/>
|
14
|
-
<provenances/>
|
15
|
-
<tags>
|
16
|
-
<tag>Envelope.Form</tag>
|
17
|
-
</tags>
|
18
|
-
<attributes>
|
19
|
-
<attribute>
|
20
|
-
<name>Measure Type</name>
|
21
|
-
<value>ModelMeasure</value>
|
22
|
-
<datatype>string</datatype>
|
23
|
-
</attribute>
|
24
|
-
<attribute>
|
25
|
-
<name>Measure Function</name>
|
26
|
-
<value>Measure</value>
|
27
|
-
<datatype>string</datatype>
|
28
|
-
</attribute>
|
29
|
-
<attribute>
|
30
|
-
<name>Requires EnergyPlus Results</name>
|
31
|
-
<value>false</value>
|
32
|
-
<datatype>boolean</datatype>
|
33
|
-
</attribute>
|
34
|
-
<attribute>
|
35
|
-
<name>Uses SketchUp API</name>
|
36
|
-
<value>false</value>
|
37
|
-
<datatype>boolean</datatype>
|
38
|
-
</attribute>
|
39
|
-
</attributes>
|
40
|
-
<files>
|
41
|
-
<file>
|
42
|
-
<filename>LICENSE.md</filename>
|
43
|
-
<filetype>md</filetype>
|
44
|
-
<usage_type>license</usage_type>
|
45
|
-
<checksum>9640B6CB</checksum>
|
46
|
-
</file>
|
47
|
-
<file>
|
48
|
-
<filename>README.md.erb</filename>
|
49
|
-
<filetype>erb</filetype>
|
50
|
-
<usage_type>readmeerb</usage_type>
|
51
|
-
<checksum>703C9964</checksum>
|
52
|
-
</file>
|
53
|
-
<file>
|
54
|
-
<filename>README.md</filename>
|
55
|
-
<filetype>md</filetype>
|
56
|
-
<usage_type>readme</usage_type>
|
57
|
-
<checksum>7258830F</checksum>
|
58
|
-
</file>
|
59
|
-
<file>
|
60
|
-
<filename>OpenStudioExtensionTestMeasure_Test.rb</filename>
|
61
|
-
<filetype>rb</filetype>
|
62
|
-
<usage_type>test</usage_type>
|
63
|
-
<checksum>8452EA9A</checksum>
|
64
|
-
</file>
|
65
|
-
<file>
|
66
|
-
<version>
|
67
|
-
<software_program>OpenStudio</software_program>
|
68
|
-
<identifier>2.0.0</identifier>
|
69
|
-
<min_compatible>2.0.0</min_compatible>
|
70
|
-
</version>
|
71
|
-
<filename>measure.rb</filename>
|
72
|
-
<filetype>rb</filetype>
|
73
|
-
<usage_type>script</usage_type>
|
74
|
-
<checksum>E5793A49</checksum>
|
75
|
-
</file>
|
76
|
-
<file>
|
77
|
-
<filename>os_lib_helper_methods.rb</filename>
|
78
|
-
<filetype>rb</filetype>
|
79
|
-
<usage_type>resource</usage_type>
|
80
|
-
<checksum>22515A49</checksum>
|
81
|
-
</file>
|
82
|
-
</files>
|
83
|
-
</measure>
|
1
|
+
<measure>
|
2
|
+
<schema_version>3.0</schema_version>
|
3
|
+
<name>openstudio_extension_test_measure</name>
|
4
|
+
<uid>36b99a29-41e1-4d85-9272-85d43b966e5a</uid>
|
5
|
+
<version_id>e9fedf04-7619-4c93-a865-0e54adfe3507</version_id>
|
6
|
+
<version_modified>20190430T155209Z</version_modified>
|
7
|
+
<xml_checksum>49BEF039</xml_checksum>
|
8
|
+
<class_name>OpenStudioExtensionTestMeasure</class_name>
|
9
|
+
<display_name>OpenStudio Extension Test Measure</display_name>
|
10
|
+
<description>Rotate your building relative to its current orientation. This will not rotate site shading objects.</description>
|
11
|
+
<modeler_description>Get the North Axis field for the OS:Building object and adjusted it based on the user specified value. If the starting value is 20 degrees and the user value is 5 degrees, then the resulting value is 25 degrees.</modeler_description>
|
12
|
+
<arguments/>
|
13
|
+
<outputs/>
|
14
|
+
<provenances/>
|
15
|
+
<tags>
|
16
|
+
<tag>Envelope.Form</tag>
|
17
|
+
</tags>
|
18
|
+
<attributes>
|
19
|
+
<attribute>
|
20
|
+
<name>Measure Type</name>
|
21
|
+
<value>ModelMeasure</value>
|
22
|
+
<datatype>string</datatype>
|
23
|
+
</attribute>
|
24
|
+
<attribute>
|
25
|
+
<name>Measure Function</name>
|
26
|
+
<value>Measure</value>
|
27
|
+
<datatype>string</datatype>
|
28
|
+
</attribute>
|
29
|
+
<attribute>
|
30
|
+
<name>Requires EnergyPlus Results</name>
|
31
|
+
<value>false</value>
|
32
|
+
<datatype>boolean</datatype>
|
33
|
+
</attribute>
|
34
|
+
<attribute>
|
35
|
+
<name>Uses SketchUp API</name>
|
36
|
+
<value>false</value>
|
37
|
+
<datatype>boolean</datatype>
|
38
|
+
</attribute>
|
39
|
+
</attributes>
|
40
|
+
<files>
|
41
|
+
<file>
|
42
|
+
<filename>LICENSE.md</filename>
|
43
|
+
<filetype>md</filetype>
|
44
|
+
<usage_type>license</usage_type>
|
45
|
+
<checksum>9640B6CB</checksum>
|
46
|
+
</file>
|
47
|
+
<file>
|
48
|
+
<filename>README.md.erb</filename>
|
49
|
+
<filetype>erb</filetype>
|
50
|
+
<usage_type>readmeerb</usage_type>
|
51
|
+
<checksum>703C9964</checksum>
|
52
|
+
</file>
|
53
|
+
<file>
|
54
|
+
<filename>README.md</filename>
|
55
|
+
<filetype>md</filetype>
|
56
|
+
<usage_type>readme</usage_type>
|
57
|
+
<checksum>7258830F</checksum>
|
58
|
+
</file>
|
59
|
+
<file>
|
60
|
+
<filename>OpenStudioExtensionTestMeasure_Test.rb</filename>
|
61
|
+
<filetype>rb</filetype>
|
62
|
+
<usage_type>test</usage_type>
|
63
|
+
<checksum>8452EA9A</checksum>
|
64
|
+
</file>
|
65
|
+
<file>
|
66
|
+
<version>
|
67
|
+
<software_program>OpenStudio</software_program>
|
68
|
+
<identifier>2.0.0</identifier>
|
69
|
+
<min_compatible>2.0.0</min_compatible>
|
70
|
+
</version>
|
71
|
+
<filename>measure.rb</filename>
|
72
|
+
<filetype>rb</filetype>
|
73
|
+
<usage_type>script</usage_type>
|
74
|
+
<checksum>E5793A49</checksum>
|
75
|
+
</file>
|
76
|
+
<file>
|
77
|
+
<filename>os_lib_helper_methods.rb</filename>
|
78
|
+
<filetype>rb</filetype>
|
79
|
+
<usage_type>resource</usage_type>
|
80
|
+
<checksum>22515A49</checksum>
|
81
|
+
</file>
|
82
|
+
</files>
|
83
|
+
</measure>
|