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
@@ -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>create_csv_output</name>
5
5
  <uid>99d3a7e5-4bd5-407f-b5eb-7c59660ca980</uid>
6
- <version_id>fbbc1933-a541-4258-89b1-20ec4abae16a</version_id>
7
- <version_modified>20230118T161956Z</version_modified>
6
+ <version_id>a1449e43-ae2f-468f-abb1-11be6f448e2e</version_id>
7
+ <version_modified>2024-07-11T14:32:06Z</version_modified>
8
8
  <xml_checksum>9BF1E6AC</xml_checksum>
9
9
  <class_name>CreateCSVOutput</class_name>
10
10
  <display_name>CreateCSVOutput</display_name>
@@ -65,7 +65,13 @@
65
65
  <filename>LICENSE.md</filename>
66
66
  <filetype>md</filetype>
67
67
  <usage_type>license</usage_type>
68
- <checksum>CD7F5672</checksum>
68
+ <checksum>BFFB1AA6</checksum>
69
+ </file>
70
+ <file>
71
+ <filename>README.md</filename>
72
+ <filetype>md</filetype>
73
+ <usage_type>readme</usage_type>
74
+ <checksum>0A07426F</checksum>
69
75
  </file>
70
76
  <file>
71
77
  <filename>README.md.erb</filename>
@@ -79,24 +85,6 @@
79
85
  <usage_type>doc</usage_type>
80
86
  <checksum>00000000</checksum>
81
87
  </file>
82
- <file>
83
- <filename>example_model.osm</filename>
84
- <filetype>osm</filetype>
85
- <usage_type>test</usage_type>
86
- <checksum>39B6E26C</checksum>
87
- </file>
88
- <file>
89
- <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
90
- <filetype>epw</filetype>
91
- <usage_type>test</usage_type>
92
- <checksum>BDF687C1</checksum>
93
- </file>
94
- <file>
95
- <filename>report.html.in</filename>
96
- <filetype>in</filetype>
97
- <usage_type>resource</usage_type>
98
- <checksum>3F69E3FB</checksum>
99
- </file>
100
88
  <file>
101
89
  <version>
102
90
  <software_program>OpenStudio</software_program>
@@ -106,19 +94,31 @@
106
94
  <filename>measure.rb</filename>
107
95
  <filetype>rb</filetype>
108
96
  <usage_type>script</usage_type>
109
- <checksum>94EA9ABB</checksum>
97
+ <checksum>B46C084C</checksum>
98
+ </file>
99
+ <file>
100
+ <filename>report.html.in</filename>
101
+ <filetype>in</filetype>
102
+ <usage_type>resource</usage_type>
103
+ <checksum>3F69E3FB</checksum>
104
+ </file>
105
+ <file>
106
+ <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
107
+ <filetype>epw</filetype>
108
+ <usage_type>test</usage_type>
109
+ <checksum>BDF687C1</checksum>
110
110
  </file>
111
111
  <file>
112
112
  <filename>create_csv_output_test.rb</filename>
113
113
  <filetype>rb</filetype>
114
114
  <usage_type>test</usage_type>
115
- <checksum>74354A94</checksum>
115
+ <checksum>91652056</checksum>
116
116
  </file>
117
117
  <file>
118
- <filename>README.md</filename>
119
- <filetype>md</filetype>
120
- <usage_type>readme</usage_type>
121
- <checksum>0A07426F</checksum>
118
+ <filename>example_model.osm</filename>
119
+ <filetype>osm</filetype>
120
+ <usage_type>test</usage_type>
121
+ <checksum>39B6E26C</checksum>
122
122
  </file>
123
123
  </files>
124
124
  </measure>
@@ -6,10 +6,6 @@
6
6
  require 'erb'
7
7
  require 'json'
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
  require "#{File.dirname(__FILE__)}/resources/os_lib_reporting_envelope_and_internal_loads_breakdown"
14
10
 
15
11
  # start the 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>envelope_and_internal_load_breakdown</name>
5
5
  <uid>8f0e1fbb-8bc6-46e5-b6e4-db59177e2c02</uid>
