openstudio-common-measures 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test_with_openstudio.yml +2 -2
  3. data/CHANGELOG.md +4 -0
  4. data/Gemfile +10 -5
  5. data/Jenkinsfile +1 -1
  6. data/README.md +1 -0
  7. data/lib/measures/.rubocop.yml +6 -0
  8. data/lib/measures/AddCostPerAreaToConstruction/measure.xml +21 -21
  9. data/lib/measures/AddCostPerFloorAreaToBuilding/measure.xml +25 -25
  10. data/lib/measures/AddCostPerFloorAreaToElectricEquipment/measure.xml +21 -21
  11. data/lib/measures/AddCostPerFloorAreaToLights/measure.xml +21 -21
  12. data/lib/measures/AddCostPerFloorAreaUnusedToLights/measure.xml +21 -21
  13. data/lib/measures/AddCostToSupplySideHVACComponentByAirLoop/measure.xml +24 -24
  14. data/lib/measures/AddCostperAreatoUnusedConstruction/measure.xml +21 -21
  15. data/lib/measures/AddExteriorLights/measure.xml +19 -19
  16. data/lib/measures/AddMeter/measure.xml +15 -15
  17. data/lib/measures/AddOutputDiagnostics/measure.xml +18 -18
  18. data/lib/measures/AddOutputVariable/measure.xml +15 -15
  19. data/lib/measures/AddSimplePvToShadingSurfacesByType/measure.xml +24 -24
  20. data/lib/measures/AddThermalComfortModelTypes/measure.xml +21 -21
  21. data/lib/measures/AdjustSystemEfficiencies/measure.xml +12 -12
  22. data/lib/measures/AdjustThermostatSetpointsByDegrees/measure.xml +23 -23
  23. data/lib/measures/ChangeBuildingLocation/README.md +1 -1
  24. data/lib/measures/ChangeBuildingLocation/measure.rb +8 -13
  25. data/lib/measures/ChangeBuildingLocation/measure.xml +89 -89
  26. data/lib/measures/EnableIdealAirLoadsForAllZones/measure.xml +22 -22
  27. data/lib/measures/ExportScheduleCSV/measure.xml +29 -29
  28. data/lib/measures/ImportEnvelopeAndInternalLoadsFromIdf/measure.xml +29 -29
  29. data/lib/measures/MeterFlodPlot/measure.xml +35 -35
  30. data/lib/measures/ModifyEnergyPlusCoilCoolingDXSingleSpeedObjects/measure.xml +24 -24
  31. data/lib/measures/ModifyEnergyPlusFanVariableVolumeObjects/measure.xml +24 -24
  32. data/lib/measures/PredictedMeanVote/measure.xml +23 -23
  33. data/lib/measures/RemoveInternalLoadsDirectlyAssignedToSpaces/measure.xml +21 -21
  34. data/lib/measures/RemoveUnusedDefaultProfiles/measure.xml +19 -19
  35. data/lib/measures/ReplaceExteriorWindowConstruction/measure.xml +29 -29
  36. data/lib/measures/ReplaceModel/README.md +1 -3
  37. data/lib/measures/ReplaceModel/measure.xml +32 -14
  38. data/lib/measures/ReplaceThermostatSchedules/measure.xml +17 -17
  39. data/lib/measures/ReportModelChanges/measure.xml +23 -23
  40. data/lib/measures/RunPeriod/measure.xml +14 -14
  41. data/lib/measures/RunPeriodMultiple/measure.xml +12 -12
  42. data/lib/measures/ServerDirectoryCleanup/measure.xml +30 -30
  43. data/lib/measures/SetCOPforSingleSpeedDXCoolingUnits/measure.xml +23 -23
  44. data/lib/measures/SetCOPforTwoSpeedDXCoolingUnits/measure.xml +23 -23
  45. data/lib/measures/SetEnergyPlusInfiltrationFlowRatePerFloorArea/measure.xml +24 -24
  46. data/lib/measures/SetEnergyPlusLightObjectsLPD/measure.xml +24 -24
  47. data/lib/measures/SetEnergyPlusMinimumOutdoorAirFlowRate/measure.xml +24 -24
  48. data/lib/measures/SetGasBurnerEfficiency/measure.xml +23 -23
  49. data/lib/measures/SetLifecycleCostParameters/measure.xml +15 -15
  50. data/lib/measures/SetLightingLoadsByLPD/measure.xml +35 -35
  51. data/lib/measures/SetSpaceInfiltrationByExteriorSurfaceArea/measure.xml +25 -25
  52. data/lib/measures/SetThermostatSchedules/measure.xml +17 -17
  53. data/lib/measures/ShiftScheduleProfileTime/measure.xml +23 -23
  54. data/lib/measures/SwapLightsDefinition/measure.xml +25 -25
  55. data/lib/measures/UnmetLoadHoursTroubleshooting/measure.xml +43 -43
  56. data/lib/measures/VentilationQAQC/measure.xml +31 -31
  57. data/lib/measures/XcelEDAReportingandQAQC/measure.xml +3 -3
  58. data/lib/measures/XcelEDATariffSelectionandModelSetup/measure.xml +73 -73
  59. data/lib/measures/ZoneReport/measure.xml +35 -35
  60. data/lib/measures/add_ems_emissions_reporting/measure.rb +0 -2
  61. data/lib/measures/add_ems_emissions_reporting/measure.xml +23 -23
  62. data/lib/measures/add_ems_to_control_ev_charging/measure.rb +0 -2
  63. data/lib/measures/add_ems_to_control_ev_charging/measure.xml +21 -21
  64. data/lib/measures/add_ev_load/measure.xml +35 -35
  65. data/lib/measures/add_rooftop_pv/measure.rb +5 -7
  66. data/lib/measures/add_rooftop_pv/measure.xml +25 -25
  67. data/lib/measures/add_zone_mixing_object/measure.xml +19 -19
  68. data/lib/measures/add_zone_ventilation_design_flow_rate_object/measure.xml +21 -21
  69. data/lib/measures/air_wall_zone_mixing/measure.rb +4 -6
  70. data/lib/measures/air_wall_zone_mixing/measure.xml +27 -27
  71. data/lib/measures/create_csv_output/measure.xml +28 -28
  72. data/lib/measures/envelope_and_internal_load_breakdown/measure.rb +0 -4
  73. data/lib/measures/envelope_and_internal_load_breakdown/measure.xml +52 -52
  74. data/lib/measures/envelope_and_internal_load_breakdown/resources/report.html.erb +1 -0
  75. data/lib/measures/example_report/measure.rb +2 -5
  76. data/lib/measures/example_report/measure.xml +41 -41
  77. data/lib/measures/example_report/resources/report.html.erb +1 -0
  78. data/lib/measures/gem_env_report/measure.xml +32 -32
  79. data/lib/measures/generic_qaqc/measure.rb +8 -15
  80. data/lib/measures/generic_qaqc/measure.xml +13 -13
  81. data/lib/measures/generic_qaqc/resources/check_air_sys_temps.rb +2 -2
  82. data/lib/measures/generic_qaqc/resources/check_domestic_hot_water.rb +4 -4
  83. data/lib/measures/generic_qaqc/resources/check_envelope_conductance.rb +7 -5
  84. data/lib/measures/generic_qaqc/resources/check_internal_loads.rb +2 -2
  85. data/lib/measures/generic_qaqc/resources/check_mech_sys_type.rb +1 -1
  86. data/lib/measures/generic_qaqc/resources/check_plant_temps.rb +6 -6
  87. data/lib/measures/generic_qaqc/resources/check_schedules.rb +7 -7
  88. data/lib/measures/generic_qaqc/resources/check_supply_air_and_thermostat_temp_difference.rb +5 -2
  89. data/lib/measures/generic_qaqc/resources/report.html.erb +1 -0
  90. data/lib/measures/get_site_from_building_component_library/measure.rb +4 -8
  91. data/lib/measures/get_site_from_building_component_library/measure.xml +28 -28
  92. data/lib/measures/hvac_psychrometric_chart/measure.xml +29 -29
  93. data/lib/measures/hvac_psychrometric_chart/resources/report.html.erb +1 -0
  94. data/lib/measures/inject_idf_objects/measure.xml +31 -31
  95. data/lib/measures/openstudio_results/measure.rb +2 -6
  96. data/lib/measures/openstudio_results/measure.xml +348 -360
  97. data/lib/measures/openstudio_results/resources/os_lib_reporting.rb +8 -8
  98. data/lib/measures/openstudio_results/resources/report.html.erb +1 -0
  99. data/lib/measures/remove_orphan_objects_and_unused_resources/measure.xml +24 -24
  100. data/lib/measures/set_electric_equipment_loads_by_epd/measure.xml +33 -33
  101. data/lib/measures/set_exterior_walls_and_floors_to_adiabatic/measure.xml +19 -19
  102. data/lib/measures/set_run_period/measure.xml +19 -19
  103. data/lib/measures/set_space_infiltration_per_exterior_area/measure.xml +22 -22
  104. data/lib/measures/shadow_calculation/measure.xml +18 -18
  105. data/lib/measures/tariff_selection_block/measure.rb +2 -5
  106. data/lib/measures/tariff_selection_block/measure.xml +25 -25
  107. data/lib/measures/tariff_selection_flat/measure.rb +3 -5
  108. data/lib/measures/tariff_selection_flat/measure.xml +25 -25
  109. data/lib/measures/tariff_selection_generic/measure.rb +2 -5
  110. data/lib/measures/tariff_selection_generic/measure.xml +39 -39
  111. data/lib/measures/tariff_selection_time_and_date_dependant/measure.rb +19 -15
  112. data/lib/measures/tariff_selection_time_and_date_dependant/measure.xml +37 -25
  113. data/lib/measures/view_data/measure.xml +41 -41
  114. data/lib/measures/view_model/measure.xml +35 -35
  115. data/lib/openstudio/common_measures/version.rb +1 -1
  116. data/openstudio-common-measures.gemspec +11 -4
  117. metadata +72 -15
