urbanopt-reporting 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/nightly_ci_build.yml +54 -0
  3. data/CHANGELOG.md +7 -0
  4. data/Gemfile +5 -0
  5. data/LICENSE.md +16 -11
  6. data/README.md +1 -0
  7. data/Rakefile +2 -37
  8. data/building_loads.csv +52561 -0
  9. data/doc_templates/LICENSE.md +16 -11
  10. data/doc_templates/copyright_erb.txt +22 -16
  11. data/doc_templates/copyright_js.txt +2 -2
  12. data/doc_templates/copyright_ruby.txt +2 -37
  13. data/lib/measures/.rubocop.yml +1 -2
  14. data/lib/measures/default_feature_reports/LICENSE.md +23 -18
  15. data/lib/measures/default_feature_reports/measure.rb +21 -59
  16. data/lib/measures/default_feature_reports/measure.xml +40 -45
  17. data/lib/measures/export_modelica_loads/LICENSE.md +23 -18
  18. data/lib/measures/export_modelica_loads/measure.rb +19 -54
  19. data/lib/measures/export_modelica_loads/measure.xml +31 -31
  20. data/lib/measures/export_time_series_modelica/LICENSE.md +23 -18
  21. data/lib/measures/export_time_series_modelica/measure.rb +2 -37
  22. data/lib/measures/export_time_series_modelica/measure.xml +48 -42
  23. data/lib/measures/export_time_series_modelica/resources/os_lib_helper_methods.rb +2 -37
  24. data/lib/urbanopt/reporting/default_reports/construction_cost.rb +2 -37
  25. data/lib/urbanopt/reporting/default_reports/date.rb +2 -37
  26. data/lib/urbanopt/reporting/default_reports/distributed_generation.rb +2 -37
  27. data/lib/urbanopt/reporting/default_reports/end_use.rb +2 -37
  28. data/lib/urbanopt/reporting/default_reports/end_uses.rb +2 -37
  29. data/lib/urbanopt/reporting/default_reports/extension.rb +2 -37
  30. data/lib/urbanopt/reporting/default_reports/feature_report.rb +2 -37
  31. data/lib/urbanopt/reporting/default_reports/generator.rb +2 -37
  32. data/lib/urbanopt/reporting/default_reports/location.rb +2 -37
  33. data/lib/urbanopt/reporting/default_reports/logger.rb +2 -37
  34. data/lib/urbanopt/reporting/default_reports/power_distribution.rb +2 -37
  35. data/lib/urbanopt/reporting/default_reports/program.rb +2 -37
  36. data/lib/urbanopt/reporting/default_reports/qaqc_flags.rb +9 -44
  37. data/lib/urbanopt/reporting/default_reports/reporting_period.rb +6 -41
  38. data/lib/urbanopt/reporting/default_reports/scenario_power_distribution.rb +2 -37
  39. data/lib/urbanopt/reporting/default_reports/scenario_power_distribution_cost.rb +5 -40
  40. data/lib/urbanopt/reporting/default_reports/scenario_report.rb +2 -37
  41. data/lib/urbanopt/reporting/default_reports/solar_pv.rb +2 -37
  42. data/lib/urbanopt/reporting/default_reports/storage.rb +2 -37
  43. data/lib/urbanopt/reporting/default_reports/thermal_storage.rb +2 -37
  44. data/lib/urbanopt/reporting/default_reports/timeseries_csv.rb +2 -37
  45. data/lib/urbanopt/reporting/default_reports/validator.rb +2 -37
  46. data/lib/urbanopt/reporting/default_reports/wind.rb +2 -37
  47. data/lib/urbanopt/reporting/default_reports.rb +2 -37
  48. data/lib/urbanopt/reporting/derived_extension.rb +2 -37
  49. data/lib/urbanopt/reporting/version.rb +3 -38
  50. data/lib/urbanopt/reporting.rb +2 -37
  51. data/urbanopt-reporting-gem.gemspec +3 -3
  52. metadata +12 -11
  53. data/.github/workflows/nightly_build.yml +0 -41
