openstudio-common-measures 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test_with_openstudio.yml +2 -2
- data/CHANGELOG.md +9 -0
- data/Gemfile +10 -5
- data/Jenkinsfile +1 -1
- data/README.md +2 -0
- data/lib/measures/.rubocop.yml +6 -0
- data/lib/measures/AddCostPerAreaToConstruction/measure.xml +21 -21
- data/lib/measures/AddCostPerFloorAreaToBuilding/measure.xml +25 -25
- data/lib/measures/AddCostPerFloorAreaToElectricEquipment/measure.xml +21 -21
- data/lib/measures/AddCostPerFloorAreaToLights/measure.xml +21 -21
- data/lib/measures/AddCostPerFloorAreaUnusedToLights/measure.xml +21 -21
- data/lib/measures/AddCostToSupplySideHVACComponentByAirLoop/measure.xml +24 -24
- data/lib/measures/AddCostperAreatoUnusedConstruction/measure.xml +21 -21
- data/lib/measures/AddExteriorLights/measure.xml +19 -19
- data/lib/measures/AddMeter/measure.xml +15 -15
- data/lib/measures/AddOutputDiagnostics/measure.xml +18 -18
- data/lib/measures/AddOutputVariable/measure.xml +15 -15
- data/lib/measures/AddSimplePvToShadingSurfacesByType/measure.xml +24 -24
- data/lib/measures/AddThermalComfortModelTypes/measure.xml +21 -21
- data/lib/measures/AdjustSystemEfficiencies/measure.xml +12 -12
- data/lib/measures/AdjustThermostatSetpointsByDegrees/measure.xml +23 -23
- data/lib/measures/ChangeBuildingLocation/README.md +1 -1
- data/lib/measures/ChangeBuildingLocation/measure.rb +8 -13
- data/lib/measures/ChangeBuildingLocation/measure.xml +89 -89
- data/lib/measures/EnableIdealAirLoadsForAllZones/measure.xml +22 -22
- data/lib/measures/ExportScheduleCSV/measure.xml +29 -29
- data/lib/measures/ImportEnvelopeAndInternalLoadsFromIdf/measure.xml +29 -29
- data/lib/measures/MeterFlodPlot/measure.xml +35 -35
- data/lib/measures/ModifyEnergyPlusCoilCoolingDXSingleSpeedObjects/measure.xml +24 -24
- data/lib/measures/ModifyEnergyPlusFanVariableVolumeObjects/measure.xml +24 -24
- data/lib/measures/PredictedMeanVote/measure.xml +23 -23
- data/lib/measures/RemoveInternalLoadsDirectlyAssignedToSpaces/measure.xml +21 -21
- data/lib/measures/RemoveUnusedDefaultProfiles/measure.xml +19 -19
- data/lib/measures/ReplaceExteriorWindowConstruction/measure.xml +29 -29
- data/lib/measures/ReplaceModel/README.md +1 -3
- data/lib/measures/ReplaceModel/measure.xml +32 -14
- data/lib/measures/ReplaceThermostatSchedules/measure.xml +17 -17
- data/lib/measures/ReportModelChanges/measure.xml +23 -23
- data/lib/measures/RunPeriod/measure.xml +14 -14
- data/lib/measures/RunPeriodMultiple/measure.xml +12 -12
- data/lib/measures/ServerDirectoryCleanup/measure.xml +30 -30
- data/lib/measures/SetCOPforSingleSpeedDXCoolingUnits/measure.xml +23 -23
- data/lib/measures/SetCOPforTwoSpeedDXCoolingUnits/measure.xml +23 -23
- data/lib/measures/SetEnergyPlusInfiltrationFlowRatePerFloorArea/measure.xml +24 -24
- data/lib/measures/SetEnergyPlusLightObjectsLPD/measure.xml +24 -24
- data/lib/measures/SetEnergyPlusMinimumOutdoorAirFlowRate/measure.xml +24 -24
- data/lib/measures/SetGasBurnerEfficiency/measure.xml +23 -23
- data/lib/measures/SetLifecycleCostParameters/measure.xml +15 -15
- data/lib/measures/SetLightingLoadsByLPD/measure.xml +35 -35
- data/lib/measures/SetSpaceInfiltrationByExteriorSurfaceArea/measure.xml +25 -25
- data/lib/measures/SetThermostatSchedules/measure.xml +17 -17
- data/lib/measures/ShiftScheduleProfileTime/measure.xml +23 -23
- data/lib/measures/SwapLightsDefinition/measure.xml +25 -25
- data/lib/measures/UnmetLoadHoursTroubleshooting/measure.xml +43 -43
- data/lib/measures/VentilationQAQC/measure.xml +31 -31
- data/lib/measures/XcelEDAReportingandQAQC/measure.xml +46 -46
- data/lib/measures/XcelEDAReportingandQAQC/resources/CreateResults.rb +2 -0
- data/lib/measures/XcelEDATariffSelectionandModelSetup/measure.xml +73 -73
- data/lib/measures/ZoneReport/measure.xml +35 -35
- data/lib/measures/add_ems_emissions_reporting/measure.rb +0 -2
- data/lib/measures/add_ems_emissions_reporting/measure.xml +23 -23
- data/lib/measures/add_ems_to_control_ev_charging/measure.rb +0 -2
- data/lib/measures/add_ems_to_control_ev_charging/measure.xml +21 -21
- data/lib/measures/add_ev_load/measure.xml +35 -35
- data/lib/measures/add_rooftop_pv/measure.rb +5 -7
- data/lib/measures/add_rooftop_pv/measure.xml +25 -25
- data/lib/measures/add_zone_mixing_object/measure.xml +19 -19
- data/lib/measures/add_zone_ventilation_design_flow_rate_object/measure.xml +21 -21
- data/lib/measures/air_wall_zone_mixing/measure.rb +4 -6
- data/lib/measures/air_wall_zone_mixing/measure.xml +27 -27
- data/lib/measures/create_csv_output/measure.xml +28 -28
- data/lib/measures/envelope_and_internal_load_breakdown/measure.rb +0 -4
- data/lib/measures/envelope_and_internal_load_breakdown/measure.xml +52 -52
- data/lib/measures/envelope_and_internal_load_breakdown/resources/report.html.erb +1 -0
- data/lib/measures/example_report/measure.rb +2 -5
- data/lib/measures/example_report/measure.xml +41 -41
- data/lib/measures/example_report/resources/report.html.erb +1 -0
- data/lib/measures/gem_env_report/measure.xml +32 -32
- data/lib/measures/generic_qaqc/measure.rb +8 -15
- data/lib/measures/generic_qaqc/measure.xml +175 -175
- data/lib/measures/generic_qaqc/resources/check_air_sys_temps.rb +2 -2
- data/lib/measures/generic_qaqc/resources/check_domestic_hot_water.rb +4 -4
- data/lib/measures/generic_qaqc/resources/check_envelope_conductance.rb +14 -5
- data/lib/measures/generic_qaqc/resources/check_internal_loads.rb +2 -2
- data/lib/measures/generic_qaqc/resources/check_mech_sys_type.rb +1 -1
- data/lib/measures/generic_qaqc/resources/check_plant_temps.rb +6 -6
- data/lib/measures/generic_qaqc/resources/check_schedules.rb +7 -7
- data/lib/measures/generic_qaqc/resources/check_supply_air_and_thermostat_temp_difference.rb +5 -2
- data/lib/measures/generic_qaqc/resources/report.html.erb +1 -0
- data/lib/measures/get_site_from_building_component_library/measure.rb +4 -8
- data/lib/measures/get_site_from_building_component_library/measure.xml +28 -28
- data/lib/measures/hvac_psychrometric_chart/measure.xml +29 -29
- data/lib/measures/hvac_psychrometric_chart/resources/report.html.erb +1 -0
- data/lib/measures/inject_idf_objects/measure.xml +31 -31
- data/lib/measures/openstudio_results/measure.rb +2 -6
- data/lib/measures/openstudio_results/measure.xml +348 -360
- data/lib/measures/openstudio_results/resources/os_lib_reporting.rb +8 -8
- data/lib/measures/openstudio_results/resources/report.html.erb +1 -0
- data/lib/measures/remove_orphan_objects_and_unused_resources/measure.xml +24 -24
- data/lib/measures/set_electric_equipment_loads_by_epd/measure.xml +33 -33
- data/lib/measures/set_exterior_walls_and_floors_to_adiabatic/measure.xml +19 -19
- data/lib/measures/set_run_period/measure.xml +19 -19
- data/lib/measures/set_space_infiltration_per_exterior_area/measure.xml +22 -22
- data/lib/measures/shadow_calculation/measure.xml +18 -18
- data/lib/measures/tariff_selection_block/measure.rb +2 -5
- data/lib/measures/tariff_selection_block/measure.xml +25 -25
- data/lib/measures/tariff_selection_flat/measure.rb +3 -5
- data/lib/measures/tariff_selection_flat/measure.xml +25 -25
- data/lib/measures/tariff_selection_generic/measure.rb +2 -5
- data/lib/measures/tariff_selection_generic/measure.xml +39 -39
- data/lib/measures/tariff_selection_time_and_date_dependant/measure.rb +19 -15
- data/lib/measures/tariff_selection_time_and_date_dependant/measure.xml +37 -25
- data/lib/measures/view_data/measure.xml +41 -41
- data/lib/measures/view_model/measure.xml +35 -35
- data/lib/openstudio/common_measures/version.rb +1 -1
- data/openstudio-common-measures.gemspec +11 -4
- metadata +72 -15
@@ -1,10 +1,10 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<measure>
|
3
|
-
<schema_version>3.
|
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>
|
7
|
-
<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>
|
109
|
-
<filetype>
|
110
|
-
<usage_type>
|
111
|
-
<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>
|
121
|
-
<filetype>
|
122
|
-
<usage_type>
|
123
|
-
<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
|
-
<
|
133
|
-
|
134
|
-
|
135
|
-
|
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>
|
146
|
+
<checksum>44033BD8</checksum>
|
142
147
|
</file>
|
143
148
|
<file>
|
144
|
-
<filename>
|
145
|
-
<filetype>
|
146
|
-
<usage_type>
|
147
|
-
<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>
|
151
|
-
<filetype>
|
155
|
+
<filename>ExampleModel.osm</filename>
|
156
|
+
<filetype>osm</filetype>
|
152
157
|
<usage_type>test</usage_type>
|
153
|
-
<checksum>
|
158
|
+
<checksum>7F9DACF4</checksum>
|
154
159
|
</file>
|
155
160
|
<file>
|
156
|
-
<
|
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>
|
164
|
-
<checksum>
|
163
|
+
<usage_type>test</usage_type>
|
164
|
+
<checksum>5926CEE0</checksum>
|
165
165
|
</file>
|
166
166
|
<file>
|
167
|
-
<filename>
|
168
|
-
<filetype>
|
169
|
-
<usage_type>
|
170
|
-
<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.
|
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>
|
7
|
-
<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>
|
44
|
-
<filetype>
|
45
|
-
<usage_type>
|
46
|
-
<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>
|
56
|
-
<filetype>
|
57
|
-
<usage_type>
|
58
|
-
<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
|
-
<
|
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>
|
64
|
-
<checksum>
|
68
|
+
<usage_type>script</usage_type>
|
69
|
+
<checksum>509760B0</checksum>
|
65
70
|
</file>
|
66
71
|
<file>
|
67
|
-
<filename>
|
68
|
-
<filetype>
|
69
|
-
<usage_type>
|
70
|
-
<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>
|
81
|
+
<checksum>58061348</checksum>
|
77
82
|
</file>
|
78
83
|
<file>
|
79
|
-
<filename>
|
84
|
+
<filename>run_gem_env_info.rb</filename>
|
80
85
|
<filetype>rb</filetype>
|
81
86
|
<usage_type>resource</usage_type>
|
82
|
-
<checksum>
|
87
|
+
<checksum>9F90BABF</checksum>
|
83
88
|
</file>
|
84
89
|
<file>
|
85
|
-
<filename>
|
90
|
+
<filename>run_openstudio_info.rb</filename>
|
86
91
|
<filetype>rb</filetype>
|
87
|
-
<usage_type>
|
88
|
-
<checksum>
|
92
|
+
<usage_type>resource</usage_type>
|
93
|
+
<checksum>E4901393</checksum>
|
89
94
|
</file>
|
90
95
|
<file>
|
91
|
-
<
|
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>
|
99
|
-
<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 =
|
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 =
|
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 =
|
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]
|