6
- <version_id>094a25e3-d116-401e-8cdb-ae076a79079a</version_id>
7
- <version_modified>20221115T224203Z</version_modified>
6
+ <version_id>a792eb8c-870a-4c3e-8780-c1cd5b7dd8d2</version_id>
7
+ <version_modified>2024-07-11T14:32:04Z</version_modified>
8
8
  <xml_checksum>69BA4D91</xml_checksum>
9
9
  <class_name>EnvelopeAndInternalLoadBreakdown</class_name>
10
10
  <display_name>Envelope and Internal Load Breakdown</display_name>
@@ -71,28 +71,22 @@
71
71
  </attributes>
72
72
  <files>
73
73
  <file>
74
- <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
75
- <filetype>epw</filetype>
76
- <usage_type>test</usage_type>
77
- <checksum>BDF687C1</checksum>
78
- </file>
79
- <file>
80
- <filename>ExampleModel.osm</filename>
81
- <filetype>osm</filetype>
82
- <usage_type>test</usage_type>
83
- <checksum>7F9DACF4</checksum>
74
+ <filename>LICENSE.md</filename>
75
+ <filetype>md</filetype>
76
+ <usage_type>license</usage_type>
77
+ <checksum>BFFB1AA6</checksum>
84
78
  </file>
85
79
  <file>
86
- <filename>ExampleModel_NoExtNoGround.osm</filename>
87
- <filetype>osm</filetype>
88
- <usage_type>test</usage_type>
89
- <checksum>07CE0378</checksum>
80
+ <filename>README.md</filename>
81
+ <filetype>md</filetype>
82
+ <usage_type>readme</usage_type>
83
+ <checksum>7D00FFF0</checksum>
90
84
  </file>
91
85
  <file>
92
- <filename>ExampleModel_NoLoads_NoOA.osm</filename>
93
- <filetype>osm</filetype>
94
- <usage_type>test</usage_type>
95
- <checksum>CA6A593D</checksum>
86
+ <filename>README.md.erb</filename>
87
+ <filetype>erb</filetype>
88
+ <usage_type>readmeerb</usage_type>
89
+ <checksum>1223C55C</checksum>
96
90
  </file>
97
91
  <file>
98
92
  <filename>htg_gain_detailed_a.png</filename>
@@ -113,63 +107,69 @@
113
107
  <checksum>E8E7FBC8</checksum>
114
108
  </file>
115
109
  <file>
116
- <filename>htg_loss_summary.png</filename>
110
+ <filename>htg_loss_detailed.png</filename>
117
111
  <filetype>png</filetype>
118
112
  <usage_type>doc</usage_type>
119
- <checksum>69DDA02E</checksum>
113
+ <checksum>6E4E8FE2</checksum>
120
114
  </file>
121
115
  <file>
122
- <filename>htg_loss_detailed.png</filename>
116
+ <filename>htg_loss_summary.png</filename>
123
117
  <filetype>png</filetype>
124
118
  <usage_type>doc</usage_type>
125
- <checksum>6E4E8FE2</checksum>
119
+ <checksum>69DDA02E</checksum>
126
120
  </file>
127
121
  <file>
128
- <filename>README.md.erb</filename>
129
- <filetype>erb</filetype>
130
- <usage_type>readmeerb</usage_type>
131
- <checksum>1223C55C</checksum>
122
+ <version>
123
+ <software_program>OpenStudio</software_program>
124
+ <identifier>2.0.0</identifier>
125
+ <min_compatible>3.8.0</min_compatible>
126
+ </version>
127
+ <filename>measure.rb</filename>
128
+ <filetype>rb</filetype>
129
+ <usage_type>script</usage_type>
130
+ <checksum>184F527B</checksum>
132
131
  </file>
133
132
  <file>
134
133
  <filename>os_lib_reporting_envelope_and_internal_loads_breakdown.rb</filename>
135
134
  <filetype>rb</filetype>
136
135
  <usage_type>resource</usage_type>
137
- <checksum>471E57CB</checksum>
136
+ <checksum>EBC3D1C1</checksum>
138
137
  </file>
139
138
  <file>