@@ -1,4 +1,4 @@
1
- URBANopt (tm), Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
1
+ URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
2
2
  contributors. All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
@@ -15,13 +15,18 @@ Neither the name of the copyright holder nor the names of its contributors may b
15
15
  used to endorse or promote products derived from this software without specific
16
16
  prior written permission.
17
17
 
18
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27
- OF THE POSSIBILITY OF SUCH DAMAGE.
18
+ The name of the copyright holder(s), any contributors, the United States Government,
19
+ the United States Department of Energy, or any of their employees may not be used to
20
+ endorse or promote products derived from this software without specific prior written
21
+ permission from the respective party.
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
24
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
26
+ THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
27
+ STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT,
28
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
30
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
32
+ WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,31 +1,37 @@
1
1
  <%
2
2
  # *********************************************************************************
3
- # URBANopt (tm), Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
+ # URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
4
4
  # contributors. All rights reserved.
5
- #
5
+
6
6
  # Redistribution and use in source and binary forms, with or without modification,
7
7
  # are permitted provided that the following conditions are met:
8
- #
8
+
9
9
  # Redistributions of source code must retain the above copyright notice, this list
10
10
  # of conditions and the following disclaimer.
11
- #
11
+
12
12
  # Redistributions in binary form must reproduce the above copyright notice, this
13
13
  # list of conditions and the following disclaimer in the documentation and/or other
14
14
  # materials provided with the distribution.
15
- #
15
+
16
16
  # Neither the name of the copyright holder nor the names of its contributors may be
17
17
  # used to endorse or promote products derived from this software without specific
18
18
  # prior written permission.
19
- #
20
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23
- # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24
- # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25
- # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
- # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
28
- # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29
- # OF THE POSSIBILITY OF SUCH DAMAGE.
19
+
20
+ # The name of the copyright holder(s), any contributors, the United States Government,
21
+ # the United States Department of Energy, or any of their employees may not be used to
22
+ # endorse or promote products derived from this software without specific prior written
23
+ # permission from the respective party.
24
+
25
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
26
+ # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27
+ # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
28
+ # THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
29
+ # STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT,
30
+ # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31
+ # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
34
+ # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+
30
36
  # *********************************************************************************
31
37
  %>
@@ -1,4 +1,4 @@
1
1
  /* @preserve
2
- * URBANopt (tm), Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
3
- * Use of this source code is governed by the BSD 3-Clause license.
2
+ * URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
3
+ * See also https://github.com/urbanopt/urbanopt-reporting-gem/blob/develop/LICENSE.md
4
4
  */
@@ -1,39 +1,4 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
- # contributors. All rights reserved.
4
-
5
- # Redistribution and use in source and binary forms, with or without modification,
6
- # are permitted provided that the following conditions are met:
7
-
8
- # Redistributions of source code must retain the above copyright notice, this list
9
- # of conditions and the following disclaimer.
10
-
11
- # Redistributions in binary form must reproduce the above copyright notice, this
12
- # list of conditions and the following disclaimer in the documentation and/or other
13
- # materials provided with the distribution.
14
-
15
- # Neither the name of the copyright holder nor the names of its contributors may be
16
- # used to endorse or promote products derived from this software without specific
17
- # prior written permission.
18
-
19
- # Redistribution of this software, without modification, must refer to the software
20
- # by the same designation. Redistribution of a modified version of this software
21
- # (i) may not refer to the modified version by the same designation, or by any
22
- # confusingly similar designation, and (ii) must refer to the underlying software
23
- # originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
24
- # the term “URBANopt”, or any confusingly similar designation may not be used to
25
- # refer to any modified version of this software or any modified version of the
26
- # underlying software originally provided by Alliance without the prior written
27
- # consent of Alliance.
28
-
29
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32
- # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33
- # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35
- # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
36
- # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
37
- # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
38
- # OF THE POSSIBILITY OF SUCH DAMAGE.
2
+ # URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
3
+ # See also https://github.com/urbanopt/urbanopt-reporting-gem/blob/develop/LICENSE.md
39
4
  # *********************************************************************************