@@ -3,8 +3,8 @@
3
3
  <schema_version>3.1</schema_version>
4
4
  <name>generic_qaqc</name>
5
5
  <uid>d58d6b29-69ba-4915-b907-3c2c37ddb7c7</uid>
6
- <version_id>4a9ad832-316a-4d46-a2fb-36bb05afbefe</version_id>
7
- <version_modified>2023-11-28T23:01:11Z</version_modified>
6
+ <version_id>30314b23-6e89-4672-ae78-4be112a7e2b4</version_id>
7
+ <version_modified>2024-07-11T14:32:09Z</version_modified>
8
8
  <xml_checksum>0A3BF61C</xml_checksum>
9
9
  <class_name>GenericQAQC</class_name>
10
10
  <display_name>Generic QAQC</display_name>
@@ -506,18 +506,18 @@
506
506
  <version>
507
507
  <software_program>OpenStudio</software_program>
508
508
  <identifier>2.0.0</identifier>
509
- <min_compatible>3.1.0</min_compatible>
509
+ <min_compatible>3.8.0</min_compatible>
510
510
  </version>
511
511
  <filename>measure.rb</filename>
512
512
  <filetype>rb</filetype>
513
513
  <usage_type>script</usage_type>
514
- <checksum>248589A4</checksum>
514
+ <checksum>C631FD2F</checksum>
515
515
  </file>