140
- <filename>LICENSE.md</filename>
141
- <filetype>md</filetype>
142
- <usage_type>license</usage_type>
143
- <checksum>64FFEBDE</checksum>
139
+ <filename>report.html.erb</filename>
140
+ <filetype>erb</filetype>
141
+ <usage_type>resource</usage_type>
142
+ <checksum>41C02D76</checksum>
144
143
  </file>
145
144
  <file>
146
145
  <filename>EnvelopeAndInternalLoadBreakdown_Test.rb</filename>
147
146
  <filetype>rb</filetype>
148
147
  <usage_type>test</usage_type>
149
- <checksum>C9C97ADF</checksum>
148
+ <checksum>DCE6255F</checksum>
150
149
  </file>
151
150
  <file>
152
- <version>
153
- <software_program>OpenStudio</software_program>
154
- <identifier>2.0.0</identifier>
155
- <min_compatible>3.1.0</min_compatible>
156
- </version>
157
- <filename>measure.rb</filename>
158
- <filetype>rb</filetype>
159
- <usage_type>script</usage_type>
160
- <checksum>4B3CF7A8</checksum>
151
+ <filename>ExampleModel.osm</filename>
152
+ <filetype>osm</filetype>
153
+ <usage_type>test</usage_type>
154
+ <checksum>7F9DACF4</checksum>
161
155
  </file>
162
156
  <file>
163
- <filename>README.md</filename>
164
- <filetype>md</filetype>
165
- <usage_type>readme</usage_type>
166
- <checksum>7D00FFF0</checksum>
157
+ <filename>ExampleModel_NoExtNoGround.osm</filename>
158
+ <filetype>osm</filetype>
159
+ <usage_type>test</usage_type>
160
+ <checksum>07CE0378</checksum>
167
161
  </file>
168
162
  <file>
169
- <filename>report.html.erb</filename>
170
- <filetype>erb</filetype>
171
- <usage_type>resource</usage_type>
172
- <checksum>0C9A88EB</checksum>
163
+ <filename>ExampleModel_NoLoads_NoOA.osm</filename>
164
+ <filetype>osm</filetype>
165
+ <usage_type>test</usage_type>
166
+ <checksum>CA6A593D</checksum>
167
+ </file>
168
+ <file>
169
+ <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
170
+ <filetype>epw</filetype>
171
+ <usage_type>test</usage_type>
172
+ <checksum>BDF687C1</checksum>
173
173
  </file>
174
174
  </files>
175
175
  </measure>
@@ -6,10 +6,6 @@
6
6
  require 'erb'
7
7
  require 'json'
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
  require "#{File.dirname(__FILE__)}/resources/os_lib_reporting_example"
14
10
 
15
11
  # start the measure
@@ -88,7 +84,8 @@ class ExampleReport < OpenStudio::Measure::ReportingMeasure
88
84
  web_asset_path = setup[:web_asset_path]
89
85
 
90
86
  # assign the user inputs to variables
91
- args = OsLib_HelperMethods.createRunVariables(runner, model, user_arguments, arguments)
87
+ args = runner.getArgumentValues(arguments, user_arguments)
88
+ args = Hash[args.collect{ |k, v| [k.to_s, v] }]
92
89
  unless args
93
90
  return false
94
91
  end
@@ -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>example_report</name>
5
5
  <uid>174a6f71-3e8c-4f99-9e7a-b64f2e7535d4</uid>
6
- <version_id>7a62653c-c1e8-4550-a21f-3655bded5074</version_id>
7
- <version_modified>20221115T224157Z</version_modified>
6
+ <version_id>3f4dffcd-d7e8-40db-a753-45646f4cc20c</version_id>
7
+ <version_modified>2024-07-11T14:31:57Z</version_modified>
8
8
  <xml_checksum>557BF06F</xml_checksum>
9
9
  <class_name>ExampleReport</class_name>
10
10
  <display_name>Example Report</display_name>
@@ -105,22 +105,16 @@
105
105
  </attributes>
106
106
  <files>
107
107
  <file>
