openstudio-common-measures 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -1
  3. data/README.md +7 -2
  4. data/doc_templates/copyright_erb.txt +1 -1
  5. data/lib/measures/AddCostPerFloorAreaUnusedToLights/measure.xml +2 -8
  6. data/lib/measures/AddCostToSupplySideHVACComponentByAirLoop/measure.xml +9 -3
  7. data/lib/measures/AddSimplePvToShadingSurfacesByType/measure.xml +2 -2
  8. data/lib/measures/RemoveUnusedDefaultProfiles/measure.xml +2 -2
  9. data/lib/measures/ReportModelChanges/measure.xml +2 -2
  10. data/lib/measures/SetCOPforSingleSpeedDXCoolingUnits/measure.xml +4 -4
  11. data/lib/measures/SetCOPforTwoSpeedDXCoolingUnits/measure.xml +4 -4
  12. data/lib/measures/SetGasBurnerEfficiency/measure.xml +4 -4
  13. data/lib/measures/ShiftScheduleProfileTime/measure.xml +4 -4
  14. data/lib/measures/SwapLightsDefinition/measure.xml +3 -5
  15. data/lib/measures/add_ems_emissions_reporting/measure.rb +236 -29
  16. data/lib/measures/add_ems_emissions_reporting/measure.xml +362 -10
  17. data/lib/measures/add_ev_load/measure.rb +51 -8
  18. data/lib/measures/add_ev_load/measure.xml +23 -5
  19. data/lib/measures/envelope_and_internal_load_breakdown/measure.xml +3 -3
  20. data/lib/measures/envelope_and_internal_load_breakdown/resources/report.html.erb +5 -1
  21. data/lib/measures/example_report/measure.xml +3 -3
  22. data/lib/measures/example_report/resources/report.html.erb +5 -1
  23. data/lib/measures/generic_qaqc/README.md +19 -4
  24. data/lib/measures/generic_qaqc/README.md.erb +7 -1
  25. data/lib/measures/generic_qaqc/docs/generic_qaqc_detailed.jpg +0 -0
  26. data/lib/measures/generic_qaqc/docs/generic_qaqc_summary.jpg +0 -0
  27. data/lib/measures/generic_qaqc/measure.rb +34 -29
  28. data/lib/measures/generic_qaqc/measure.xml +181 -82
  29. data/lib/measures/generic_qaqc/resources/check_cond_zns.rb +3 -1
  30. data/lib/measures/generic_qaqc/resources/check_domestic_hot_water.rb +13 -8
  31. data/lib/measures/generic_qaqc/resources/check_envelope_conductance.rb +330 -231
  32. data/lib/measures/generic_qaqc/resources/check_eui_by_end_use.rb +59 -20
  33. data/lib/measures/generic_qaqc/resources/check_eui_reasonableness.rb +58 -20
  34. data/lib/measures/generic_qaqc/resources/check_internal_loads.rb +57 -56
  35. data/lib/measures/generic_qaqc/resources/check_mech_sys_capacity.rb +4 -1
  36. data/lib/measures/generic_qaqc/resources/check_mech_sys_efficiency.rb +27 -22
  37. data/lib/measures/generic_qaqc/resources/check_mech_sys_part_load_eff.rb +4 -1
  38. data/lib/measures/generic_qaqc/resources/check_mech_sys_type.rb +3 -3
  39. data/lib/measures/generic_qaqc/resources/check_schedules.rb +65 -101
  40. data/lib/measures/generic_qaqc/resources/check_simultaneous_heating_and_cooling.rb +3 -1
  41. data/lib/measures/generic_qaqc/resources/check_supply_air_and_thermostat_temp_difference.rb +3 -1
  42. data/lib/measures/generic_qaqc/resources/os_lib_reporting_qaqc.rb +49 -15
  43. data/lib/measures/generic_qaqc/resources/report.html.erb +5 -1
  44. data/lib/measures/hvac_psychrometric_chart/measure.xml +3 -3
  45. data/lib/measures/hvac_psychrometric_chart/resources/report.html.erb +5 -1
  46. data/lib/measures/openstudio_results/measure.xml +3 -3
  47. data/lib/measures/openstudio_results/resources/report.html.erb +5 -1
  48. data/lib/measures/set_run_period/measure.xml +2 -2
  49. data/lib/measures/view_data/measure.xml +4 -4
  50. data/lib/measures/view_data/resources/report.html.in +189 -19
  51. data/lib/measures/view_data/resources/va3c.rb +1 -0
  52. data/lib/measures/view_model/measure.xml +9 -9
  53. data/lib/measures/view_model/resources/report.html.in +189 -19
  54. data/lib/measures/view_model/resources/va3c.rb +1 -0
  55. data/lib/openstudio/common_measures/version.rb +1 -1
  56. data/openstudio-common-measures.gemspec +1 -1
  57. metadata +7 -5
