openstudio-load-flexibility-measures 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fa671099e5cc0ad39a3cd1aaf233fc91b2e503f49099ade5f7d2e127ab9d11c
4
- data.tar.gz: ac66a94b34e42e72ab90fa98ae9ecdc90e0b04aee0617070ba5406a7a525b79a
3
+ metadata.gz: 26b919673f7ce4c202f5126df385ad569a77079965c62d15dbcef6b04e0b90dd
4
+ data.tar.gz: d8a422fab203371546a6031c4c01d1084fb26a64536a4a578de387b5592dbcb5
5
5
  SHA512:
6
- metadata.gz: 58d07c597583a56f4cc5dfeace3e859e315e502cccafa56db70d89fde9d7b7336cfa506f460a7f30b6319c589e14e58d227fac1f6f8e948747568ce81631d073
7
- data.tar.gz: d01ffdf2a44723494064a599ab24d0801108a9aab2d31defc4e6b4781f8215d550c15e32f5fee387c6112c37de592f6e9c4164be2cbf49873d4a83b517ee2b7a
6
+ metadata.gz: 294fdcd9d4242a5aa1e4731563440a33936606cda1c1a5c80ec59bd9ef3ff4a9a27ca1856874a5cd36fe85ebaa73686dbffe3e5d00f992104741221fb94b118b
7
+ data.tar.gz: 3b4f529c7a8a20be1ed134d397355cdaa1f93fd1197df2a7d77256a79d98fe051a20ed9fb780e3e547c78a2ea8470aaa669b3e2a9987e7ac0c7a3aa71ef73d03
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # OpenStudio Load Flexibility Measures Gem
2
2
 
3
+ ## Version 0.8.0
4
+ - Updating dependencies and licenses for OpenStudio 3.7 (upgrade to standards gem 0.5.0, extension gem 0.7.0)
5
+ - Fix field indexes for CoilCoolingDXTwoSpeed in add_packaged_ice_storage
6
+
3
7
  ## Version 0.7.0
4
8
  - Updating dependencies and licenses for OpenStudio 3.6 (upgrade to standards gem 0.4.0, extension gem 0.6.1)
5
9
 
data/README.md CHANGED
@@ -31,6 +31,7 @@ Detailed instructions for usage are included in each measure's respective README
31
31
 
32
32
  |OpenStudio Load Flexibility Measures Gem|OpenStudio|Ruby|
33
33
  |:--------------:|:----------:|:--------:|
34
+ | 0.8.0| 3.7 | 2.7 |
34
35
  | 0.7.0| 3.6 | 2.7 |
35
36
  | 0.6 - 0.6.1 | 3.5 | 2.7 |
36
37
  | 0.5 | 3.4 | 2.7 |
@@ -534,22 +534,22 @@ class AddPackagedIceStorage < OpenStudio::Measure::EnergyPlusMeasure
534
534
  case sel_coil.iddObject.name
535
535
  when 'Coil:Cooling:DX:SingleSpeed'
536
536
  runner.registerInfo("Grabing inputs for #{utss.getString(0)} from #{sel_coil.iddObject.name} object named #{sel_coil.getString(0)}")
537
- utss.setString(16, sel_coil.getString(2).get)
538
- utss.setString(18, sel_coil.getString(4).get)
539
- utss.setString(19, sel_coil.getString(10).get)
540
- utss.setString(20, sel_coil.getString(11).get)
541
- utss.setString(21, sel_coil.getString(12).get)
542
- utss.setString(22, sel_coil.getString(13).get)
543
- utss.setString(23, sel_coil.getString(14).get)
537
+ utss.setString(16, sel_coil.getString(2).get) # Gross Rated Total Cooling Capacity
538
+ utss.setString(18, sel_coil.getString(4).get) # Gross Rated Cooling COP
539
+ utss.setString(19, sel_coil.getString(10).get) # Total Cooling Capacity Function of Temperature Curve Name
540
+ utss.setString(20, sel_coil.getString(11).get) # Total Cooling Capacity Function of Flow Fraction Curve Name
541
+ utss.setString(21, sel_coil.getString(12).get) # Energy Input Ratio Function of Temperature Curve Name
542
+ utss.setString(22, sel_coil.getString(13).get) # Energy Input Ratio Function of Flow Fraction Curve Name
543
+ utss.setString(23, sel_coil.getString(14).get) # Part Load Fraction Correlation Curve Name
544
544
  when 'Coil:Cooling:DX:TwoSpeed'