108
- <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
109
- <filetype>epw</filetype>
110
- <usage_type>test</usage_type>
111
- <checksum>BDF687C1</checksum>
112
- </file>
113
- <file>
114
- <filename>ExampleModel.osm</filename>
115
- <filetype>osm</filetype>
116
- <usage_type>test</usage_type>
117
- <checksum>7F9DACF4</checksum>
108
+ <filename>LICENSE.md</filename>
109
+ <filetype>md</filetype>
110
+ <usage_type>license</usage_type>
111
+ <checksum>BFFB1AA6</checksum>
118
112
  </file>
119
113
  <file>
120
- <filename>ExampleReport.pdf</filename>
121
- <filetype>pdf</filetype>
122
- <usage_type>resource</usage_type>
123
- <checksum>FBA35C89</checksum>
114
+ <filename>README.md</filename>
115
+ <filetype>md</filetype>
116
+ <usage_type>readme</usage_type>
117
+ <checksum>3C0851D8</checksum>
124
118
  </file>
125
119
  <file>
126
120
  <filename>README.md.erb</filename>
@@ -129,45 +123,51 @@
129
123
  <checksum>703C9964</checksum>
130
124
  </file>
131
125
  <file>
132
- <filename>README.md</filename>
133
- <filetype>md</filetype>
134
- <usage_type>readme</usage_type>
135
- <checksum>3C0851D8</checksum>
126
+ <version>
127
+ <software_program>OpenStudio</software_program>
128
+ <identifier>2.0.0</identifier>
129
+ <min_compatible>3.8.0</min_compatible>
130
+ </version>
131
+ <filename>measure.rb</filename>
132
+ <filetype>rb</filetype>
133
+ <usage_type>script</usage_type>
134
+ <checksum>3E43ABFD</checksum>
135
+ </file>
136
+ <file>
137
+ <filename>ExampleReport.pdf</filename>
138
+ <filetype>pdf</filetype>
139
+ <usage_type>resource</usage_type>
140
+ <checksum>FBA35C89</checksum>
136
141
  </file>
137
142
  <file>
138
143
  <filename>os_lib_reporting_example.rb</filename>
139
144
  <filetype>rb</filetype>
140
145
  <usage_type>resource</usage_type>
141
- <checksum>79453AA9</checksum>
146
+ <checksum>44033BD8</checksum>
142
147
  </file>
143
148
  <file>
144
- <filename>LICENSE.md</filename>
145
- <filetype>md</filetype>
146
- <usage_type>license</usage_type>
147
- <checksum>64FFEBDE</checksum>
149
+ <filename>report.html.erb</filename>
150
+ <filetype>erb</filetype>
151
+ <usage_type>resource</usage_type>
152
+ <checksum>FF1CBF19</checksum>
148
153
  </file>
149
154
  <file>
150
- <filename>ExampleReport_Test.rb</filename>
151
- <filetype>rb</filetype>
155
+ <filename>ExampleModel.osm</filename>
156
+ <filetype>osm</filetype>
152
157
  <usage_type>test</usage_type>
153
- <checksum>45DFAE69</checksum>
158
+ <checksum>7F9DACF4</checksum>
154
159
  </file>
155
160
  <file>
156
- <version>
157
- <software_program>OpenStudio</software_program>
158
- <identifier>2.0.0</identifier>
159
- <min_compatible>3.1.0</min_compatible>
160
- </version>
161
- <filename>measure.rb</filename>
161
+ <filename>ExampleReport_Test.rb</filename>
162
162
  <filetype>rb</filetype>
163
- <usage_type>script</usage_type>
164
- <checksum>04DFD4D1</checksum>
163
+ <usage_type>test</usage_type>
164
+ <checksum>5926CEE0</checksum>
165
165
  </file>
166
166
  <file>
167
- <filename>report.html.erb</filename>
168
- <filetype>erb</filetype>
169
- <usage_type>resource</usage_type>
170
- <checksum>71EF0A45</checksum>
167
+ <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
168
+ <filetype>epw</filetype>
169
+ <usage_type>test</usage_type>
170
+ <checksum>BDF687C1</checksum>
171
171
  </file>
172
172
  </files>
173
173
  </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>gem_environment_report</name>
5
5
  <uid>3f9f1a2f-0e8a-4c88-b817-10494fc3e73a</uid>