@@ -1,7 +1,6 @@
1
1
  AllCops:
2
2
  Exclude:
3
- - gems/**/*
3
+ - 'spec/test_measures/**/*'
4
4
  require: rubocop-performance
5
-
6
5
  inherit_from:
7
6
  - http://s3.amazonaws.com/openstudio-resources/styles/rubocop_v4.yml
@@ -1,27 +1,32 @@
1
- URBANopt (tm), Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
1
+ URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
2
2
  contributors. All rights reserved.
3
3
 
4
- Redistribution and use in source and binary forms, with or without modification,
4
+ Redistribution and use in source and binary forms, with or without modification,
5
5
  are permitted provided that the following conditions are met:
6
6
 
7
- Redistributions of source code must retain the above copyright notice, this list
7
+ Redistributions of source code must retain the above copyright notice, this list
8
8
  of conditions and the following disclaimer.
9
9
 
10
- Redistributions in binary form must reproduce the above copyright notice, this
11
- list of conditions and the following disclaimer in the documentation and/or other
10
+ Redistributions in binary form must reproduce the above copyright notice, this
11
+ list of conditions and the following disclaimer in the documentation and/or other
12
12
  materials provided with the distribution.
13
-
14
- Neither the name of the copyright holder nor the names of its contributors may be
15
- used to endorse or promote products derived from this software without specific
13
+
14
+ Neither the name of the copyright holder nor the names of its contributors may be
15
+ used to endorse or promote products derived from this software without specific
16
16
  prior written permission.
17
17
 
18
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27
- OF THE POSSIBILITY OF SUCH DAMAGE.
18
+ The name of the copyright holder(s), any contributors, the United States Government,
19
+ the United States Department of Energy, or any of their employees may not be used to
20
+ endorse or promote products derived from this software without specific prior written
21
+ permission from the respective party.
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
24
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
26
+ THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
27
+ STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT,
28
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
30
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
32
+ WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,41 +1,6 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
- # contributors. All rights reserved.
4
-
5
- # Redistribution and use in source and binary forms, with or without modification,
6
- # are permitted provided that the following conditions are met:
7
-
8
- # Redistributions of source code must retain the above copyright notice, this list
9
- # of conditions and the following disclaimer.
10
-
11
- # Redistributions in binary form must reproduce the above copyright notice, this
12
- # list of conditions and the following disclaimer in the documentation and/or other
13
- # materials provided with the distribution.
14
-
15
- # Neither the name of the copyright holder nor the names of its contributors may be
16
- # used to endorse or promote products derived from this software without specific
17
- # prior written permission.
18
-
19
- # Redistribution of this software, without modification, must refer to the software
20
- # by the same designation. Redistribution of a modified version of this software
21
- # (i) may not refer to the modified version by the same designation, or by any
22
- # confusingly similar designation, and (ii) must refer to the underlying software
23
- # originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
24
- # the term “URBANopt”, or any confusingly similar designation may not be used to
25
- # refer to any modified version of this software or any modified version of the
26
- # underlying software originally provided by Alliance without the prior written
27
- # consent of Alliance.
28
-
29
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32
- # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33
- # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35
- # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
36
- # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
37
- # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
38
- # OF THE POSSIBILITY OF SUCH DAMAGE.
2
+ # URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
3
+ # See also https://github.com/urbanopt/urbanopt-reporting-gem/blob/develop/LICENSE.md
39
4
  # *********************************************************************************
40
5
 
41
6
  require 'urbanopt/reporting/default_reports'
@@ -294,7 +259,6 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
294
259
  qaqc_flags_hash = {} # Make a hash for count of flags of each category
295
260
 
296
261
  runner.workflow.workflowSteps.each do |step| # Go through all the steps
297
-
298
262
  if step.to_MeasureStep.is_initialized
