openstudio-calibration 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +29 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile +20 -0
- data/Jenkinsfile +6 -0
- data/LICENSE.md +27 -0
- data/README.md +33 -0
- data/Rakefile +50 -0
- data/doc_templates/LICENSE.md +27 -0
- data/doc_templates/README.md.erb +42 -0
- data/doc_templates/copyright_erb.txt +36 -0
- data/doc_templates/copyright_js.txt +4 -0
- data/doc_templates/copyright_ruby.txt +34 -0
- data/lib/files/.gitkeep +0 -0
- data/lib/measures/AddMonthlyJSONUtilityData/LICENSE.md +27 -0
- data/lib/measures/AddMonthlyJSONUtilityData/README.md +96 -0
- data/lib/measures/AddMonthlyJSONUtilityData/README.md.erb +42 -0
- data/lib/measures/AddMonthlyJSONUtilityData/measure.rb +280 -0
- data/lib/measures/AddMonthlyJSONUtilityData/measure.xml +163 -0
- data/lib/measures/AddMonthlyUtilityData/LICENSE.md +27 -0
- data/lib/measures/AddMonthlyUtilityData/README.md +64 -0
- data/lib/measures/AddMonthlyUtilityData/README.md.erb +42 -0
- data/lib/measures/AddMonthlyUtilityData/measure.rb +312 -0
- data/lib/measures/AddMonthlyUtilityData/measure.xml +115 -0
- data/lib/measures/AddMonthlyUtilityData/tests/AddMonthlyUtilityData_Test.rb +88 -0
- data/lib/measures/AddMonthlyUtilityData/tests/electric_billed_usages.json +198 -0
- data/lib/measures/AddMonthlyUtilityData/tests/gas_billed_usages.json +198 -0
- data/lib/measures/CalibrationReports/LICENSE.md +27 -0
- data/lib/measures/CalibrationReports/README.md +26 -0
- data/lib/measures/CalibrationReports/README.md.erb +42 -0
- data/lib/measures/CalibrationReports/measure.rb +511 -0
- data/lib/measures/CalibrationReports/measure.xml +98 -0
- data/lib/measures/CalibrationReports/resources/report.html.in +379 -0
- data/lib/measures/CalibrationReports/tests/CalibrationReports_Test.rb +523 -0
- data/lib/measures/CalibrationReports/tests/ExampleModel.osm +10497 -0
- data/lib/measures/CalibrationReports/tests/ExampleModelNoDemandInput.osm +10560 -0
- data/lib/measures/CalibrationReports/tests/ExampleModelNoGasInput.osm +10456 -0
- data/lib/measures/CalibrationReports/tests/USA_CO_Golden-NREL.724666_TMY3.epw +8768 -0
- data/lib/measures/CalibrationReportsEnhanced/LICENSE.md +27 -0
- data/lib/measures/CalibrationReportsEnhanced/README.md +143 -0
- data/lib/measures/CalibrationReportsEnhanced/README.md.erb +42 -0
- data/lib/measures/CalibrationReportsEnhanced/measure.rb +798 -0
- data/lib/measures/CalibrationReportsEnhanced/measure.xml +372 -0
- data/lib/measures/CalibrationReportsEnhanced/resources/report.html.in +380 -0
- data/lib/measures/CalibrationReportsEnhanced/tests/CalibrationReportsEnhanced_Test.rb +734 -0
- data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel.osm +10497 -0
- data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel_FuelOil.osm +12740 -0
- data/lib/measures/CalibrationReportsEnhanced/tests/USA_CO_Golden-NREL.724666_TMY3.epw +8768 -0
- data/lib/measures/CalibrationReportsEnhanced21/LICENSE.md +27 -0
- data/lib/measures/CalibrationReportsEnhanced21/README.md +109 -0
- data/lib/measures/CalibrationReportsEnhanced21/README.md.erb +42 -0
- data/lib/measures/CalibrationReportsEnhanced21/measure.rb +690 -0
- data/lib/measures/CalibrationReportsEnhanced21/measure.xml +269 -0
- data/lib/measures/CalibrationReportsEnhanced21/resources/report.html.in +380 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/README.md +48 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.rb +237 -0
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.xml +93 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/README.md +48 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.rb +228 -0
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.xml +93 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/README.md +64 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.rb +280 -0
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.xml +111 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/README.md +64 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.rb +270 -0
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.xml +111 -0
- data/lib/measures/CoilCoolingWaterMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingWaterMultiplier/README.md +80 -0
- data/lib/measures/CoilCoolingWaterMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilCoolingWaterMultiplier/measure.rb +324 -0
- data/lib/measures/CoilCoolingWaterMultiplier/measure.xml +129 -0
- data/lib/measures/CoilCoolingWaterPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilCoolingWaterPercentChange/README.md +80 -0
- data/lib/measures/CoilCoolingWaterPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilCoolingWaterPercentChange/measure.rb +311 -0
- data/lib/measures/CoilCoolingWaterPercentChange/measure.xml +129 -0
- data/lib/measures/CoilHeatingElectricMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingElectricMultiplier/README.md +48 -0
- data/lib/measures/CoilHeatingElectricMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilHeatingElectricMultiplier/measure.rb +240 -0
- data/lib/measures/CoilHeatingElectricMultiplier/measure.xml +93 -0
- data/lib/measures/CoilHeatingElectricPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingElectricPercentChange/README.md +48 -0
- data/lib/measures/CoilHeatingElectricPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilHeatingElectricPercentChange/measure.rb +231 -0
- data/lib/measures/CoilHeatingElectricPercentChange/measure.xml +93 -0
- data/lib/measures/CoilHeatingGasMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingGasMultiplier/README.md +64 -0
- data/lib/measures/CoilHeatingGasMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilHeatingGasMultiplier/measure.rb +282 -0
- data/lib/measures/CoilHeatingGasMultiplier/measure.xml +111 -0
- data/lib/measures/CoilHeatingGasPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingGasPercentChange/README.md +64 -0
- data/lib/measures/CoilHeatingGasPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilHeatingGasPercentChange/measure.rb +271 -0
- data/lib/measures/CoilHeatingGasPercentChange/measure.xml +111 -0
- data/lib/measures/CoilHeatingWaterMultiplier/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingWaterMultiplier/README.md +48 -0
- data/lib/measures/CoilHeatingWaterMultiplier/README.md.erb +42 -0
- data/lib/measures/CoilHeatingWaterMultiplier/measure.rb +235 -0
- data/lib/measures/CoilHeatingWaterMultiplier/measure.xml +93 -0
- data/lib/measures/CoilHeatingWaterPercentChange/LICENSE.md +27 -0
- data/lib/measures/CoilHeatingWaterPercentChange/README.md +48 -0
- data/lib/measures/CoilHeatingWaterPercentChange/README.md.erb +42 -0
- data/lib/measures/CoilHeatingWaterPercentChange/measure.rb +226 -0
- data/lib/measures/CoilHeatingWaterPercentChange/measure.xml +93 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/LICENSE.md +27 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/README.md +88 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/README.md.erb +42 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.rb +221 -0
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.xml +194 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/LICENSE.md +27 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/README.md +40 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/README.md.erb +42 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb +102 -0
- data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.xml +78 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/LICENSE.md +27 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/README.md +48 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/README.md.erb +42 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.rb +263 -0
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.xml +97 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/LICENSE.md +27 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/README.md +48 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/README.md.erb +42 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.rb +253 -0
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.xml +97 -0
- data/lib/measures/FansMultiplier/LICENSE.md +27 -0
- data/lib/measures/FansMultiplier/README.md +64 -0
- data/lib/measures/FansMultiplier/README.md.erb +42 -0
- data/lib/measures/FansMultiplier/measure.rb +297 -0
- data/lib/measures/FansMultiplier/measure.xml +166 -0
- data/lib/measures/FansPercentChange/LICENSE.md +27 -0
- data/lib/measures/FansPercentChange/README.md +64 -0
- data/lib/measures/FansPercentChange/README.md.erb +42 -0
- data/lib/measures/FansPercentChange/measure.rb +286 -0
- data/lib/measures/FansPercentChange/measure.xml +166 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/LICENSE.md +27 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/README.md +112 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/README.md.erb +42 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.rb +639 -0
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.xml +229 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/LICENSE.md +27 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/README.md +112 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/README.md.erb +42 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.rb +756 -0
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.xml +229 -0
- data/lib/measures/HardSizeHvac/LICENSE.md +27 -0
- data/lib/measures/HardSizeHvac/README.md +26 -0
- data/lib/measures/HardSizeHvac/README.md.erb +42 -0
- data/lib/measures/HardSizeHvac/measure.rb +88 -0
- data/lib/measures/HardSizeHvac/measure.xml +81 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/LICENSE.md +27 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md +104 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md.erb +42 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.rb +304 -0
- data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.xml +216 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/LICENSE.md +27 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/README.md +40 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/README.md.erb +42 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.rb +196 -0
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.xml +132 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/LICENSE.md +27 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/README.md +40 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/README.md.erb +42 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.rb +189 -0
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.xml +132 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/LICENSE.md +27 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/README.md +48 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/README.md.erb +42 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.rb +263 -0
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.xml +97 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/LICENSE.md +27 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/README.md +48 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/README.md.erb +42 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.rb +253 -0
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.xml +97 -0
- data/lib/measures/TimeseriesObjectiveFunction/LICENSE.md +27 -0
- data/lib/measures/TimeseriesObjectiveFunction/README.md +207 -0
- data/lib/measures/TimeseriesObjectiveFunction/README.md.erb +42 -0
- data/lib/measures/TimeseriesObjectiveFunction/measure.rb +748 -0
- data/lib/measures/TimeseriesObjectiveFunction/measure.xml +435 -0
- data/lib/measures/TimeseriesObjectiveFunction/resources/report.html.erb +288 -0
- data/lib/measures/TimeseriesPlot/LICENSE.md +27 -0
- data/lib/measures/TimeseriesPlot/README.md +56 -0
- data/lib/measures/TimeseriesPlot/README.md.erb +42 -0
- data/lib/measures/TimeseriesPlot/measure.rb +302 -0
- data/lib/measures/TimeseriesPlot/measure.xml +137 -0
- data/lib/measures/TimeseriesPlot/resources/report.html.erb +270 -0
- data/lib/measures/WaterHeaterMixedMultiplier/LICENSE.md +27 -0
- data/lib/measures/WaterHeaterMixedMultiplier/README.md +64 -0
- data/lib/measures/WaterHeaterMixedMultiplier/README.md.erb +42 -0
- data/lib/measures/WaterHeaterMixedMultiplier/measure.rb +255 -0
- data/lib/measures/WaterHeaterMixedMultiplier/measure.xml +180 -0
- data/lib/measures/WaterHeaterMixedPercentChange/LICENSE.md +27 -0
- data/lib/measures/WaterHeaterMixedPercentChange/README.md +64 -0
- data/lib/measures/WaterHeaterMixedPercentChange/README.md.erb +42 -0
- data/lib/measures/WaterHeaterMixedPercentChange/measure.rb +245 -0
- data/lib/measures/WaterHeaterMixedPercentChange/measure.xml +180 -0
- data/lib/measures/zone_report/LICENSE.md +27 -0
- data/lib/measures/zone_report/README.md +26 -0
- data/lib/measures/zone_report/README.md.erb +42 -0
- data/lib/measures/zone_report/measure.rb +706 -0
- data/lib/measures/zone_report/measure.xml +67 -0
- data/lib/measures/zone_report/resources/report.html.in +342 -0
- data/lib/openstudio-calibration-measures.rb +36 -0
- data/lib/openstudio/calibration_measures.rb +37 -0
- data/lib/openstudio/calibration_measures/extension.rb +49 -0
- data/lib/openstudio/calibration_measures/version.rb +40 -0
- data/openstudio-calibration.gemspec +30 -0
- metadata +331 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<measure>
|
3
|
+
<schema_version>3.0</schema_version>
|
4
|
+
<name>calibration_reports</name>
|
5
|
+
<uid>2baede0a-65f3-47ec-b5f6-9c21d0f91aff</uid>
|
6
|
+
<version_id>4ddc39ac-978c-4808-a018-cc0bc716a56c</version_id>
|
7
|
+
<version_modified>20200316T215432Z</version_modified>
|
8
|
+
<xml_checksum>2C8A3EEF</xml_checksum>
|
9
|
+
<class_name>CalibrationReports</class_name>
|
10
|
+
<display_name>Calibration Reports</display_name>
|
11
|
+
<description>Reports modeled energy consumpiton and peak demand by fuel per utility billing period.</description>
|
12
|
+
<modeler_description>This report is intended for use with models where utility data for one or more fuels as been included.</modeler_description>
|
13
|
+
<arguments />
|
14
|
+
<outputs />
|
15
|
+
<provenances />
|
16
|
+
<tags>
|
17
|
+
<tag>Reporting.QAQC</tag>
|
18
|
+
</tags>
|
19
|
+
<attributes>
|
20
|
+
<attribute>
|
21
|
+
<name>Measure Type</name>
|
22
|
+
<value>ReportingMeasure</value>
|
23
|
+
<datatype>string</datatype>
|
24
|
+
</attribute>
|
25
|
+
<attribute>
|
26
|
+
<name>Uses SketchUp API</name>
|
27
|
+
<value>false</value>
|
28
|
+
<datatype>boolean</datatype>
|
29
|
+
</attribute>
|
30
|
+
</attributes>
|
31
|
+
<files>
|
32
|
+
<file>
|
33
|
+
<filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
|
34
|
+
<filetype>epw</filetype>
|
35
|
+
<usage_type>test</usage_type>
|
36
|
+
<checksum>BDF687C1</checksum>
|
37
|
+
</file>
|
38
|
+
<file>
|
39
|
+
<filename>ExampleModel.osm</filename>
|
40
|
+
<filetype>osm</filetype>
|
41
|
+
<usage_type>test</usage_type>
|
42
|
+
<checksum>5A314A0A</checksum>
|
43
|
+
</file>
|
44
|
+
<file>
|
45
|
+
<filename>report.html.in</filename>
|
46
|
+
<filetype>in</filetype>
|
47
|
+
<usage_type>resource</usage_type>
|
48
|
+
<checksum>4444C3A6</checksum>
|
49
|
+
</file>
|
50
|
+
<file>
|
51
|
+
<filename>README.md.erb</filename>
|
52
|
+
<filetype>erb</filetype>
|
53
|
+
<usage_type>readmeerb</usage_type>
|
54
|
+
<checksum>703C9964</checksum>
|
55
|
+
</file>
|
56
|
+
<file>
|
57
|
+
<filename>README.md</filename>
|
58
|
+
<filetype>md</filetype>
|
59
|
+
<usage_type>readme</usage_type>
|
60
|
+
<checksum>32E77F5D</checksum>
|
61
|
+
</file>
|
62
|
+
<file>
|
63
|
+
<filename>ExampleModelNoGasInput.osm</filename>
|
64
|
+
<filetype>osm</filetype>
|
65
|
+
<usage_type>test</usage_type>
|
66
|
+
<checksum>142393A2</checksum>
|
67
|
+
</file>
|
68
|
+
<file>
|
69
|
+
<filename>ExampleModelNoDemandInput.osm</filename>
|
70
|
+
<filetype>osm</filetype>
|
71
|
+
<usage_type>test</usage_type>
|
72
|
+
<checksum>9A565F93</checksum>
|
73
|
+
</file>
|
74
|
+
<file>
|
75
|
+
<filename>LICENSE.md</filename>
|
76
|
+
<filetype>md</filetype>
|
77
|
+
<usage_type>license</usage_type>
|
78
|
+
<checksum>E0468DD6</checksum>
|
79
|
+
</file>
|
80
|
+
<file>
|
81
|
+
<version>
|
82
|
+
<software_program>OpenStudio</software_program>
|
83
|
+
<identifier>2.0.0</identifier>
|
84
|
+
<min_compatible>2.0.0</min_compatible>
|
85
|
+
</version>
|
86
|
+
<filename>measure.rb</filename>
|
87
|
+
<filetype>rb</filetype>
|
88
|
+
<usage_type>script</usage_type>
|
89
|
+
<checksum>78D676CD</checksum>
|
90
|
+
</file>
|
91
|
+
<file>
|
92
|
+
<filename>CalibrationReports_Test.rb</filename>
|
93
|
+
<filetype>rb</filetype>
|
94
|
+
<usage_type>test</usage_type>
|
95
|
+
<checksum>4C23E80C</checksum>
|
96
|
+
</file>
|
97
|
+
</files>
|
98
|
+
</measure>
|
@@ -0,0 +1,379 @@
|
|
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 != "—") {
|
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> </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 ? "—" : numFormat(obj[key][i]);
|
172
|
+
|
173
|
+
if (num != "—") {
|
174
|
+
if (key == "NMBE") {
|
175
|
+
if (Math.abs(num) > maxNMBE) {
|
176
|
+
num = "<font color=\"red\">" + num;
|
177
|
+
}
|
178
|
+
num = num + "%";
|
179
|
+
}
|
180
|
+
}
|
181
|
+
$row.append("<td>" + num + "</td>");
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
$table.appendTo('#' + id);
|
187
|
+
}
|
188
|
+
|
189
|
+
var margin = {
|
190
|
+
top: 20.5,
|
191
|
+
right: 20,
|
192
|
+
bottom: 30,
|
193
|
+
left: 40.5
|
194
|
+
},
|
195
|
+
width = 560 - margin.left - margin.right,
|
196
|
+
height = 300 - margin.top - margin.bottom;
|
197
|
+
|
198
|
+
var x0 = d3.scale.ordinal()
|
199
|
+
.rangeRoundBands([0, width], 0.1);
|
200
|
+
|
201
|
+
var x1 = d3.scale.ordinal();
|
202
|
+
|
203
|
+
var y = d3.scale.linear()
|
204
|
+
.range([height, 0]);
|
205
|
+
|
206
|
+
var color = d3.scale.ordinal()
|
207
|
+
.range(["#8CC739", "#29AAE7"]);
|
208
|
+
|
209
|
+
var xAxis = d3.svg.axis()
|
210
|
+
.scale(x0)
|
211
|
+
.orient("bottom");
|
212
|
+
|
213
|
+
var yAxis = d3.svg.axis()
|
214
|
+
.scale(y)
|
215
|
+
.orient("left")
|
216
|
+
.tickFormat(d3.format(".2s"));
|
217
|
+
|
218
|
+
var tip = d3.tip()
|
219
|
+
.attr('class', 'd3-tip')
|
220
|
+
.offset([-10, 0])
|
221
|
+
.html(function (d) {
|
222
|
+
return "<strong>" + d3.event.target.__data__.name + ":</strong> <span style='color:red'>" + d3.event.target.__data__.value + "</span>";
|
223
|
+
});
|
224
|
+
|
225
|
+
var charts = ["Electricity Consumption", "Electricity Demand", "Natural Gas Consumption"];
|
226
|
+
|
227
|
+
for (var c in charts) {
|
228
|
+
|
229
|
+
if(consumption[charts[c]]){
|
230
|
+
|
231
|
+
if (c == 0) {
|
232
|
+
margin.right = 125;
|
233
|
+
}
|
234
|
+
|
235
|
+
cvrmseString = "<h6>CV(RMSE) = </h6>"
|
236
|
+
num = consumption[charts[c]].cvrsme;
|
237
|
+
if (Math.abs(num) > maxCVRMSE) {
|
238
|
+
num = "<font color=\"red\">" + num + "<font color=\"black\">";
|
239
|
+
}
|
240
|
+
cvrmseString = cvrmseString + num;
|
241
|
+
|
242
|
+
nmbeString = "<h6>NMBE = </h6>"
|
243
|
+
num = consumption[charts[c]].nmbe;
|
244
|
+
if (Math.abs(num) > maxNMBE) {
|
245
|
+
num = "<font color=\"red\">" + num;
|
246
|
+
}
|
247
|
+
nmbeString = nmbeString + num;
|
248
|
+
|
249
|
+
string = "<h4 style=\"margin-bottom:-10px;\">" + charts[c] + " (" + consumption[charts[c]].units + ")</h4>";
|
250
|
+
if(charts[c] != "Electricity Demand"){
|
251
|
+
string = string + "<br>" + cvrmseString + "<br>" + nmbeString;
|
252
|
+
}
|
253
|
+
$('#consumptionString-' + c).html(string);
|
254
|
+
|
255
|
+
var svg = d3.select("#chart-" + c).append("svg")
|
256
|
+
.attr("width", width + margin.left + margin.right)
|
257
|
+
.attr("height", height + margin.top + margin.bottom)
|
258
|
+
.append("g")
|
259
|
+
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
|
260
|
+
svg.call(tip);
|
261
|
+
|
262
|
+
data = [];
|
263
|
+
for (var enduse in consumption[charts[c]].data) {
|
264
|
+
if (enduse == "Actual" | enduse == "Model") {
|
265
|
+
var enduse_data = consumption[charts[c]].data[enduse];
|
266
|
+
for (var i = 1; i <= enduse_data.length; i++) {
|
267
|
+
if (data.length < enduse_data.length) {
|
268
|
+
var temp = {
|
269
|
+
"Month": i
|
270
|
+
};
|
271
|
+
temp[enduse] = enduse_data[i - 1];
|
272
|
+
data.push(temp);
|
273
|
+
} else {
|
274
|
+
data[i - 1][enduse] = enduse_data[i - 1];
|
275
|
+
}
|
276
|
+
}
|
277
|
+
}
|
278
|
+
}
|
279
|
+
var comparison = d3.keys(data[0]).filter(function (key) {
|
280
|
+
return key !== "Month";
|
281
|
+
});
|
282
|
+
|
283
|
+
data.forEach(function (d) {
|
284
|
+
d.consumption = comparison.map(function (name) {
|
285
|
+
return {
|
286
|
+
name: name,
|
287
|
+
value: +d[name]
|
288
|
+
};
|
289
|
+
});
|
290
|
+
});
|
291
|
+
|
292
|
+
x0.domain(data.map(function (d) {
|
293
|
+
return d.Month;
|
294
|
+
}));
|
295
|
+
x1.domain(comparison).rangeRoundBands([0, x0.rangeBand()]);
|
296
|
+
y.domain([0, d3.max(data, function (d) {
|
297
|
+
return d3.max(d.consumption, function (d) {
|
298
|
+
return d.value;
|
299
|
+
});
|
300
|
+
})]);
|
301
|
+
|
302
|
+
//data.sort(function(a, b) { return b.total - a.total; });
|
303
|
+
|
304
|
+
svg.append("g")
|
305
|
+
.attr("class", "x axis")
|
306
|
+
.attr("transform", "translate(0," + height + ")")
|
307
|
+
.call(xAxis);
|
308
|
+
|
309
|
+
svg.append("g")
|
310
|
+
.attr("class", "y axis")
|
311
|
+
.call(yAxis)
|
312
|
+
.append("text")
|
313
|
+
.attr("transform", "rotate(-90)")
|
314
|
+
.attr("y", -36)
|
315
|
+
.attr("dy", ".71em")
|
316
|
+
.style("text-anchor", "end")
|
317
|
+
.text(consumption[charts[c]].units);
|
318
|
+
|
319
|
+
var month = svg.selectAll(".month")
|
320
|
+
.data(data)
|
321
|
+
.enter().append("g")
|
322
|
+
.attr("class", "g")
|
323
|
+
.on('mouseover', tip.show)
|
324
|
+
.on('mouseout', tip.hide)
|
325
|
+
.attr("transform", function (d) {
|
326
|
+
return "translate(" + x0(d.Month) + ",0)";
|
327
|
+
});
|
328
|
+
|
329
|
+
month.selectAll("rect")
|
330
|
+
.data(function (d) {
|
331
|
+
return d.consumption;
|
332
|
+
})
|
333
|
+
.enter().append("rect")
|
334
|
+
.attr("width", x1.rangeBand())
|
335
|
+
.attr("x", function (d) {
|
336
|
+
return x1(d.name);
|
337
|
+
})
|
338
|
+
.attr("y", function (d) {
|
339
|
+
return y(d.value);
|
340
|
+
})
|
341
|
+
.attr("height", function (d) {
|
342
|
+
return height - y(d.value);
|
343
|
+
})
|
344
|
+
.style("fill", function (d) {
|
345
|
+
return color(d.name);
|
346
|
+
});
|
347
|
+
|
348
|
+
var legend = svg.selectAll(".legend")
|
349
|
+
.data(comparison.slice().reverse())
|
350
|
+
.enter().append("g")
|
351
|
+
.attr("class", "legend")
|
352
|
+
.attr("transform", function (d, i) {
|
353
|
+
return "translate(0," + i * 20 + ")";
|
354
|
+
});
|
355
|
+
|
356
|
+
legend.append("rect")
|
357
|
+
.attr("x", width + 105)
|
358
|
+
.attr("width", 18)
|
359
|
+
.attr("height", 18)
|
360
|
+
.style("fill", color);
|
361
|
+
|
362
|
+
legend.append("text")
|
363
|
+
.attr("x", width + 105 - 3)
|
364
|
+
.attr("y", 9)
|
365
|
+
.attr("dy", ".35em")
|
366
|
+
.style("text-anchor", "end")
|
367
|
+
.text(function (d) {
|
368
|
+
return d;
|
369
|
+
});
|
370
|
+
|
371
|
+
svg.selectAll(".g").attr("stroke", "black");
|
372
|
+
|
373
|
+
outputTable(charts[c], consumption[charts[c]].units, consumption[charts[c]].data, "table-" + c);
|
374
|
+
}
|
375
|
+
|
376
|
+
}
|
377
|
+
</script>
|
378
|
+
</body>
|
379
|
+
</html>
|