openstudio-recommendation-engine 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -29,6 +29,7 @@ module OpenStudio
|
|
29
29
|
measure_checks = Dir.glob("#{@path_to_measures}/**/recommendation.rb")
|
30
30
|
|
31
31
|
applicable_measures = []
|
32
|
+
error_messages = []
|
32
33
|
|
33
34
|
measure_checks.each do |measure|
|
34
35
|
require "#{File.expand_path(measure)}"
|
@@ -39,12 +40,13 @@ module OpenStudio
|
|
39
40
|
measure = Object.const_get(measure_class_name).new
|
40
41
|
|
41
42
|
if @model
|
42
|
-
|
43
|
-
if
|
44
|
-
applicable_measures <<
|
43
|
+
results_json, messages = measure.check_applicability(@model)
|
44
|
+
if results_json
|
45
|
+
applicable_measures << results_json
|
45
46
|
else
|
46
47
|
puts "measure #{measure_class_name} not applicable"
|
47
48
|
end
|
49
|
+
error_messages << messages
|
48
50
|
else
|
49
51
|
raise "No model passed into the recommendation engine"
|
50
52
|
end
|
@@ -53,7 +55,7 @@ module OpenStudio
|
|
53
55
|
|
54
56
|
applicable_measures_json = JSON.pretty_generate(applicable_measures)
|
55
57
|
|
56
|
-
return applicable_measures_json
|
58
|
+
return [applicable_measures_json,error_messages]
|
57
59
|
|
58
60
|
end
|
59
61
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio-recommendation-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nicholas Long
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2014-03-
|
19
|
+
date: 2014-03-07 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: parallel
|