299
263
  measure_step = step.to_MeasureStep.get
300
264
 
@@ -310,17 +274,17 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
310
274
  result = measure_step.result.get
311
275
  puts " result = #{result}"
312
276
 
313
- ## Adding quaqc_flags_list to check the step value name since units key is missing from the result
277
+ ## Adding quaqc_flags_list to check the step value name since units key is missing from the result
314
278
  ## It does show in the out.osw but not in the runner.workflow.workflowSteps object
315
- # use this list to define the flags you want to report
316
- qaqc_flags_list = ['eui_reasonableness' , 'end_use_by_category',
317
- 'mechanical_system_part_load_efficiency', 'simultaneous_heating_and_cooling',
318
- 'internal_loads', 'schedules', 'envelope_r_value', 'domestic_hot_water',
319
- 'mechanical_system_efficiency', 'supply_and_zone_air_temperature', 'total_qaqc_flags' ]
320
-
279
+ # use this list to define the flags you want to report
280
+ qaqc_flags_list = [
281
+ 'eui_reasonableness', 'end_use_by_category', 'mechanical_system_part_load_efficiency',
282
+ 'simultaneous_heating_and_cooling', 'internal_loads', 'schedules', 'envelope_r_value',
283
+ 'domestic_hot_water', 'mechanical_system_efficiency', 'supply_and_zone_air_temperature', 'total_qaqc_flags'
284
+ ]
285
+
321
286
  result.stepValues.each do |step_value|
322
-
323
- #get name
287
+ # get name
324
288
  name = step_value.name
325
289
 
326
290
  if qaqc_flags_list.include? name
@@ -328,27 +292,27 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
328
292
  # get value
329
293
  # check if value, double, int, or bool
330
294
  value_type = step_value.variantType.valueDescription
331
- if value_type == "Double"
295
+ case value_type
296
+ when 'Double'
332
297
  value = step_value.valueAsDouble
333
- elsif value_type == "Integer"
298
+ when 'Integer'
334
299
  value = step_value.valueAsInteger
335
- elsif value_type == "Boolean"
300
+ when 'Boolean'
336
301
  value = step_value.valueAsBoolean
337
- elsif value_type == "String"
302
+ when 'String'
338
303
  value = step_value.valueAsString
339
304
  else
340
305
  # catchall for unexpected value types
341
306
  value = step_value.valueAsVariant.to_s
342
307
  end
343
-
308
+
344
309
  if qaqc_flags_hash[name]
345
310
  qaqc_flags_hash[name] += value
346
- else
311
+ else
347
312
  qaqc_flags_hash[name] = value
348
313
  end
349
314
 
350
315
  end
351
-
352
316
  end
353
317
 
354
318
  puts "qaqc_flags_hash = #{qaqc_flags_hash}"
@@ -359,11 +323,10 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
359
323
  qaqc_flags_hash['total_qaqc_flags'] = temp_hash_for_ordering['total_qaqc_flags']
360
324
 
361
325
  end
362
-
326
+
363
327
  end
364
328
 
365
329
  end
366
-
367
330
  end
368
331
  return qaqc_flags_hash
369
332
  end
@@ -948,7 +911,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
948
911
  @@logger.info('Emissions are not reported for this feature')
949
912
  end
950
913
 
951
- # add qaqc results to feature report
914
+ # add qaqc results to feature report
952
915
  qaqc_flags_hash = feature_qaqc_flags(runner)
953
916
  feature_report.qaqc_flags.eui_reasonableness = qaqc_flags_hash['eui_reasonableness']
954
917
  feature_report.qaqc_flags.end_use_by_category = qaqc_flags_hash['end_use_by_category']
@@ -1501,7 +1464,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
1501
1464
  end
1502
1465
  end
1503
1466
 
1504
- #puts "values = #{values}"
1467
+ # puts "values = #{values}"
1505
1468
 
1506
1469
  # closing the sql file
1507
1470
  sql_file.close
@@ -1512,7 +1475,6 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
1512
1475
  feature_report.timeseries_csv.first_report_datetime = '0'