516
516
  <file>
517
517
  <filename>check_air_sys_temps.rb</filename>
518
518
  <filetype>rb</filetype>
519
519
  <usage_type>resource</usage_type>
520
- <checksum>A4C95CA9</checksum>
520
+ <checksum>3B5F8121</checksum>
521
521
  </file>
522
522
  <file>
523
523
  <filename>check_calibration.rb</filename>
@@ -535,13 +535,13 @@
535
535
  <filename>check_domestic_hot_water.rb</filename>
536
536
  <filetype>rb</filetype>
537
537
  <usage_type>resource</usage_type>
538
- <checksum>58169778</checksum>
538
+ <checksum>29505A2B</checksum>
539
539
  </file>
540
540
  <file>
541
541
  <filename>check_envelope_conductance.rb</filename>
542
542
  <filetype>rb</filetype>
543
543
  <usage_type>resource</usage_type>
544
- <checksum>7DBD6363</checksum>
544
+ <checksum>192010AD</checksum>
545
545
  </file>
546
546
  <file>
547
547
  <filename>check_eui_by_end_use.rb</filename>
@@ -565,7 +565,7 @@
565
565
  <filename>check_internal_loads.rb</filename>
566
566
  <filetype>rb</filetype>
567
567
  <usage_type>resource</usage_type>
568
- <checksum>2343A7BE</checksum>
568
+ <checksum>874EBD06</checksum>
569
569
  </file>
570
570
  <file>
571
571
  <filename>check_mech_sys_capacity.rb</filename>
@@ -589,7 +589,7 @@
589
589
  <filename>check_mech_sys_type.rb</filename>
590
590
  <filetype>rb</filetype>
591
591
  <usage_type>resource</usage_type>
592
- <checksum>E20ED4B4</checksum>
592
+ <checksum>2CE1AFFF</checksum>
593
593
  </file>
594
594
  <file>
595
595
  <filename>check_part_loads.rb</filename>
@@ -613,7 +613,7 @@
613
613
  <filename>check_plant_temps.rb</filename>
614
614
  <filetype>rb</filetype>
615
615
  <usage_type>resource</usage_type>
616
- <checksum>DDA087A9</checksum>
616
+ <checksum>B171C6AE</checksum>
617
617
  </file>
618
618
  <file>
619
619
  <filename>check_plenum_loads.rb</filename>
@@ -637,7 +637,7 @@
637
637
  <filename>check_schedules.rb</filename>
638
638
  <filetype>rb</filetype>
639
639
  <usage_type>resource</usage_type>
640
- <checksum>6DADD274</checksum>
640
+ <checksum>47BA3DD4</checksum>
641
641
  </file>
642
642
  <file>
643
643
  <filename>check_simultaneous_heating_and_cooling.rb</filename>
@@ -649,7 +649,7 @@
649
649
  <filename>check_supply_air_and_thermostat_temp_difference.rb</filename>
650
650
  <filetype>rb</filetype>
651
651
  <usage_type>resource</usage_type>
652
- <checksum>3C95B9EE</checksum>
652
+ <checksum>824F4D82</checksum>
653
653
  </file>
654
654
  <file>
655
655
  <filename>check_weather_files.rb</filename>
@@ -673,7 +673,7 @@
673
673
  <filename>report.html.erb</filename>
674
674
  <filetype>erb</filetype>
675
675
  <usage_type>resource</usage_type>
676
- <checksum>41C02D76</checksum>
676
+ <checksum>FF1CBF19</checksum>
677
677
  </file>
678
678
  <file>
679
679
  <filename>0422_test_b_sm_off.osm</filename>
@@ -100,8 +100,8 @@ module OsLib_QAQC
100
100
  when 'OS_SetpointManager_Scheduled'
101
101
  sch = spm.to_SetpointManagerScheduled.get.schedule
102
102
  if sch.to_ScheduleRuleset.is_initialized
103
- min_c = std.schedule_ruleset_annual_min_max_value(sch.to_ScheduleRuleset.get)['min']
104
- max_c = std.schedule_ruleset_annual_min_max_value(sch.to_ScheduleRuleset.get)['max']
103
+ min_c = openstudiostandards::schedules.schedule_ruleset_annual_min_max_value(sch.to_ScheduleRuleset.get)['min']
104
+ max_c = openstudiostandards::schedules.schedule_ruleset_annual_min_max_value(sch.to_ScheduleRuleset.get)['max']
105
105
  elsif sch.to_ScheduleConstant.is_initialized