@@ -53,12 +53,15 @@ module OsLib_QAQC
53
53
  check_elems << OpenStudio::Attribute.new('name', 'Mechanical System Part Load Efficiency')
54
54
  check_elems << OpenStudio::Attribute.new('category', category)
55
55
  check_elems << OpenStudio::Attribute.new('description', "Check 40% and 80% part load efficency against #{display_standard} for the following compenent types: #{component_type_array.join(', ')}. Checking EIR Function of Part Load Ratio curve for chiller and EIR Function of Flow Fraction for DX coils.")
56
+ check_elems << OpenStudio::Attribute.new('min_pass', min_pass * 100)
57
+ check_elems << OpenStudio::Attribute.new('max_pass', max_pass * 100)
56
58
  # TODO: - add in check for VAV fan
57
59
 
58
60
  # stop here if only name is requested this is used to populate display name for arguments
59
61
  if name_only == true
60
62
  results = []
61
63
  check_elems.each do |elem|
64
+ next if ['Double','Integer'].include? (elem.valueType.valueDescription)
62
65
  results << elem.valueAsString
63
66
  end
64
67
  return results
@@ -143,7 +146,7 @@ module OsLib_QAQC
143
146
 
144
147
  if use_old_gem_code
145
148
  chlr_props = component.model.find_object($os_standards['chillers'], search_criteria, capacity_tons, Date.today)
146
- chlr_props
149
+ else
147
150
  chlr_props = std.model_find_object(std.standards_data['chillers'], search_criteria, capacity_tons, Date.today)
148
151
  end
149
152
  if chlr_props.nil?
@@ -40,7 +40,7 @@ module OsLib_QAQC
40
40
  def check_mech_sys_type(category, target_standard, name_only = false)
41
41
  # summary of the check
42
42
  check_elems = OpenStudio::AttributeVector.new
43
- check_elems << OpenStudio::Attribute.new('name', 'Mechanical System Type')
43
+ check_elems << OpenStudio::Attribute.new('name', 'Baseline Mechanical System Type')
44
44
  check_elems << OpenStudio::Attribute.new('category', category)
45
45
 
46
46
  # add ASHRAE to display of target standard if includes with 90.1
@@ -49,7 +49,7 @@ module OsLib_QAQC
49
49
  else
50
50
  check_elems << OpenStudio::Attribute.new('description', 'Check against ASHRAE 90.1. Infers the baseline system type based on the equipment serving the zone and their heating/cooling fuels. Only does a high-level inference; does not look for the presence/absence of required controls, etc.')
51
51
  end
52
-
52
+
53
53
  # stop here if only name is requested this is used to populate display name for arguments
54
54
  if name_only == true
55
55
  results = []
@@ -119,7 +119,7 @@ module OsLib_QAQC
119
119
  else
120
120
  if req_sys_type == '' then req_sys_type = 'Unknown' end
121
121
  puts "#{zone.name} baseline system type is incorrect. Supposed to be #{req_sys_type}, but was #{act_sys_type} instead."
122
- check_elems << OpenStudio::Attribute.new('flag', "#{zone.name} baseline system type is incorrect. Supposed to be #{req_sys_type}, but was #{act_sys_type} instead.")
122
+ check_elems << OpenStudio::Attribute.new('flag', "For #{zone.name}, the baseline system type would be #{req_sys_type}; the current system type is #{act_sys_type}.")
123
123
  end
124
124
  end
125
125
  rescue StandardError => e
@@ -42,60 +42,63 @@ module OsLib_QAQC
42
42
  check_elems = OpenStudio::AttributeVector.new
43
43
  check_elems << OpenStudio::Attribute.new('name', 'Schedules')
44
44
  check_elems << OpenStudio::Attribute.new('category', category)
45
- check_elems << OpenStudio::Attribute.new('description', 'Check schedules for lighting, ventilation, occupant density, plug loads, and equipment based on DOE reference building schedules in terms of full load hours per year.')
45
+
46
+ # update display sttandard
47
+ if target_standard.include?('90.1')
48
+ display_standard = "ASHRAE #{target_standard}"
49
+ else
50
+ display_standard = target_standard
51
+ end
46
52
 
