openstudio-calibration 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +29 -0
  3. data/CHANGELOG.md +14 -0
  4. data/Gemfile +20 -0
  5. data/Jenkinsfile +6 -0
  6. data/LICENSE.md +27 -0
  7. data/README.md +33 -0
  8. data/Rakefile +50 -0
  9. data/doc_templates/LICENSE.md +27 -0
  10. data/doc_templates/README.md.erb +42 -0
  11. data/doc_templates/copyright_erb.txt +36 -0
  12. data/doc_templates/copyright_js.txt +4 -0
  13. data/doc_templates/copyright_ruby.txt +34 -0
  14. data/lib/files/.gitkeep +0 -0
  15. data/lib/measures/AddMonthlyJSONUtilityData/LICENSE.md +27 -0
  16. data/lib/measures/AddMonthlyJSONUtilityData/README.md +96 -0
  17. data/lib/measures/AddMonthlyJSONUtilityData/README.md.erb +42 -0
  18. data/lib/measures/AddMonthlyJSONUtilityData/measure.rb +280 -0
  19. data/lib/measures/AddMonthlyJSONUtilityData/measure.xml +163 -0
  20. data/lib/measures/AddMonthlyUtilityData/LICENSE.md +27 -0
  21. data/lib/measures/AddMonthlyUtilityData/README.md +64 -0
  22. data/lib/measures/AddMonthlyUtilityData/README.md.erb +42 -0
  23. data/lib/measures/AddMonthlyUtilityData/measure.rb +312 -0
  24. data/lib/measures/AddMonthlyUtilityData/measure.xml +115 -0
  25. data/lib/measures/AddMonthlyUtilityData/tests/AddMonthlyUtilityData_Test.rb +88 -0
  26. data/lib/measures/AddMonthlyUtilityData/tests/electric_billed_usages.json +198 -0
  27. data/lib/measures/AddMonthlyUtilityData/tests/gas_billed_usages.json +198 -0
  28. data/lib/measures/CalibrationReports/LICENSE.md +27 -0
  29. data/lib/measures/CalibrationReports/README.md +26 -0
  30. data/lib/measures/CalibrationReports/README.md.erb +42 -0
  31. data/lib/measures/CalibrationReports/measure.rb +511 -0
  32. data/lib/measures/CalibrationReports/measure.xml +98 -0
  33. data/lib/measures/CalibrationReports/resources/report.html.in +379 -0
  34. data/lib/measures/CalibrationReports/tests/CalibrationReports_Test.rb +523 -0
  35. data/lib/measures/CalibrationReports/tests/ExampleModel.osm +10497 -0
  36. data/lib/measures/CalibrationReports/tests/ExampleModelNoDemandInput.osm +10560 -0
  37. data/lib/measures/CalibrationReports/tests/ExampleModelNoGasInput.osm +10456 -0
  38. data/lib/measures/CalibrationReports/tests/USA_CO_Golden-NREL.724666_TMY3.epw +8768 -0
  39. data/lib/measures/CalibrationReportsEnhanced/LICENSE.md +27 -0
  40. data/lib/measures/CalibrationReportsEnhanced/README.md +143 -0
  41. data/lib/measures/CalibrationReportsEnhanced/README.md.erb +42 -0
  42. data/lib/measures/CalibrationReportsEnhanced/measure.rb +798 -0
  43. data/lib/measures/CalibrationReportsEnhanced/measure.xml +372 -0
  44. data/lib/measures/CalibrationReportsEnhanced/resources/report.html.in +380 -0
  45. data/lib/measures/CalibrationReportsEnhanced/tests/CalibrationReportsEnhanced_Test.rb +734 -0
  46. data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel.osm +10497 -0
  47. data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel_FuelOil.osm +12740 -0
  48. data/lib/measures/CalibrationReportsEnhanced/tests/USA_CO_Golden-NREL.724666_TMY3.epw +8768 -0
  49. data/lib/measures/CalibrationReportsEnhanced21/LICENSE.md +27 -0
  50. data/lib/measures/CalibrationReportsEnhanced21/README.md +109 -0
  51. data/lib/measures/CalibrationReportsEnhanced21/README.md.erb +42 -0
  52. data/lib/measures/CalibrationReportsEnhanced21/measure.rb +690 -0
  53. data/lib/measures/CalibrationReportsEnhanced21/measure.xml +269 -0
  54. data/lib/measures/CalibrationReportsEnhanced21/resources/report.html.in +380 -0
  55. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/LICENSE.md +27 -0
  56. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/README.md +48 -0
  57. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/README.md.erb +42 -0
  58. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.rb +237 -0
  59. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.xml +93 -0
  60. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/LICENSE.md +27 -0
  61. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/README.md +48 -0
  62. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/README.md.erb +42 -0
  63. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.rb +228 -0
  64. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.xml +93 -0
  65. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/LICENSE.md +27 -0
  66. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/README.md +64 -0
  67. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/README.md.erb +42 -0
  68. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.rb +280 -0
  69. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.xml +111 -0
  70. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/LICENSE.md +27 -0
  71. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/README.md +64 -0
  72. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/README.md.erb +42 -0
  73. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.rb +270 -0
  74. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.xml +111 -0
  75. data/lib/measures/CoilCoolingWaterMultiplier/LICENSE.md +27 -0
  76. data/lib/measures/CoilCoolingWaterMultiplier/README.md +80 -0
  77. data/lib/measures/CoilCoolingWaterMultiplier/README.md.erb +42 -0
  78. data/lib/measures/CoilCoolingWaterMultiplier/measure.rb +324 -0
  79. data/lib/measures/CoilCoolingWaterMultiplier/measure.xml +129 -0
  80. data/lib/measures/CoilCoolingWaterPercentChange/LICENSE.md +27 -0
  81. data/lib/measures/CoilCoolingWaterPercentChange/README.md +80 -0
  82. data/lib/measures/CoilCoolingWaterPercentChange/README.md.erb +42 -0
  83. data/lib/measures/CoilCoolingWaterPercentChange/measure.rb +311 -0
  84. data/lib/measures/CoilCoolingWaterPercentChange/measure.xml +129 -0
  85. data/lib/measures/CoilHeatingElectricMultiplier/LICENSE.md +27 -0
  86. data/lib/measures/CoilHeatingElectricMultiplier/README.md +48 -0
  87. data/lib/measures/CoilHeatingElectricMultiplier/README.md.erb +42 -0
  88. data/lib/measures/CoilHeatingElectricMultiplier/measure.rb +240 -0
  89. data/lib/measures/CoilHeatingElectricMultiplier/measure.xml +93 -0
  90. data/lib/measures/CoilHeatingElectricPercentChange/LICENSE.md +27 -0
  91. data/lib/measures/CoilHeatingElectricPercentChange/README.md +48 -0
  92. data/lib/measures/CoilHeatingElectricPercentChange/README.md.erb +42 -0
  93. data/lib/measures/CoilHeatingElectricPercentChange/measure.rb +231 -0
  94. data/lib/measures/CoilHeatingElectricPercentChange/measure.xml +93 -0
  95. data/lib/measures/CoilHeatingGasMultiplier/LICENSE.md +27 -0
  96. data/lib/measures/CoilHeatingGasMultiplier/README.md +64 -0
  97. data/lib/measures/CoilHeatingGasMultiplier/README.md.erb +42 -0
  98. data/lib/measures/CoilHeatingGasMultiplier/measure.rb +282 -0
  99. data/lib/measures/CoilHeatingGasMultiplier/measure.xml +111 -0
  100. data/lib/measures/CoilHeatingGasPercentChange/LICENSE.md +27 -0
  101. data/lib/measures/CoilHeatingGasPercentChange/README.md +64 -0
  102. data/lib/measures/CoilHeatingGasPercentChange/README.md.erb +42 -0
  103. data/lib/measures/CoilHeatingGasPercentChange/measure.rb +271 -0
  104. data/lib/measures/CoilHeatingGasPercentChange/measure.xml +111 -0
  105. data/lib/measures/CoilHeatingWaterMultiplier/LICENSE.md +27 -0
  106. data/lib/measures/CoilHeatingWaterMultiplier/README.md +48 -0
  107. data/lib/measures/CoilHeatingWaterMultiplier/README.md.erb +42 -0
  108. data/lib/measures/CoilHeatingWaterMultiplier/measure.rb +235 -0
  109. data/lib/measures/CoilHeatingWaterMultiplier/measure.xml +93 -0
  110. data/lib/measures/CoilHeatingWaterPercentChange/LICENSE.md +27 -0
  111. data/lib/measures/CoilHeatingWaterPercentChange/README.md +48 -0
  112. data/lib/measures/CoilHeatingWaterPercentChange/README.md.erb +42 -0
  113. data/lib/measures/CoilHeatingWaterPercentChange/measure.rb +226 -0
  114. data/lib/measures/CoilHeatingWaterPercentChange/measure.xml +93 -0
  115. data/lib/measures/ConstructionLayerZeroMaterialProperties/LICENSE.md +27 -0
  116. data/lib/measures/ConstructionLayerZeroMaterialProperties/README.md +88 -0
  117. data/lib/measures/ConstructionLayerZeroMaterialProperties/README.md.erb +42 -0
  118. data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.rb +221 -0
  119. data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.xml +194 -0
  120. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/LICENSE.md +27 -0
  121. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/README.md +40 -0
  122. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/README.md.erb +42 -0
  123. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb +102 -0
  124. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.xml +78 -0
  125. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/LICENSE.md +27 -0
  126. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/README.md +48 -0
  127. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/README.md.erb +42 -0
  128. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.rb +263 -0
  129. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.xml +97 -0
  130. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/LICENSE.md +27 -0
  131. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/README.md +48 -0
  132. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/README.md.erb +42 -0
  133. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.rb +253 -0
  134. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.xml +97 -0
  135. data/lib/measures/FansMultiplier/LICENSE.md +27 -0
  136. data/lib/measures/FansMultiplier/README.md +64 -0
  137. data/lib/measures/FansMultiplier/README.md.erb +42 -0
  138. data/lib/measures/FansMultiplier/measure.rb +297 -0
  139. data/lib/measures/FansMultiplier/measure.xml +166 -0
  140. data/lib/measures/FansPercentChange/LICENSE.md +27 -0
  141. data/lib/measures/FansPercentChange/README.md +64 -0
  142. data/lib/measures/FansPercentChange/README.md.erb +42 -0
  143. data/lib/measures/FansPercentChange/measure.rb +286 -0
  144. data/lib/measures/FansPercentChange/measure.xml +166 -0
  145. data/lib/measures/GeneralCalibrationMeasureMultiplier/LICENSE.md +27 -0
  146. data/lib/measures/GeneralCalibrationMeasureMultiplier/README.md +112 -0
  147. data/lib/measures/GeneralCalibrationMeasureMultiplier/README.md.erb +42 -0
  148. data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.rb +639 -0
  149. data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.xml +229 -0
  150. data/lib/measures/GeneralCalibrationMeasurePercentChange/LICENSE.md +27 -0
  151. data/lib/measures/GeneralCalibrationMeasurePercentChange/README.md +112 -0
  152. data/lib/measures/GeneralCalibrationMeasurePercentChange/README.md.erb +42 -0
  153. data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.rb +756 -0
  154. data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.xml +229 -0
  155. data/lib/measures/HardSizeHvac/LICENSE.md +27 -0
  156. data/lib/measures/HardSizeHvac/README.md +26 -0
  157. data/lib/measures/HardSizeHvac/README.md.erb +42 -0
  158. data/lib/measures/HardSizeHvac/measure.rb +88 -0
  159. data/lib/measures/HardSizeHvac/measure.xml +81 -0
  160. data/lib/measures/MaalkaMonthlyJSONUtilityData/LICENSE.md +27 -0
  161. data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md +104 -0
  162. data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md.erb +42 -0
  163. data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.rb +304 -0
  164. data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.xml +216 -0
  165. data/lib/measures/RValueOfInsulationForConstructionMultiplier/LICENSE.md +27 -0
  166. data/lib/measures/RValueOfInsulationForConstructionMultiplier/README.md +40 -0
  167. data/lib/measures/RValueOfInsulationForConstructionMultiplier/README.md.erb +42 -0
  168. data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.rb +196 -0
  169. data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.xml +132 -0
  170. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/LICENSE.md +27 -0
  171. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/README.md +40 -0
  172. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/README.md.erb +42 -0
  173. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.rb +189 -0
  174. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.xml +132 -0
  175. data/lib/measures/RoofThermalPropertiesMultiplier/LICENSE.md +27 -0
  176. data/lib/measures/RoofThermalPropertiesMultiplier/README.md +48 -0
  177. data/lib/measures/RoofThermalPropertiesMultiplier/README.md.erb +42 -0
  178. data/lib/measures/RoofThermalPropertiesMultiplier/measure.rb +263 -0
  179. data/lib/measures/RoofThermalPropertiesMultiplier/measure.xml +97 -0
  180. data/lib/measures/RoofThermalPropertiesPercentChange/LICENSE.md +27 -0
  181. data/lib/measures/RoofThermalPropertiesPercentChange/README.md +48 -0
  182. data/lib/measures/RoofThermalPropertiesPercentChange/README.md.erb +42 -0
  183. data/lib/measures/RoofThermalPropertiesPercentChange/measure.rb +253 -0
  184. data/lib/measures/RoofThermalPropertiesPercentChange/measure.xml +97 -0
  185. data/lib/measures/TimeseriesObjectiveFunction/LICENSE.md +27 -0
  186. data/lib/measures/TimeseriesObjectiveFunction/README.md +207 -0
  187. data/lib/measures/TimeseriesObjectiveFunction/README.md.erb +42 -0
  188. data/lib/measures/TimeseriesObjectiveFunction/measure.rb +748 -0
  189. data/lib/measures/TimeseriesObjectiveFunction/measure.xml +435 -0
  190. data/lib/measures/TimeseriesObjectiveFunction/resources/report.html.erb +288 -0
  191. data/lib/measures/TimeseriesPlot/LICENSE.md +27 -0
  192. data/lib/measures/TimeseriesPlot/README.md +56 -0
  193. data/lib/measures/TimeseriesPlot/README.md.erb +42 -0
  194. data/lib/measures/TimeseriesPlot/measure.rb +302 -0
  195. data/lib/measures/TimeseriesPlot/measure.xml +137 -0
  196. data/lib/measures/TimeseriesPlot/resources/report.html.erb +270 -0
  197. data/lib/measures/WaterHeaterMixedMultiplier/LICENSE.md +27 -0
  198. data/lib/measures/WaterHeaterMixedMultiplier/README.md +64 -0
  199. data/lib/measures/WaterHeaterMixedMultiplier/README.md.erb +42 -0
  200. data/lib/measures/WaterHeaterMixedMultiplier/measure.rb +255 -0
  201. data/lib/measures/WaterHeaterMixedMultiplier/measure.xml +180 -0
  202. data/lib/measures/WaterHeaterMixedPercentChange/LICENSE.md +27 -0
  203. data/lib/measures/WaterHeaterMixedPercentChange/README.md +64 -0
  204. data/lib/measures/WaterHeaterMixedPercentChange/README.md.erb +42 -0
  205. data/lib/measures/WaterHeaterMixedPercentChange/measure.rb +245 -0
  206. data/lib/measures/WaterHeaterMixedPercentChange/measure.xml +180 -0
  207. data/lib/measures/zone_report/LICENSE.md +27 -0
  208. data/lib/measures/zone_report/README.md +26 -0
  209. data/lib/measures/zone_report/README.md.erb +42 -0
  210. data/lib/measures/zone_report/measure.rb +706 -0
  211. data/lib/measures/zone_report/measure.xml +67 -0
  212. data/lib/measures/zone_report/resources/report.html.in +342 -0
  213. data/lib/openstudio-calibration-measures.rb +36 -0
  214. data/lib/openstudio/calibration_measures.rb +37 -0
  215. data/lib/openstudio/calibration_measures/extension.rb +49 -0
  216. data/lib/openstudio/calibration_measures/version.rb +40 -0
  217. data/openstudio-calibration.gemspec +30 -0
  218. metadata +331 -0