106
106
  min_c = std.schedule_constant_annual_min_max_value(sch.to_ScheduleConstant.get)['min']
107
107
  max_c = std.schedule_constant_annual_min_max_value(sch.to_ScheduleConstant.get)['max']
@@ -61,13 +61,13 @@ module OsLib_QAQC
61
61
  if use_old_gem_code
62
62
  annual_equiv_flow_rate = schedule_inst.to_ScheduleRuleset.get.annual_equivalent_full_load_hrs
63
63
  else
64
- annual_equiv_flow_rate = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_inst.to_ScheduleRuleset.get)
64
+ annual_equiv_flow_rate = OpenstudioStandards::Schedules.schedule_ruleset_get_equivalent_full_load_hours(schedule_inst.to_ScheduleRuleset.get)
65
65
  end
66
66
  elsif schedule_inst.to_ScheduleConstant.is_initialized
67
67
  if use_old_gem_code
68
68
  annual_equiv_flow_rate = schedule_inst.to_ScheduleConstant.get.annual_equivalent_full_load_hrs
69
69
  else
70
- annual_equiv_flow_rate = std.schedule_constant_annual_equivalent_full_load_hrs(schedule_inst.to_ScheduleConstant.get)
70
+ annual_equiv_flow_rate = OpenstudioStandards::Schedules.schedule_constant_get_equivalent_full_load_hours(schedule_inst.to_ScheduleConstant.get)
71
71
  end
72
72
  else
73
73
  check_elems << OpenStudio::Attribute.new('flag', "#{schedule_inst.name} isn't a Ruleset or Constant schedule. Can't calculate annual equivalent full load hours.")
@@ -139,7 +139,7 @@ module OsLib_QAQC
139
139
  if use_old_gem_code
140
140
  annual_equiv_flow_rate = inst_schedule.to_ScheduleRuleset.get.annual_equivalent_full_load_hrs
141
141
  else
142
- annual_equiv_flow_rate = std.schedule_ruleset_annual_equivalent_full_load_hrs(inst_schedule.to_ScheduleRuleset.get)
142
+ annual_equiv_flow_rate = OpenstudioStandards::Schedules.schedule_ruleset_get_equivalent_full_load_hours(inst_schedule.to_ScheduleRuleset.get)
143
143
  end
144
144
  elsif inst_schedule.to_ScheduleConstant.is_initialized
145
145
  if use_old_gem_code
@@ -241,7 +241,7 @@ module OsLib_QAQC
241
241
  if use_old_gem_code
242
242
  annual_equiv_flow_rate = inst_schedule.to_ScheduleRuleset.get.annual_equivalent_full_load_hrs
243
243
  else
244
- annual_equiv_flow_rate = std.schedule_ruleset_annual_equivalent_full_load_hrs(inst_schedule.to_ScheduleRuleset.get)
244
+ annual_equiv_flow_rate = OpenstudioStandards::Schedules.schedule_ruleset_get_equivalent_full_load_hours(inst_schedule.to_ScheduleRuleset.get)
245
245
  end
246
246
  elsif inst_schedule.to_ScheduleConstant.is_initialized
247
247
  if use_old_gem_code
@@ -276,7 +276,7 @@ module OsLib_QAQC
276
276
  construction_type = surface_detail[:construction_type]
277
277
  next if boundary_condition.to_s != 'Outdoors'
278
278
 
279
- film_coefficients_r_value = std.film_coefficients_r_value(intended_surface_type, includes_int_film = true, includes_ext_film = true)
279
+ film_coefficients_r_value = OpenstudioStandards::Constructions.film_coefficients_r_value(intended_surface_type, includes_int_film = true, includes_ext_film = true)
280
280
  thermal_conductance = surface_detail[:construction].thermalConductance.get
281
281
  r_value_with_film = 1 / thermal_conductance + film_coefficients_r_value
282
282
  source_units = 'm^2*K/W'
@@ -321,9 +321,11 @@ module OsLib_QAQC
321
321
  # check for non opaque sub surfaces
322
322
  source_units = 'W/m^2*K'
323
323
  target_units = 'Btu/ft^2*h*R'
324
- u_factor_si = std.construction_calculated_u_factor(sub_surface_detail[:construction].to_LayeredConstruction.get.to_Construction.get)
324
+ surface_construction = sub_surface_detail[:construction].to_LayeredConstruction.get
325
+ u_factor_si = OpenstudioStandards::Constructions.construction_get_conductance(surface_construction)
325
326
  u_factor_ip = OpenStudio.convert(u_factor_si, source_units, target_units).get
326
- shgc = std.construction_calculated_solar_heat_gain_coefficient(sub_surface_detail[:construction].to_LayeredConstruction.get.to_Construction.get)
327
+ shgc = OpenstudioStandards::Constructions.construction_get_solar_transmittance(sub_surface_detail[:construction].to_LayeredConstruction.get)
328
+
327
329
  intended_surface_type = sub_surface_detail[:surface_type]
328
330
  construction_type = sub_surface_detail[:construction_type]
329
331
  const_bldg_cat = sub_surface_detail[:const_bldg_cat]
@@ -363,7 +365,7 @@ module OsLib_QAQC
363
365
  intended_surface_type = sub_surface_detail[:surface_type]