47
53
  # stop here if only name is requested this is used to populate display name for arguments
48
54
  if name_only == true
49
55
  results = []
56
+ check_elems << OpenStudio::Attribute.new('description', 'Check schedules for lighting, ventilation, occupant density, plug loads, and equipment based on DOE reference building schedules in terms of full load hours per year.')
50
57
  check_elems.each do |elem|
51
58
  results << elem.valueAsString
52
59
  end
53
60
  return results
54
61
  end
55
62
 
56
- # Versions of OpenStudio greater than 2.4.0 use a modified version of
57
- # openstudio-standards with different method calls. These methods
58
- # require a "Standard" object instead of the standard being passed into method calls.
59
- # This Standard object is used throughout the QAQC check.
60
- if OpenStudio::VersionString.new(OpenStudio.openStudioVersion) < OpenStudio::VersionString.new('2.4.3')
61
- use_old_gem_code = true
62
- else
63
- use_old_gem_code = false
63
+ begin
64
+
65
+ # setup standard
64
66
  std = Standard.build(target_standard)
65
- end
66
67
 
67
- begin
68
+ # gather building type for summary
69
+ bt_cz = std.model_get_building_climate_zone_and_building_type(@model)
70
+ building_type = bt_cz['building_type']
71
+ # mapping to obuilding type to match space types
72
+ if building_type.include?("Office") then building_type = "Office" end
73
+ climate_zone = bt_cz['climate_zone']
74
+ prototype_prefix = "#{display_standard} #{building_type} #{climate_zone}"
75
+ check_elems << OpenStudio::Attribute.new('description', "Check schedules for lighting, ventilation, occupant density, plug loads, and equipment based on #{prototype_prefix} DOE reference building schedules in terms of full load hours per year.")
76
+ check_elems << OpenStudio::Attribute.new('min_pass', min_pass * 100)
77
+ check_elems << OpenStudio::Attribute.new('max_pass', max_pass * 100)
78
+
79
+ # gather all non statandard space types so can be listed in single flag
80
+ non_tagged_space_types = []
81
+
68
82
  # loop through all space types used in the model
69
83
  @model.getSpaceTypes.each do |space_type|
70
84
  next if space_type.floorArea <= 0
71
85
 
72
86
  # load in standard info for this space type
73
- if use_old_gem_code
74
- data = space_type.get_standards_data(target_standard)
75
- else
76
- data = std.space_type_get_standards_data(space_type)
77
- end
87
+ data = std.space_type_get_standards_data(space_type)
78
88
 
79
89
  if data.nil? || data.empty?
80
90
 
81
91
  # skip if all spaces using this space type are plenums
82
92
  all_spaces_plenums = true
83
93
  space_type.spaces.each do |space|
84
- if use_old_gem_code
85
- if !space.plenum?
86
- all_spaces_plenums = false
87
- next
88
- end
89
- else
90
- if !std.space_plenum?(space)
91
- all_spaces_plenums = false
92
- next
93
- end
94
+ if !std.space_plenum?(space)
95
+ all_spaces_plenums = false
96
+ next
94
97
  end
95
98
  end
96
99
 
97
100
  if !all_spaces_plenums
98
- check_elems << OpenStudio::Attribute.new('flag', "Unexpected standards type for #{space_type.name}, can't validate schedules.")
101
+ non_tagged_space_types << space_type.floorArea
99
102
  end
100
103
 
101
104
  next
@@ -107,22 +110,14 @@ module OsLib_QAQC
107
110
  # check lighting schedules
108
111
  data['lighting_per_area'].nil? ? (target_ip = 0.0) : (target_ip = data['lighting_per_area'])
109
112
  if target_ip.to_f > 0
110
- if use_old_gem_code
111
- schedule_target = model_temp.add_schedule(data['lighting_schedule'])
112
- else
113
- schedule_target = std.model_add_schedule(model_temp, data['lighting_schedule'])
114
- end
113
+ schedule_target = std.model_add_schedule(model_temp, data['lighting_schedule'])
115
114
  if !schedule_target
116
115
  check_elems << OpenStudio::Attribute.new('flag', "Didn't find schedule named #{data['lighting_schedule']} in standards json.")
117
116
  else
118
117
  # loop through and test individual load instances