545
545
  runner.registerInfo("Grabing inputs for #{utss.getString(0)} from #{sel_coil.iddObject.name} object named #{sel_coil.getString(0)}")
546
- utss.setString(16, sel_coil.getString(14).get)
547
- utss.setString(18, sel_coil.getString(16).get)
548
- utss.setString(19, sel_coil.getString(18).get)
549
- utss.setString(20, sel_coil.getString(10).get)
550
- utss.setString(21, sel_coil.getString(19).get)
551
- utss.setString(22, sel_coil.getString(12).get)
552
- utss.setString(23, sel_coil.getString(13).get)
546
+ utss.setString(16, sel_coil.getString(16).get) # Low Speed Gross Rated Total Cooling Capacity
547
+ utss.setString(18, sel_coil.getString(18).get) # Low Speed Gross Rated Cooling COP
548
+ utss.setString(19, sel_coil.getString(22).get) # Low Speed Total Cooling Capacity Function of Temperature Curve Name
549
+ utss.setString(20, sel_coil.getString(12).get) # Total Cooling Capacity Function of Flow Fraction Curve Name
550
+ utss.setString(21, sel_coil.getString(23).get) # Low Speed Energy Input Ratio Function of Temperature Curve Name
551
+ utss.setString(22, sel_coil.getString(14).get) # Energy Input Ratio Function of Flow Fraction Curve Name
552
+ utss.setString(23, sel_coil.getString(15).get) # Part Load Fraction Correlation Curve Name
553
553
  end
554
554
 
555
555
  # identify container object in which the coil is used
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0"?>
2
2
  <measure>
3
- <schema_version>3.0</schema_version>
3
+ <schema_version>3.1</schema_version>
4
4
  <name>add_packaged_ice_storage</name>
5
5
  <uid>2aa8c128-53b9-49fd-9aaf-9253a1f05936</uid>
6
- <version_id>cd809cee-aa3a-43bb-8a41-cd27c936267d</version_id>
7
- <version_modified>20230602T162403Z</version_modified>
6
+ <version_id>21dee291-3e59-413a-9353-efb85b3e8d7b</version_id>
7
+ <version_modified>2023-12-12T07:23:13Z</version_modified>
8
8
  <xml_checksum>2617824F</xml_checksum>
9
9
  <class_name>AddPackagedIceStorage</class_name>
10
10
  <display_name>Add Packaged Ice Storage</display_name>
@@ -201,16 +201,10 @@ If 'AutoSize' is selected for ice capacity, these inputs set an ice capacity siz
201
201
  </attributes>
202
202
  <files>
203
203
  <file>
204
- <filename>TESCurves.idf</filename>
205
- <filetype>idf</filetype>
206
- <usage_type>resource</usage_type>
207
- <checksum>E919566C</checksum>
208
- </file>
209
- <file>
210
- <filename>MeasureTest.osm</filename>
211
- <filetype>osm</filetype>
212
- <usage_type>test</usage_type>
213
- <checksum>DC0DCC4B</checksum>
204
+ <filename>LICENSE.md</filename>
205
+ <filetype>md</filetype>
206
+ <usage_type>license</usage_type>
207
+ <checksum>BFFB1AA6</checksum>
214
208
  </file>
215
209
  <file>
216
210
  <filename>README.md</filename>
@@ -219,10 +213,27 @@ If 'AutoSize' is selected for ice capacity, these inputs set an ice capacity siz
219
213
  <checksum>E6FBC489</checksum>
220
214
  </file>
221
215
  <file>
222
- <filename>single_speed_dx_350.osm</filename>
216
+ <version>
217
+ <software_program>OpenStudio</software_program>
218
+ <identifier>3.0.0</identifier>
219
+ <min_compatible>3.5.0</min_compatible>
220
+ </version>
221
+ <filename>measure.rb</filename>
222
+ <filetype>rb</filetype>
223
+ <usage_type>script</usage_type>
224
+ <checksum>30BE5060</checksum>
225
+ </file>
226
+ <file>
227
+ <filename>TESCurves.idf</filename>
228
+ <filetype>idf</filetype>
229
+ <usage_type>resource</usage_type>
230
+ <checksum>E919566C</checksum>
231
+ </file>
232
+ <file>
233
+ <filename>MeasureTest.osm</filename>
223
234
  <filetype>osm</filetype>
