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,67 @@
1
+ <measure>
2
+ <schema_version>3.0</schema_version>
3
+ <name>zone_report</name>
4
+ <uid>f3531642-27ce-4624-95ab-0bfcd5b9f5fe</uid>
5
+ <version_id>338beba4-8b3e-4296-adba-4b7eae6f55aa</version_id>
6
+ <version_modified>20200325T030944Z</version_modified>
7
+ <xml_checksum>2C8A3EEF</xml_checksum>
8
+ <class_name>ZoneReport</class_name>
9
+ <display_name>Zone Report</display_name>
10
+ <description> This measure provides Thermal Zone level HVAC information. Output includes thermal zone equipment descriptions and details, zone sizing information for heating and cooling, and a disaggregation of the contributions of envelope and internal gains to the HVAC loads.</description>
11
+ <modeler_description> This measure will not report uncontrolled air terminals, or zone level radiant HVAC equipment.</modeler_description>
12
+ <arguments/>
13
+ <outputs/>
14
+ <provenances/>
15
+ <tags>
16
+ <tag>Reporting.QAQC</tag>
17
+ </tags>
18
+ <attributes>
19
+ <attribute>
20
+ <name>Measure Type</name>
21
+ <value>ReportingMeasure</value>
22
+ <datatype>string</datatype>
23
+ </attribute>
24
+ <attribute>
25
+ <name>Uses SketchUp API</name>
26
+ <value>false</value>
27
+ <datatype>boolean</datatype>
28
+ </attribute>
29
+ </attributes>
30
+ <files>
31
+ <file>
32
+ <filename>report.html.in</filename>
33
+ <filetype>in</filetype>
34
+ <usage_type>resource</usage_type>
35
+ <checksum>9863EEC5</checksum>
36
+ </file>
37
+ <file>
38
+ <filename>LICENSE.md</filename>
39
+ <filetype>md</filetype>
40
+ <usage_type>license</usage_type>
41
+ <checksum>E0468DD6</checksum>
42
+ </file>
43
+ <file>
44
+ <filename>README.md.erb</filename>
45
+ <filetype>erb</filetype>
46
+ <usage_type>readmeerb</usage_type>
47
+ <checksum>703C9964</checksum>
48
+ </file>
49
+ <file>
50
+ <filename>README.md</filename>
51
+ <filetype>md</filetype>
52
+ <usage_type>readme</usage_type>
53
+ <checksum>C013AECE</checksum>
54
+ </file>
55
+ <file>
56
+ <version>
57
+ <software_program>OpenStudio</software_program>
58
+ <identifier>1.5.0</identifier>
59
+ <min_compatible>1.8.0</min_compatible>
60
+ </version>
61
+ <filename>measure.rb</filename>
62
+ <filetype>rb</filetype>
63
+ <usage_type>script</usage_type>
64
+ <checksum>34E82F27</checksum>
65
+ </file>
66
+ </files>
67
+ </measure>
@@ -0,0 +1,342 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Zone Report</title>
6
+ <link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
7
+ <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
8
+ <script type="text/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
9
+ <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.3.9/d3.min.js"></script>
10
+ <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/dygraph/1.0.1/dygraph-combined.js"></script>
11
+ <style>
12
+ body {
13
+ position: relative;
14
+ height: 100%;
15
+ }
16
+
17
+ #tocItems > .nav > li > a {
18
+ padding-top: 4px;
19
+ padding-bottom: 4px;
20
+ }
21
+
22
+ #tocItems {
23
+ overflow-y: scroll;
24
+ max-height: 100%;
25
+ }
26
+
27
+ td.equipmentCategory{
28
+ font-weight:bold;
29
+ }
30
+
31
+ td.valWide{
32
+ text-align:center;
33
+ }
34
+
35
+ .dygraph-legend {
36
+ float: left;
37
+ top: -270px;
38
+ background-color: transparent !important;
39
+ left: 810px !important;
40
+ position: relative;
41
+ }
42
+ </style>
43
+ <script type="text/javascript">
44
+ // Create a timeseries graph of the data for each zone
45
+ $(document).ready(function () {
46
+
47
+ function stackedColumnPlotter(e) {
48
+ // We need to handle all the series simultaneously.
49
+ if (e.seriesIndex !== 0) return;
50
+
51
+ var g = e.dygraph;
52
+ var ctx = e.drawingContext;
53
+ var sets = e.allSeriesPoints;
54
+
55
+ ctx.fillStyle="#000000";
56
+ ctx.fillRect( 0, e.dygraph.toDomYCoord(0), 940, 2 );
57
+
58
+ // Find the minimum separation between x-values.
59
+ // This determines the bar width.
60
+ var min_sep = Infinity;
61
+ for (var j = 0; j < sets.length; j++) {
62
+ var points = sets[j];
63
+ for (var i = 1; i < points.length; i++) {
64
+ var sep = points[i].canvasx - points[i - 1].canvasx;
65
+ if (sep < min_sep) min_sep = sep;
66
+ }
67
+ }
68
+ var bar_width = Math.floor(2.0 / 2.6 * min_sep);
69
+
70
+ var fillColors = [];
71
+ var strokeColors = g.getColors();
72
+ for (var i = 0; i < strokeColors.length; i++) {
73
+ var color = new RGBColorParser(strokeColors[i]);
74
+ color.r = Math.floor((255 + color.r) / 2);
75
+ color.g = Math.floor((255 + color.g) / 2);
76
+ color.b = Math.floor((255 + color.b) / 2);
77
+ fillColors.push(color.toRGB());
78
+ }
79
+
80
+ var ranges = []
81
+
82
+ for (var j = 0; j < sets.length; j++) {
83
+ ctx.fillStyle = fillColors[j];
84
+ ctx.strokeStyle = strokeColors[j];
85
+ // Category 0 is used for min/max graph autoscaling; don't plot category 0
86
+ // The last category is used for spacing; don't plot the last category
87
+ for (var i = 1; i<sets[j].length-1; i++) {
88
+ var p = sets[j][i];
89
+ var center_x = p.canvasx;
90
+ var x_left = center_x - (bar_width / 2);
91
+ var x_right = center_x + (bar_width / 2);
92
+
93
+ if (p.yval != 0) {
94
+
95
+ var from = 0
96
+ var to = 0
97
+ var r = ranges[p.xval] || [0.0, 0.0]
98
+
99
+ if (p.yval >= 0) {
100
+ to = r[0]
101
+ r[0] = from = to + p.yval
102
+ }
103
+ else {
104
+ from = r[1]
105
+ r[1] = to = from + p.yval
106
+ }
107
+
108
+ ranges[p.xval] = r
109
+
110
+ var y_top = e.dygraph.toDomYCoord(from)
111
+ var y_bottom = e.dygraph.toDomYCoord(to)
112
+ var bar_height = y_bottom-y_top
113
+
114
+ ctx.fillRect(x_left, y_top,
115
+ bar_width, bar_height);
116
+
117
+ ctx.strokeRect(x_left, y_top,
118
+ bar_width, bar_height);
119
+
120
+ //ctx.fillStyle = fillColors[j];
121
+ //fillstring = fillColors[j].substring(4);
122
+
123
+ ctx.fillStyle="rgba( 0, 0, 0, 0.70)";
124
+ ctx.font = '16px sans-serif';
125
+ ctx.fillText(p.name + " " + p.yval, x_left + 10, y_top + ( bar_height / 2 ));
126
+
127
+ ctx.fillStyle = fillColors[j];
128
+ }
129
+ }
130
+ }
131
+ };
132
+
133
+ $.each(graph_data, function (index, graphData) {
134
+ var graph = graph_data[index];
135
+
136
+ $('#graphs_' + index).append('<div><div id="data_div_' + index + '"></div><div id="labels_div_' + index + '" class="dygraph-legend" style="margin-right: 56px"></div></div>');
137
+
138
+ g = new Dygraph(document.getElementById('data_div_' + index), graph.data, {
139
+ title: graph.title,
140
+ xlabel: graph.xaxislabel,
141
+ ylabel: graph.yaxislabel,
142
+ labels: graph.labels,
143
+ colors: graph.colors,
144
+ labelsDiv: document.getElementById('labels_div_' + index),
145
+ labelsSeparateLines: true,
146
+ labelsShowZeroValues: false,
147
+ showLabelsOnHighlight: false,
148
+ legend: "never",
149
+ height: 520,
150
+ axes: {
151
+ x: {
152
+ axisLabelFormatter: function(d, gran) {
153
+ switch(d){
154
+ case 1: return "Net Heating"; break;
155
+ case 2: return "Heating"; break;
156
+ case 3: return "Cooling"; break;
157
+ case 4: return "Net Cooling"; break;
158
+ default: return "";
159
+ }
160
+ }
161
+ }
162
+ },
163
+ plotter: stackedColumnPlotter,
164
+ highlightCircleSize:0,
165
+ highlightCallback: highlightCol
166
+ });
167
+
168
+ var annotations = []
169
+ for (var i=1; i<graph.data.length-1; ++i) { // First and last points are not shown on graph
170
+ points = graph.data[i]
171
+ for (var e=1; e<points.length; ++e) {
172
+ if (points[e] != 0) {
173
+ var labeltext = graph.labels[e] + ": " + points[e]
174
+ a = {series:graph.labels[e] , x:points[0], shortText:labeltext, text:labeltext, cssClass:'stackedbarlabel', width:100}
175
+ annotations.push(a)
176
+ }
177
+ }
178
+ }
179
+ //g.setAnnotations(annotations)
180
+
181
+ $('#series_div_' + index ).append( "<button type='button' id='data_export_" + index + "' onclick='exportData(" + index + ")' class='btn btn-default btn-xs'>Export</button>" );
182
+ });
183
+ });
184
+
185
+ function highlightCol( event, x, points, row, seriesName ){
186
+ for (var e = 0 ; e < points.length; ++e ) {
187
+ if ( points[e] != 0 ) {
188
+ //alert( points[e].name + "-" + points[e].yval );
189
+ }
190
+ }
191
+
192
+
193
+ }
194
+
195
+ function exportData( index ){
196
+
197
+ var graph = graph_data[index];
198
+ var csvContent = "data:text/csv;charset=utf-8,";
199
+ csvContent = graph.data.join("\n");
200
+
201
+ var encodedUri = encodeURI(csvContent);
202
+ window.open(encodedUri);
203
+ }
204
+ </script>
205
+ <script type="text/javascript">
206
+ var graph_data = <%= @graph_data %>;
207
+ </script>
208
+
209
+ </head>
210
+ <body data-spy="scroll" data-target="#tocItems">
211
+
212
+ <div id="content" class="container-fluid">
213
+
214
+ <div id="toc" class="col-md-3" role="complementary">
215
+ <div id="tocItems" class="hidden-print well affix" role="complementary" style="margin-top: 40px;">
216
+ <ul class="nav nav-pills nav-stacked" role="navigation">
217
+ <% counter = 0 %>
218
+ <% zone_collection.each do |z| %>
219
+
220
+ <li>
221
+ <a href="#zone_<%= counter %>"><%= z[:name] %></a>
222
+ </li>
223
+ <% counter = counter + 1 %>
224
+ <% end %>
225
+ </ul>
226
+ </div>
227
+ </div>
228
+
229
+ <div class="col-md-9" style="padding-top:25px;" role="main">
230
+
231
+ <h1>Zone Equipment Report</h1>
232
+
233
+ <% counter = 0 %>
234
+ <% zone_collection.each do |z| %>
235
+ <h3 id="zone_<%= counter %>"><%= z[:name] %></h3>
236
+
237
+ <h4>Zone Equipment Summary</h4>
238
+
239
+ <table class="table table-striped table-bordered table-condensed zoneGrid">
240
+ <% report_sort_order = {"Heating" => 0, "Backup Heating" => 1, "Cooling" => 2, "Fans" => 3} %>
241
+ <% z[:equipment].sort_by{|k,v| report_sort_order[k]}.each do |reporting_type, equipments| %>
242
+ <% type_properties = equipments[0].keys %>
243
+ <% type_properties.each_with_index do |key, i| %>
244
+ <tr>
245
+ <td class="equipmentCategory"><%= i == 0 ? reporting_type : "&nbsp;" %></td>
246
+ <td class="propertyName"><%= key %></td>
247
+ <% (0...max_zone_equipments).each do |equip_index| %>
248
+ <% if equip_index < equipments.length
249
+ value = equipments[equip_index][key]
250
+ if value.kind_of?(Array) %>
251
+ <td class="valWide"><%= "#{value[0]} #{value[1]}" %></td>
252
+ <% else %>
253
+ <td class="valWide"><%= value %></td>
254
+ <% end %>
255
+ <% else %>
256
+ <td>&nbsp;</td>
257
+ <% end %>
258
+ <% end %>
259
+ </tr>
260
+ <% end %>
261
+ <% end %>
262
+ </table>
263
+
264
+ <h4>Zone Sizing and Load Summary</h4>
265
+
266
+ <table class="table table-striped table-bordered table-condensed zoneGrid">
267
+ <tr>
268
+ <td>Zone Name</td><td><%=z[:name]%></td><td>Zone Size (ft2)</td><td><%=z[:area]%></td>
269
+ </tr>
270
+ <tr>
271
+ <td>Unmet Load Hours (Htg)</td><td><%=z[:vals][:vp]%></td><td>Unmet Load Hours (Clg)</td><td><%=z[:vals][:vq]%></td>
272
+ </tr>
273
+ </table>
274
+
275
+ <table class="table table-striped table-bordered table-condensed">
276
+ <tr>
277
+ <td>Zone Load Summary</td><td>Zone Conditioned</td><td>Peak kBtu/hr/ft2</td><td>Time of Peak</td><td> kBtu/ft2 per Run Period</td>
278
+ </tr>
279
+ <tr><td>Heating Loads</td><td><%=z[:vals][:vf]%></td><td><%=z[:vals][:vae]%></td><td><%=z[:vals][:vaf]%></td><td><%=z[:vals][:vad]%></td></tr>
280
+ <tr><td>Cooling Loads</td><td><%=z[:vals][:vf]%></td><td><%=z[:vals][:vah]%></td><td><%=z[:vals][:vai]%></td><td><%=z[:vals][:vag]%></td></tr>
281
+ </table>
282
+
283
+ <table class="table table-striped table-bordered table-condensed">
284
+ <tr>
285
+ <td>Zone HVAC Sizing Summary</td><td>User Design Load (kBtu/hr)</td><td>Date/Time of Peak</td><td>User Design Airflow (ft3/min)</td>
286
+ </tr>
287
+ <tr><td>Heating Loads</td><td><%=z[:vals][:vg]%></td><td><%=z[:vals][:vo]%></td><td><%=z[:vals][:vh]%></td></tr>
288
+ <tr><td>Cooling Loads</td><td><%=z[:vals][:vi]%></td><td><%=z[:vals][:vn]%></td><td><%=z[:vals][:vj]%></td></tr>
289
+ </table>
290
+
291
+ <table class="table table-striped table-bordered table-condensed">
292
+ <tr>
293
+ <td colspan="2">Int Lighting, Equip & People - Density</td><td>Avg Vent (ACH)</td><td>Avg Infil (ACH)</td>
294
+ </tr>
295
+ <tr><td>Lights - Density (W/ft2)</td><td><%=z[:vals][:va]%></td><td><%=z[:vals][:vk]%></td><td><%=z[:vals][:vl]%></td></tr>
296
+ <tr><td>People - Density (ft2/Person)</td><td><%=z[:vals][:vm]%></td><td></td><td></td></tr>
297
+ <tr><td>Plug and Process Density (W/ft2)</td><td><%=z[:vals][:vd]%></td><td>Zone Lights - EFLH</td><td><%=z[:vals][:vb]%></td></tr>
298
+ </table>
299
+
300
+ <table class="table table-striped table-bordered table-condensed">
301
+ <tr>
302
+ <td></td><td>Peak Heating Load (Btu/hr/ft2)</td><td>Peak Cooling Load (Btu/hr/ft2)</td>
303
+ </tr>
304
+ <tr><td>Date/Time of Peak</td><td><%=z[:vals][:vbh]%></td><td><%=z[:vals][:vcg]%></td></tr>
305
+ <tr><td>People</td><td><%=z[:vals][:vaj]%></td><td><%=z[:vals][:vbi]%></td></tr>
306
+ <tr><td>Interior Lights</td><td><%=z[:vals][:vak]%></td><td><%=z[:vals][:vbj]%></td></tr>
307
+ <tr><td>Interior Equipment</td><td><%=z[:vals][:val]%></td><td><%=z[:vals][:vbk]%></td></tr>
308
+ <tr><td>Refrigeration</td><td><%=z[:vals][:vam]%></td><td><%=z[:vals][:vbl]%></td></tr>
309
+ <tr><td>Other</td><td><%=z[:vals][:sumOtherHeating]%></td><td><%=z[:vals][:sumOtherCooling]%></td></tr>
310
+ <tr><td>Infiltration</td><td><%=z[:vals][:vaq]%></td><td><%=z[:vals][:vbp]%></td></tr>
311
+ <tr><td>Zone Ventilation</td><td><%=z[:vals][:var]%></td><td><%=z[:vals][:vbq]%></td></tr>
312
+ <tr><td>Interzone Mixing</td><td><%=z[:vals][:vas]%></td><td><%=z[:vals][:vbr]%></td></tr>
313
+ <tr><td>Walls / Doors</td><td><%=z[:vals][:sumWallDoorHeating]%></td><td><%=z[:vals][:sumWallDoorCooling]%></td></tr>
314
+ <tr><td>Roof/Ceiling</td><td><%=z[:vals][:sumRoofCeilingHeating]%></td><td><%=z[:vals][:sumRoofCeilingCooling]%></td></tr>
315
+ <tr><td>Floor</td><td><%=z[:vals][:sumFloorHeating]%></td><td><%=z[:vals][:sumFloorCooling]%></td></tr>
316
+ <tr><td>Windows</td><td><%=z[:vals][:sumWindowsHeating]%></td><td><%=z[:vals][:sumWindowsCooling]%></td></tr>
317
+ <tr><td>Total</td><td><%=z[:vals][:sumHeatingTotal]%></td><td><%=z[:vals][:sumCoolingTotal]%></td></tr>
318
+ </table>
319
+
320
+ <table class="table table-striped table-bordered table-condensed">
321
+ <tr>
322
+ <td colspan="2">Int Lighting and Equip - Metered Usage (Run Period)</td><td colspan="2">Int Lighting, Equip , Htg and Clg Loads - Peak </td><td>Time of Peak</td>
323
+ </tr>
324
+ <tr><td>Int Lighting (kWh)</td><td><%=z[:vals][:vc]%></td><td>Int Lighting (kW)</td><td><%=z[:vals][:vv]%></td><td><%=z[:vals][:vw]%></td></tr>
325
+ <tr><td>Int Equip - Elec (kWh)</td><td><%=z[:vals][:vs]%></td><td>Int Equip - Elec (kW)</td><td><%=z[:vals][:vy]%></td><td><%=z[:vals][:vz]%></td></tr>
326
+ <tr><td>Int Equip - Steam (kBtu)</td><td><%=z[:vals][:vaa]%></td><td>Int Equip - Steam (kBtu/Hr)</td><td><%=z[:vals][:vab]%></td><td><%=z[:vals][:vac]%></td></tr>
327
+ <tr><td>Int Equip - Gas (Therms)</td><td><%=z[:vals][:vr]%></td><td>Int Equip - Gas (KBtu/Hr)</td><td><%=z[:vals][:vt]%></td><td><%=z[:vals][:vu]%></td></tr>
328
+ </table>
329
+
330
+ <h4>Peak Load Contributions</h4>
331
+
332
+ <div id="graphs_<%= counter %>" class="zoneChart zoneGrid" style="background-color: white"></div>
333
+
334
+ <% counter = counter + 1 %>
335
+ <% end %>
336
+
337
+ </div>
338
+
339
+ </div>
340
+
341
+ </body>
342
+ </html>
@@ -0,0 +1,36 @@
1
+ # *******************************************************************************
2
+ # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
3
+ # All rights reserved.
4
+ # Redistribution and use in source and binary forms, with or without
5
+ # modification, are permitted provided that the following conditions are met:
6
+ #
7
+ # (1) Redistributions of source code must retain the above copyright notice,
8
+ # this list of conditions and the following disclaimer.
9
+ #
10
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
11
+ # this list of conditions and the following disclaimer in the documentation
12
+ # and/or other materials provided with the distribution.
13
+ #
14
+ # (3) Neither the name of the copyright holder nor the names of any contributors
15
+ # may be used to endorse or promote products derived from this software without
16
+ # specific prior written permission from the respective party.
17
+ #
18
+ # (4) Other than as required in clauses (1) and (2), distributions in any form
19
+ # of modifications or other derivative works may not use the "OpenStudio"
20
+ # trademark, "OS", "os", or any other confusingly similar designation without
21
+ # specific prior written permission from Alliance for Sustainable Energy, LLC.
22
+ #
23
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
24
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
25
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
27
+ # UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
28
+ # THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
30
+ # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ # *******************************************************************************
35
+
36
+ require_relative 'openstudio/calibration_measures'
@@ -0,0 +1,37 @@
1
+ # *******************************************************************************
2
+ # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
3
+ # All rights reserved.
4
+ # Redistribution and use in source and binary forms, with or without
5
+ # modification, are permitted provided that the following conditions are met:
6
+ #
7
+ # (1) Redistributions of source code must retain the above copyright notice,
8
+ # this list of conditions and the following disclaimer.
9
+ #
10
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
11
+ # this list of conditions and the following disclaimer in the documentation
12
+ # and/or other materials provided with the distribution.
13
+ #
14
+ # (3) Neither the name of the copyright holder nor the names of any contributors
15
+ # may be used to endorse or promote products derived from this software without
16
+ # specific prior written permission from the respective party.
17
+ #
18
+ # (4) Other than as required in clauses (1) and (2), distributions in any form
19
+ # of modifications or other derivative works may not use the "OpenStudio"
20
+ # trademark, "OS", "os", or any other confusingly similar designation without
21
+ # specific prior written permission from Alliance for Sustainable Energy, LLC.
22
+ #
23
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
24
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
25
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
27
+ # UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
28
+ # THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
30
+ # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ # *******************************************************************************
35
+
36
+ require 'openstudio/calibration_measures/version'
37
+ require 'openstudio/calibration_measures/extension'