119
- if use_old_gem_code
120
- target_hrs = schedule_target.annual_equivalent_full_load_hrs
121
- else
122
- target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target)
123
- end
118
+ target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target.to_ScheduleRuleset.get)
124
119
  space_type.lights.each do |load_inst|
125
- inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass)
120
+ inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass, target_standard)
126
121
  if inst_sch_check then check_elems << inst_sch_check end
127
122
  end
128
123
 
@@ -132,23 +127,15 @@ module OsLib_QAQC
132
127
  # check electric equipment schedules
133
128
  data['electric_equipment_per_area'].nil? ? (target_ip = 0.0) : (target_ip = data['electric_equipment_per_area'])
134
129
  if target_ip.to_f > 0
135
- if use_old_gem_code
136
- schedule_target = model_temp.add_schedule(data['electric_equipment_schedule'])
137
- else
138
- schedule_target = std.model_add_schedule(model_temp, data['electric_equipment_schedule'])
139
- end
130
+ schedule_target = std.model_add_schedule(model_temp, data['electric_equipment_schedule'])
140
131
  if !schedule_target
141
132
  check_elems << OpenStudio::Attribute.new('flag', "Didn't find schedule named #{data['electric_equipment_schedule']} in standards json.")
142
133
  else
143
134
  # loop through and test individual load instances
144
- if use_old_gem_code
145
- target_hrs = schedule_target.annual_equivalent_full_load_hrs
146
- else
147
- target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target)
148
- end
135
+ target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target.to_ScheduleRuleset.get)
149
136
 
150
137
  space_type.electricEquipment.each do |load_inst|
151
- inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass)
138
+ inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass, target_standard)
152
139
  if inst_sch_check then check_elems << inst_sch_check end
153
140
  end
154
141
  end
@@ -158,22 +145,14 @@ module OsLib_QAQC
158
145
  # todo - update measure test to with space type to check this
159
146
  data['gas_equipment_per_area'].nil? ? (target_ip = 0.0) : (target_ip = data['gas_equipment_per_area'])
160
147
  if target_ip.to_f > 0
161
- if use_old_gem_code
162
- schedule_target = model_temp.add_schedule(data['gas_equipment_schedule'])
163
- else
164
- schedule_target = std.model_add_schedule(model_temp, data['gas_equipment_schedule'])
165
- end
148
+ schedule_target = std.model_add_schedule(model_temp, data['gas_equipment_schedule'])
166
149
  if !schedule_target
167
150
  check_elems << OpenStudio::Attribute.new('flag', "Didn't find schedule named #{data['gas_equipment_schedule']} in standards json.")
168
151
  else
169
152
  # loop through and test individual load instances
170
- if use_old_gem_code
171
- target_hrs = schedule_target.annual_equivalent_full_load_hrs
172
- else
173
- target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target)
174
- end
153
+ target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target.to_ScheduleRuleset.get)
175
154
  space_type.gasEquipment.each do |load_inst|
176
- inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass)
155
+ inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass, target_standard)
177
156
  if inst_sch_check then check_elems << inst_sch_check end
178
157
  end
179
158
  end
@@ -182,22 +161,14 @@ module OsLib_QAQC
182
161
  # check occupancy schedules
183
162
  data['occupancy_per_area'].nil? ? (target_ip = 0.0) : (target_ip = data['occupancy_per_area'])
184
163
  if target_ip.to_f > 0
185
- if use_old_gem_code
186
- schedule_target = model_temp.add_schedule(data['occupancy_schedule'])
187
- else
188
- schedule_target = std.model_add_schedule(model_temp, data['occupancy_schedule'])
189
- end
164
+ schedule_target = std.model_add_schedule(model_temp, data['occupancy_schedule'])
190
165
  if !schedule_target
191
166
  check_elems << OpenStudio::Attribute.new('flag', "Didn't find schedule named #{data['occupancy_schedule']} in standards json.")
192
167
  else
193
168
  # loop through and test individual load instances
194
- if use_old_gem_code
195
- target_hrs = schedule_target.annual_equivalent_full_load_hrs
196
- else
197
- target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target)
198
- end
169
+ target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target.to_ScheduleRuleset.get)
199
170
  space_type.people.each do |load_inst|
200
- inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass)
171
+ inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass, target_standard)
201
172
  if inst_sch_check then check_elems << inst_sch_check end
202
173
  end
203
174
 
@@ -212,7 +183,7 @@ module OsLib_QAQC
212
183
  if oa.outdoorAirFlowRateFractionSchedule.is_initialized