364
366
  construction_type = sub_surface_detail[:construction_type]
365
367
  next if boundary_condition.to_s != 'Outdoors'
366
- film_coefficients_r_value = std.film_coefficients_r_value(intended_surface_type, includes_int_film = true, includes_ext_film = true)
368
+ film_coefficients_r_value = OpenstudioStandards::Constructions.film_coefficients_r_value(intended_surface_type, includes_int_film = true, includes_ext_film = true)
367
369
 
368
370
  thermal_conductance = sub_surface_detail[:construction].thermalConductance.get
369
371
  r_value_with_film = 1 / thermal_conductance + film_coefficients_r_value
@@ -458,7 +460,7 @@ module OsLib_QAQC
458
460
  boundary_condition = surface_detail[:boundary_condition]
459
461
  intended_surface_type = surface_detail[:surface_type]
460
462
  construction_type = surface_detail[:construction_type]
461
- film_coefficients_r_value = std.film_coefficients_r_value(intended_surface_type, includes_int_film = true, includes_ext_film = true)
463
+ film_coefficients_r_value = OpenstudioStandards::Constructions.film_coefficients_r_value(intended_surface_type, includes_int_film = true, includes_ext_film = true)
462
464
 
463
465
  thermal_conductance = surface_detail[:construction].thermalConductance.get
464
466
  r_value_with_film = 1 / thermal_conductance + film_coefficients_r_value
@@ -171,7 +171,7 @@ module OsLib_QAQC
171
171
  # skip if all spaces using this space type are plenums
172
172
  all_spaces_plenums = true
173
173
  space_type.spaces.each do |space|
174
- if !std.space_plenum?(space)
174
+ if !OpenstudioStandards::Space.space_plenum?(space)
175
175
  all_spaces_plenums = false
176
176
  next
177
177
  end
@@ -339,7 +339,7 @@ module OsLib_QAQC
339
339
 
340
340
  # warn if there are spaces in model that don't use space type unless they appear to be plenums
341
341
  @model.getSpaces.each do |space|
342
- next if std.space_plenum?(space)
342
+ next if OpenstudioStandards::Space.space_plenum?(space)
343
343
 
344
344
  if !space.spaceType.is_initialized
345
345
  check_elems << OpenStudio::Attribute.new('flag', "#{space.name} doesn't have a space type assigned, can't validate internal loads.")
@@ -78,7 +78,7 @@ module OsLib_QAQC
78
78
  is_plenum = true
79
79
  end
80
80
  else
81
- if std.space_plenum?(space)
81
+ if OpenstudioStandards::Space.space_plenum?(space)
82
82
  is_plenum = true
83
83
  end
84
84
  end
@@ -43,8 +43,8 @@ module OsLib_QAQC
43
43
  when 'OS_SetpointManager_Scheduled'
44
44
  sch = spm.to_SetpointManagerScheduled.get.schedule
45
45
  if sch.to_ScheduleRuleset.is_initialized
46
- min_c = std.schedule_ruleset_annual_min_max_value(sch.to_ScheduleRuleset.get)['min']
47
- max_c = std.schedule_ruleset_annual_min_max_value(sch.to_ScheduleRuleset.get)['max']
46
+ min_c = openstudiostandards::schedules.schedule_ruleset_annual_min_max_value(sch.to_ScheduleRuleset.get)['min']
47
+ max_c = openstudiostandards::schedules.schedule_ruleset_annual_min_max_value(sch.to_ScheduleRuleset.get)['max']
48
48
  elsif sch.to_ScheduleConstant.is_initialized
49
49
  min_c = std.schedule_constant_annual_min_max_value(sch.to_ScheduleConstant.get)['min']
50
50
  max_c = std.schedule_constant_annual_min_max_value(sch.to_ScheduleConstant.get)['max']
@@ -60,8 +60,8 @@ module OsLib_QAQC
60
60
  next if low_sch.empty?
61
61
  low_sch = low_sch.get
62
62
  if low_sch.to_ScheduleRuleset.is_initialized
63
- min_c = std.schedule_ruleset_annual_min_max_value(low_sch.to_ScheduleRuleset.get)['min']
64
- max_c = std.schedule_ruleset_annual_min_max_value(low_sch.to_ScheduleRuleset.get)['max']
63
+ min_c = openstudiostandards::schedules.schedule_ruleset_annual_min_max_value(low_sch.to_ScheduleRuleset.get)['min']
64
+ max_c = openstudiostandards::schedules.schedule_ruleset_annual_min_max_value(low_sch.to_ScheduleRuleset.get)['max']
65
65
  elsif low_sch.to_ScheduleConstant.is_initialized
66
66
  min_c = std.schedule_constant_annual_min_max_value(low_sch.to_ScheduleConstant.get)['min']
67
67
  max_c = std.schedule_constant_annual_min_max_value(low_sch.to_ScheduleConstant.get)['max']
@@ -74,8 +74,8 @@ module OsLib_QAQC
74
74
  next if high_sch.empty?
75
75
  high_sch = high_sch.get
76
76
  if high_sch.to_ScheduleRuleset.is_initialized
