openstudio-calibration 0.1.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +5 -0
  4. data/CHANGELOG.md +23 -8
  5. data/Gemfile +0 -3
  6. data/Jenkinsfile +6 -2
  7. data/README.md +2 -2
  8. data/Rakefile +5 -5
  9. data/lib/measures/TimeseriesObjectiveFunction/README.md +5 -171
  10. data/lib/measures/TimeseriesObjectiveFunction/measure.rb +2 -6
  11. data/lib/measures/TimeseriesObjectiveFunction/measure.xml +89 -13
  12. data/lib/measures/TimeseriesObjectiveFunction/resources/report.html.erb +2 -0
  13. data/lib/measures/TimeseriesPlot/README.md +5 -35
  14. data/lib/measures/TimeseriesPlot/measure.xml +27 -11
  15. data/lib/measures/TimeseriesPlot/resources/report.html.erb +2 -0
  16. data/lib/measures/zone_report/README.md +2 -2
  17. data/lib/measures/zone_report/measure.rb +1 -1
  18. data/lib/measures/zone_report/measure.xml +14 -12
  19. data/lib/{openstudio-calibration-measures.rb → openstudio-calibration.rb} +1 -1
  20. data/lib/openstudio/{calibration_measures.rb → calibration.rb} +2 -2
  21. data/lib/openstudio/{calibration_measures → calibration}/extension.rb +1 -1
  22. data/lib/openstudio/{calibration_measures → calibration}/version.rb +2 -2
  23. data/openstudio-calibration.gemspec +38 -0
  24. metadata +37 -54
  25. data/lib/measures/AddMonthlyUtilityData/tests/AddMonthlyUtilityData_Test.rb +0 -88
  26. data/lib/measures/AddMonthlyUtilityData/tests/electric_billed_usages.json +0 -198
  27. data/lib/measures/AddMonthlyUtilityData/tests/gas_billed_usages.json +0 -198
  28. data/lib/measures/CalibrationReports/tests/CalibrationReports_Test.rb +0 -523
  29. data/lib/measures/CalibrationReports/tests/ExampleModel.osm +0 -10497
  30. data/lib/measures/CalibrationReports/tests/ExampleModelNoDemandInput.osm +0 -10560
  31. data/lib/measures/CalibrationReports/tests/ExampleModelNoGasInput.osm +0 -10456
  32. data/lib/measures/CalibrationReports/tests/USA_CO_Golden-NREL.724666_TMY3.epw +0 -8768
  33. data/lib/measures/CalibrationReportsEnhanced/tests/CalibrationReportsEnhanced_Test.rb +0 -734
  34. data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel.osm +0 -10497
  35. data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel_FuelOil.osm +0 -12740
  36. data/lib/measures/CalibrationReportsEnhanced/tests/USA_CO_Golden-NREL.724666_TMY3.epw +0 -8768
  37. data/lib/measures/CalibrationReportsEnhanced21/LICENSE.md +0 -27
  38. data/lib/measures/CalibrationReportsEnhanced21/README.md +0 -109
  39. data/lib/measures/CalibrationReportsEnhanced21/README.md.erb +0 -42
  40. data/lib/measures/CalibrationReportsEnhanced21/measure.rb +0 -690
  41. data/lib/measures/CalibrationReportsEnhanced21/measure.xml +0 -269
  42. data/lib/measures/CalibrationReportsEnhanced21/resources/report.html.in +0 -380
  43. data/lib/measures/MaalkaMonthlyJSONUtilityData/LICENSE.md +0 -27
  44. data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md +0 -104
  45. data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md.erb +0 -42
  46. data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.rb +0 -304
  47. data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.xml +0 -216
  48. data/openstudio-calibration-measures.gemspec +0 -30