213
184
  # TODO: - update measure test to check this
214
185
  target_hrs = 8760
215
- inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, oa, space_type, check_elems, min_pass, max_pass)
186
+ inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, oa, space_type, check_elems, min_pass, max_pass, target_standard)
216
187
  if inst_sch_check then check_elems << inst_sch_check end
217
188
  end
218
189
  end
@@ -227,13 +198,16 @@ module OsLib_QAQC
227
198
  # model load for space type where standards doesn't have one wont throw flag about mis-matched schedules
228
199
  end
229
200
 
201
+ # report about non standard space types
202
+ if non_tagged_space_types.size > 0
203
+ impacted_floor_area = non_tagged_space_types.sum
204
+ building_area = @model.getBuilding.floorArea
205
+ check_elems << OpenStudio::Attribute.new('flag', "Unexpected standard building/space types found for #{non_tagged_space_types.size} space types covering #{(100 * impacted_floor_area/building_area).round}% of floor area, can't provide comparisons for schedules for those space types.")
206
+ end
207
+
230
208
  # warn if there are spaces in model that don't use space type unless they appear to be plenums
231
209
  @model.getSpaces.each do |space|
232
- if use_old_gem_code
233
- next if space.plenum?
234
- else
235
- next if std.space_plenum?(space)
236
- end
210
+ next if std.space_plenum?(space)
237
211
  if !space.spaceType.is_initialized
238
212
  check_elems << OpenStudio::Attribute.new('flag', "#{space.name} doesn't have a space type assigned, can't validate schedules.")
239
213
  end
@@ -255,21 +229,19 @@ module OsLib_QAQC
255
229
 
256
230
  # code for each load instance for different load types will pass through here
257
231
  # will return nill or a single attribute
258
- def generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass)
259
- # Versions of OpenStudio greater than 2.4.0 use a modified version of
260
- # openstudio-standards with different method calls. These methods
261
- # require a "Standard" object instead of the standard being passed into method calls.
262
- # This Standard object is used throughout the QAQC check.
263
- if OpenStudio::VersionString.new(OpenStudio.openStudioVersion) < OpenStudio::VersionString.new('2.4.3')
264
- use_old_gem_code = true
265
- else
266
- use_old_gem_code = false
267
- std = Standard.build('90.1-2013')
268
- end
269
-
232
+ def generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass, target_standard)
270
233
  schedule_inst = nil
271
234
  inst_hrs = nil
272
235
 
236
+ # setup standard
237
+ std = Standard.build(target_standard)
238
+
239
+ # gather building type for summary
240
+ bt_cz = std.model_get_building_climate_zone_and_building_type(@model)
241
+ building_type = bt_cz['building_type']
242
+ climate_zone = bt_cz['climate_zone']
243
+ prototype_prefix = "#{target_standard} #{building_type} #{climate_zone}"
244
+
273
245
  # get schedule
274
246
  if (load_inst.class.to_s == 'OpenStudio::Model::People') && load_inst.numberofPeopleSchedule.is_initialized
275
247
  schedule_inst = load_inst.numberofPeopleSchedule.get
@@ -283,26 +255,18 @@ module OsLib_QAQC
283
255
 
284
256
  # get annual equiv for model schedule
285
257
  if schedule_inst.to_ScheduleRuleset.is_initialized
286
- if use_old_gem_code
287
- inst_hrs = schedule_inst.to_ScheduleRuleset.get.annual_equivalent_full_load_hrs
288
- else
289
- inst_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_inst.to_ScheduleRuleset.get)
290
- end
258
+ inst_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_inst.to_ScheduleRuleset.get)
291
259
  elsif schedule_inst.to_ScheduleConstant.is_initialized
292
- if use_old_gem_code
293
- inst_hrs = schedule_inst.to_ScheduleConstant.get.annual_equivalent_full_load_hrs
294
- else
295
- inst_hrs = std.schedule_constant_annual_equivalent_full_load_hrs(schedule_inst.to_ScheduleConstant.get)
296
- end
260
+ inst_hrs = std.schedule_constant_annual_equivalent_full_load_hrs(schedule_inst.to_ScheduleConstant.get)
297
261
  else
298
262
  return OpenStudio::Attribute.new('flag', "#{schedule_inst.name} isn't a Ruleset or Constant schedule. Can't calculate annual equivalent full load hours.")
299
263
  end
300
264
 
301
265
  # check instance against target