1513
1476
  feature_report.timeseries_csv.column_names = final_timeseries_names
1514
1477
 
1515
-
1516
1478
  ##### Save the 'default_feature_reports.json' file
1517
1479
  feature_report_hash = feature_report.to_hash
1518
1480
 
@@ -1,11 +1,11 @@
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
  <error>wrong number of arguments (given 1, expected 0)</error>
5
5
  <name>default_feature_reports</name>
6
6
  <uid>9ee3135a-8070-4408-bfa1-b75fecf9dd4f</uid>
7
- <version_id>136d51d4-9a61-48cd-b068-0e02c4094e76</version_id>
8
- <version_modified>20210427T174740Z</version_modified>
7
+ <version_id>50d54c60-5f7e-4948-9fb0-1567e1335148</version_id>
8
+ <version_modified>2023-07-06T16:04:16Z</version_modified>
9
9
  <xml_checksum>FB304155</xml_checksum>
10
10
  <class_name>DefaultFeatureReports</class_name>
11
11
  <display_name>DefaultFeatureReports</display_name>
@@ -15,45 +15,42 @@
15
15
  <argument>
16
16
  <name>feature_id</name>
17
17
  <display_name>Feature unique identifier</display_name>
18
- <description></description>
19
18
  <type>String</type>
20
- <units></units>
21
19
  <required>false</required>
22
20
  <model_dependent>false</model_dependent>
23
21
  <default_value>1</default_value>
24
- <min_value></min_value>
25
- <max_value></max_value>
26
22
  </argument>
27
23
  <argument>
28
24
  <name>feature_name</name>
29
25
  <display_name>Feature scenario specific name</display_name>
30
- <description></description>
31
26
  <type>String</type>
32
- <units></units>
33
27
  <required>false</required>
34
28
  <model_dependent>false</model_dependent>
35
29
  <default_value>name</default_value>
36
- <min_value></min_value>
37
- <max_value></max_value>
38
30
  </argument>
39
31
  <argument>
40
32
  <name>feature_type</name>
41
33
  <display_name>URBANopt Feature Type</display_name>
42
- <description></description>
43
34
  <type>String</type>
44
- <units></units>
45
35
  <required>false</required>
46
36
  <model_dependent>false</model_dependent>
47
37
  <default_value>Building</default_value>
48
- <min_value></min_value>
49
- <max_value></max_value>
38
+ </argument>
39
+ <argument>
40
+ <name>feature_location</name>
41
+ <display_name>URBANopt Feature Location</display_name>
42
+ <descrption>Writes default_feature_reports.json and default_feature_reports.csv files used by URBANopt Scenario Default Post Processor</descrption>
43
+ <type>String</type>
44
+ <units></units>
45
+ <required>true</required>
46
+ <model_dependent>false</model_dependent>
47
+ <default_value>1</default_value>
50
48
  </argument>
51
49
  <argument>
52
50
  <name>reporting_frequency</name>
53
51
  <display_name>Reporting Frequency</display_name>
54
52
  <description>The frequency at which to report timeseries output data.</description>
55
53
  <type>Choice</type>
56
- <units></units>
57
54
  <required>true</required>
58
55
  <model_dependent>false</model_dependent>
59
56
  <default_value>Timestep</default_value>
@@ -87,8 +84,6 @@
87
84
  <display_name>Runperiod</display_name>
88
85
  </choice>
89
86
  </choices>
90
- <min_value></min_value>
91
- <max_value></max_value>
92
87
  </argument>
93
88
  </arguments>
94
89
  <outputs />
@@ -110,16 +105,10 @@
110
105
  </attributes>
111
106
  <files>
112
107
  <file>