77
- min_c = std.schedule_ruleset_annual_min_max_value(high_sch.to_ScheduleRuleset.get)['min']
78
- max_c = std.schedule_ruleset_annual_min_max_value(high_sch.to_ScheduleRuleset.get)['max']
77
+ min_c = openstudiostandards::schedules.schedule_ruleset_annual_min_max_value(high_sch.to_ScheduleRuleset.get)['min']
78
+ max_c = openstudiostandards::schedules.schedule_ruleset_annual_min_max_value(high_sch.to_ScheduleRuleset.get)['max']
79
79
  elsif high_sch.to_ScheduleConstant.is_initialized
80
80
  min_c = std.schedule_constant_annual_min_max_value(high_sch.to_ScheduleConstant.get)['min']
81
81
  max_c = std.schedule_constant_annual_min_max_value(high_sch.to_ScheduleConstant.get)['max']
@@ -66,7 +66,7 @@ module OsLib_QAQC
66
66
  # skip if all spaces using this space type are plenums
67
67
  all_spaces_plenums = true
68
68
  space_type.spaces.each do |space|
69
- if !std.space_plenum?(space)
69
+ if !OpenstudioStandards::Space.space_plenum?(space)
70
70
  all_spaces_plenums = false
71
71
  next
72
72
  end
@@ -90,7 +90,7 @@ module OsLib_QAQC
90
90
  check_elems << OpenStudio::Attribute.new('flag', "Didn't find schedule named #{data['lighting_schedule']} in standards json.")
91
91
  else
92
92
  # loop through and test individual load instances
93
- target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target.to_ScheduleRuleset.get)
93
+ target_hrs = OpenstudioStandards::Schedules.schedule_ruleset_get_equivalent_full_load_hours(schedule_target.to_ScheduleRuleset.get)
94
94
  space_type.lights.each do |load_inst|
95
95
  inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass, target_standard)
96
96
  if inst_sch_check then check_elems << inst_sch_check end
@@ -107,7 +107,7 @@ module OsLib_QAQC
107
107
  check_elems << OpenStudio::Attribute.new('flag', "Didn't find schedule named #{data['electric_equipment_schedule']} in standards json.")
108
108
  else
109
109
  # loop through and test individual load instances
110
- target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target.to_ScheduleRuleset.get)
110
+ target_hrs = OpenstudioStandards::Schedules.schedule_ruleset_get_equivalent_full_load_hours(schedule_target.to_ScheduleRuleset.get)
111
111
 
112
112
  space_type.electricEquipment.each do |load_inst|
113
113
  inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass, target_standard)
@@ -125,7 +125,7 @@ module OsLib_QAQC
125
125
  check_elems << OpenStudio::Attribute.new('flag', "Didn't find schedule named #{data['gas_equipment_schedule']} in standards json.")
126
126
  else
127
127
  # loop through and test individual load instances
128
- target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target.to_ScheduleRuleset.get)
128
+ target_hrs = OpenstudioStandards::Schedules.schedule_ruleset_get_equivalent_full_load_hours(schedule_target.to_ScheduleRuleset.get)
129
129
  space_type.gasEquipment.each do |load_inst|
130
130
  inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass, target_standard)
131
131
  if inst_sch_check then check_elems << inst_sch_check end
@@ -141,7 +141,7 @@ module OsLib_QAQC
141
141
  check_elems << OpenStudio::Attribute.new('flag', "Didn't find schedule named #{data['occupancy_schedule']} in standards json.")
142
142
  else
143
143
  # loop through and test individual load instances
144
- target_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_target.to_ScheduleRuleset.get)
144
+ target_hrs = OpenstudioStandards::Schedules.schedule_ruleset_get_equivalent_full_load_hours(schedule_target.to_ScheduleRuleset.get)
145
145
  space_type.people.each do |load_inst|
146
146
  inst_sch_check = generate_load_insc_sch_check_attribute(target_hrs, load_inst, space_type, check_elems, min_pass, max_pass, target_standard)
147
147
  if inst_sch_check then check_elems << inst_sch_check end
@@ -182,7 +182,7 @@ module OsLib_QAQC
182
182
 
183
183
  # warn if there are spaces in model that don't use space type unless they appear to be plenums
184
184
  @model.getSpaces.each do |space|
185
- next if std.space_plenum?(space)
185
+ next if OpenstudioStandards::Space.space_plenum?(space)
186
186
  if !space.spaceType.is_initialized
187
187
  check_elems << OpenStudio::Attribute.new('flag', "#{space.name} doesn't have a space type assigned, can't validate schedules.")
188
188
  end
@@ -234,7 +234,7 @@ module OsLib_QAQC
234
234
 
235
235
  # get annual equiv for model schedule
236
236
  if schedule_inst.to_ScheduleRuleset.is_initialized
237
- inst_hrs = std.schedule_ruleset_annual_equivalent_full_load_hrs(schedule_inst.to_ScheduleRuleset.get)
237
+ inst_hrs = OpenstudioStandards::Schedules.schedule_ruleset_get_equivalent_full_load_hours(schedule_inst.to_ScheduleRuleset.get)
238
238
  elsif schedule_inst.to_ScheduleConstant.is_initialized
239
239
  inst_hrs = std.schedule_constant_annual_equivalent_full_load_hrs(schedule_inst.to_ScheduleConstant.get)
240
240
  else
@@ -60,17 +60,20 @@ module OsLib_QAQC
60
60
  if use_old_gem_code
61
61
  schedule_values = clg_sch.to_ScheduleRuleset.get.annual_min_max_value