224
235
  <usage_type>test</usage_type>
225
- <checksum>D9B82B85</checksum>
236
+ <checksum>DC0DCC4B</checksum>
226
237
  </file>
227
238
  <file>
228
239
  <filename>USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw</filename>
@@ -231,27 +242,16 @@ If 'AutoSize' is selected for ice capacity, these inputs set an ice capacity siz
231
242
  <checksum>C254B53F</checksum>
232
243
  </file>
233
244
  <file>
234
- <filename>LICENSE.md</filename>
235
- <filetype>md</filetype>
236
- <usage_type>license</usage_type>
237
- <checksum>BFFB1AA6</checksum>
238
- </file>
239
- <file>
240
- <version>
241
- <software_program>OpenStudio</software_program>
242
- <identifier>3.0.0</identifier>
243
- <min_compatible>3.5.0</min_compatible>
244
- </version>
245
- <filename>measure.rb</filename>
245
+ <filename>add_packaged_ice_storage_test.rb</filename>
246
246
  <filetype>rb</filetype>
247
- <usage_type>script</usage_type>
248
- <checksum>74476013</checksum>
247
+ <usage_type>test</usage_type>
248
+ <checksum>2D36B76B</checksum>
249
249
  </file>
250
250
  <file>
251
- <filename>add_packaged_ice_storage_test.rb</filename>
252
- <filetype>rb</filetype>
251
+ <filename>single_speed_dx_350.osm</filename>
252
+ <filetype>osm</filetype>
253
253
  <usage_type>test</usage_type>
254
- <checksum>C70CEB86</checksum>
254
+ <checksum>D9B82B85</checksum>
255
255
  </file>
256
256
  </files>
257
257
  </measure>
@@ -24,7 +24,7 @@ class AddPackagedIceStorageTest < MiniTest::Test
24
24
  # @param IDF OpenStudio workspace IDF object
25
25
  # @param run_dir [String] file path location for the annual run, defaults to 'Run' in the current directory
26
26
  # @return [Bool] returns true if successful, false if not
27
- def model_run_simulation_and_log_errors(workspace, run_dir = "#{Dir.pwd}/Run")
27
+ def model_run_simulation_and_log_errors(model, workspace, run_dir = "#{Dir.pwd}/Run")
28
28
  # Make the directory if it doesn't exist
29
29
  unless Dir.exist?(run_dir)
30
30
  FileUtils.mkdir_p(run_dir)
@@ -70,7 +70,7 @@ class AddPackagedIceStorageTest < MiniTest::Test
70
70
  else
71
71
  # If the sql file does not exist, it is likely that EnergyPlus crashed,
72
72
  # in which case the useful errors are inside the eplusout.err file.
73
- err_file_path_string = "#{run_dir}/run/eplusout.err"
73
+ err_file_path_string = "#{run_dir}/eplusout.err"
74
74
  err_file_path = OpenStudio::Path.new(err_file_path_string)
75
75
  if OpenStudio.exists(err_file_path)
76
76
  if __dir__[0] == ':' # Running from OpenStudio CLI
@@ -86,33 +86,32 @@ class AddPackagedIceStorageTest < MiniTest::Test
86
86
  end
87
87
  end
88
88
 
