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.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +29 -26
  3. data/.rspec +3 -3
  4. data/.rubocop.yml +10 -9
  5. data/CHANGELOG.md +16 -0
  6. data/Gemfile +6 -6
  7. data/Jenkinsfile +10 -10
  8. data/README.md +251 -250
  9. data/Rakefile +119 -119
  10. data/bin/console +14 -14
  11. data/bin/setup +8 -8
  12. data/doc_templates/LICENSE.md +26 -26
  13. data/doc_templates/README.md.erb +41 -41
  14. data/doc_templates/copyright_erb.txt +35 -35
  15. data/doc_templates/copyright_js.txt +3 -3
  16. data/doc_templates/copyright_ruby.txt +33 -33
  17. data/init_templates/README.md +37 -37
  18. data/init_templates/gemspec.txt +32 -32
  19. data/init_templates/openstudio_module.rb +50 -50
  20. data/init_templates/spec.rb +47 -47
  21. data/init_templates/spec_helper.rb +49 -49
  22. data/init_templates/template_gemfile.txt +17 -17
  23. data/init_templates/template_rakefile.txt +15 -15
  24. data/init_templates/version.rb +40 -40
  25. data/lib/files/openstudio-extension-gem-test.ddy +536 -536
  26. data/lib/files/openstudio-extension-gem-test.epw +8768 -8768
  27. data/lib/files/openstudio-extension-gem-test.stat +554 -554
  28. data/lib/measures/openstudio_extension_test_measure/LICENSE.md +26 -26
  29. data/lib/measures/openstudio_extension_test_measure/README.md +26 -26
  30. data/lib/measures/openstudio_extension_test_measure/README.md.erb +41 -41
  31. data/lib/measures/openstudio_extension_test_measure/measure.rb +72 -72
  32. data/lib/measures/openstudio_extension_test_measure/measure.xml +83 -83
  33. data/lib/measures/openstudio_extension_test_measure/resources/os_lib_helper_methods.rb +399 -399
  34. data/lib/measures/openstudio_extension_test_measure/tests/{OpenStudioExtensionTestMeasure_Test.rb → openstudio_extension_test_measure_test.rb} +74 -75
  35. data/lib/openstudio-extension.rb +1 -1
  36. data/lib/openstudio/extension.rb +234 -229
  37. data/lib/openstudio/extension/core/CreateResults.rb +886 -886
  38. data/lib/openstudio/extension/core/check_air_sys_temps.rb +190 -190
  39. data/lib/openstudio/extension/core/check_calibration.rb +155 -155
  40. data/lib/openstudio/extension/core/check_cond_zns.rb +84 -84
  41. data/lib/openstudio/extension/core/check_domestic_hot_water.rb +334 -334
  42. data/lib/openstudio/extension/core/check_envelope_conductance.rb +453 -453
  43. data/lib/openstudio/extension/core/check_eui_by_end_use.rb +162 -162
  44. data/lib/openstudio/extension/core/check_eui_reasonableness.rb +135 -135
  45. data/lib/openstudio/extension/core/check_fan_pwr.rb +98 -98
  46. data/lib/openstudio/extension/core/check_internal_loads.rb +393 -393
  47. data/lib/openstudio/extension/core/check_mech_sys_capacity.rb +226 -226
  48. data/lib/openstudio/extension/core/check_mech_sys_efficiency.rb +326 -326
  49. data/lib/openstudio/extension/core/check_mech_sys_part_load_eff.rb +464 -464
  50. data/lib/openstudio/extension/core/check_mech_sys_type.rb +139 -139
  51. data/lib/openstudio/extension/core/check_part_loads.rb +451 -451
  52. data/lib/openstudio/extension/core/check_placeholder.rb +75 -75
  53. data/lib/openstudio/extension/core/check_plant_cap.rb +123 -123
  54. data/lib/openstudio/extension/core/check_plant_temps.rb +159 -159
  55. data/lib/openstudio/extension/core/check_plenum_loads.rb +87 -87
  56. data/lib/openstudio/extension/core/check_pump_pwr.rb +108 -108
  57. data/lib/openstudio/extension/core/check_sch_coord.rb +241 -241
  58. data/lib/openstudio/extension/core/check_schedules.rb +311 -311
  59. data/lib/openstudio/extension/core/check_simultaneous_heating_and_cooling.rb +158 -158
  60. data/lib/openstudio/extension/core/check_supply_air_and_thermostat_temp_difference.rb +148 -148
  61. data/lib/openstudio/extension/core/check_weather_files.rb +132 -132
  62. data/lib/openstudio/extension/core/deer_vintages.rb +311 -311
  63. data/lib/openstudio/extension/core/os_lib_aedg_measures.rb +491 -491
  64. data/lib/openstudio/extension/core/os_lib_cofee.rb +258 -258
  65. data/lib/openstudio/extension/core/os_lib_constructions.rb +378 -378
  66. data/lib/openstudio/extension/core/os_lib_geometry.rb +1022 -1022
  67. data/lib/openstudio/extension/core/os_lib_helper_methods.rb +399 -399
  68. data/lib/openstudio/extension/core/os_lib_hvac.rb +2171 -2171
  69. data/lib/openstudio/extension/core/os_lib_lighting_and_equipment.rb +214 -214
  70. data/lib/openstudio/extension/core/os_lib_model_generation.rb +817 -817
  71. data/lib/openstudio/extension/core/os_lib_model_simplification.rb +1049 -1049
  72. data/lib/openstudio/extension/core/os_lib_outdoorair_and_infiltration.rb +165 -165
  73. data/lib/openstudio/extension/core/os_lib_reporting.rb +4651 -4651
  74. data/lib/openstudio/extension/core/os_lib_reporting_qaqc.rb +200 -200
  75. data/lib/openstudio/extension/core/os_lib_schedules.rb +963 -963
  76. data/lib/openstudio/extension/rake_task.rb +159 -149
  77. data/lib/openstudio/extension/runner.rb +667 -644
  78. data/lib/openstudio/extension/runner_config.rb +114 -0
  79. data/lib/openstudio/extension/version.rb +40 -40
  80. data/openstudio-extension.gemspec +34 -33
  81. metadata +39 -37