113
- <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
114
- <filetype>epw</filetype>
115
- <usage_type>test</usage_type>
116
- <checksum>BDF687C1</checksum>
117
- </file>
118
- <file>
119
- <filename>README.md.erb</filename>
120
- <filetype>erb</filetype>
121
- <usage_type>readmeerb</usage_type>
122
- <checksum>703C9964</checksum>
108
+ <filename>LICENSE.md</filename>
109
+ <filetype>md</filetype>
110
+ <usage_type>license</usage_type>
111
+ <checksum>016C4035</checksum>
123
112
  </file>
124
113
  <file>
125
114
  <filename>README.md</filename>
@@ -128,22 +117,10 @@
128
117
  <checksum>0B68E96D</checksum>
129
118
  </file>
130
119
  <file>
131
- <filename>LICENSE.md</filename>
132
- <filetype>md</filetype>
133
- <usage_type>license</usage_type>
134
- <checksum>BBD19F47</checksum>
135
- </file>
136
- <file>
137
- <filename>example_model.osm</filename>
138
- <filetype>osm</filetype>
139
- <usage_type>test</usage_type>
140
- <checksum>A178EC04</checksum>
141
- </file>
142
- <file>
143
- <filename>default_feature_reports_test.rb</filename>
144
- <filetype>rb</filetype>
145
- <usage_type>test</usage_type>
146
- <checksum>0C4ED2E7</checksum>
120
+ <filename>README.md.erb</filename>
121
+ <filetype>erb</filetype>
122
+ <usage_type>readmeerb</usage_type>
123
+ <checksum>703C9964</checksum>
147
124
  </file>
148
125
  <file>
149
126
  <version>
@@ -154,7 +131,25 @@
154
131
  <filename>measure.rb</filename>
155
132
  <filetype>rb</filetype>
156
133
  <usage_type>script</usage_type>
157
- <checksum>CD1AFD42</checksum>
134
+ <checksum>A0464D25</checksum>
135
+ </file>
136
+ <file>
137
+ <filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
138
+ <filetype>epw</filetype>
139
+ <usage_type>test</usage_type>
140
+ <checksum>BDF687C1</checksum>
141
+ </file>
142
+ <file>
143
+ <filename>default_feature_reports_test.rb</filename>
144
+ <filetype>rb</filetype>
145
+ <usage_type>test</usage_type>
146
+ <checksum>8AD78A1A</checksum>
147
+ </file>
148
+ <file>
149
+ <filename>example_model.osm</filename>
150
+ <filetype>osm</filetype>
151
+ <usage_type>test</usage_type>
152
+ <checksum>C4527950</checksum>
158
153
  </file>
159
154
  </files>
160
155
  </measure>
@@ -1,27 +1,32 @@
1
- URBANopt (tm), Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
1
+ URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
2
2
  contributors. All rights reserved.
3
3
 
4
- Redistribution and use in source and binary forms, with or without modification,
4
+ Redistribution and use in source and binary forms, with or without modification,
5
5
  are permitted provided that the following conditions are met:
6
6
 
7
- Redistributions of source code must retain the above copyright notice, this list
7
+ Redistributions of source code must retain the above copyright notice, this list
8
8
  of conditions and the following disclaimer.
9
9
 
10
- Redistributions in binary form must reproduce the above copyright notice, this
11
- list of conditions and the following disclaimer in the documentation and/or other
10
+ Redistributions in binary form must reproduce the above copyright notice, this
11
+ list of conditions and the following disclaimer in the documentation and/or other
12
12
  materials provided with the distribution.
13
-
14
- Neither the name of the copyright holder nor the names of its contributors may be
15
- used to endorse or promote products derived from this software without specific
13
+
14
+ Neither the name of the copyright holder nor the names of its contributors may be
15
+ used to endorse or promote products derived from this software without specific
16
16
  prior written permission.
17
17
 
18
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27
- OF THE POSSIBILITY OF SUCH DAMAGE.
18
+ The name of the copyright holder(s), any contributors, the United States Government,
19
+ the United States Department of Energy, or any of their employees may not be used to
20
+ endorse or promote products derived from this software without specific prior written
21
+ permission from the respective party.
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
24
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
26
+ THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
27
+ STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT,
28
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
30
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
32
+ WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.