openstudio-analysis 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b307b715407bd74c16e687f0acfe025555e232cab093d493ddfec92930208928
|
4
|
+
data.tar.gz: b03f1c1c73cbd0c7ec95033e91874d9a4ec6ff267ca038877a04d18ec8772f7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba82343b9d2bc7e35439d1583ee39b6938459e1fd0f83cd6993ab1e6e71dcf185f2da7fedb62d4b02267664576c42b941e22e3fcf673ac321812998ca60bd07d
|
7
|
+
data.tar.gz: 4a8aad3e2348fa63e25c6aa07e496b75a79be7b9aa2af92075c1e63524296e60150169f0c9e732c13cd962b6c701e16a16b50474e7005fb3cbf7e090981ee7df
|
data/CHANGELOG.md
CHANGED
@@ -50,7 +50,8 @@ module OpenStudio
|
|
50
50
|
end
|
51
51
|
|
52
52
|
# these are the allowed analysis types
|
53
|
-
ANALYSIS_TYPES = ['
|
53
|
+
ANALYSIS_TYPES = ['diag', 'doe', 'fast99', 'ga', 'gaisl', 'lhs', 'morris', 'nsga_nrel', 'optim',
|
54
|
+
'preflight', 'pso', 'repeat_run', 'rgenoud', 'single_run', 'sobol', 'spea_nrel']
|
54
55
|
|
55
56
|
def set_attribute(attribute_name, attribute_value)
|
56
57
|
@attributes[attribute_name] = attribute_value
|
@@ -129,6 +129,16 @@ module OpenStudio
|
|
129
129
|
v
|
130
130
|
end
|
131
131
|
|
132
|
+
def remove_variable(variable_name)
|
133
|
+
v_index = @variables.find_index { |v| v[:argument][:name] == variable_name }
|
134
|
+
if v_index
|
135
|
+
@variables.delete_at(v_index)
|
136
|
+
return true
|
137
|
+
else
|
138
|
+
return false
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
132
142
|
# Tag a measure's argument as a variable.
|
133
143
|
#
|
134
144
|
# @param argument_name [String] The instance_name of the measure argument that is to be tagged. This is the same name as the argument's variable in the measure.rb file.
|
@@ -224,12 +234,18 @@ module OpenStudio
|
|
224
234
|
end
|
225
235
|
|
226
236
|
# fix everything to support the legacy version
|
227
|
-
|
237
|
+
# we need to make a deep copy since multiple calls to .to_hash deletes :type, :mode, etc below
|
238
|
+
# and we still want those args to be avail for future calls, but not end up in the final OSA hash.
|
239
|
+
# without this, the v.delete() below (line ~278-281) will remove :type from @variables.
|
240
|
+
# this would be okay if there was only 1 call to .to_hash. but thats not guaranteed
|
241
|
+
variables_dup = Marshal.load(Marshal.dump(@variables))
|
242
|
+
hash[:variables] = variables_dup
|
228
243
|
|
229
244
|
# Clean up the variables to match the legacy format
|
230
245
|
hash[:variables].each_with_index do |v, index|
|
231
246
|
v[:variable_type] == 'pivot' ? v[:pivot] = true : v[:variable] = true
|
232
247
|
v[:static_value] = v[:argument][:default_value] unless v[:static_value]
|
248
|
+
@variables[index][:static_value] = v[:static_value]
|
233
249
|
|
234
250
|
v[:uncertainty_description] = {}
|
235
251
|
# In Version 0.5 the _uncertain text will be removed from distribution
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio-analysis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Long
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcl
|