6
- <version_id>c37f64ba-bdf4-4c67-a5e6-4cd01086ac36</version_id>
7
- <version_modified>20221115T223606Z</version_modified>
6
+ <version_id>b833f734-5c26-4273-94d8-d9cb36a7abf3</version_id>
7
+ <version_modified>2024-07-11T14:32:10Z</version_modified>
8
8
  <xml_checksum>D1F10311</xml_checksum>
9
9
  <class_name>GemEnvironmentReport</class_name>
10
10
  <display_name>gem environment report</display_name>
@@ -40,10 +40,10 @@
40
40
  </attributes>
41
41
  <files>
42
42
  <file>
43
- <filename>README.md.erb</filename>
44
- <filetype>erb</filetype>
45
- <usage_type>readmeerb</usage_type>
46
- <checksum>703C9964</checksum>
43
+ <filename>LICENSE.md</filename>
44
+ <filetype>md</filetype>
45
+ <usage_type>license</usage_type>
46
+ <checksum>BFFB1AA6</checksum>
47
47
  </file>
48
48
  <file>
49
49
  <filename>README.md</filename>
@@ -52,51 +52,51 @@
52
52
  <checksum>ACC6F66B</checksum>
53
53
  </file>
54
54
  <file>
55
- <filename>run_gem_env_info.rb</filename>
56
- <filetype>rb</filetype>
57
- <usage_type>resource</usage_type>
58
- <checksum>EB1D95F2</checksum>
55
+ <filename>README.md.erb</filename>
56
+ <filetype>erb</filetype>
57
+ <usage_type>readmeerb</usage_type>
58
+ <checksum>703C9964</checksum>
59
59
  </file>
60
60
  <file>
61
- <filename>run_openstudio_info.rb</filename>
61
+ <version>
62
+ <software_program>OpenStudio</software_program>
63
+ <identifier>2.0.0</identifier>
64
+ <min_compatible>2.0.0</min_compatible>
65
+ </version>
66
+ <filename>measure.rb</filename>
62
67
  <filetype>rb</filetype>
63
- <usage_type>resource</usage_type>
64
- <checksum>926943DC</checksum>
68
+ <usage_type>script</usage_type>
69
+ <checksum>509760B0</checksum>
65
70
  </file>
66
71
  <file>
67
- <filename>LICENSE.md</filename>
68
- <filetype>md</filetype>
69
- <usage_type>license</usage_type>
70
- <checksum>64FFEBDE</checksum>
72
+ <filename>gem_env_info.rb</filename>
73
+ <filetype>rb</filetype>
74
+ <usage_type>resource</usage_type>
75
+ <checksum>C74C9A12</checksum>
71
76
  </file>
72
77
  <file>
73
78
  <filename>openstudio_info.rb</filename>
74
79
  <filetype>rb</filetype>
75
80
  <usage_type>resource</usage_type>
76
- <checksum>BA1249C5</checksum>
81
+ <checksum>58061348</checksum>
77
82
  </file>
78
83
  <file>
79
- <filename>gem_env_info.rb</filename>
84
+ <filename>run_gem_env_info.rb</filename>
80
85
  <filetype>rb</filetype>
81
86
  <usage_type>resource</usage_type>
82
- <checksum>5C631590</checksum>
87
+ <checksum>9F90BABF</checksum>
83
88
  </file>
84
89
  <file>
85
- <filename>gem_env_report_Test.rb</filename>
90
+ <filename>run_openstudio_info.rb</filename>
86
91
  <filetype>rb</filetype>
87
- <usage_type>test</usage_type>
88
- <checksum>96AADEF6</checksum>
92
+ <usage_type>resource</usage_type>
93
+ <checksum>E4901393</checksum>
89
94
  </file>
90
95
  <file>
91
- <version>
92
- <software_program>OpenStudio</software_program>
93
- <identifier>2.0.0</identifier>
94
- <min_compatible>2.0.0</min_compatible>
95
- </version>
96
- <filename>measure.rb</filename>
96
+ <filename>gem_env_report_Test.rb</filename>
97
97
  <filetype>rb</filetype>
98
- <usage_type>script</usage_type>
99
- <checksum>3D133192</checksum>
98
+ <usage_type>test</usage_type>
99
+ <checksum>1F849B2D</checksum>
100
100
  </file>