@@ -1,88 +0,0 @@
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'
37
-
38
- require 'openstudio/ruleset/ShowRunnerOutput'
39
-
40
- require "#{File.dirname(__FILE__)}/../measure.rb"
41
-
42
- require 'minitest/autorun'
43
-
44
- class AddMonthlyUtilityData_Test < Minitest::Test
45
- def test_AddMonthlyUtilityData
46
- # create an instance of the measure
47
- measure = AddMonthlyUtilityData.new
48
-
49
- # create an instance of a runner
50
- runner = OpenStudio::Measure::OSRunner.new(OpenStudio::WorkflowJSON.new)
51
-
52
- # make an empty model
53
- model = OpenStudio::Model::Model.new
54
-
55
- # get arguments and test that they are what we are expecting
56
- arguments = measure.arguments(model)
57
- assert_equal(5, arguments.size)
58
- assert_equal('electric_json', arguments[0].name)
59
- assert_equal('gas_json', arguments[1].name)
60
- assert_equal('water_json', arguments[2].name)
61
- assert_equal('start_date', arguments[3].name)
62
- assert_equal('end_date', arguments[4].name)
63
-
64
- # set argument values to good values and run the measure on model with spaces
65
- argument_map = OpenStudio::Measure::OSArgumentMap.new
66
-
67
- electric_json = arguments[0].clone
68
- assert(electric_json.setValue(File.dirname(__FILE__) + '/electric_billed_usages.json'))
69
- argument_map['electric_json'] = electric_json
70
-
71
- gas_json = arguments[1].clone
72
- assert(gas_json.setValue(File.dirname(__FILE__) + '/gas_billed_usages.json'))
73
- argument_map['gas_json'] = gas_json
74
-
75
- start_date = arguments[2].clone
76
- assert(start_date.setValue('2012-06-19'))
77
- argument_map['start_date'] = start_date
78
-
79
- end_date = arguments[3].clone
80
- assert(end_date.setValue('2013-05-20'))
81
- argument_map['end_date'] = end_date
82
-
83
- measure.run(model, runner, argument_map)
84
- result = runner.result
85
- show_output(result)
86
- assert(result.value.valueName == 'Success')
87
- end
88
- end
@@ -1,198 +0,0 @@
1
- { "data": [
2
- {
3
- "accounts": 1,
4
- "from": "2011-12-05T00:00:00Z",
5
- "peak": 0,
6
- "to": "2012-01-06T00:00:00Z",
7
- "tot_kwh": 1
8
- },
9
- {
10
- "accounts": 1,
11
- "from": "2012-01-06T00:00:00Z",
12
- "peak": 0,
13
- "to": "2012-02-02T00:00:00Z",
14
- "tot_kwh": 2
15
- },
16
- {
17
- "accounts": 1,
18
- "from": "2012-02-02T00:00:00Z",
19
- "peak": 0,
20
- "to": "2012-03-05T00:00:00Z",
21
- "tot_kwh": 3
22
- },
23
- {
24
- "accounts": 1,
25
- "from": "2012-03-05T00:00:00Z",
26
- "peak": 0,
27
- "to": "2012-04-02T00:00:00Z",
28
- "tot_kwh": 2
29
- },
30
- {
31
- "accounts": 1,
32
- "from": "2012-04-02T00:00:00Z",
33
- "peak": 0,
34
- "to": "2012-05-02T00:00:00Z",
35
- "tot_kwh": 3
36
- },
37
- {
38
- "accounts": 1,
39
- "from": "2012-05-02T00:00:00Z",
40
- "peak": 0,
41
- "to": "2012-06-04T00:00:00Z",
42
- "tot_kwh": 2
43
- },
44
- {
45
- "accounts": 1,
46
- "from": "2012-06-04T00:00:00Z",
47
- "peak": 0,
48
- "to": "2012-07-02T00:00:00Z",
49
- "tot_kwh": 3
50
- },
51
- {
52
- "accounts": 1,
53
- "from": "2012-07-02T00:00:00Z",
54
- "peak": 0,
55
- "to": "2012-08-02T00:00:00Z",
56
- "tot_kwh": 2
57
- },
58
- {
59
- "accounts": 1,
60
- "from": "2012-08-02T00:00:00Z",
61
- "peak": 0,
62
- "to": "2012-09-05T00:00:00Z",
63
- "tot_kwh": 3
64
- },
65
- {
66
- "accounts": 1,
67
- "from": "2012-09-05T00:00:00Z",
68
- "peak": 0,
69
- "to": "2012-10-02T00:00:00Z",
70
- "tot_kwh": 2
71
- },
72
- {
73
- "accounts": 1,
74
- "from": "2012-10-02T00:00:00Z",
75
- "peak": 0,
76
- "to": "2012-11-05T00:00:00Z",
77
- "tot_kwh": 3
78
- },
79
- {
80
- "accounts": 1,
81
- "from": "2012-11-05T00:00:00Z",
82
- "peak": 0,
83
- "to": "2012-12-04T00:00:00Z",
84
- "tot_kwh": 3
85
- },
86
- {
87
- "accounts": 1,
88
- "from": "2012-12-04T00:00:00Z",
89
- "peak": 0,
90
- "to": "2013-01-03T00:00:00Z",
91
- "tot_kwh": 3
92
- },
93
- {
94
- "accounts": 1,
95
- "from": "2013-01-03T00:00:00Z",
96
- "peak": 0,
97
- "to": "2013-02-01T00:00:00Z",
98
- "tot_kwh": 2
99
- },
100
- {
101
- "accounts": 1,
102
- "from": "2013-02-01T00:00:00Z",
103
- "peak": 0,
104
- "to": "2013-03-04T00:00:00Z",
105
- "tot_kwh": 3
106
- },
107
- {
108
- "accounts": 1,
109
- "from": "2013-03-04T00:00:00Z",
110
- "peak": 0,
111
- "to": "2013-04-02T00:00:00Z",
112
- "tot_kwh": 4
113
- },
114
- {
115
- "accounts": 1,
116
- "from": "2013-04-02T00:00:00Z",
117
- "peak": 0,
118
- "to": "2013-05-03T00:00:00Z",
119
- "tot_kwh": 3
120
- },
121
- {
122
- "accounts": 1,
123
- "from": "2013-05-03T00:00:00Z",
124
- "peak": 0,
125
- "to": "2013-06-04T00:00:00Z",
126
- "tot_kwh": 2
127
- },
128
- {
129
- "accounts": 1,
130
- "from": "2013-06-04T00:00:00Z",
131
- "peak": 0,
132
- "to": "2013-07-02T00:00:00Z",
133
- "tot_kwh": 3
134
- },
135
- {
136
- "accounts": 1,
137
- "from": "2013-07-02T00:00:00Z",
138
- "peak": 0,
139
- "to": "2013-08-02T00:00:00Z",
140
- "tot_kwh": 2
141
- },
142
- {
143
- "accounts": 1,
144
- "from": "2013-08-02T00:00:00Z",
145
- "peak": 0,
146
- "to": "2013-09-05T00:00:00Z",
147
- "tot_kwh": 3
148
- },
149
- {
150
- "accounts": 1,
151
- "from": "2013-09-05T00:00:00Z",
152
- "peak": 0,
153
- "to": "2013-10-03T00:00:00Z",
154
- "tot_kwh": 2
155
- },
156
- {
157
- "accounts": 1,
158
- "from": "2013-10-03T00:00:00Z",
159
- "peak": 0,
160
- "to": "2013-10-31T00:00:00Z",
161
- "tot_kwh": 3
162
- },
163
- {
164
- "accounts": 1,
165
- "from": "2013-10-31T00:00:00Z",
166
- "peak": 0,
167
- "to": "2013-12-03T00:00:00Z",
168
- "tot_kwh": 4
169
- },
170
- {
171
- "accounts": 1,
172
- "from": "2013-12-03T00:00:00Z",
173
- "peak": 0,
174
- "to": "2014-01-06T00:00:00Z",
175
- "tot_kwh": 3
176
- },
177
- {
178
- "accounts": 1,
179
- "from": "2014-01-06T00:00:00Z",
180
- "peak": 0,
181
- "to": "2014-02-03T00:00:00Z",
182
- "tot_kwh": 3
183
- },
184
- {
185
- "accounts": 1,
186
- "from": "2014-02-03T00:00:00Z",
187
- "peak": 0,
188
- "to": "2014-03-04T00:00:00Z",
189
- "tot_kwh": 3
190
- },
191
- {
192
- "accounts": 1,
193
- "from": "2014-03-04T00:00:00Z",
194
- "peak": 0,
195
- "to": "2014-04-02T00:00:00Z",
196
- "tot_kwh": 3
197
- }
198
- ] }
@@ -1,198 +0,0 @@
1
- { "data": [
2
- {
3
- "accounts": 1,
4
- "from": "2011-12-05T00:00:00Z",
5
- "peak": 0,
6
- "to": "2012-01-06T00:00:00Z",
7
- "tot_therms": 1
8
- },
9
- {
10
- "accounts": 1,
11
- "from": "2012-01-06T00:00:00Z",
12
- "peak": 0,
13
- "to": "2012-02-02T00:00:00Z",
14
- "tot_therms": 2
15
- },
16
- {
17
- "accounts": 1,
18
- "from": "2012-02-02T00:00:00Z",
19
- "peak": 0,
20
- "to": "2012-03-05T00:00:00Z",
21
- "tot_therms": 3
22
- },
23
- {
24
- "accounts": 1,
25
- "from": "2012-03-05T00:00:00Z",
26
- "peak": 0,
27
- "to": "2012-04-02T00:00:00Z",
28
- "tot_therms": 2
29
- },
30
- {
31
- "accounts": 1,
32
- "from": "2012-04-02T00:00:00Z",
33
- "peak": 0,
34
- "to": "2012-05-02T00:00:00Z",
35
- "tot_therms": 3
36
- },
37
- {
38
- "accounts": 1,
39
- "from": "2012-05-02T00:00:00Z",
40
- "peak": 0,
41
- "to": "2012-06-04T00:00:00Z",
42
- "tot_therms": 2
43
- },
44
- {
45
- "accounts": 1,
46
- "from": "2012-06-04T00:00:00Z",
47
- "peak": 0,
48
- "to": "2012-07-02T00:00:00Z",
49
- "tot_therms": 3
50
- },
51
- {
52
- "accounts": 1,
53
- "from": "2012-07-02T00:00:00Z",
54
- "peak": 0,
55
- "to": "2012-08-02T00:00:00Z",
56
- "tot_therms": 2
57
- },
58
- {
59
- "accounts": 1,
60
- "from": "2012-08-02T00:00:00Z",
61
- "peak": 0,
62
- "to": "2012-09-05T00:00:00Z",
63
- "tot_therms": 3
64
- },
65
- {
66
- "accounts": 1,
67
- "from": "2012-09-05T00:00:00Z",
68
- "peak": 0,
69
- "to": "2012-10-02T00:00:00Z",
70
- "tot_therms": 2
71
- },
72
- {
73
- "accounts": 1,
74
- "from": "2012-10-02T00:00:00Z",
75
- "peak": 0,
76
- "to": "2012-11-05T00:00:00Z",
77
- "tot_therms": 3
78
- },
79
- {
80
- "accounts": 1,
81
- "from": "2012-11-05T00:00:00Z",
82
- "peak": 0,
83
- "to": "2012-12-04T00:00:00Z",
84
- "tot_therms": 3
85
- },
86
- {
87
- "accounts": 1,
88
- "from": "2012-12-04T00:00:00Z",
89
- "peak": 0,
90
- "to": "2013-01-03T00:00:00Z",
91
- "tot_therms": 3
92
- },
93
- {
94
- "accounts": 1,
95
- "from": "2013-01-03T00:00:00Z",
96
- "peak": 0,
97
- "to": "2013-02-01T00:00:00Z",
98
- "tot_therms": 2
99
- },
100
- {
101
- "accounts": 1,
102
- "from": "2013-02-01T00:00:00Z",
103
- "peak": 0,
104
- "to": "2013-03-04T00:00:00Z",
105
- "tot_therms": 3
106
- },
107
- {
108
- "accounts": 1,
109
- "from": "2013-03-04T00:00:00Z",
110
- "peak": 0,
111
- "to": "2013-04-02T00:00:00Z",
112
- "tot_therms": 4
113
- },
114
- {
115
- "accounts": 1,
116
- "from": "2013-04-02T00:00:00Z",
117
- "peak": 0,
118
- "to": "2013-05-03T00:00:00Z",
119
- "tot_therms": 3
120
- },
121
- {
122
- "accounts": 1,
123
- "from": "2013-05-03T00:00:00Z",
124
- "peak": 0,
125
- "to": "2013-06-04T00:00:00Z",
126
- "tot_therms": 2
127
- },
128
- {
129
- "accounts": 1,
130
- "from": "2013-06-04T00:00:00Z",
131
- "peak": 0,
132
- "to": "2013-07-02T00:00:00Z",
133
- "tot_therms": 3
134
- },
135
- {
136
- "accounts": 1,
137
- "from": "2013-07-02T00:00:00Z",
138
- "peak": 0,
139
- "to": "2013-08-02T00:00:00Z",
140
- "tot_therms": 2
141
- },
142
- {
143
- "accounts": 1,
144
- "from": "2013-08-02T00:00:00Z",
145
- "peak": 0,
146
- "to": "2013-09-05T00:00:00Z",
147
- "tot_therms": 3
148
- },
149
- {
150
- "accounts": 1,
151
- "from": "2013-09-05T00:00:00Z",
152
- "peak": 0,
153
- "to": "2013-10-03T00:00:00Z",
154
- "tot_therms": 2
155
- },
156
- {
157
- "accounts": 1,
158
- "from": "2013-10-03T00:00:00Z",
159
- "peak": 0,
160
- "to": "2013-10-31T00:00:00Z",
161
- "tot_therms": 3
162
- },
163
- {
164
- "accounts": 1,
165
- "from": "2013-10-31T00:00:00Z",
166
- "peak": 0,
167
- "to": "2013-12-03T00:00:00Z",
168
- "tot_therms": 4
169
- },
170
- {
171
- "accounts": 1,
172
- "from": "2013-12-03T00:00:00Z",
173
- "peak": 0,
174
- "to": "2014-01-06T00:00:00Z",
175
- "tot_therms": 3
176
- },
177
- {
178
- "accounts": 1,
179
- "from": "2014-01-06T00:00:00Z",
180
- "peak": 0,
181
- "to": "2014-02-03T00:00:00Z",
182
- "tot_therms": 3
183
- },
184
- {
185
- "accounts": 1,
186
- "from": "2014-02-03T00:00:00Z",
187
- "peak": 0,
188
- "to": "2014-03-04T00:00:00Z",
189
- "tot_therms": 3
190
- },
191
- {
192
- "accounts": 1,
193
- "from": "2014-03-04T00:00:00Z",
194
- "peak": 0,
195
- "to": "2014-04-02T00:00:00Z",
196
- "tot_therms": 3
197
- }
198
- ] }