89
- # todo - figure out how to get code below to work so method returns false when simulation fails
90
-
91
- # # Report severe or fatal errors in the run
92
- # error_query = "SELECT ErrorMessage
93
- # FROM Errors
94
- # WHERE ErrorType in(1,2)"
95
- # errs = model.sqlFile.get.execAndReturnVectorOfString(error_query)
96
- # if errs.is_initialized
97
- # errs = errs.get
98
- # end
99
-
100
- # # Check that the run completed successfully
101
- # end_file_stringpath = "#{run_dir}/run/eplusout.end"
102
- # end_file_path = OpenStudio::Path.new(end_file_stringpath)
103
- # if OpenStudio.exists(end_file_path)
104
- # endstring = File.read(end_file_stringpath)
105
- # end
106
-
107
- # if !endstring.include?('EnergyPlus Completed Successfully')
108
- # OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "The run did not finish and had following errors: #{errs.join('\n')}")
109
- # return false
110
- # end
111
-
112
- # # Log any severe errors that did not cause simulation to fail
113
- # unless errs.empty?
114
- # OpenStudio.logFree(OpenStudio::Warn, 'openstudio.model.Model', "The run completed but had the following severe errors: #{errs.join('\n')}")
115
- # end
89
+ # Report severe or fatal errors in the run
90
+ error_query = "SELECT ErrorMessage
91
+ FROM Errors
92
+ WHERE ErrorType in(1,2)"
93
+ model.setSqlFile(sql)
94
+ errs = model.sqlFile.get.execAndReturnVectorOfString(error_query)
95
+ if errs.is_initialized
96
+ errs = errs.get
97
+ end
98
+
99
+ # Check that the run completed successfully
100
+ end_file_stringpath = "#{run_dir}/eplusout.end"
101
+ end_file_path = OpenStudio::Path.new(end_file_stringpath)
102
+ if OpenStudio.exists(end_file_path)
103
+ endstring = File.read(end_file_stringpath)
104
+ end
105
+
106
+ if !endstring.include?('EnergyPlus Completed Successfully')
107
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "The run did not finish and had following errors: #{errs.join('\n')}")
108
+ return false
109
+ end
110
+
111
+ # Log any severe errors that did not cause simulation to fail
112
+ unless errs.empty?
113
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.model.Model', "The run completed but had the following severe errors: #{errs.join('\n')}")
114
+ end
116
115
 
117
116
  return true
118
117
  end
@@ -155,10 +154,10 @@ class AddPackagedIceStorageTest < MiniTest::Test
155
154
  measure.run(workspace, runner, argument_map)
156
155
 
157
156
  # run the annual simulation
158
- output_file_path = "#{File.dirname(__FILE__)}/output/test_good_argument_values/Run"
159
- #sim_results = self.model_run_simulation_and_log_errors(workspace, output_file_path)
157
+ # commented out for now E+ run in test doesn't function on CI yet
158
+ #output_file_path = "#{File.dirname(__FILE__)}/output/test_good_argument_values"
159
+ #sim_results = self.model_run_simulation_and_log_errors(model, workspace, output_file_path)
160
160
  #assert(sim_results)
161
- # todo - need to add code so test fails if simulation fails
162
161
 
163
162
  result = runner.result
164
163
  assert_equal('Success', result.value.valueName)
@@ -206,10 +205,10 @@ class AddPackagedIceStorageTest < MiniTest::Test
206
205
  measure.run(workspace, runner, argument_map)
207
206
 
208
207
  # run the annual simulation
209
- output_file_path = "#{File.dirname(__FILE__)}/output/single_speed_dx/Run"
210
- #sim_results = self.model_run_simulation_and_log_errors(workspace, output_file_path)
208
+ # commented out for now E+ run in test doesn't function on CI yet
209
+ #output_file_path = "#{File.dirname(__FILE__)}/output/single_speed_dx"
210
+ #sim_results = self.model_run_simulation_and_log_errors(model, workspace, output_file_path)
211
211
  #assert(sim_results)
212
- # todo - need to add code so test fails if simulation fails
213
212
 
214
213
  result = runner.result
215
214
  assert_equal('Success', result.value.valueName)
@@ -5,6 +5,6 @@
5
5
 
6
6
  module OpenStudio
7
7
  module LoadFlexibilityMeasures
8
- VERSION = '0.7.0'.freeze
8
+ VERSION = '0.8.0'.freeze
9
9
  end
10
10
  end
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_dependency 'bundler', '~> 2.1'
27
27
 
28
- spec.add_dependency 'openstudio-extension', '~> 0.6.1'
29
- spec.add_dependency 'openstudio-standards', '~> 0.4.0'
28
+ spec.add_dependency 'openstudio-extension', '~> 0.7.0'
29
+ spec.add_dependency 'openstudio-standards', '~> 0.5.0'
30
30
 
31
31
  spec.add_development_dependency 'rake', '~> 13.0'
32
32
  spec.add_development_dependency 'rspec', '~> 3.9'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstudio-load-flexibility-measures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Heine
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-06-12 00:00:00.000000000 Z
12
+ date: 2023-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -31,28 +31,28 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.6.1
34
+ version: 0.7.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.6.1
41
+ version: 0.7.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: openstudio-standards
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 0.4.0
48
+ version: 0.5.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 0.4.0
55
+ version: 0.5.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rake
58
58
  requirement: !ruby/object:Gem::Requirement