302
266
  if inst_hrs < target_hrs * (1.0 - min_pass)
303
- return OpenStudio::Attribute.new('flag', "#{inst_hrs.round} annual equivalent full load hours for #{schedule_inst.name} in #{space_type.name} is more than #{min_pass * 100} (%) below the typical value of #{target_hrs.round} hours from the DOE Prototype building.")
267
+ return OpenStudio::Attribute.new('flag', "#{inst_hrs.round} annual equivalent full load hours for #{schedule_inst.name} in #{space_type.name} is more than #{min_pass * 100} (%) below the value of #{target_hrs.round} hours from the #{prototype_prefix} DOE Prototype building.")
304
268
  elsif inst_hrs > target_hrs * (1.0 + max_pass)
305
- return OpenStudio::Attribute.new('flag', "#{inst_hrs.round} annual equivalent full load hours for #{schedule_inst.name} in #{space_type.name} is more than #{max_pass * 100} (%) above the typical value of #{target_hrs.round} hours DOE Prototype building.")
269
+ return OpenStudio::Attribute.new('flag', "#{inst_hrs.round} annual equivalent full load hours for #{schedule_inst.name} in #{space_type.name} is more than #{max_pass * 100} (%) above the value of #{target_hrs.round} hours from the #{prototype_prefix} DOE Prototype building.")
306
270
  end
307
271
 
308
272
  # will get to this if no flag was thrown
@@ -43,11 +43,13 @@ module OsLib_QAQC
43
43
  check_elems << OpenStudio::Attribute.new('name', 'Simultaneous Heating and Cooling')
44
44
  check_elems << OpenStudio::Attribute.new('category', category)
45
45
  check_elems << OpenStudio::Attribute.new('description', 'Check for simultaneous heating and cooling by looping through all Single Duct VAV Reheat Air Terminals and analyzing hourly data when there is a cooling load. ')
46
-
46
+ check_elems << OpenStudio::Attribute.new('max_pass', max_pass * 100)
47
+
47
48
  # stop here if only name is requested this is used to populate display name for arguments
48
49
  if name_only == true
49
50
  results = []
50
51
  check_elems.each do |elem|
52
+ next if ['Double','Integer'].include? (elem.valueType.valueDescription)
51
53
  results << elem.valueAsString
52
54
  end
53
55
  return results
@@ -50,11 +50,13 @@ module OsLib_QAQC
50
50
  else
51
51
  check_elems << OpenStudio::Attribute.new('description', "Check if fans modeled to ASHRAE 90.1 2013 Section G3.1.2.9 requirements. Compare the supply air temperature for each thermal zone against the thermostat setpoints. Throw flag if temperature difference excedes threshold set by #{@utility_name}.")
52
52
  end
53
-
53
+ check_elems << OpenStudio::Attribute.new('min_pass', max_delta)
54
+
54
55
  # stop here if only name is requested this is used to populate display name for arguments
55
56
  if name_only == true
56
57
  results = []
57
58
  check_elems.each do |elem|
59
+ next if ['Double','Integer'].include? (elem.valueType.valueDescription)
58
60
  results << elem.valueAsString
59
61
  end
60
62
  return results
@@ -126,7 +126,7 @@ module OsLib_Reporting
126
126
  # gather data for section
127
127
  qaqc_check_summary = {}
128
128
  qaqc_check_summary[:title] = 'List of Checks in Measure'
129
- qaqc_check_summary[:header] = ['Name', 'Category', 'Flags', 'Description']
129
+ qaqc_check_summary[:header] = ['Name', 'Category', 'Flags', 'Tolerance','Description']
130
130
  qaqc_check_summary[:data] = []
131
131
  qaqc_check_summary[:data_color] = []
132
132
  @qaqc_check_section = {}
@@ -152,28 +152,62 @@ module OsLib_Reporting
152
152
  check_name = nil
153
153
  check_cat = nil
154
154
  check_desc = nil
155
+ check_min_pass = nil
156
+ check_max_pass = nil
155
157
  flags = []