62
62
  else
63
- schedule_values = std.schedule_ruleset_annual_min_max_value(clg_sch.to_ScheduleRuleset.get)
63
+ schedule_values = OpenstudioStandards::Schedules.schedule_get_min_max(clg_sch)
64
64
  end
65
65
  elsif clg_sch.to_ScheduleConstant.is_initialized
66
66
  if use_old_gem_code
67
67
  schedule_values = clg_sch.to_ScheduleConstant.get.annual_min_max_value
68
68
  else
69
- schedule_values = std.schedule_constant_annual_min_max_value(clg_sch.to_ScheduleConstant.get)
69
+ schedule_values = OpenstudioStandards::Schedules.schedule_get_min_max(clg_sch)
70
70
  end
71
71
  end
72
72
 
73
73
  unless schedule_values.nil?
74
+ puts "hello1"
75
+ puts schedule_values
76
+ puts "hello2"
74
77
  model_clg_min = schedule_values['min']
75
78
  end
76
79
  end
@@ -6,14 +6,8 @@
6
6
  # see the URL below for information on how to write OpenStudio measures
7
7
  # http://nrel.github.io/OpenStudio-user-documentation/measures/measure_writing_guide/
8
8
 
9
- # load OpenStudio measure libraries from openstudio-extension gem
10
- require 'openstudio-extension'
11
- require 'openstudio/extension/core/os_lib_helper_methods'
12
-
13
9
  # start the measure
14
10
  class GetSiteFromBuildingComponentLibrary < OpenStudio::Measure::ModelMeasure
15
- # resource file modules
16
- include OsLib_HelperMethods
17
11
 
18
12
  # human readable name
19
13
  def name
@@ -56,14 +50,16 @@ class GetSiteFromBuildingComponentLibrary < OpenStudio::Measure::ModelMeasure
56
50
  super(model, runner, user_arguments)
57
51
 
58
52
  # assign the user inputs to variables
59
- args = OsLib_HelperMethods.createRunVariables(runner, model, user_arguments, arguments(model))
53
+ args = runner.getArgumentValues(arguments(model), user_arguments)
54
+ args = Hash[args.collect{ |k, v| [k.to_s, v] }]
60
55
  if !args then return false end
61
56
 
62
57
  # lookup and replace argument values from upstream measures
63
58
  if args['use_upstream_args'] == true
64
59
  args.each do |arg, value|
65
60
  next if arg == 'use_upstream_args' # this argument should not be changed
66
- value_from_osw = OsLib_HelperMethods.check_upstream_measure_for_arg(runner, arg)
61
+ value_from_osw = runner.getPastStepValuesForName(arg)
62
+ value_from_osw = value_from_osw.collect{ |k, v| Hash[:measure_name => k, :value => v] }.first if !value_from_osw.empty?
67
63
  if !value_from_osw.empty?
68
64
  runner.registerInfo("Replacing argument named #{arg} from current measure with a value of #{value_from_osw[:value]} from #{value_from_osw[:measure_name]}.")
69
65
  new_val = value_from_osw[:value]
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0"?>
2
2
  <measure>
3
- <schema_version>3.0</schema_version>
3
+ <schema_version>3.1</schema_version>
4
4
  <name>get_site_from_building_component_library</name>
5
5
  <uid>a6dff045-6f62-4288-a3f0-a5549f4c292a</uid>
6
- <version_id>6cfdd1c0-eae5-4eba-b422-fde5d082ee4c</version_id>
7
- <version_modified>20221115T223607Z</version_modified>
6
+ <version_id>aa3db6e6-f8bf-492f-9fcd-b2c8750c4352</version_id>
7
+ <version_modified>2024-07-11T14:32:10Z</version_modified>
8
8
  <xml_checksum>99E7000D</xml_checksum>
9
9
  <class_name>GetSiteFromBuildingComponentLibrary</class_name>
10
10
  <display_name>Get Site from Building Component Library</display_name>
@@ -94,10 +94,16 @@
94
94
  </attributes>
95
95
  <files>
96
96
  <file>
97
- <filename>example_model.osm</filename>
98
- <filetype>osm</filetype>
99
- <usage_type>test</usage_type>
100
- <checksum>C4F35230</checksum>
97
+ <filename>LICENSE.md</filename>
98
+ <filetype>md</filetype>
99
+ <usage_type>license</usage_type>
100
+ <checksum>BFFB1AA6</checksum>
101
+ </file>
102
+ <file>
103
+ <filename>README.md</filename>
104
+ <filetype>md</filetype>
105
+ <usage_type>readme</usage_type>
106
+ <checksum>FAAFE9B7</checksum>
101
107
  </file>
102
108
  <file>
103
109
  <filename>README.md.erb</filename>
@@ -106,39 +112,33 @@
106
112
  <checksum>703C9964</checksum>
107
113
  </file>
108
114
  <file>
109
- <filename>README.md</filename>
110
- <filetype>md</filetype>
111
- <usage_type>readme</usage_type>
112
- <checksum>FAAFE9B7</checksum>
115
+ <version>
116
+ <software_program>OpenStudio</software_program>
117
+ <identifier>2.0.0</identifier>
118
+ <min_compatible>3.8.0</min_compatible>
119
+ </version>
120
+ <filename>measure.rb</filename>
121
+ <filetype>rb</filetype>
122
+ <usage_type>script</usage_type>
123
+ <checksum>4D81272B</checksum>
113
124
  </file>