@@ -0,0 +1,269 @@
1
+ <measure>
2
+ <schema_version>3.0</schema_version>
3
+ <name>calibration_reports_enhanced_21</name>
4
+ <uid>e6642d40-7366-4647-8724-53a37991d669</uid>
5
+ <version_id>45858510-0de6-47ae-98b7-a90ed01654f7</version_id>
6
+ <version_modified>20200325T030943Z</version_modified>
7
+ <xml_checksum>2C8A3EEF</xml_checksum>
8
+ <class_name>CalibrationReportsEnhanced21</class_name>
9
+ <display_name>Calibration Reports Enhanced</display_name>
10
+ <description>This measure is intended for calibibration of modeled results against user entered utility bill.</description>
11
+ <modeler_description>Measure looks at consumption for electricity and natural gas, and demand for electricity. It is inteneded to be used with no more than one gas an electric bills. Each bill can have multiple billing periods. Make sure ot use an AMY matching the utility data time frame.</modeler_description>
12
+ <arguments>
13
+ <argument>
14
+ <name>electric_nmbe_limit</name>
15
+ <display_name>Electric NMBE limit (%)</display_name>
16
+ <type>Double</type>
17
+ <required>true</required>
18
+ <model_dependent>false</model_dependent>
19
+ <default_value>5</default_value>
20
+ </argument>
21
+ <argument>
22
+ <name>electric_cvrmse_limit</name>
23
+ <display_name>Electric CVRMSE limit (%)</display_name>
24
+ <type>Double</type>
25
+ <required>true</required>
26
+ <model_dependent>false</model_dependent>
27
+ <default_value>15</default_value>
28
+ </argument>
29
+ <argument>
30
+ <name>gas_nmbe_limit</name>
31
+ <display_name>Gas NMBE limit (%)</display_name>
32
+ <type>Double</type>
33
+ <required>true</required>
34
+ <model_dependent>false</model_dependent>
35
+ <default_value>5</default_value>
36
+ </argument>
37
+ <argument>
38
+ <name>gas_cvrmse_limit</name>
39
+ <display_name>Gas CVRMSE limit (%)</display_name>
40
+ <type>Double</type>
41
+ <required>true</required>
42
+ <model_dependent>false</model_dependent>
43
+ <default_value>15</default_value>
44
+ </argument>
45
+ </arguments>
46
+ <outputs>
47
+ <output>
48
+ <name>electricity_consumption_actual</name>
49
+ <display_name>electricity_consumption_actual</display_name>
50
+ <short_name>electricity_consumption_actual</short_name>
51
+ <type>Double</type>
52
+ <model_dependent>false</model_dependent>
53
+ </output>
54
+ <output>
55
+ <name>electricity_consumption_modeled</name>
56
+ <display_name>electricity_consumption_modeled</display_name>
57
+ <short_name>electricity_consumption_modeled</short_name>
58
+ <type>Double</type>
59
+ <model_dependent>false</model_dependent>
60
+ </output>
61
+ <output>
62
+ <name>electricity_consumption_cvrmse</name>
63
+ <display_name>electricity_consumption_cvrmse</display_name>
64
+ <short_name>electricity_consumption_cvrmse</short_name>
65
+ <type>Double</type>
66
+ <model_dependent>false</model_dependent>
67
+ </output>
68
+ <output>
69
+ <name>electricity_consumption_nmbe</name>
70
+ <display_name>electricity_consumption_nmbe</display_name>
71
+ <short_name>electricity_consumption_nmbe</short_name>
72
+ <type>Double</type>
73
+ <model_dependent>false</model_dependent>
74
+ </output>
75
+ <output>
76
+ <name>electricity_sum_of_squares</name>
77
+ <display_name>electricity_sum_of_squares</display_name>
78
+ <short_name>electricity_sum_of_squares</short_name>
79
+ <type>Double</type>
80
+ <model_dependent>false</model_dependent>
81
+ </output>
82
+ <output>
83
+ <name>electricity_dof</name>
84
+ <display_name>electricity_dof</display_name>
85
+ <short_name>electricity_dof</short_name>
86
+ <type>Double</type>
87
+ <model_dependent>false</model_dependent>
88
+ </output>
89
+ <output>
90
+ <name>electricity_rmse</name>
91
+ <display_name>electricity_rmse</display_name>
92
+ <short_name>electricity_rmse</short_name>
93
+ <type>Double</type>
94
+ <model_dependent>false</model_dependent>
95
+ </output>
96
+ <output>
97
+ <name>electricity_peak_demand_nmbe</name>
98
+ <display_name>electricity_peak_demand_nmbe</display_name>
99
+ <short_name>electricity_peak_demand_nmbe</short_name>
100
+ <type>Double</type>
101
+ <model_dependent>false</model_dependent>
102
+ </output>
103
+ <output>
104
+ <name>electricity_peak_demand_actual</name>
105
+ <display_name>electricity_peak_demand_actual</display_name>
106
+ <short_name>electricity_peak_demand_actual</short_name>
107
+ <type>Double</type>
108
+ <model_dependent>false</model_dependent>
109
+ </output>
110
+ <output>
111
+ <name>electricity_peak_demand_modeled</name>
112
+ <display_name>electricity_peak_demand_modeled</display_name>
113
+ <short_name>electricity_peak_demand_modeled</short_name>
114
+ <type>Double</type>
115
+ <model_dependent>false</model_dependent>
116
+ </output>
117
+ <output>
118
+ <name>natural_gas_consumption_actual</name>
119
+ <display_name>natural_gas_consumption_actual</display_name>
120
+ <short_name>natural_gas_consumption_actual</short_name>
121
+ <type>Double</type>
122
+ <model_dependent>false</model_dependent>
123
+ </output>
124
+ <output>
125
+ <name>natural_gas_consumption_modeled</name>
126
+ <display_name>natural_gas_consumption_modeled</display_name>
127
+ <short_name>natural_gas_consumption_modeled</short_name>
128
+ <type>Double</type>
129
+ <model_dependent>false</model_dependent>
130
+ </output>
131
+ <output>
132
+ <name>natural_gas_consumption_cvrmse</name>
133
+ <display_name>natural_gas_consumption_cvrmse</display_name>
134
+ <short_name>natural_gas_consumption_cvrmse</short_name>
135
+ <type>Double</type>
136
+ <model_dependent>false</model_dependent>
137
+ </output>
138
+ <output>
139
+ <name>natural_gas_consumption_nmbe</name>
140
+ <display_name>natural_gas_consumption_nmbe</display_name>
141
+ <short_name>natural_gas_consumption_nmbe</short_name>
142
+ <type>Double</type>
143
+ <model_dependent>false</model_dependent>
144
+ </output>
145
+ <output>
146
+ <name>natural_gas_sum_of_squares</name>
147
+ <display_name>natural_gas_sum_of_squares</display_name>
148
+ <short_name>natural_gas_sum_of_squares</short_name>
149
+ <type>Double</type>
150
+ <model_dependent>false</model_dependent>
151
+ </output>
152
+ <output>
153
+ <name>natural_gas_dof</name>
154
+ <display_name>natural_gas_dof</display_name>
155
+ <short_name>natural_gas_dof</short_name>
156
+ <type>Double</type>
157
+ <model_dependent>false</model_dependent>
158
+ </output>
159
+ <output>
160
+ <name>natural_gas_rmse</name>
161
+ <display_name>natural_gas_rmse</display_name>
162
+ <short_name>natural_gas_rmse</short_name>
163
+ <type>Double</type>
164
+ <model_dependent>false</model_dependent>
165
+ </output>
166
+ <output>
167
+ <name>total_sum_of_squares</name>
168
+ <display_name>total_sum_of_squares</display_name>
169
+ <short_name>total_sum_of_squares</short_name>
170
+ <type>Double</type>
171
+ <model_dependent>false</model_dependent>
172
+ </output>
173
+ <output>
174
+ <name>total_dof</name>
175
+ <display_name>total_dof</display_name>
176
+ <short_name>total_dof</short_name>
177
+ <type>Double</type>
178
+ <model_dependent>false</model_dependent>
179
+ </output>
180
+ <output>
181
+ <name>total_rmse</name>
182
+ <display_name>total_rmse</display_name>
183
+ <short_name>total_rmse</short_name>
184
+ <type>Double</type>
185
+ <model_dependent>false</model_dependent>
186
+ </output>
187
+ <output>
188
+ <name>electricity_cvrmse_within_limit</name>
189
+ <display_name>electricity_cvrmse_within_limit</display_name>
190
+ <short_name>electricity_cvrmse_within_limit</short_name>
191
+ <type>Double</type>
192
+ <model_dependent>false</model_dependent>
193
+ </output>
194
+ <output>
195
+ <name>electricity_nmbe_within_limit</name>
196
+ <display_name>electricity_nmbe_within_limit</display_name>
197
+ <short_name>electricity_nmbe_within_limit</short_name>
198
+ <type>Double</type>
199
+ <model_dependent>false</model_dependent>
200
+ </output>
201
+ <output>
202
+ <name>natural_gas_cvrmse_within_limit</name>
203
+ <display_name>natural_gas_cvrmse_within_limit</display_name>
204
+ <short_name>natural_gas_cvrmse_within_limit</short_name>
205
+ <type>Double</type>
206
+ <model_dependent>false</model_dependent>
207
+ </output>
208
+ <output>
209
+ <name>natural_gas_nmbe_within_limit</name>
210
+ <display_name>natural_gas_nmbe_within_limit</display_name>
211
+ <short_name>natural_gas_nmbe_within_limit</short_name>
212
+ <type>Double</type>
213
+ <model_dependent>false</model_dependent>
214
+ </output>
215
+ </outputs>
216
+ <provenances/>
217
+ <tags>
218
+ <tag>Reporting.QAQC</tag>
219
+ </tags>
220
+ <attributes>
221
+ <attribute>
222
+ <name>Measure Type</name>
223
+ <value>ReportingMeasure</value>
224
+ <datatype>string</datatype>
225
+ </attribute>
226
+ <attribute>
227
+ <name>Uses SketchUp API</name>
228
+ <value>false</value>
229
+ <datatype>boolean</datatype>
230
+ </attribute>
231
+ </attributes>
232
+ <files>
233
+ <file>
234
+ <filename>report.html.in</filename>
235
+ <filetype>in</filetype>
236
+ <usage_type>resource</usage_type>
237
+ <checksum>22F45739</checksum>
238
+ </file>
239
+ <file>
240
+ <filename>LICENSE.md</filename>
241
+ <filetype>md</filetype>
242
+ <usage_type>license</usage_type>
243
+ <checksum>E0468DD6</checksum>
244
+ </file>
245
+ <file>
246
+ <filename>README.md.erb</filename>
247
+ <filetype>erb</filetype>
248
+ <usage_type>readmeerb</usage_type>
249
+ <checksum>703C9964</checksum>
250
+ </file>
251
+ <file>
252
+ <filename>README.md</filename>
253
+ <filetype>md</filetype>
254
+ <usage_type>readme</usage_type>
255
+ <checksum>6EC9831E</checksum>
256
+ </file>
257
+ <file>
258
+ <version>
259
+ <software_program>OpenStudio</software_program>
260
+ <identifier>1.11.0</identifier>
261
+ <min_compatible>1.11.0</min_compatible>
262
+ </version>
263
+ <filename>measure.rb</filename>
264
+ <filetype>rb</filetype>
265
+ <usage_type>script</usage_type>
266
+ <checksum>ACDD9C17</checksum>
267
+ </file>
268
+ </files>
269
+ </measure>
@@ -0,0 +1,380 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Calibration | OpenStudio</title>
6
+ <link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
7
+ <link href="file:///C:/openstudio_git/OpenStudio/openstudiocore/resources/web_assets/bootstrap.min.css" rel="stylesheet">
8
+ <style type="text/css">
9
+ body {
10
+ font: 10px sans-serif;
11
+ min-width: 750px;
12
+ }
13
+ table {
14
+ max-width:700px;
15
+ }
16
+ .axis path, .axis line {
17
+ fill: none;
18
+ stroke: #000;
19
+ shape-rendering: crispEdges;
20
+ }
21
+ .bar {
22
+ fill: steelblue;
23
+ }
24
+ .x.axis path {
25
+ display: none;
26
+ }
27
+ .d3-tip {
28
+ line-height: 1;
29
+ font-weight: bold;
30
+ padding: 12px;
31
+ background: rgba(0, 0, 0, 0.8);
32
+ color: #fff;
33
+ border-radius: 2px;
34
+ }
35
+ /* Creates a small triangle extender for the tooltip */
36
+ .d3-tip:after {
37
+ box-sizing: border-box;
38
+ display: inline;
39
+ font-size: 10px;
40
+ width: 100%;
41
+ line-height: 1;
42
+ color: rgba(0, 0, 0, 0.8);
43
+ content:"\25BC";
44
+ position: absolute;
45
+ text-align: center;
46
+ }
47
+ /* Style northward tooltips differently */
48
+ .d3-tip.n:after {
49
+ margin: -1px 0 0 0;
50
+ top: 100%;
51
+ left: 0;
52
+ }
53
+ .chartInfo h6 {
54
+ display: inline;
55
+ }
56
+ </style>
57
+ <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
58
+ <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.3.9/d3.min.js"></script>
59
+ <script type="text/javascript" src="file:///C:/openstudio_git/OpenStudio/openstudiocore/resources/web_assets/jquery.min.js"></script>
60
+ <script type="text/javascript" src="file:///C:/openstudio_git/OpenStudio/openstudiocore/resources/web_assets/d3.min.js"></script>
61
+ <script type="text/javascript">
62
+ // http://labratrevenge.com/d3-tip/javascripts/d3.tip.min.js
63
+ d3.tip=function(){function t(t){v=m(t),w=v.createSVGPoint(),document.body.appendChild(x)}function e(){return"n"}function n(){return[0,0]}function r(){return" "}function o(){var t=p();return{top:t.n.y-x.offsetHeight,left:t.n.x-x.offsetWidth/2}}function s(){var t=p();return{top:t.s.y,left:t.s.x-x.offsetWidth/2}}function l(){var t=p();return{top:t.e.y-x.offsetHeight/2,left:t.e.x}}function u(){var t=p();return{top:t.w.y-x.offsetHeight/2,left:t.w.x-x.offsetWidth}}function f(){var t=p();return{top:t.nw.y-x.offsetHeight,left:t.nw.x-x.offsetWidth}}function i(){var t=p();return{top:t.ne.y-x.offsetHeight,left:t.ne.x}}function a(){var t=p();return{top:t.sw.y,left:t.sw.x-x.offsetWidth}}function c(){var t=p();return{top:t.se.y,left:t.e.x}}function d(){var t=d3.select(document.createElement("div"));return t.style({position:"absolute",opacity:0,pointerEvents:"none",boxSizing:"border-box"}),t.node()}function m(t){return t=t.node(),"svg"==t.tagName.toLowerCase()?t:t.ownerSVGElement}function p(){var t=d3.event.target,e={},n=t.getScreenCTM(),r=t.getBBox(),o=r.width,s=r.height,l=r.x,u=r.y,f=document.body.scrollTop,i=document.body.scrollLeft;return document.documentElement&&document.documentElement.scrollTop&&(f=document.documentElement.scrollTop,i=document.documentElement.scrollLeft),w.x=l+i,w.y=u+f,e.nw=w.matrixTransform(n),w.x+=o,e.ne=w.matrixTransform(n),w.y+=s,e.se=w.matrixTransform(n),w.x-=o,e.sw=w.matrixTransform(n),w.y-=s/2,e.w=w.matrixTransform(n),w.x+=o,e.e=w.matrixTransform(n),w.x-=o/2,w.y-=s/2,e.n=w.matrixTransform(n),w.y+=s,e.s=w.matrixTransform(n),e}var y=e,g=n,h=r,x=d(),v=null,w=null;t.show=function(){var e,n=h.apply(this,arguments),r=g.apply(this,arguments),o=y.apply(this,arguments),s=d3.select(x),l=0;for(s.html(n).style({opacity:1,pointerEvents:"all"});l--;)s.classed(E[l],!1);return e=T.get(o).apply(this),s.classed(o,!0).style({top:e.top+r[0]+"px",left:e.left+r[1]+"px"}),t},t.hide=function(){return nodel=d3.select(x),nodel.style({opacity:0,pointerEvents:"none"}),t},t.attr=function(e){if(2>arguments.length&&"string"==typeof e)return d3.select(x).attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(d3.select(x),n),t},t.style=function(e){if(2>arguments.length&&"string"==typeof e)return d3.select(x).style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(d3.select(x),n),t},t.direction=function(e){return arguments.length?(y=null==e?e:d3.functor(e),t):y},t.offset=function(e){return arguments.length?(g=null==e?e:d3.functor(e),t):g},t.html=function(e){return arguments.length?(h=null==e?e:d3.functor(e),t):h};var T=d3.map({n:o,s:s,e:l,w:u,nw:f,ne:i,sw:a,se:c}),E=T.keys();return t};
64
+ </script>
65
+ </head>
66
+ <body>
67
+ <div style="width:250px;display:inline-block;">
68
+ <label>Calibration Method</label>
69
+ <select id="calibrationMethodSelect">
70
+ </select>
71
+ </div>
72
+ <div style="width:400px;display:inline-block;">
73
+ <h6 id="calibrationString"></h6>
74
+ </div>
75
+ <div id="consumptionString-0" class="chartInfo"></div>
76
+ <div id="chart-0"></div>
77
+ <div id="table-0" ></div>
78
+ <div id="consumptionString-1" class="chartInfo"></div>
79
+ <div id="chart-1"></div>
80
+ <div id="table-1" ></div>
81
+ <div id="consumptionString-2" class="chartInfo"></div>
82
+ <div id="chart-2"></div>
83
+ <div id="table-2" ></div>
84
+ <script type="text/javascript">
85
+ function numFormat(n) {
86
+ var parts = n.toString().split(".");
87
+ return parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + (parts[1] ? "." + parts[1] : "");
88
+ }
89
+
90
+ <%= energy %>
91
+
92
+ $.each(calibrationGuidelines, function (index, value) {
93
+ $('#calibrationMethodSelect')
94
+ .append($("<option></option>")
95
+ .attr("value", index)
96
+ .text(value));
97
+ });
98
+
99
+ $("#calibrationMethodSelect").change(onMethodChange);
100
+
101
+ var maxNMBE = 0;
102
+ var maxCVRMSE = 0;
103
+
104
+ function onMethodChange() {
105
+ if ($('#calibrationMethodSelect').val() == "0") {
106
+ maxNMBE = ashraeMaxNMBE;
107
+ maxCVRMSE = ashraeMaxCVRMSE;
108
+ } else {
109
+ maxNMBE = fempMaxNMBE;
110
+ maxCVRMSE = fempMaxCVRMSE;
111
+ }
112
+ $('#calibrationString').text("NMBE of " + maxNMBE + "% or less and CV(RMSE) of " + maxCVRMSE + "% relative to monthly data. Must contain all utility data for one year and real weather data. Check the guideline for additional requirements.");
113
+
114
+ $('.table').each(function(i) {
115
+ $(this).find('tr:last td:not(:first)').each(function(j) {
116
+ var value = $(this).text().replace(/%/g, '');
117
+ if (value != "&mdash;") {
118
+ var num = parseFloat(value);
119
+ if (Math.abs(num) > maxNMBE) {
120
+ num = "<font color=\"red\">" + num;
121
+ }
122
+ num = num + "%";
123
+ $(this).html(num);
124
+ }
125
+ });
126
+ })
127
+
128
+ for (var c in charts) {
129
+
130
+ if(consumption[charts[c]]){
131
+ cvrmseString = "<h6>CV(RMSE) = </h6>"
132
+ num = consumption[charts[c]].cvrsme;
133
+ if (Math.abs(num) > maxCVRMSE) {
134
+ num = "<font color=\"red\">" + num + "<font color=\"black\">";
135
+ }
136
+ cvrmseString = cvrmseString + num;
137
+
138
+ nmbeString = "<h6>NMBE = </h6>"
139
+ num = consumption[charts[c]].nmbe;
140
+ if (Math.abs(num) > maxNMBE) {
141
+ num = "<font color=\"red\">" + num;
142
+ }
143
+ nmbeString = nmbeString + num;
144
+
145
+ string = "<h4 style=\"margin-bottom:-10px;\">" + charts[c] + " (" + consumption[charts[c]].units + ")</h4>";
146
+ if(charts[c] != "Electricity Demand"){
147
+ string = string + "<br>" + cvrmseString + "<br>" + nmbeString;
148
+ }
149
+ $('#consumptionString-' + c).html(string);
150
+ }
151
+
152
+ }
153
+
154
+ }
155
+
156
+ onMethodChange();
157
+
158
+ function outputTable(name, units, obj, id) {
159
+ var $table = $('<table id="' + name.toLowerCase().replace(/ /g, '-') + '">').addClass("table table-striped table-bordered table-condensed");
160
+ var headers = '';
161
+ for (var i = 1; i <= obj.Start.length; i++) headers += '<th>' + i + '</th>';
162
+ $table.append('<thead>').children('thead').append('<tr />').children('tr').append('<th>&nbsp;</th>').append(headers);
163
+ var $tbody = $table.append('<tbody />').children('tbody');
164
+ var key;
165
+ for (key in obj) {
166
+ if (obj.hasOwnProperty(key)) {
167
+ if (key == "Start" | key == "End" | key == "Actual" | key == "Model" | key == "NMBE") {
168
+ var $row = $tbody.append('<tr />').children('tr:last');
169
+ $row.append("<td>" + key + "</td>");
170
+ for (i = 0; i < obj.Start.length; i++) {
171
+ var num = obj[key][i] === 0 ? "&mdash;" : numFormat(obj[key][i]);
172
+
173
+ if (num != "&mdash;") {
174
+ if (key == "NMBE") {
175
+ if (Math.abs(num) > maxNMBE) {
176
+ num = "<font color=\"red\">" + num;
177
+ }
178
+ num = num + "%";
179
+ }
180
+ }
181
+
182
+ $row.append("<td>" + num + "</td>");
183
+ }
184
+ }
185
+ }
186
+ }
187
+ $table.appendTo('#' + id);
188
+ }
189
+
190
+ var margin = {
191
+ top: 20.5,
192
+ right: 20,
193
+ bottom: 30,
194
+ left: 40.5
195
+ },
196
+ width = 560 - margin.left - margin.right,
197
+ height = 300 - margin.top - margin.bottom;
198
+
199
+ var x0 = d3.scale.ordinal()
200
+ .rangeRoundBands([0, width], 0.1);
201
+
202
+ var x1 = d3.scale.ordinal();
203
+
204
+ var y = d3.scale.linear()
205
+ .range([height, 0]);
206
+
207
+ var color = d3.scale.ordinal()
208
+ .range(["#8CC739", "#29AAE7"]);
209
+
210
+ var xAxis = d3.svg.axis()
211
+ .scale(x0)
212
+ .orient("bottom");
213
+
214
+ var yAxis = d3.svg.axis()
215
+ .scale(y)
216
+ .orient("left")
217
+ .tickFormat(d3.format(".2s"));
218
+
219
+ var tip = d3.tip()
220
+ .attr('class', 'd3-tip')
221
+ .offset([-10, 0])
222
+ .html(function (d) {
223
+ return "<strong>" + d3.event.target.__data__.name + ":</strong> <span style='color:red'>" + d3.event.target.__data__.value + "</span>";
224
+ });
225
+
226
+ var charts = ["Electricity Consumption", "Electricity Demand", "Natural Gas Consumption"];
227
+
228
+ for (var c in charts) {
229
+
230
+ if(consumption[charts[c]]){
231
+
232
+ if (c == 0) {
233
+ margin.right = 125;
234
+ }
235
+
236
+ cvrmseString = "<h6>CV(RMSE) = </h6>"
237
+ num = consumption[charts[c]].cvrsme;
238
+ if (Math.abs(num) > maxCVRMSE) {
239
+ num = "<font color=\"red\">" + num + "<font color=\"black\">";
240
+ }
241
+ cvrmseString = cvrmseString + num;
242
+
243
+ nmbeString = "<h6>NMBE = </h6>"
244
+ num = consumption[charts[c]].nmbe;
245
+ if (Math.abs(num) > maxNMBE) {
246
+ num = "<font color=\"red\">" + num;
247
+ }
248
+ nmbeString = nmbeString + num;
249
+
250
+ string = "<h4 style=\"margin-bottom:-10px;\">" + charts[c] + " (" + consumption[charts[c]].units + ")</h4>";
251
+ if(charts[c] != "Electricity Demand"){
252
+ string = string + "<br>" + cvrmseString + "<br>" + nmbeString;
253
+ }
254
+ $('#consumptionString-' + c).html(string);
255
+
256
+ var svg = d3.select("#chart-" + c).append("svg")
257
+ .attr("width", width + margin.left + margin.right)
258
+ .attr("height", height + margin.top + margin.bottom)
259
+ .append("g")
260
+ .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
261
+ svg.call(tip);
262
+
263
+ data = [];
264
+ for (var enduse in consumption[charts[c]].data) {
265
+ if (enduse == "Actual" | enduse == "Model") {
266
+ var enduse_data = consumption[charts[c]].data[enduse];
267
+ for (var i = 1; i <= enduse_data.length; i++) {
268
+ if (data.length < enduse_data.length) {
269
+ var temp = {
270
+ "Month": i
271
+ };
272
+ temp[enduse] = enduse_data[i - 1];
273
+ data.push(temp);
274
+ } else {
275
+ data[i - 1][enduse] = enduse_data[i - 1];
276
+ }
277
+ }
278
+ }
279
+ }
280
+ var comparison = d3.keys(data[0]).filter(function (key) {
281
+ return key !== "Month";
282
+ });
283
+
284
+ data.forEach(function (d) {
285
+ d.consumption = comparison.map(function (name) {
286
+ return {
287
+ name: name,
288
+ value: +d[name]
289
+ };
290
+ });
291
+ });
292
+
293
+ x0.domain(data.map(function (d) {
294
+ return d.Month;
295
+ }));
296
+ x1.domain(comparison).rangeRoundBands([0, x0.rangeBand()]);
297
+ y.domain([0, d3.max(data, function (d) {
298
+ return d3.max(d.consumption, function (d) {
299
+ return d.value;
300
+ });
301
+ })]);
302
+
303
+ //data.sort(function(a, b) { return b.total - a.total; });
304
+
305
+ svg.append("g")
306
+ .attr("class", "x axis")
307
+ .attr("transform", "translate(0," + height + ")")
308
+ .call(xAxis);
309
+
310
+ svg.append("g")
311
+ .attr("class", "y axis")
312
+ .call(yAxis)
313
+ .append("text")
314
+ .attr("transform", "rotate(-90)")
315
+ .attr("y", -36)
316
+ .attr("dy", ".71em")
317
+ .style("text-anchor", "end")
318
+ .text(consumption[charts[c]].units);
319
+
320
+ var month = svg.selectAll(".month")
321
+ .data(data)
322
+ .enter().append("g")
323
+ .attr("class", "g")
324
+ .on('mouseover', tip.show)
325
+ .on('mouseout', tip.hide)
326
+ .attr("transform", function (d) {
327
+ return "translate(" + x0(d.Month) + ",0)";
328
+ });
329
+
330
+ month.selectAll("rect")
331
+ .data(function (d) {
332
+ return d.consumption;
333
+ })
334
+ .enter().append("rect")
335
+ .attr("width", x1.rangeBand())
336
+ .attr("x", function (d) {
337
+ return x1(d.name);
338
+ })
339
+ .attr("y", function (d) {
340
+ return y(d.value);
341
+ })
342
+ .attr("height", function (d) {
343
+ return height - y(d.value);
344
+ })
345
+ .style("fill", function (d) {
346
+ return color(d.name);
347
+ });
348
+
349
+ var legend = svg.selectAll(".legend")
350
+ .data(comparison.slice().reverse())
351
+ .enter().append("g")
352
+ .attr("class", "legend")
353
+ .attr("transform", function (d, i) {
354
+ return "translate(0," + i * 20 + ")";
355
+ });
356
+
357
+ legend.append("rect")
358
+ .attr("x", width + 105)
359
+ .attr("width", 18)
360
+ .attr("height", 18)
361
+ .style("fill", color);
362
+
363
+ legend.append("text")
364
+ .attr("x", width + 105 - 3)
365
+ .attr("y", 9)
366
+ .attr("dy", ".35em")
367
+ .style("text-anchor", "end")
368
+ .text(function (d) {
369
+ return d;
370
+ });
371
+
372
+ svg.selectAll(".g").attr("stroke", "black");
373
+
374
+ outputTable(charts[c], consumption[charts[c]].units, consumption[charts[c]].data, "table-" + c);
375
+ }
376
+
377
+ }
378
+ </script>
379
+ </body>
380
+ </html>