156
- # loop through attributes (name,category,description,then optionally one or more flag attributes)
157
- check.valueAsAttributeVector.each_with_index do |value, index|
158
- if index == 0
159
- check_name = value.valueAsString
160
- elsif index == 1
161
- check_cat = value.valueAsString
162
- elsif index == 2
163
- check_desc = value.valueAsString
158
+
159
+
160
+ # loop through attributes (name,category,description, min tol, max tol ,then optionally one or more flag attributes)
161
+ check.valueAsAttributeVector.each do |attribute|
162
+ if attribute.name == "name"
163
+ check_name = attribute.valueAsString
164
+ elsif attribute.name == 'category'
165
+ check_cat = attribute.valueAsString
166
+ elsif attribute.name == 'description'
167
+ check_desc = attribute.valueAsString
168
+ elsif attribute.name == 'min_pass'
169
+ if ['Double','Integer'].include? (attribute.valueType.valueDescription)
170
+ check_min_pass = attribute.valueAsDouble
171
+ else
172
+ check_min_pass = attribute.valueAsString
173
+ end
174
+ elsif attribute.name == 'max_pass'
175
+ if ['Double','Integer'].include? (attribute.valueType.valueDescription)
176
+ check_max_pass = attribute.valueAsDouble
177
+ else
178
+ check_max_pass = attribute.valueAsString
179
+ end
164
180
  else # should be flag
165
- flags << value.valueAsString
166
- qaqc_flag_details[:data] << [value.valueAsString]
167
- runner.registerWarning("#{check_name} - #{value.valueAsString}")
181
+ flags << attribute.valueAsString
182
+ qaqc_flag_details[:data] << [attribute.valueAsString]
183
+ runner.registerWarning("#{check_name} - #{attribute.valueAsString}")
168
184
  num_flags += 1
169
- end
185
+ end
170
186
  end
171
187
 
172
188
  # add row to table for this check
173
- qaqc_check_summary[:data] << [check_name, check_cat, flags.size, check_desc]
189
+ # check_supply_air_and_thermostat_temp_difference should have unit for F instead of default %, can add that here or do I need to pass in from that method
190
+ if !check_min_pass.nil? && !check_min_pass.instance_of?(String) && check_min_pass.abs > 0
191
+ tol_val = check_min_pass
192
+ elsif !check_max_pass.nil? && !check_min_pass.instance_of?(String) && check_max_pass.abs > 0
193
+ tol_val = check_max_pass
194
+ elsif
195
+ tol_val = check_min_pass # should empty string or Var
196
+ end
197
+
198
+ # change units for some checks #todo - this can be changed later to use "unit" attribute
199
+ if check_name == 'Supply and Zone Air Temperature'
200
+ tol_val = "#{tol_val} F"
201
+ elsif check_name == 'Baseline Mechanical System Type'
202
+ tol_val = "#{tol_val}"
203
+ else
204
+ tol_val = "#{tol_val}%"
205
+ end
206
+
207
+ qaqc_check_summary[:data] << [check_name, check_cat, flags.size, tol_val ,check_desc]
174
208
 
175
209
  # add info message for check if no flags found (this way user still knows what ran)
176
- if check.valueAsAttributeVector.size < 4
210
+ if num_flags == 0
177
211
  runner.registerInfo("#{check_name} - no flags.")
178
212
  end
179
213
 
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  # *******************************************************************************
3
- # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
+ # OpenStudio(R), Copyright (c) 2008-2022, Alliance for Sustainable Energy, LLC.
4
4
  # All rights reserved.
5
5
  # Redistribution and use in source and binary forms, with or without
6
6
  # modification, are permitted provided that the following conditions are met:
@@ -42,6 +42,10 @@
42
42
 
43
43
 
44
44
 
45
+
46
+
47
+
48
+
45
49
  <!DOCTYPE html>
46
50
  <html lang="en">
47
51
  <head>
@@ -3,8 +3,8 @@
3
3
  <schema_version>3.0</schema_version>
4
4
  <name>hvac_psychrometric_chart</name>
5
5
  <uid>97213780-0727-4462-8ec0-9a6c3e475cd6</uid>
6
- <version_id>0ed095ba-99b0-4662-bcc3-bae563008dee</version_id>
7
- <version_modified>20210708T214255Z</version_modified>
6
+ <version_id>65abd215-893b-472a-9876-175f63f27728</version_id>
7
+ <version_modified>20220506T153446Z</version_modified>
8
8
  <xml_checksum>F657B621</xml_checksum>
9
9
  <class_name>HVACPsychrometricChart</class_name>
10
10
  <display_name>HVAC Psychrometric Chart</display_name>
@@ -94,7 +94,7 @@
94
94
  <filename>report.html.erb</filename>
95
95
  <filetype>erb</filetype>
96
96
  <usage_type>resource</usage_type>
97
- <checksum>CFE345B8</checksum>
97
+ <checksum>0006E928</checksum>
98
98
  </file>
