openstudio-standards 0.2.12.rc5 → 0.2.12.rc6

Sign up to get free protection for your applications and to get access to all the features.
@@ -139,7 +139,7 @@ Standard.class_eval do
139
139
  end
140
140
  end
141
141
 
142
- # Report severe errors in the run
142
+ # Report severe or fatal errors in the run
143
143
  error_query = "SELECT ErrorMessage
144
144
  FROM Errors
145
145
  WHERE ErrorType in(1,2)"
@@ -148,26 +148,16 @@ Standard.class_eval do
148
148
  errs = errs.get
149
149
  end
150
150
 
151
- # Check that the run completed
152
- completed_query = 'SELECT Completed FROM Simulations'
153
- completed = model.sqlFile.get.execAndReturnFirstDouble(completed_query)
154
- if completed.is_initialized
155
- completed = completed.get
156
- if completed.zero?
157
- OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "The run did not finish and had following errors: #{errs.join('\n')}")
158
- return false
159
- end
151
+ # Check that the run completed successfully
152
+ end_file_stringpath = "#{run_dir}/run/eplusout.end"
153
+ end_file_path = OpenStudio::Path.new(end_file_stringpath)
154
+ if OpenStudio.exists(end_file_path)
155
+ endstring = File.read(end_file_stringpath)
160
156
  end
161
157
 
162
- # Check that the run completed with no severe errors
163
- completed_successfully_query = 'SELECT CompletedSuccessfully FROM Simulations'
164
- completed_successfully = model.sqlFile.get.execAndReturnFirstDouble(completed_successfully_query)
165
- if completed_successfully.is_initialized
166
- completed_successfully = completed_successfully.get
167
- if completed_successfully.zero?
168
- OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "The run failed with the following severe or fatal errors: #{errs.join('\n')}")
169
- return false
170
- end
158
+ if not endstring.include?("EnergyPlus Completed Successfully")
159
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "The run did not finish and had following errors: #{errs.join('\n')}")
160
+ return false
171
161
  end
172
162
 
173
163
  # Log any severe errors that did not cause simulation to fail
@@ -13,5 +13,5 @@ module OpenstudioStandards
13
13
  end
14
14
  return 'git-not-found-on-this-system'
15
15
  end
16
- VERSION = '0.2.12.rc5'.freeze
16
+ VERSION = '0.2.12.rc6'.freeze
17
17
  end
@@ -310,8 +310,8 @@ module BTAP
310
310
  else
311
311
  Dir.glob("#{File.dirname(__FILE__)}/../../../**/*.epw").each do |file|
312
312
  canadian_file_names << File.basename(file).to_s
313
- puts "File.basename = #{File.basename(file)}"
314
- puts "File.dirname = #{File.dirname(file)}"
313
+ # puts "File.basename = #{File.basename(file)}"
314
+ # puts "File.dirname = #{File.dirname(file)}"
315
315
  end
316
316
  end
317
317
  return canadian_file_names
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstudio-standards
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12.rc5
4
+ version: 0.2.12.rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Parker
@@ -22,7 +22,7 @@ authors:
22
22
  autorequire:
23
23
  bindir: bin
24
24
  cert_chain: []
25
- date: 2020-09-30 00:00:00.000000000 Z
25
+ date: 2020-10-07 00:00:00.000000000 Z
26
26
  dependencies:
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest-reporters