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
@@ -49,11 +49,14 @@ module OsLib_QAQC
49
49
  else
50
50
  check_elems << OpenStudio::Attribute.new('description', 'Check against the 2011 ASHRAE Handbook - HVAC Applications, Table 7 section 50.14.')
51
51
  end
52
-
52
+ check_elems << OpenStudio::Attribute.new('min_pass', min_pass * 100)
53
+ check_elems << OpenStudio::Attribute.new('max_pass', max_pass * 100)
54
+
53
55
  # stop here if only name is requested this is used to populate display name for arguments
54
56
  if name_only == true
55
57
  results = []
56
58
  check_elems.each do |elem|
59
+ next if ['Double','Integer'].include? (elem.valueType.valueDescription)
57
60
  results << elem.valueAsString
58
61
  end
59
62
  return results
@@ -158,7 +161,7 @@ module OsLib_QAQC
158
161
 
159
162
  space_type_num_people_hours = 0.0
160
163
  # loop through peole instances
161
- space_type.peoples.each do |inst|
164
+ space_type.people.each do |inst|
162
165
  inst_num_people = inst.getNumberOfPeople(space_type_floor_area)
163
166
  inst_schedule = inst.numberofPeopleSchedule.get # sim will fail prior to this if doesn't have it
164
167
 
@@ -185,7 +188,7 @@ module OsLib_QAQC
185
188
 
186
189
  num_people_hours += space_type_num_people_hours
187
190
  end
188
- num_meals = num_people_hours / 365.0 * 1.5 # 90 minute meal
191
+ num_meals = num_people_hours / (365.0 * 1.5) # 90 minute meal
189
192
  target_consumption = num_meals * ashrae_hot_water_demand.first[:avg_day_unit]
190
193
 
191
194
  elsif ['LargeHotel', 'SmallHotel'].include? building_type
@@ -287,7 +290,7 @@ module OsLib_QAQC
287
290
 
288
291
  num_people_hours += space_type_num_people_hours
289
292
  end
290
- num_meals = num_people_hours / 365.0 * 0.5 # 30 minute leal
293
+ num_meals = num_people_hours / (365.0 * 0.5) # 30 minute leal
291
294
  # todo - add logic to address drive through traffic
292
295
  target_consumption = num_meals * ashrae_hot_water_demand.first[:avg_day_unit]
293
296
 
@@ -312,10 +315,12 @@ module OsLib_QAQC
312
315
  end
313
316
 
314
317
  # check actual against target
315
- if service_water_consumption_daily_avg_gal < target_consumption * (1.0 - min_pass)
316
- check_elems << OpenStudio::Attribute.new('flag', "Annual average of #{service_water_consumption_daily_avg_gal.round} gallons per day of hot water is more than #{min_pass * 100} % below the expected value of #{target_consumption.round} gallons per day.")
317
- elsif service_water_consumption_daily_avg_gal > target_consumption * (1.0 + max_pass)
318
- check_elems << OpenStudio::Attribute.new('flag', "Annual average of #{service_water_consumption_daily_avg_gal.round} gallons per day of hot water is more than #{max_pass * 100} % above the expected value of #{target_consumption.round} gallons per day.")
318
+ if !target_consumption.nil?
319
+ if service_water_consumption_daily_avg_gal < target_consumption * (1.0 - min_pass)
320
+ check_elems << OpenStudio::Attribute.new('flag', "Annual average of #{service_water_consumption_daily_avg_gal.round} gallons per day of hot water is more than #{min_pass * 100} % below the value of #{target_consumption.round} gallons per day.")
321
+ elsif service_water_consumption_daily_avg_gal > target_consumption * (1.0 + max_pass)
322
+ check_elems << OpenStudio::Attribute.new('flag', "Annual average of #{service_water_consumption_daily_avg_gal.round} gallons per day of hot water is more than #{max_pass * 100} % above the value of #{target_consumption.round} gallons per day.")
323
+ end
319
324
  end
320
325
  rescue StandardError => e
321
326
  # brief description of ruby error