99
99
  </files>
100
100
  </measure>
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  # *******************************************************************************
3
- # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
+ # OpenStudio(R), Copyright (c) 2008-2022, Alliance for Sustainable Energy, LLC.
4
4
  # All rights reserved.
5
5
  # Redistribution and use in source and binary forms, with or without
6
6
  # modification, are permitted provided that the following conditions are met:
@@ -42,6 +42,10 @@
42
42
 
43
43
 
44
44
 
45
+
46
+
47
+
48
+
45
49
  <!DOCTYPE html>
46
50
  <html>
47
51
  <head>
@@ -3,8 +3,8 @@
3
3
  <schema_version>3.0</schema_version>
4
4
  <name>openstudio_results</name>
5
5
  <uid>a25386cd-60e4-46bc-8b11-c755f379d916</uid>
6
- <version_id>da737820-833d-4734-8131-f962d58ea8e2</version_id>
7
- <version_modified>20210423T144543Z</version_modified>
6
+ <version_id>813ebcc3-c480-491c-9934-c1bcd1a1a478</version_id>
7
+ <version_modified>20220506T153445Z</version_modified>
8
8
  <xml_checksum>557BF06F</xml_checksum>
9
9
  <class_name>OpenStudioResults</class_name>
10
10
  <display_name>OpenStudio Results</display_name>
@@ -1493,7 +1493,7 @@
1493
1493
  <filename>report.html.erb</filename>
1494
1494
  <filetype>erb</filetype>
1495
1495
  <usage_type>resource</usage_type>
1496
- <checksum>FB09FEFB</checksum>
1496
+ <checksum>9224834F</checksum>
1497
1497
  </file>
1498
1498
  </files>
1499
1499
  </measure>
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  # *******************************************************************************
3
- # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
+ # OpenStudio(R), Copyright (c) 2008-2022, Alliance for Sustainable Energy, LLC.
4
4
  # All rights reserved.
5
5
  # Redistribution and use in source and binary forms, with or without
6
6
  # modification, are permitted provided that the following conditions are met:
@@ -42,6 +42,10 @@
42
42
 
43
43
 
44
44
 
45
+
46
+
47
+
48
+
45
49
  <!DOCTYPE html>
46
50
  <html lang="en">
47
51
  <head>
@@ -3,8 +3,8 @@
3
3
  <schema_version>3.0</schema_version>
4
4
  <name>set_run_period</name>
5
5
  <uid>7a84292a-3975-4ab3-9284-6edabcbe750b</uid>
6
- <version_id>81a0f7fb-e4fc-4ee4-96ed-f3856c9a258b</version_id>
7
- <version_modified>20210708T213307Z</version_modified>
6
+ <version_id>ffaa166b-6d19-454c-98a7-86d40660f333</version_id>
7
+ <version_modified>20220506T153446Z</version_modified>
8
8
  <xml_checksum>2AF3A68E</xml_checksum>
9
9
  <class_name>SetRunPeriod</class_name>
10
10
  <display_name>SetRunPeriod</display_name>
@@ -3,8 +3,8 @@
3
3
  <schema_version>3.0</schema_version>
4
4
  <name>view_data</name>
5
5
  <uid>18cf0de7-48b8-48dc-ab68-0dd29f0b8bd0</uid>
6
- <version_id>735a1615-20af-4edc-838f-b8166d375587</version_id>
7
- <version_modified>20210801T053516Z</version_modified>
6
+ <version_id>1b6eabd7-668b-4547-90e9-38c978bce1c0</version_id>
7
+ <version_modified>20220505T194724Z</version_modified>
8
8
  <xml_checksum>2C8A3EEF</xml_checksum>
9
9
  <class_name>ViewData</class_name>
10
10
  <display_name>ViewData</display_name>
@@ -147,13 +147,13 @@
147
147
  <filename>va3c.rb</filename>
148
148
  <filetype>rb</filetype>
149
149
  <usage_type>resource</usage_type>
150
- <checksum>1FD61D41</checksum>
150
+ <checksum>78ACC264</checksum>
151
151
  </file>
152
152
  <file>
153
153
  <filename>report.html.in</filename>
154
154
  <filetype>in</filetype>
155
155
  <usage_type>resource</usage_type>
156
- <checksum>59FADD1B</checksum>
156
+ <checksum>4C5A2EA2</checksum>
157
157
  </file>
158
158
  </files>
159
159
  </measure>