@@ -1,132 +1,132 @@
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
- module OsLib_QAQC
37
- # include any general notes about QAQC method here
38
-
39
- # checks the number of unmet hours in the model
40
- def check_weather_files(category, options, name_only = false)
41
- # summary of the check
42
- check_elems = OpenStudio::AttributeVector.new
43
- check_elems << OpenStudio::Attribute.new('name', 'Weather Files')
44
- check_elems << OpenStudio::Attribute.new('category', category)
45
- check_elems << OpenStudio::Attribute.new('description', "Check weather file, design days, and climate zone against #{@utility_name} list of allowable options.")
46
-
47
- # stop here if only name is requested this is used to populate display name for arguments
48
- if name_only == true
49
- results = []
50
- check_elems.each do |elem|
51
- results << elem.valueAsString
52
- end
53
- return results
54
- end
55
-
56
- begin
57
- # get weather file
58
- model_epw = nil
59
- if @model.getWeatherFile.url.is_initialized
60
- raw_epw = @model.getWeatherFile.url.get
61
- end_path_index = raw_epw.rindex('/')
62
- model_epw = raw_epw.slice!(end_path_index + 1, raw_epw.length) # everything right of last forward slash
63
- end
64
-
65
- # check design days (model must have one or more of the required summer and winter design days)
66
- # get design days names from model
67
- model_summer_dd_names = []
68
- model_winter_dd_names = []
69
- @model.getDesignDays.each do |design_day|
70
- if design_day.dayType == 'SummerDesignDay'
71
- model_summer_dd_names << design_day.name.to_s
72
- elsif design_day.dayType == 'WinterDesignDay'
73
- model_winter_dd_names << design_day.name.to_s
74
- else
75
- puts "unexpected day type of #{design_day.dayType} wont' be included in check"
76
- end
77
- end
78
-
79
- # find matching weather file from options, as well as design days and climate zone
80
- if options.key?(model_epw)
81
- required_summer_dd = options[model_epw]['summer']
82
- required_winter_dd = options[model_epw]['winter']
83
- valid_climate_zones = [options[model_epw]['climate_zone']]
84
-
85
- # check for intersection betwen model valid design days
86
- summer_intersection = (required_summer_dd & model_summer_dd_names)
87
- winter_intersection = (required_winter_dd & model_winter_dd_names)
88
- if summer_intersection.empty? && !required_summer_dd.empty?
89
- check_elems << OpenStudio::Attribute.new('flag', "Didn't find any of the expected summer design days for #{model_epw}")
90
- end
91
- if winter_intersection.empty? && !required_winter_dd.empty?
92
- check_elems << OpenStudio::Attribute.new('flag', "Didn't find any of the expected winter design days for #{model_epw}")
93
- end
94
-
95
- else
96
- check_elems << OpenStudio::Attribute.new('flag', "#{model_epw} is not a an expected weather file.")
97
- check_elems << OpenStudio::Attribute.new('flag', "Model doesn't have expected epw file, as a result can't validate design days.")
98
- valid_climate_zones = []
99
- options.each do |lookup_epw, value|
100
- valid_climate_zones << value['climate_zone']
101
- end
102
- end
103
-
104
- # get ashrae climate zone from model
105
- model_climate_zone = nil
106
- climateZones = @model.getClimateZones
107
- climateZones.climateZones.each do |climateZone|
108
- if climateZone.institution == 'ASHRAE'
109
- model_climate_zone = climateZone.value
110
- next
111
- end
112
- end
113
- if model_climate_zone == ''
114
- check_elems << OpenStudio::Attribute.new('flag', "The model's ASHRAE climate zone has not been defined. Expected climate zone was #{valid_climate_zones.uniq.join(',')}.")
115
- elsif !valid_climate_zones.include?(model_climate_zone)
116
- check_elems << OpenStudio::Attribute.new('flag', "The model's ASHRAE climate zone was #{model_climate_zone}. Expected climate zone was #{valid_climate_zones.uniq.join(',')}.")
117
- end
118
- rescue StandardError => e
119
- # brief description of ruby error
120
- check_elems << OpenStudio::Attribute.new('flag', "Error prevented QAQC check from running (#{e}).")
121
-
122
- # backtrace of ruby error for diagnostic use
123
- if @error_backtrace then check_elems << OpenStudio::Attribute.new('flag', e.backtrace.join("\n").to_s) end
124
- end
125
-
126
- # add check_elms to new attribute
127
- check_elem = OpenStudio::Attribute.new('check', check_elems)
128
-
129
- return check_elem
130
- # note: registerWarning and registerValue will be added for checks downstream using os_lib_reporting_qaqc.rb
131
- end
132
- end
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
+ module OsLib_QAQC
37
+ # include any general notes about QAQC method here
38
+
39
+ # checks the number of unmet hours in the model
40
+ def check_weather_files(category, options, name_only = false)
41
+ # summary of the check
42
+ check_elems = OpenStudio::AttributeVector.new
43
+ check_elems << OpenStudio::Attribute.new('name', 'Weather Files')
44
+ check_elems << OpenStudio::Attribute.new('category', category)
45
+ check_elems << OpenStudio::Attribute.new('description', "Check weather file, design days, and climate zone against #{@utility_name} list of allowable options.")
46
+
47
+ # stop here if only name is requested this is used to populate display name for arguments
48
+ if name_only == true
49
+ results = []
50
+ check_elems.each do |elem|
51
+ results << elem.valueAsString
52
+ end
53
+ return results
54
+ end
55
+
56
+ begin
57
+ # get weather file
58
+ model_epw = nil
59
+ if @model.getWeatherFile.url.is_initialized
60
+ raw_epw = @model.getWeatherFile.url.get
61
+ end_path_index = raw_epw.rindex('/')
62
+ model_epw = raw_epw.slice!(end_path_index + 1, raw_epw.length) # everything right of last forward slash
63
+ end
64
+
65
+ # check design days (model must have one or more of the required summer and winter design days)
66
+ # get design days names from model
67
+ model_summer_dd_names = []
68
+ model_winter_dd_names = []
69
+ @model.getDesignDays.each do |design_day|
70
+ if design_day.dayType == 'SummerDesignDay'
71
+ model_summer_dd_names << design_day.name.to_s
72
+ elsif design_day.dayType == 'WinterDesignDay'
73
+ model_winter_dd_names << design_day.name.to_s
74
+ else
75
+ puts "unexpected day type of #{design_day.dayType} wont' be included in check"
76
+ end
77
+ end
78
+
79
+ # find matching weather file from options, as well as design days and climate zone
80
+ if options.key?(model_epw)
81
+ required_summer_dd = options[model_epw]['summer']
82
+ required_winter_dd = options[model_epw]['winter']
83
+ valid_climate_zones = [options[model_epw]['climate_zone']]
84
+
85
+ # check for intersection betwen model valid design days
86
+ summer_intersection = (required_summer_dd & model_summer_dd_names)
87
+ winter_intersection = (required_winter_dd & model_winter_dd_names)
88
+ if summer_intersection.empty? && !required_summer_dd.empty?
89
+ check_elems << OpenStudio::Attribute.new('flag', "Didn't find any of the expected summer design days for #{model_epw}")
90
+ end
91
+ if winter_intersection.empty? && !required_winter_dd.empty?
92
+ check_elems << OpenStudio::Attribute.new('flag', "Didn't find any of the expected winter design days for #{model_epw}")
93
+ end
94
+
95
+ else
96
+ check_elems << OpenStudio::Attribute.new('flag', "#{model_epw} is not a an expected weather file.")
97
+ check_elems << OpenStudio::Attribute.new('flag', "Model doesn't have expected epw file, as a result can't validate design days.")
98
+ valid_climate_zones = []
99
+ options.each do |lookup_epw, value|
100
+ valid_climate_zones << value['climate_zone']
101
+ end
102
+ end
103
+
104
+ # get ashrae climate zone from model
105
+ model_climate_zone = nil
106
+ climateZones = @model.getClimateZones
107
+ climateZones.climateZones.each do |climateZone|
108
+ if climateZone.institution == 'ASHRAE'
109
+ model_climate_zone = climateZone.value
110
+ next
111
+ end
112
+ end
113
+ if model_climate_zone == ''
114
+ check_elems << OpenStudio::Attribute.new('flag', "The model's ASHRAE climate zone has not been defined. Expected climate zone was #{valid_climate_zones.uniq.join(',')}.")
115
+ elsif !valid_climate_zones.include?(model_climate_zone)
116
+ check_elems << OpenStudio::Attribute.new('flag', "The model's ASHRAE climate zone was #{model_climate_zone}. Expected climate zone was #{valid_climate_zones.uniq.join(',')}.")
117
+ end
118
+ rescue StandardError => e
119
+ # brief description of ruby error
120
+ check_elems << OpenStudio::Attribute.new('flag', "Error prevented QAQC check from running (#{e}).")
121
+
122
+ # backtrace of ruby error for diagnostic use
123
+ if @error_backtrace then check_elems << OpenStudio::Attribute.new('flag', e.backtrace.join("\n").to_s) end
124
+ end
125
+
126
+ # add check_elms to new attribute
127
+ check_elem = OpenStudio::Attribute.new('check', check_elems)
128
+
129
+ return check_elem
130
+ # note: registerWarning and registerValue will be added for checks downstream using os_lib_reporting_qaqc.rb
131
+ end
132
+ end
@@ -1,311 +1,311 @@
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
- # Maps the DEER vintages to year ranges
37
- module DEERVintages
38
- # Building type abbreviation to long name map
39
- def building_type_to_long
40
- return {
41
- 'Asm' => 'Assembly',
42
- 'DMo' => 'Residential Mobile Home',
43
- 'ECC' => 'Education - Community College',
44
- 'EPr' => 'Education - Primary School',
45
- 'ERC' => 'Education - Relocatable Classroom',
46
- 'ESe' => 'Education - Secondary School',
47
- 'EUn' => 'Education - University',
48
- 'GHs' => 'Greenhouse',
49
- 'Gro' => 'Grocery',
50
- 'Hsp' => 'Health/Medical - Hospital',
51
- 'Htl' => 'Lodging - Hotel',
52
- 'MBT' => 'Manufacturing Biotech',
53
- 'MFm' => 'Residential Multi-family',
54
- 'MLI' => 'Manufacturing Light Industrial',
55
- 'Mtl' => 'Lodging - Motel',
56
- 'Nrs' => 'Health/Medical - Nursing Home',
57
- 'OfL' => 'Office - Large',
58
- 'OfS' => 'Office - Small',
59
- 'RFF' => 'Restaurant - Fast-Food',
60
- 'RSD' => 'Restaurant - Sit-Down',
61
- 'Rt3' => 'Retail - Multistory Large',
62
- 'RtL' => 'Retail - Single-Story Large',
63
- 'RtS' => 'Retail - Small',
64
- 'SCn' => 'Storage - Conditioned',
65
- 'SFm' => 'Residential Single Family',
66
- 'SUn' => 'Storage - Unconditioned',
67
- 'WRf' => 'Warehouse - Refrigerated'
68
- }
69
- end
70
-
71
- # HVAC type abbreviation to long name map
72
- def hvac_sys_to_long
73
- return {
74
- 'DXGF' => 'Split or Packaged DX Unit with Gas Furnace',
75
- 'DXEH' => 'Split or Packaged DX Unit with Electric Heat',
76
- 'DXHP' => 'Split or Packaged DX Unit with Heat Pump',
77
- 'WLHP' => 'Water Loop Heat Pump',
78
- 'NCEH' => 'No Cooling with Electric Heat',
79
- 'NCGF' => 'No Cooling with Gas Furnace',
80
- 'PVVG' => 'Packaged VAV System with Gas Boiler',
81
- 'PVVE' => 'Packaged VAV System with Electric Heat',
82
- 'SVVG' => 'Built-Up VAV System with Gas Boiler',
83
- 'SVVE' => 'Built-Up VAV System with Electric Reheat',
84
- 'Unc' => 'No HVAC (Unconditioned)',
85
- 'PTAC' => 'Packaged Terminal Air Conditioner',
86
- 'PTHP' => 'Packaged Terminal Heat Pump',
87
- 'FPFC' => 'Four Pipe Fan Coil',
88
- 'DDCT' => 'Dual Duct System',
89
- 'EVAP' => 'Evaporative Cooling with Separate Gas Furnace'
90
- }
91
- end
92
-
93
- # Valid building type/hvac type combos
94
- def building_type_to_hvac_systems
95
- return {
96
- 'Asm' => [
97
- 'DXEH',
98
- 'DXGF',
99
- 'DXHP',
100
- 'NCEH',
101
- 'NCGF'
102
- ],
103
- 'ECC' => [
104
- 'DXEH',
105
- 'DXGF',
106
- 'DXHP',
107
- 'NCEH',
108
- 'NCGF',
109
- 'PVVE',
110
- 'PVVG',
111
- 'SVVE',
112
- 'SVVG',
113
- 'WLHP'
114
- ],
115
- 'EPr' => [
116
- 'DXEH',
117
- 'DXGF',
118
- 'DXHP',
119
- 'NCEH',
120
- 'NCGF',
121
- 'WLHP'
122
- ],
123
- 'ERC' => [
124
- 'DXEH',
125
- 'DXGF',
126
- 'DXHP',
127
- 'NCEH',
128
- 'NCGF'
129
- ],
130
- 'ESe' => [
131
- 'DXEH',
132
- 'DXGF',
133
- 'DXHP',
134
- 'NCEH',
135
- 'NCGF',
136
- 'PVVE',
137
- 'PVVG',
138
- 'SVVE',
139
- 'SVVG',
140
- 'WLHP'
141
- ],
142
- 'EUn' => [
143
- 'DXEH',
144
- 'DXGF',
145
- 'DXHP',
146
- 'NCEH',
147
- 'NCGF',
148
- 'PVVE',
149
- 'PVVG',
150
- 'SVVE',
151
- 'SVVG'
152
- ],
153
- 'Gro' => [
154
- 'DXEH',
155
- 'DXGF',
156
- 'DXHP',
157
- 'NCEH',
158
- 'NCGF'
159
- ],
160
- 'Hsp' => [
161
- 'DXEH',
162
- 'DXGF',
163
- 'DXHP',
164
- 'NCEH',
165
- 'NCGF',
166
- 'PVVE',
167
- 'PVVG',
168
- 'SVVE',
169
- 'SVVG'
170
- ],
171
- 'Nrs' => [
172
- 'DXEH',
173
- 'DXGF',
174
- 'DXHP',
175
- 'FPFC',
176
- 'NCEH',
177
- 'NCGF',
178
- 'PVVE',
179
- 'PVVG',
180
- 'SVVE',
181
- 'SVVG'
182
- ],
183
- 'Htl' => [
184
- 'DXEH',
185
- 'DXGF',
186
- 'DXHP',
187
- 'NCEH',
188
- 'NCGF',
189
- 'PVVE',
190
- 'PVVG',
191
- 'SVVE',
192
- 'SVVG',
193
- 'WLHP'
194
- ],
195
- 'Mtl' => [
196
- 'DXEH',
197
- 'DXGF',
198
- 'DXHP',
199
- 'NCEH',
200
- 'NCGF'
201
- ],
202
- 'MBT' => [
203
- 'DXEH',
204
- 'DXGF',
205
- 'DXHP',
206
- 'NCEH',
207
- 'NCGF',
208
- 'PVVE',
209
- 'PVVG',
210
- 'SVVE',
211
- 'SVVG',
212
- 'WLHP'
213
- ],
214
- 'MLI' => [
215
- 'DXEH',
216
- 'DXGF',
217
- 'DXHP',
218
- 'NCEH',
219
- 'NCGF'
220
- ],
221
- 'OfL' => [
222
- 'DXEH',
223
- 'DXGF',
224
- 'DXHP',
225
- 'NCEH',
226
- 'NCGF',
227
- 'PVVE',
228
- 'PVVG',
229
- 'SVVE',
230
- 'SVVG',
231
- 'WLHP'
232
- ],
233
- 'OfS' => [
234
- 'DXEH',
235
- 'DXGF',
236
- 'DXHP',
237
- 'NCEH',
238
- 'NCGF',
239
- 'PVVE',
240
- 'PVVG',
241
- 'SVVE',
242
- 'SVVG',
243
- 'WLHP'
244
- ],
245
- 'RFF' => [
246
- 'DXEH',
247
- 'DXGF',
248
- 'DXHP',
249
- 'NCEH',
250
- 'NCGF'
251
- ],
252
- 'RSD' => [
253
- 'DXEH',
254
- 'DXGF',
255
- 'DXHP',
256
- 'NCEH',
257
- 'NCGF'
258
- ],
259
- 'Rt3' => [
260
- 'DXEH',
261
- 'DXGF',
262
- 'DXHP',
263
- 'NCEH',
264
- 'NCGF',
265
- 'PVVE',
266
- 'PVVG',
267
- 'SVVE',
268
- 'SVVG',
269
- 'WLHP'
270
- ],
271
- 'RtL' => [
272
- 'DXEH',
273
- 'DXGF',
274
- 'DXHP',
275
- 'NCEH',
276
- 'NCGF'
277
- ],
278
- 'RtS' => [
279
- 'DXEH',
280
- 'DXGF',
281
- 'DXHP',
282
- 'NCEH',
283
- 'NCGF'
284
- ],
285
- 'SCn' => [
286
- 'DXEH',
287
- 'DXGF',
288
- 'DXHP',
289
- 'NCEH',
290
- 'NCGF'
291
- ],
292
- 'SUn' => ['Unc'],
293
- 'WRf' => ['DXGF']
294
- }
295
- end
296
-
297
- # Age range to DEER template
298
- def template_to_age_range
299
- return {
300
- 'DEER Pre-1975' => 'Before 1978',
301
- 'DEER 1985' => '1978-1992',
302
- 'DEER 1996' => '1993-2001',
303
- 'DEER 2003' => '2002-2005',
304
- 'DEER 2007' => '2006-2009',
305
- 'DEER 2011' => '2010-2013',
306
- 'DEER 2014' => '2014',
307
- 'DEER 2015' => '2015-2016',
308
- 'DEER 2017' => '2017 or Later'
309
- }
310
- end
311
- end
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
+ # Maps the DEER vintages to year ranges
37
+ module DEERVintages
38
+ # Building type abbreviation to long name map
39
+ def building_type_to_long
40
+ return {
41
+ 'Asm' => 'Assembly',
42
+ 'DMo' => 'Residential Mobile Home',
43
+ 'ECC' => 'Education - Community College',
44
+ 'EPr' => 'Education - Primary School',
45
+ 'ERC' => 'Education - Relocatable Classroom',
46
+ 'ESe' => 'Education - Secondary School',
47
+ 'EUn' => 'Education - University',
48
+ 'GHs' => 'Greenhouse',
49
+ 'Gro' => 'Grocery',
50
+ 'Hsp' => 'Health/Medical - Hospital',
51
+ 'Htl' => 'Lodging - Hotel',
52
+ 'MBT' => 'Manufacturing Biotech',
53
+ 'MFm' => 'Residential Multi-family',
54
+ 'MLI' => 'Manufacturing Light Industrial',
55
+ 'Mtl' => 'Lodging - Motel',
56
+ 'Nrs' => 'Health/Medical - Nursing Home',
57
+ 'OfL' => 'Office - Large',
58
+ 'OfS' => 'Office - Small',
59
+ 'RFF' => 'Restaurant - Fast-Food',
60
+ 'RSD' => 'Restaurant - Sit-Down',
61
+ 'Rt3' => 'Retail - Multistory Large',
62
+ 'RtL' => 'Retail - Single-Story Large',
63
+ 'RtS' => 'Retail - Small',
64
+ 'SCn' => 'Storage - Conditioned',
65
+ 'SFm' => 'Residential Single Family',
66
+ 'SUn' => 'Storage - Unconditioned',
67
+ 'WRf' => 'Warehouse - Refrigerated'
68
+ }
69
+ end
70
+
71
+ # HVAC type abbreviation to long name map
72
+ def hvac_sys_to_long
73
+ return {
74
+ 'DXGF' => 'Split or Packaged DX Unit with Gas Furnace',
75
+ 'DXEH' => 'Split or Packaged DX Unit with Electric Heat',
76
+ 'DXHP' => 'Split or Packaged DX Unit with Heat Pump',
77
+ 'WLHP' => 'Water Loop Heat Pump',
78
+ 'NCEH' => 'No Cooling with Electric Heat',
79
+ 'NCGF' => 'No Cooling with Gas Furnace',
80
+ 'PVVG' => 'Packaged VAV System with Gas Boiler',
81
+ 'PVVE' => 'Packaged VAV System with Electric Heat',
82
+ 'SVVG' => 'Built-Up VAV System with Gas Boiler',
83
+ 'SVVE' => 'Built-Up VAV System with Electric Reheat',
84
+ 'Unc' => 'No HVAC (Unconditioned)',
85
+ 'PTAC' => 'Packaged Terminal Air Conditioner',
86
+ 'PTHP' => 'Packaged Terminal Heat Pump',
87
+ 'FPFC' => 'Four Pipe Fan Coil',
88
+ 'DDCT' => 'Dual Duct System',
89
+ 'EVAP' => 'Evaporative Cooling with Separate Gas Furnace'
90
+ }
91
+ end
92
+
93
+ # Valid building type/hvac type combos
94
+ def building_type_to_hvac_systems
95
+ return {
96
+ 'Asm' => [
97
+ 'DXEH',
98
+ 'DXGF',
99
+ 'DXHP',
100
+ 'NCEH',
101
+ 'NCGF'
102
+ ],
103
+ 'ECC' => [
104
+ 'DXEH',
105
+ 'DXGF',
106
+ 'DXHP',
107
+ 'NCEH',
108
+ 'NCGF',
109
+ 'PVVE',
110
+ 'PVVG',
111
+ 'SVVE',
112
+ 'SVVG',
113
+ 'WLHP'
114
+ ],
115
+ 'EPr' => [
116
+ 'DXEH',
117
+ 'DXGF',
118
+ 'DXHP',
119
+ 'NCEH',
120
+ 'NCGF',
121
+ 'WLHP'
122
+ ],
123
+ 'ERC' => [
124
+ 'DXEH',
125
+ 'DXGF',
126
+ 'DXHP',
127
+ 'NCEH',
128
+ 'NCGF'
129
+ ],
130
+ 'ESe' => [
131
+ 'DXEH',
132
+ 'DXGF',
133
+ 'DXHP',
134
+ 'NCEH',
135
+ 'NCGF',
136
+ 'PVVE',
137
+ 'PVVG',
138
+ 'SVVE',
139
+ 'SVVG',
140
+ 'WLHP'
141
+ ],
142
+ 'EUn' => [
143
+ 'DXEH',
144
+ 'DXGF',
145
+ 'DXHP',
146
+ 'NCEH',
147
+ 'NCGF',
148
+ 'PVVE',
149
+ 'PVVG',
150
+ 'SVVE',
151
+ 'SVVG'
152
+ ],
153
+ 'Gro' => [
154
+ 'DXEH',
155
+ 'DXGF',
156
+ 'DXHP',
157
+ 'NCEH',
158
+ 'NCGF'
159
+ ],
160
+ 'Hsp' => [
161
+ 'DXEH',
162
+ 'DXGF',
163
+ 'DXHP',
164
+ 'NCEH',
165
+ 'NCGF',
166
+ 'PVVE',
167
+ 'PVVG',
168
+ 'SVVE',
169
+ 'SVVG'
170
+ ],
171
+ 'Nrs' => [
172
+ 'DXEH',
173
+ 'DXGF',
174
+ 'DXHP',
175
+ 'FPFC',
176
+ 'NCEH',
177
+ 'NCGF',
178
+ 'PVVE',
179
+ 'PVVG',
180
+ 'SVVE',
181
+ 'SVVG'
182
+ ],
183
+ 'Htl' => [
184
+ 'DXEH',
185
+ 'DXGF',
186
+ 'DXHP',
187
+ 'NCEH',
188
+ 'NCGF',
189
+ 'PVVE',
190
+ 'PVVG',
191
+ 'SVVE',
192
+ 'SVVG',
193
+ 'WLHP'
194
+ ],
195
+ 'Mtl' => [
196
+ 'DXEH',
197
+ 'DXGF',
198
+ 'DXHP',
199
+ 'NCEH',
200
+ 'NCGF'
201
+ ],
202
+ 'MBT' => [
203
+ 'DXEH',
204
+ 'DXGF',
205
+ 'DXHP',
206
+ 'NCEH',
207
+ 'NCGF',
208
+ 'PVVE',
209
+ 'PVVG',
210
+ 'SVVE',
211
+ 'SVVG',
212
+ 'WLHP'
213
+ ],
214
+ 'MLI' => [
215
+ 'DXEH',
216
+ 'DXGF',
217
+ 'DXHP',
218
+ 'NCEH',
219
+ 'NCGF'
220
+ ],
221
+ 'OfL' => [
222
+ 'DXEH',
223
+ 'DXGF',
224
+ 'DXHP',
225
+ 'NCEH',
226
+ 'NCGF',
227
+ 'PVVE',
228
+ 'PVVG',
229
+ 'SVVE',
230
+ 'SVVG',
231
+ 'WLHP'
232
+ ],
233
+ 'OfS' => [
234
+ 'DXEH',
235
+ 'DXGF',
236
+ 'DXHP',
237
+ 'NCEH',
238
+ 'NCGF',
239
+ 'PVVE',
240
+ 'PVVG',
241
+ 'SVVE',
242
+ 'SVVG',
243
+ 'WLHP'
244
+ ],
245
+ 'RFF' => [
246
+ 'DXEH',
247
+ 'DXGF',
248
+ 'DXHP',
249
+ 'NCEH',
250
+ 'NCGF'
251
+ ],
252
+ 'RSD' => [
253
+ 'DXEH',
254
+ 'DXGF',
255
+ 'DXHP',
256
+ 'NCEH',
257
+ 'NCGF'
258
+ ],
259
+ 'Rt3' => [
260
+ 'DXEH',
261
+ 'DXGF',
262
+ 'DXHP',
263
+ 'NCEH',
264
+ 'NCGF',
265
+ 'PVVE',
266
+ 'PVVG',
267
+ 'SVVE',
268
+ 'SVVG',
269
+ 'WLHP'
270
+ ],
271
+ 'RtL' => [
272
+ 'DXEH',
273
+ 'DXGF',
274
+ 'DXHP',
275
+ 'NCEH',
276
+ 'NCGF'
277
+ ],
278
+ 'RtS' => [
279
+ 'DXEH',
280
+ 'DXGF',
281
+ 'DXHP',
282
+ 'NCEH',
283
+ 'NCGF'
284
+ ],
285
+ 'SCn' => [
286
+ 'DXEH',
287
+ 'DXGF',
288
+ 'DXHP',
289
+ 'NCEH',
290
+ 'NCGF'
291
+ ],
292
+ 'SUn' => ['Unc'],
293
+ 'WRf' => ['DXGF']
294
+ }
295
+ end
296
+
297
+ # Age range to DEER template
298
+ def template_to_age_range
299
+ return {
300
+ 'DEER Pre-1975' => 'Before 1978',
301
+ 'DEER 1985' => '1978-1992',
302
+ 'DEER 1996' => '1993-2001',
303
+ 'DEER 2003' => '2002-2005',
304
+ 'DEER 2007' => '2006-2009',
305
+ 'DEER 2011' => '2010-2013',
306
+ 'DEER 2014' => '2014',
307
+ 'DEER 2015' => '2015-2016',
308
+ 'DEER 2017' => '2017 or Later'
309
+ }
310
+ end
311
+ end