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,27 @@
|
|
1
|
+
OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted
|
4
|
+
provided that the following conditions are met:
|
5
|
+
|
6
|
+
(1) Redistributions of source code must retain the above copyright notice, this list of conditions
|
7
|
+
and the following disclaimer.
|
8
|
+
|
9
|
+
(2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
10
|
+
and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
11
|
+
|
12
|
+
(3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse
|
13
|
+
or promote products derived from this software without specific prior written permission from the
|
14
|
+
respective party.
|
15
|
+
|
16
|
+
(4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other
|
17
|
+
derivative works may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar
|
18
|
+
designation without specific prior written permission from Alliance for Sustainable Energy, LLC.
|
19
|
+
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
21
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
22
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES GOVERNMENT,
|
23
|
+
OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
25
|
+
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
26
|
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,56 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
###### (Automatically generated documentation)
|
4
|
+
|
5
|
+
# Timeseries Plot
|
6
|
+
|
7
|
+
## Description
|
8
|
+
Creates an interactive timeseries plot of selected variable.
|
9
|
+
|
10
|
+
## Modeler Description
|
11
|
+
NOTE: This will load and respond slowly in the OS app, especially if you select * on a variable with many possible keys or you select timestep data. Suggest you open it in a web browser like Chrome instead.
|
12
|
+
|
13
|
+
## Measure Type
|
14
|
+
ReportingMeasure
|
15
|
+
|
16
|
+
## Taxonomy
|
17
|
+
|
18
|
+
|
19
|
+
## Arguments
|
20
|
+
|
21
|
+
|
22
|
+
### Enter Variable Name.
|
23
|
+
Valid values can be found in the eplusout.rdd file after a simulation is run.
|
24
|
+
**Name:** variable_name,
|
25
|
+
**Type:** String,
|
26
|
+
**Units:** ,
|
27
|
+
**Required:** true,
|
28
|
+
**Model Dependent:** false
|
29
|
+
|
30
|
+
### Reporting Frequency.
|
31
|
+
|
32
|
+
**Name:** reporting_frequency,
|
33
|
+
**Type:** Choice,
|
34
|
+
**Units:** ,
|
35
|
+
**Required:** true,
|
36
|
+
**Model Dependent:** false
|
37
|
+
|
38
|
+
### Enter Key Name.
|
39
|
+
Enter * for all objects or the full name of a specific object to.
|
40
|
+
**Name:** key_value,
|
41
|
+
**Type:** String,
|
42
|
+
**Units:** ,
|
43
|
+
**Required:** true,
|
44
|
+
**Model Dependent:** false
|
45
|
+
|
46
|
+
### availableEnvPeriods
|
47
|
+
availableEnvPeriods
|
48
|
+
**Name:** env,
|
49
|
+
**Type:** String,
|
50
|
+
**Units:** ,
|
51
|
+
**Required:** true,
|
52
|
+
**Model Dependent:** false
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<%#= README.md.erb is used to auto-generate README.md. %>
|
2
|
+
<%#= To manually maintain README.md throw away README.md.erb and manually edit README.md %>
|
3
|
+
###### (Automatically generated documentation)
|
4
|
+
|
5
|
+
# <%= name %>
|
6
|
+
|
7
|
+
## Description
|
8
|
+
<%= description %>
|
9
|
+
|
10
|
+
## Modeler Description
|
11
|
+
<%= modelerDescription %>
|
12
|
+
|
13
|
+
## Measure Type
|
14
|
+
<%= measureType %>
|
15
|
+
|
16
|
+
## Taxonomy
|
17
|
+
<%= taxonomy %>
|
18
|
+
|
19
|
+
## Arguments
|
20
|
+
|
21
|
+
<% arguments.each do |argument| %>
|
22
|
+
### <%= argument[:display_name] %>
|
23
|
+
<%= argument[:description] %>
|
24
|
+
**Name:** <%= argument[:name] %>,
|
25
|
+
**Type:** <%= argument[:type] %>,
|
26
|
+
**Units:** <%= argument[:units] %>,
|
27
|
+
**Required:** <%= argument[:required] %>,
|
28
|
+
**Model Dependent:** <%= argument[:model_dependent] %>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<% if arguments.size == 0 %>
|
32
|
+
<%= "This measure does not have any user arguments" %>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% if outputs.size > 0 %>
|
36
|
+
## Outputs
|
37
|
+
<% output_names = [] %>
|
38
|
+
<% outputs.each do |output| %>
|
39
|
+
<% output_names << output[:display_name] %>
|
40
|
+
<% end %>
|
41
|
+
<%= output_names.join(", ") %>
|
42
|
+
<% end %>
|
@@ -0,0 +1,302 @@
|
|
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
|
+
# see the URL below for information on how to write OpenStudio measures
|
37
|
+
# http://openstudio.nrel.gov/openstudio-measure-writing-guide
|
38
|
+
|
39
|
+
require 'erb'
|
40
|
+
|
41
|
+
# start the measure
|
42
|
+
class TimeseriesPlot < OpenStudio::Measure::ReportingMeasure
|
43
|
+
# human readable name
|
44
|
+
def name
|
45
|
+
'Timeseries Plot'
|
46
|
+
end
|
47
|
+
|
48
|
+
# human readable description
|
49
|
+
def description
|
50
|
+
'Creates an interactive timeseries plot of selected variable.'
|
51
|
+
end
|
52
|
+
|
53
|
+
# human readable description of modeling approach
|
54
|
+
def modeler_description
|
55
|
+
'NOTE: This will load and respond slowly in the OS app, especially if you select * on a variable with many possible keys or you select timestep data. Suggest you open it in a web browser like Chrome instead.'
|
56
|
+
end
|
57
|
+
|
58
|
+
# define the arguments that the user will input
|
59
|
+
def arguments
|
60
|
+
args = OpenStudio::Measure::OSArgumentVector.new
|
61
|
+
|
62
|
+
# make an argument for the variable name
|
63
|
+
variable_name = OpenStudio::Measure::OSArgument.makeStringArgument('variable_name', true)
|
64
|
+
variable_name.setDisplayName('Enter Variable Name.')
|
65
|
+
variable_name.setDescription('Valid values can be found in the eplusout.rdd file after a simulation is run.')
|
66
|
+
args << variable_name
|
67
|
+
|
68
|
+
# make an argument for the electric tariff
|
69
|
+
reporting_frequency_chs = OpenStudio::StringVector.new
|
70
|
+
reporting_frequency_chs << 'Detailed'
|
71
|
+
reporting_frequency_chs << 'Timestep'
|
72
|
+
reporting_frequency_chs << 'Zone Timestep'
|
73
|
+
reporting_frequency_chs << 'Hourly'
|
74
|
+
reporting_frequency_chs << 'Daily'
|
75
|
+
reporting_frequency_chs << 'Monthly'
|
76
|
+
reporting_frequency_chs << 'Runperiod'
|
77
|
+
reporting_frequency = OpenStudio::Measure::OSArgument.makeChoiceArgument('reporting_frequency', reporting_frequency_chs, true)
|
78
|
+
reporting_frequency.setDisplayName('Reporting Frequency.')
|
79
|
+
reporting_frequency.setDefaultValue('Hourly')
|
80
|
+
args << reporting_frequency
|
81
|
+
|
82
|
+
# make an argument for the key_value
|
83
|
+
key_value = OpenStudio::Measure::OSArgument.makeStringArgument('key_value', true)
|
84
|
+
key_value.setDisplayName('Enter Key Name.')
|
85
|
+
key_value.setDescription('Enter * for all objects or the full name of a specific object to.')
|
86
|
+
key_value.setDefaultValue('*')
|
87
|
+
args << key_value
|
88
|
+
|
89
|
+
env = OpenStudio::Measure::OSArgument.makeStringArgument('env', true)
|
90
|
+
env.setDisplayName('availableEnvPeriods')
|
91
|
+
env.setDescription('availableEnvPeriods')
|
92
|
+
env.setDefaultValue('RUN PERIOD 1')
|
93
|
+
args << env
|
94
|
+
|
95
|
+
args
|
96
|
+
end
|
97
|
+
|
98
|
+
# define what happens when the measure is run
|
99
|
+
def run(runner, user_arguments)
|
100
|
+
super(runner, user_arguments)
|
101
|
+
|
102
|
+
# use the built-in error checking
|
103
|
+
return false unless runner.validateUserArguments(arguments, user_arguments)
|
104
|
+
|
105
|
+
# Assign the user inputs to variables
|
106
|
+
variable_name = runner.getStringArgumentValue('variable_name', user_arguments)
|
107
|
+
reporting_frequency = runner.getStringArgumentValue('reporting_frequency', user_arguments)
|
108
|
+
key_value = runner.getStringArgumentValue('key_value', user_arguments)
|
109
|
+
env = runner.getStringArgumentValue('env', user_arguments)
|
110
|
+
|
111
|
+
# set ann_env_pd to be user defined arg
|
112
|
+
ann_env_pd = env
|
113
|
+
|
114
|
+
# get the last model and sql file
|
115
|
+
model = runner.lastOpenStudioModel
|
116
|
+
if model.empty?
|
117
|
+
runner.registerError('Cannot find last model.')
|
118
|
+
return false
|
119
|
+
end
|
120
|
+
model = model.get
|
121
|
+
|
122
|
+
sql = runner.lastEnergyPlusSqlFile
|
123
|
+
if sql.empty?
|
124
|
+
runner.registerError('Cannot find last sql file.')
|
125
|
+
return false
|
126
|
+
end
|
127
|
+
sql = sql.get
|
128
|
+
model.setSqlFile(sql)
|
129
|
+
|
130
|
+
find_avail = TRUE
|
131
|
+
if find_avail
|
132
|
+
ts = sql.availableTimeSeries
|
133
|
+
runner.registerInfo("available timeseries: #{ts}")
|
134
|
+
runner.registerInfo('')
|
135
|
+
envs = sql.availableEnvPeriods
|
136
|
+
envs.each do |env_s|
|
137
|
+
freqs = sql.availableReportingFrequencies(env_s)
|
138
|
+
runner.registerInfo("available EnvPeriod: #{env_s}, available ReportingFrequencies: #{freqs}")
|
139
|
+
freqs.each do |freq|
|
140
|
+
vn = sql.availableVariableNames(env_s, freq.to_s)
|
141
|
+
runner.registerInfo("available variable names: #{vn}")
|
142
|
+
vn.each do |v|
|
143
|
+
kv = sql.availableKeyValues(env_s, freq.to_s, v)
|
144
|
+
runner.registerInfo("variable names: #{v}")
|
145
|
+
runner.registerInfo("available key value: #{kv}")
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
# Get the weather file run period (as opposed to design day run period)
|
152
|
+
# ann_env_pd = nil
|
153
|
+
# sql.availableEnvPeriods.each do |env_pd|
|
154
|
+
# env_type = sql.environmentType(env_pd)
|
155
|
+
# if env_type.is_initialized
|
156
|
+
# if env_type.get == OpenStudio::EnvironmentType.new("WeatherRunPeriod")
|
157
|
+
# ann_env_pd = env_pd
|
158
|
+
# end
|
159
|
+
# end
|
160
|
+
# end
|
161
|
+
|
162
|
+
# if ann_env_pd == false
|
163
|
+
# runner.registerError("Can't find a weather runperiod, make sure you ran an annual simulation, not just the design days.")
|
164
|
+
# return false
|
165
|
+
# end
|
166
|
+
|
167
|
+
# Method to translate from OpenStudio's time formatting
|
168
|
+
# to Javascript time formatting
|
169
|
+
# OpenStudio time
|
170
|
+
# 2009-May-14 00:10:00 Raw string
|
171
|
+
# Javascript time
|
172
|
+
# 2009/07/12 12:34:56
|
173
|
+
def to_JSTime(os_time)
|
174
|
+
js_time = os_time.to_s
|
175
|
+
# Replace the '-' with '/'
|
176
|
+
js_time = js_time.tr('-', '/')
|
177
|
+
# Replace month abbreviations with numbers
|
178
|
+
js_time = js_time.gsub('Jan', '01')
|
179
|
+
js_time = js_time.gsub('Feb', '02')
|
180
|
+
js_time = js_time.gsub('Mar', '03')
|
181
|
+
js_time = js_time.gsub('Apr', '04')
|
182
|
+
js_time = js_time.gsub('May', '05')
|
183
|
+
js_time = js_time.gsub('Jun', '06')
|
184
|
+
js_time = js_time.gsub('Jul', '07')
|
185
|
+
js_time = js_time.gsub('Aug', '08')
|
186
|
+
js_time = js_time.gsub('Sep', '09')
|
187
|
+
js_time = js_time.gsub('Oct', '10')
|
188
|
+
js_time = js_time.gsub('Nov', '11')
|
189
|
+
js_time = js_time.gsub('Dec', '12')
|
190
|
+
|
191
|
+
js_time
|
192
|
+
end
|
193
|
+
|
194
|
+
# Create an array of arrays of variables
|
195
|
+
variables_to_graph = []
|
196
|
+
if key_value == '*'
|
197
|
+
# Get all the key values from the sql file
|
198
|
+
runner.registerInfo("Plotting #{sql.availableKeyValues(ann_env_pd, reporting_frequency, variable_name).size} variables")
|
199
|
+
sql.availableKeyValues(ann_env_pd, reporting_frequency, variable_name).each do |kv|
|
200
|
+
variables_to_graph << [variable_name, reporting_frequency, kv]
|
201
|
+
runner.registerInfo("Plotting #{kv}")
|
202
|
+
end
|
203
|
+
else
|
204
|
+
runner.registerInfo("Plotting #{variable_name}: #{reporting_frequency}: #{key_value}")
|
205
|
+
variables_to_graph << [variable_name, reporting_frequency, key_value]
|
206
|
+
runner.registerInfo("variables_to_graph: #{variables_to_graph}")
|
207
|
+
end
|
208
|
+
|
209
|
+
# Create a new series like this
|
210
|
+
# for each condition series we want to plot
|
211
|
+
# {"name" : "series 1",
|
212
|
+
# "color" : "purple",
|
213
|
+
# "data" :[{ "x": 20, "y": 0.015, "time": "2009/07/12 12:34:56"},
|
214
|
+
# { "x": 25, "y": 0.008, "time": "2009/07/12 12:34:56"},
|
215
|
+
# { "x": 30, "y": 0.005, "time": "2009/07/12 12:34:56"}]
|
216
|
+
# }
|
217
|
+
all_series = []
|
218
|
+
variables_to_graph.each_with_index do |var_to_graph, j|
|
219
|
+
var_name = var_to_graph[0]
|
220
|
+
freq = var_to_graph[1]
|
221
|
+
kv = var_to_graph[2]
|
222
|
+
|
223
|
+
runner.registerInfo("sqlcall: #{ann_env_pd},#{freq},#{var_name},#{kv}")
|
224
|
+
# Get the y axis values
|
225
|
+
y_timeseries = sql.timeSeries(ann_env_pd, freq, var_name, kv)
|
226
|
+
if y_timeseries.empty?
|
227
|
+
runner.registerWarning("No data found for '#{ann_env_pd}: #{freq}: #{var_name}: #{kv}'")
|
228
|
+
next
|
229
|
+
else
|
230
|
+
y_timeseries = y_timeseries.get
|
231
|
+
end
|
232
|
+
y_vals = y_timeseries.values
|
233
|
+
|
234
|
+
# Convert time stamp format to be more readable
|
235
|
+
js_date_times = []
|
236
|
+
y_timeseries.dateTimes.each do |date_time|
|
237
|
+
js_date_times << to_JSTime(date_time)
|
238
|
+
end
|
239
|
+
|
240
|
+
# Store the timeseries data to hash for later
|
241
|
+
# export to the HTML file
|
242
|
+
series = {}
|
243
|
+
series['name'] = kv.to_s
|
244
|
+
series['type'] = var_name.to_s
|
245
|
+
series['units'] = y_timeseries.units
|
246
|
+
data = []
|
247
|
+
for i in 0..(js_date_times.size - 1)
|
248
|
+
point = {}
|
249
|
+
point['y'] = y_vals[i].round(2)
|
250
|
+
point['time'] = js_date_times[i]
|
251
|
+
data << point
|
252
|
+
end
|
253
|
+
series['data'] = data
|
254
|
+
all_series << series
|
255
|
+
|
256
|
+
# increment color selection
|
257
|
+
j += 1
|
258
|
+
end
|
259
|
+
|
260
|
+
# Convert all_series to JSON.
|
261
|
+
# This JSON will be substituted
|
262
|
+
# into the HTML file.
|
263
|
+
require 'json'
|
264
|
+
all_series = all_series.to_json
|
265
|
+
|
266
|
+
# read in template
|
267
|
+
html_in_path = "#{File.dirname(__FILE__)}/resources/report.html.erb"
|
268
|
+
html_in_path = if File.exist?(html_in_path)
|
269
|
+
html_in_path
|
270
|
+
else
|
271
|
+
"#{File.dirname(__FILE__)}/report.html.erb"
|
272
|
+
end
|
273
|
+
html_in = ''
|
274
|
+
File.open(html_in_path, 'r') do |file|
|
275
|
+
html_in = file.read
|
276
|
+
end
|
277
|
+
|
278
|
+
# configure template with variable values
|
279
|
+
renderer = ERB.new(html_in)
|
280
|
+
html_out = renderer.result(binding)
|
281
|
+
|
282
|
+
# write html file
|
283
|
+
html_out_path = './report.html'
|
284
|
+
File.open(html_out_path, 'w') do |file|
|
285
|
+
file << html_out
|
286
|
+
# make sure data is written to the disk one way or the other
|
287
|
+
begin
|
288
|
+
file.fsync
|
289
|
+
rescue StandardError
|
290
|
+
file.flush
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
# close the sql file
|
295
|
+
sql.close
|
296
|
+
|
297
|
+
true
|
298
|
+
end
|
299
|
+
end
|
300
|
+
|
301
|
+
# register the measure to be used by the application
|
302
|
+
TimeseriesPlot.new.registerWithApplication
|
@@ -0,0 +1,137 @@
|
|
1
|
+
<measure>
|
2
|
+
<schema_version>3.0</schema_version>
|
3
|
+
<name>timeseries_plot</name>
|
4
|
+
<uid>6804217d-4737-45f3-82df-b81393c29ce7</uid>
|
5
|
+
<version_id>eaeb6d82-5b2c-47df-b17a-5bc25079efde</version_id>
|
6
|
+
<version_modified>20200331T151749Z</version_modified>
|
7
|
+
<xml_checksum>FFE04372</xml_checksum>
|
8
|
+
<class_name>TimeseriesPlot</class_name>
|
9
|
+
<display_name>Timeseries Plot</display_name>
|
10
|
+
<description>Creates an interactive timeseries plot of selected variable.</description>
|
11
|
+
<modeler_description>NOTE: This will load and respond slowly in the OS app, especially if you select * on a variable with many possible keys or you select timestep data. Suggest you open it in a web browser like Chrome instead.</modeler_description>
|
12
|
+
<arguments>
|
13
|
+
<argument>
|
14
|
+
<name>variable_name</name>
|
15
|
+
<display_name>Enter Variable Name.</display_name>
|
16
|
+
<description>Valid values can be found in the eplusout.rdd file after a simulation is run.</description>
|
17
|
+
<type>String</type>
|
18
|
+
<required>true</required>
|
19
|
+
<model_dependent>false</model_dependent>
|
20
|
+
</argument>
|
21
|
+
<argument>
|
22
|
+
<name>reporting_frequency</name>
|
23
|
+
<display_name>Reporting Frequency.</display_name>
|
24
|
+
<type>Choice</type>
|
25
|
+
<required>true</required>
|
26
|
+
<model_dependent>false</model_dependent>
|
27
|
+
<default_value>Hourly</default_value>
|
28
|
+
<choices>
|
29
|
+
<choice>
|
30
|
+
<value>Detailed</value>
|
31
|
+
<display_name>Detailed</display_name>
|
32
|
+
</choice>
|
33
|
+
<choice>
|
34
|
+
<value>Timestep</value>
|
35
|
+
<display_name>Timestep</display_name>
|
36
|
+
</choice>
|
37
|
+
<choice>
|
38
|
+
<value>Zone Timestep</value>
|
39
|
+
<display_name>Zone Timestep</display_name>
|
40
|
+
</choice>
|
41
|
+
<choice>
|
42
|
+
<value>Hourly</value>
|
43
|
+
<display_name>Hourly</display_name>
|
44
|
+
</choice>
|
45
|
+
<choice>
|
46
|
+
<value>Daily</value>
|
47
|
+
<display_name>Daily</display_name>
|
48
|
+
</choice>
|
49
|
+
<choice>
|
50
|
+
<value>Monthly</value>
|
51
|
+
<display_name>Monthly</display_name>
|
52
|
+
</choice>
|
53
|
+
<choice>
|
54
|
+
<value>Runperiod</value>
|
55
|
+
<display_name>Runperiod</display_name>
|
56
|
+
</choice>
|
57
|
+
</choices>
|
58
|
+
</argument>
|
59
|
+
<argument>
|
60
|
+
<name>key_value</name>
|
61
|
+
<display_name>Enter Key Name.</display_name>
|
62
|
+
<description>Enter * for all objects or the full name of a specific object to.</description>
|
63
|
+
<type>String</type>
|
64
|
+
<required>true</required>
|
65
|
+
<model_dependent>false</model_dependent>
|
66
|
+
<default_value>*</default_value>
|
67
|
+
</argument>
|
68
|
+
<argument>
|
69
|
+
<name>env</name>
|
70
|
+
<display_name>availableEnvPeriods</display_name>
|
71
|
+
<description>availableEnvPeriods</description>
|
72
|
+
<type>String</type>
|
73
|
+
<required>true</required>
|
74
|
+
<model_dependent>false</model_dependent>
|
75
|
+
<default_value>RUN PERIOD 1</default_value>
|
76
|
+
</argument>
|
77
|
+
</arguments>
|
78
|
+
<outputs/>
|
79
|
+
<provenances/>
|
80
|
+
<tags>
|
81
|
+
<tag>Reporting.QAQC</tag>
|
82
|
+
</tags>
|
83
|
+
<attributes>
|
84
|
+
<attribute>
|
85
|
+
<name>Intended Software Tool</name>
|
86
|
+
<value>OpenStudio Application</value>
|
87
|
+
<datatype>string</datatype>
|
88
|
+
</attribute>
|
89
|
+
<attribute>
|
90
|
+
<name>Intended Software Tool</name>
|
91
|
+
<value>Parametric Analysis Tool</value>
|
92
|
+
<datatype>string</datatype>
|
93
|
+
</attribute>
|
94
|
+
<attribute>
|
95
|
+
<name>Measure Type</name>
|
96
|
+
<value>ReportingMeasure</value>
|
97
|
+
<datatype>string</datatype>
|
98
|
+
</attribute>
|
99
|
+
</attributes>
|
100
|
+
<files>
|
101
|
+
<file>
|
102
|
+
<filename>LICENSE.md</filename>
|
103
|
+
<filetype>md</filetype>
|
104
|
+
<usage_type>license</usage_type>
|
105
|
+
<checksum>E0468DD6</checksum>
|
106
|
+
</file>
|
107
|
+
<file>
|
108
|
+
<filename>README.md.erb</filename>
|
109
|
+
<filetype>erb</filetype>
|
110
|
+
<usage_type>readmeerb</usage_type>
|
111
|
+
<checksum>703C9964</checksum>
|
112
|
+
</file>
|
113
|
+
<file>
|
114
|
+
<filename>README.md</filename>
|
115
|
+
<filetype>md</filetype>
|
116
|
+
<usage_type>readme</usage_type>
|
117
|
+
<checksum>A3A04D6D</checksum>
|
118
|
+
</file>
|
119
|
+
<file>
|
120
|
+
<version>
|
121
|
+
<software_program>OpenStudio</software_program>
|
122
|
+
<identifier>2.1.0</identifier>
|
123
|
+
<min_compatible>2.1.0</min_compatible>
|
124
|
+
</version>
|
125
|
+
<filename>measure.rb</filename>
|
126
|
+
<filetype>rb</filetype>
|
127
|
+
<usage_type>script</usage_type>
|
128
|
+
<checksum>76613086</checksum>
|
129
|
+
</file>
|
130
|
+
<file>
|
131
|
+
<filename>report.html.erb</filename>
|
132
|
+
<filetype>erb</filetype>
|
133
|
+
<usage_type>resource</usage_type>
|
134
|
+
<checksum>8A46D937</checksum>
|
135
|
+
</file>
|
136
|
+
</files>
|
137
|
+
</measure>
|