101
101
  </files>
102
102
  </measure>
@@ -7,24 +7,14 @@ require 'erb'
7
7
  require 'json'
8
8
  require 'openstudio-standards'
9
9
 
10
- # load OpenStudio measure libraries from openstudio-extension gem
11
- require 'openstudio-extension'
12
- require 'openstudio/extension/core/os_lib_schedules'
13
- require 'openstudio/extension/core/os_lib_helper_methods'
14
- require 'openstudio/extension/core/os_lib_model_generation.rb'
15
-
16
10
  # require all .rb files in resources folder
11
+ # todo - remove resource ruby files and connect to OpenstudioStandards::QAQC
17
12
  Dir[File.dirname(__FILE__) + '/resources/*.rb'].each { |file| require file }
18
13
 
19
14
  # start the measure
20
15
  class GenericQAQC < OpenStudio::Measure::ReportingMeasure
21
16
  # all QAQC checks should be in OsLib_QAQC module
22
17
  include OsLib_QAQC
23
- include OsLib_HelperMethods
24
- include OsLib_ModelGeneration
25
-
26
- # OsLib_CreateResults is needed for utility EDA programs but not the generic QAQC measure
27
- # include OsLib_CreateResults
28
18
 
29
19
  # define the name that a user will see, this method may be deprecated as
30
20
  # the display name in PAT comes from the name field in measure.xml
@@ -92,7 +82,7 @@ class GenericQAQC < OpenStudio::Measure::ReportingMeasure
92
82
  args = OpenStudio::Measure::OSArgumentVector.new
93
83
 
94
84
  # Make an argument for the template
95
- template = OpenStudio::Measure::OSArgument.makeChoiceArgument('template', get_doe_templates(false), true)
85
+ template = OpenStudio::Measure::OSArgument.makeChoiceArgument('template', OpenstudioStandards::CreateTypical.get_doe_templates(false), true)
96
86
  template.setDisplayName('Target ASHRAE Standard')
97
87
  template.setDescription('This used to set the target standard for most checks.')
98
88
  template.setDefaultValue('90.1-2013') # there is override variable in run method for this
@@ -169,7 +159,8 @@ class GenericQAQC < OpenStudio::Measure::ReportingMeasure
169
159
  result = OpenStudio::IdfObjectVector.new
170
160
 
171
161
  # assign the user inputs to variables
172
- args = OsLib_HelperMethods.createRunVariables(runner, @model, user_arguments, arguments)
162
+ args = runner.getArgumentValues(arguments, user_arguments)
163
+ args = Hash[args.collect{ |k, v| [k.to_s, v] }]
173
164
  unless args
174
165
  return false
175
166
  end
@@ -231,7 +222,8 @@ class GenericQAQC < OpenStudio::Measure::ReportingMeasure
231
222
  climateZones.setClimateZone('ASHRAE', cz)
232
223
 
233
224
  # assign the user inputs to variables
234
- args = OsLib_HelperMethods.createRunVariables(runner, @model, user_arguments, arguments)
225
+ args = runner.getArgumentValues(arguments, user_arguments)
226
+ args = Hash[args.collect{ |k, v| [k.to_s, v] }]
235
227
  unless args
236
228
  return false
237
229
  end
@@ -246,7 +238,8 @@ class GenericQAQC < OpenStudio::Measure::ReportingMeasure
246
238
  if args['use_upstream_args'] == true
247
239
  args.each do |arg, value|
248
240
  next if arg == 'use_upstream_args' # this argument should not be changed
249
- value_from_osw = OsLib_HelperMethods.check_upstream_measure_for_arg(runner, arg)
241
+ value_from_osw = runner.getPastStepValuesForName(arg)
242
+ value_from_osw = value_from_osw.collect{ |k, v| Hash[:measure_name => k, :value => v] }.first if !value_from_osw.empty?
250
243
  if !value_from_osw.empty?
251
244
  runner.registerInfo("Replacing argument named #{arg} from current measure with a value of #{value_from_osw[:value]} from #{value_from_osw[:measure_name]}.")
252
245
  new_val = value_from_osw[:value]