114
125
  <file>
115
126
  <filename>bcl_api_test.rb</filename>
116
127
  <filetype>rb</filetype>
117
128
  <usage_type>test</usage_type>
118
- <checksum>9EE93012</checksum>
129
+ <checksum>1CD9B490</checksum>
119
130
  </file>
120
131
  <file>
121
- <filename>LICENSE.md</filename>
122
- <filetype>md</filetype>
123
- <usage_type>license</usage_type>
124
- <checksum>64FFEBDE</checksum>
132
+ <filename>example_model.osm</filename>
133
+ <filetype>osm</filetype>
134
+ <usage_type>test</usage_type>
135
+ <checksum>C4F35230</checksum>
125
136
  </file>
126
137
  <file>
127
138
  <filename>get_site_from_building_component_library_test.rb</filename>
128
139
  <filetype>rb</filetype>
129
140
  <usage_type>test</usage_type>
130
- <checksum>F5BB0628</checksum>
131
- </file>
132
- <file>
133
- <version>
134
- <software_program>OpenStudio</software_program>
135
- <identifier>2.0.0</identifier>
136
- <min_compatible>2.8.0</min_compatible>
137
- </version>
138
- <filename>measure.rb</filename>
139
- <filetype>rb</filetype>
140
- <usage_type>script</usage_type>
141
- <checksum>3FBDCCAF</checksum>
141
+ <checksum>AE95604F</checksum>
142
142
  </file>
143
143
  </files>
144
144
  </measure>
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0"?>
2
2
  <measure>
3
- <schema_version>3.0</schema_version>
3
+ <schema_version>3.1</schema_version>
4
4
  <name>hvac_psychrometric_chart</name>
5
5
  <uid>97213780-0727-4462-8ec0-9a6c3e475cd6</uid>
6
- <version_id>dad1d895-c678-4bb4-879d-3eae5fded9d3</version_id>
7
- <version_modified>20221115T224202Z</version_modified>
6
+ <version_id>b6eca7ed-6047-4a27-9190-773f8e670e5c</version_id>
7
+ <version_modified>2024-07-11T14:32:02Z</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>
@@ -44,22 +44,10 @@
44
44
  </attributes>
45
45
  <files>
46
46
  <file>
47
- <filename>model_test.osm</filename>
48
- <filetype>osm</filetype>
49
- <usage_type>test</usage_type>
50
- <checksum>34E3E58A</checksum>
51
- </file>
52
- <file>
53
- <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
54
- <filetype>epw</filetype>
55
- <usage_type>test</usage_type>
56
- <checksum>BDF687C1</checksum>
57
- </file>
58
- <file>
59
- <filename>README.md.erb</filename>
60
- <filetype>erb</filetype>
61
- <usage_type>readmeerb</usage_type>
62
- <checksum>703C9964</checksum>
47
+ <filename>LICENSE.md</filename>
48
+ <filetype>md</filetype>
49
+ <usage_type>license</usage_type>
50
+ <checksum>BFFB1AA6</checksum>
63
51
  </file>
64
52
  <file>
65
53
  <filename>README.md</filename>
@@ -68,10 +56,10 @@
68
56
  <checksum>3DE900D7</checksum>
69
57
  </file>
70
58
  <file>
71
- <filename>LICENSE.md</filename>
72
- <filetype>md</filetype>
73
- <usage_type>license</usage_type>
74
- <checksum>64FFEBDE</checksum>
59
+ <filename>README.md.erb</filename>
60
+ <filetype>erb</filetype>
61
+ <usage_type>readmeerb</usage_type>
62
+ <checksum>703C9964</checksum>
75
63
  </file>
76
64
  <file>
77
65
  <version>
@@ -82,19 +70,31 @@
82
70
  <filename>measure.rb</filename>
83
71
  <filetype>rb</filetype>
84
72
  <usage_type>script</usage_type>
85
- <checksum>7C4C392E</checksum>
73
+ <checksum>E80959ED</checksum>
74
+ </file>
75
+ <file>
76
+ <filename>report.html.erb</filename>
77
+ <filetype>erb</filetype>
78
+ <usage_type>resource</usage_type>
79
+ <checksum>FB03153C</checksum>
80
+ </file>
81
+ <file>
82
+ <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
83
+ <filetype>epw</filetype>
84
+ <usage_type>test</usage_type>
85
+ <checksum>BDF687C1</checksum>
86
86
  </file>
87
87
  <file>
88
88
  <filename>hvac_psychrometric_chart_test.rb</filename>
89
89
  <filetype>rb</filetype>
90
90
  <usage_type>test</usage_type>
91
- <checksum>CE7469B8</checksum>
91
+ <checksum>8046D052</checksum>
92
92
  </file>
93
93
  <file>
94
- <filename>report.html.erb</filename>
95
- <filetype>erb</filetype>
96
- <usage_type>resource</usage_type>
97
- <checksum>3DE4D1D8</checksum>
94
+ <filename>model_test.osm</filename>
95
+ <filetype>osm</filetype>
96
+ <usage_type>test</usage_type>
97
+ <checksum>34E3E58A</checksum>
98
98
  </file>
99
99
  </files>
100
100
  </measure>