openstudio-analysis 1.0.0.rc19 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -0
  3. data/.gitlab-ci.yml +20 -0
  4. data/.rubocop.yml +2 -133
  5. data/.travis.yml +2 -2
  6. data/CHANGELOG.md +26 -32
  7. data/Gemfile +5 -6
  8. data/LICENSE.md +28 -0
  9. data/README.md +16 -8
  10. data/Rakefile +38 -3
  11. data/lib/openstudio-analysis.rb +35 -0
  12. data/lib/openstudio/analysis.rb +57 -26
  13. data/lib/openstudio/analysis/algorithm_attributes.rb +36 -1
  14. data/lib/openstudio/analysis/formulation.rb +41 -6
  15. data/lib/openstudio/analysis/server_api.rb +53 -36
  16. data/lib/openstudio/analysis/support_files.rb +40 -0
  17. data/lib/openstudio/analysis/translator/datapoints.rb +39 -4
  18. data/lib/openstudio/analysis/translator/excel.rb +43 -8
  19. data/lib/openstudio/analysis/translator/workflow.rb +54 -14
  20. data/lib/openstudio/analysis/version.rb +36 -1
  21. data/lib/openstudio/analysis/workflow.rb +37 -2
  22. data/lib/openstudio/analysis/workflow_step.rb +97 -70
  23. data/lib/openstudio/helpers/hash.rb +35 -0
  24. data/lib/openstudio/helpers/string.rb +36 -2
  25. data/lib/openstudio/weather/epw.rb +32 -17
  26. data/openstudio-analysis.gemspec +21 -18
  27. data/update_license.rb +120 -0
  28. metadata +62 -200
  29. data/LGPL-2.1.txt +0 -502
  30. data/LICENSE.txt +0 -65
  31. data/rubocop-todo.yml +0 -246
  32. data/spec/files/0_1_09_no_variables.xlsx +0 -0
  33. data/spec/files/0_1_09_outputvars.xlsx +0 -0
  34. data/spec/files/0_1_09_setup_version_2.xlsx +0 -0
  35. data/spec/files/0_1_09_small_list.xlsx +0 -0
  36. data/spec/files/0_1_09_small_list_incomplete.xlsx +0 -0
  37. data/spec/files/0_1_09_small_list_repeat_vars.xlsx +0 -0
  38. data/spec/files/0_1_09_small_list_validation_errors.xlsx +0 -0
  39. data/spec/files/0_1_10_proxy.xlsx +0 -0
  40. data/spec/files/0_1_10_proxy_user.xlsx +0 -0
  41. data/spec/files/0_1_10_template_input.xlsx +0 -0
  42. data/spec/files/0_1_11_discrete_variables.xlsx +0 -0
  43. data/spec/files/0_1_12_discrete_dynamic_columns.xlsx +0 -0
  44. data/spec/files/0_2_0_template.xlsx +0 -0
  45. data/spec/files/0_2_0_template_simpletest.xlsx +0 -0
  46. data/spec/files/0_3_0_dynamic_uuids.xlsx +0 -0
  47. data/spec/files/0_3_0_measure_existence.xlsx +0 -0
  48. data/spec/files/0_3_0_outputs.xlsx +0 -0
  49. data/spec/files/0_3_3_short_names.xlsx +0 -0
  50. data/spec/files/0_3_5_multiple_measure_paths.xlsx +0 -0
  51. data/spec/files/0_3_7_unique_measure_names.xlsx +0 -0
  52. data/spec/files/0_3_7_worker_init_final.xlsx +0 -0
  53. data/spec/files/0_4_0_lhs_discrete_continuous.xlsx +0 -0
  54. data/spec/files/0_4_0_multiple_seeds.xlsx +0 -0
  55. data/spec/files/0_4_0_pivot_test.xlsx +0 -0
  56. data/spec/files/analysis/examples/discrete_lhs_example.json +0 -809
  57. data/spec/files/analysis/examples/medium_office_example.json +0 -1673
  58. data/spec/files/analysis/examples/medium_office_workflow.json +0 -1298
  59. data/spec/files/measures/ActualMeasureNoJson/measure.rb +0 -80
  60. data/spec/files/measures/ActualMeasureNoJson/measure.xml +0 -2
  61. data/spec/files/measures/ExampleMeasure/measure.json +0 -3
  62. data/spec/files/measures/ExampleMeasure/measure.rb +0 -5
  63. data/spec/files/measures/ExampleMeasure/measure.xml +0 -1
  64. data/spec/files/measures/IncreaseInsulationRValueForRoofs/measure.json +0 -36
  65. data/spec/files/measures/IncreaseInsulationRValueForRoofs/measure.rb +0 -22
  66. data/spec/files/measures/IncreaseInsulationRValueForRoofs/measure.xml +0 -5
  67. data/spec/files/measures/NoMeasureRbFile/.gitkeep +0 -0
  68. data/spec/files/measures/ReduceLightingLoadsByPercentage/measure.json +0 -3
  69. data/spec/files/measures/ReduceLightingLoadsByPercentage/measure.rb +0 -5
  70. data/spec/files/measures/ReduceLightingLoadsByPercentage/measure.xml +0 -1
  71. data/spec/files/measures/SetThermostatSchedules/measure.json +0 -63
  72. data/spec/files/measures/SetThermostatSchedules/measure.rb +0 -254
  73. data/spec/files/measures/SetThermostatSchedules/measure.xml +0 -2
  74. data/spec/files/measures/example_measure_auto_directory_name/measure.json +0 -3
  75. data/spec/files/measures/example_measure_auto_directory_name/measure.rb +0 -5
  76. data/spec/files/measures/example_measure_auto_directory_name/measure.xml +0 -1
  77. data/spec/files/measures/reduce_lighting_loads_by_percentage/measure.json +0 -3
  78. data/spec/files/measures/reduce_lighting_loads_by_percentage/measure.rb +0 -5
  79. data/spec/files/measures/reduce_lighting_loads_by_percentage/measure.xml +0 -1
  80. data/spec/files/measures/reduce_space_infiltration_by_percentage/measure.rb +0 -5
  81. data/spec/files/measures/reduce_space_infiltration_by_percentage/measure.xml +0 -1
  82. data/spec/files/measures/rotate_building/measure.rb +0 -5
  83. data/spec/files/measures/rotate_building/measure.xml +0 -1
  84. data/spec/files/measures/set_window_to_wall_ratio_by_facade/measure.rb +0 -5
  85. data/spec/files/measures/set_window_to_wall_ratio_by_facade/measure.xml +0 -1
  86. data/spec/files/measures_second_path/measure_in_another_dir/measure.json +0 -3
  87. data/spec/files/measures_second_path/measure_in_another_dir/measure.rb +0 -5
  88. data/spec/files/measures_second_path/measure_in_another_dir/measure.xml +0 -1
  89. data/spec/files/partial_weather.epw +0 -32
  90. data/spec/files/partial_weather_2.epw +0 -32
  91. data/spec/files/small_seed.osm +0 -4622
  92. data/spec/files/worker_init/first_file.rb +0 -15
  93. data/spec/files/worker_init/second_file.rb +0 -15
  94. data/spec/files/workflow/analysis.osa +0 -1334
  95. data/spec/files/workflow/datapoint_0.osd +0 -65
  96. data/spec/files/workflow/datapoint_1.osd +0 -65
  97. data/spec/files/workflow/datapoint_2.osd +0 -65
  98. data/spec/files/workflow/datapoint_wrong_osa_id.osd +0 -65
  99. data/spec/integration/server_api_spec.rb +0 -48
  100. data/spec/openstudio/excel_spec.rb +0 -571
  101. data/spec/openstudio/formulation_spec.rb +0 -157
  102. data/spec/openstudio/hash_spec.rb +0 -21
  103. data/spec/openstudio/osw_spec.rb +0 -94
  104. data/spec/openstudio/server_api_spec.rb +0 -25
  105. data/spec/openstudio/string_spec.rb +0 -0
  106. data/spec/openstudio/support_files_spec.rb +0 -54
  107. data/spec/openstudio/weather_spec.rb +0 -45
  108. data/spec/openstudio/workflow_spec.rb +0 -91
  109. data/spec/openstudio/workflow_step_spec.rb +0 -118
  110. data/spec/schema/osa.json +0 -613
  111. data/spec/schema/osa.png +0 -0
  112. data/spec/schema/osd.json +0 -110
  113. data/spec/schema/osd.png +0 -0
  114. data/spec/spec_helper.rb +0 -19
@@ -1,118 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe OpenStudio::Analysis::WorkflowStep do
4
- it 'should create a workflow' do
5
- s = OpenStudio::Analysis::WorkflowStep.new
6
- expect(s).not_to be nil
7
- expect(s).to be_a OpenStudio::Analysis::WorkflowStep
8
- end
9
-
10
- it 'should add a measure' do
11
- h = 'spec/files/measures/IncreaseInsulationRValueForRoofs/measure.json'
12
- s = OpenStudio::Analysis::WorkflowStep.from_measure_hash(
13
- 'my_instance',
14
- 'my instance display name',
15
- h,
16
- JSON.parse(File.read(h), symbolize_names: true))
17
- puts s
18
- end
19
-
20
- it 'should tag a discrete variable' do
21
- h = 'spec/files/measures/SetThermostatSchedules/measure.json'
22
- measure = OpenStudio::Analysis::WorkflowStep.from_measure_hash(
23
- 'my_instance',
24
- 'my instance display name',
25
- h,
26
- JSON.parse(File.read(h), symbolize_names: true))
27
-
28
- expect(measure.name).to eq 'my_instance'
29
- v = {
30
- type: 'discrete',
31
- minimum: 'low string',
32
- maximum: 'high string',
33
- mean: 'middle string',
34
- values: %w(a b c d),
35
- weights: [0.25, 0.25, 0.25, 0.25]
36
- }
37
- r = measure.make_variable('cooling_sch', 'my variable', v)
38
- expect(r).to eq true
39
- end
40
-
41
- it 'should tag a continuous variable' do
42
- h = 'spec/files/measures/SetThermostatSchedules/measure.json'
43
- measure = OpenStudio::Analysis::WorkflowStep.from_measure_hash(
44
- 'my_instance',
45
- 'my instance display name',
46
- h,
47
- JSON.parse(File.read(h), symbolize_names: true))
48
-
49
- expect(measure.name).to eq 'my_instance'
50
- v = {
51
- type: 'triangle',
52
- minimum: 0.5,
53
- maximum: 20,
54
- mean: 10
55
- }
56
- o = {
57
- static_value: 24601
58
- }
59
- r = measure.make_variable('cooling_sch', 'my variable', v, o)
60
-
61
- h = measure.to_hash
62
-
63
- expect(h[:variables].first[:static_value]).to eq 24601
64
- expect(h[:variables].first.key?(:step_size)).to eq false
65
-
66
- expect(r).to eq true
67
- end
68
-
69
- it 'should tag a normal continuous variable' do
70
- h = 'spec/files/measures/SetThermostatSchedules/measure.json'
71
- measure = OpenStudio::Analysis::WorkflowStep.from_measure_hash(
72
- 'my_instance',
73
- 'my instance display name',
74
- h,
75
- JSON.parse(File.read(h), symbolize_names: true))
76
-
77
- expect(measure.name).to eq 'my_instance'
78
- v = {
79
- type: 'normal',
80
- minimum: 0.5,
81
- maximum: 20,
82
- mean: 10,
83
- standard_deviation: 2
84
- }
85
- r = measure.make_variable('cooling_sch', 'my variable', v)
86
-
87
- h = measure.to_hash
88
-
89
- expect(h[:variables].first.key?(:step_size)).to eq false
90
-
91
- expect(r).to eq true
92
- end
93
-
94
- it 'should tag a uniform variable' do
95
- h = 'spec/files/measures/SetThermostatSchedules/measure.json'
96
- measure = OpenStudio::Analysis::WorkflowStep.from_measure_hash(
97
- 'my_instance',
98
- 'my instance display name',
99
- h,
100
- JSON.parse(File.read(h), symbolize_names: true))
101
-
102
- expect(measure.name).to eq 'my_instance'
103
- v = {
104
- type: 'uniform',
105
- minimum: 0.5,
106
- maximum: 20,
107
- mean: 10
108
- }
109
- r = measure.make_variable('cooling_sch', 'my variable', v)
110
-
111
- h = measure.to_hash
112
-
113
- # puts JSON.pretty_generate(h)
114
- expect(h[:variables].first.key?(:step_size)).to eq false
115
-
116
- expect(r).to eq true
117
- end
118
- end
@@ -1,613 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "description": "JSON Schema for the OpenStudioAnalysis File Type",
4
- "type": "object",
5
- "properties": {
6
- "analysis": {
7
- "$ref": "#/definitions/Analysis"
8
- }
9
- },
10
- "required": [
11
- "analysis"
12
- ],
13
- "additionalProperties": false,
14
- "definitions": {
15
- "Output": {
16
- "description": "Hash",
17
- "type": "object",
18
- "properties": {
19
- "units": {
20
- "description": "Haystack compliant unit string, or empty string if not applicable",
21
- "type": "string"
22
- },
23
- "objective_function": {
24
- "description": "Determines if output is part of an objective function",
25
- "type": "boolean"
26
- },
27
- "objective_function_index": {
28
- "description": "Key used to define multi-objective functions, null if not applicable",
29
- "type": "number"
30
- },
31
- "objective_function_target": {
32
- "description": "Key used to define target of the objective function, null if not applicable",
33
- "type": [
34
- "number",
35
- "null"
36
- ]
37
- },
38
- "objective_function_group": {
39
- "description": "Optional key used to define multi-objective functions",
40
- "type": "number"
41
- },
42
- "scaling_factor": {
43
- "description": "????",
44
- "type": "null"
45
- },
46
- "display_name": {
47
- "description": "User facing name of objective which must be unique",
48
- "type": "string"
49
- },
50
- "display_name_short": {
51
- "description": "User facing name less that 20 characters",
52
- "type": "string"
53
- },
54
- "metadata_id": {
55
- "description": "??????",
56
- "type": [
57
- "string",
58
- "null"
59
- ]
60
- },
61
- "name": {
62
- "description": "Snake cased output machine name",
63
- "type": "string"
64
- },
65
- "visualize": {
66
- "description": "Determines if variable will be include in plots on the server",
67
- "type": "boolean"
68
- },
69
- "export": {
70
- "description": "?????",
71
- "type": "boolean"
72
- },
73
- "variable_type": {
74
- "description": "Allowed values of 'string', 'bool', or 'number'",
75
- "type": "string"
76
- }
77
- },
78
- "required": [
79
- "units",
80
- "objective_function",
81
- "objective_function_index",
82
- "objective_function_target",
83
- "scaling_factor",
84
- "display_name",
85
- "metadata_id",
86
- "name"
87
- ],
88
- "additionalProperties": false
89
- },
90
- "Algorithm Attributes": {
91
- "title": "algorithm",
92
- "description": "Hash of attributes associated with the analysis_type",
93
- "type": "object",
94
- "additionalProperties": {
95
- "description": "Attributes defined by analysis type"
96
- }
97
- },
98
- "Argument": {
99
- "title": "argument",
100
- "description": "Individual argument instance",
101
- "type": "object",
102
- "properties": {
103
- "display_name": {
104
- "description": "User-facing display name which must be unique",
105
- "type": "string"
106
- },
107
- "display_name_short": {
108
- "description": "Optional user-facing display name under 20 characters",
109
- "type": "string"
110
- },
111
- "name": {
112
- "description": "Machine readable snake-cased name of argument as defined in the measure.xml",
113
- "type": "string"
114
- },
115
- "value_type": {
116
- "description": "Accepts inputs of 'string', 'bool', and 'number'",
117
- "type": "string"
118
- },
119
- "default_value": {
120
- "description": "Default value for argument, if defined in the measure.xml file",
121
- "type": [
122
- "string",
123
- "number",
124
- "boolean"
125
- ]
126
- },
127
- "value": {
128
- "description": "Value to set argument to in analysis",
129
- "type": [
130
- "string",
131
- "number",
132
- "boolean"
133
- ]
134
- },
135
- "machine_name": {
136
- "description": "????",
137
- "type": "string"
138
- },
139
- "uuid": {
140
- "description": "UUID for the measure from the measure.xml",
141
- "type": "string"
142
- },
143
- "version_uuid": {
144
- "description": "UUID for the measure version form the measure.xml",
145
- "type": "string"
146
- }
147
- },
148
- "required": [
149
- "display_name",
150
- "name",
151
- "value",
152
- "machine_name",
153
- "uuid",
154
- "version_uuid"
155
- ],
156
- "additionalProperties": false
157
- },
158
- "Workflow Step": {
159
- "description": "Individual measure definition",
160
- "type": "object",
161
- "properties": {
162
- "name": {
163
- "description": "Snake-cased machine readable measure name which must be unique",
164
- "type": "string"
165
- },
166
- "display_name": {
167
- "description": "User facing measure name which must also be unique",
168
- "type": "string"
169
- },
170
- "measure_type": {
171
- "description": "Accepts values of 'Ruby' 'EnergyPlus' and 'Reporting'",
172
- "type": "string"
173
- },
174
- "description": {
175
- "description": "Measure description",
176
- "type": "string"
177
- },
178
- "taxonomy": {
179
- "description": "Measure taxonomy tag",
180
- "type": "string"
181
- },
182
- "measure_definition_class_name": {
183
- "description": "Class name of measure.rb file",
184
- "type": "string"
185
- },
186
- "measure_definition_directory": {
187
- "description": "??",
188
- "type": "string"
189
- },
190
- "measure_definition_directory_local": {
191
- "description": "Local path to the measure directory",
192
- "type": "string"
193
- },
194
- "measure_definition_display_name": {
195
- "description": "?????",
196
- "type": "string"
197
- },
198
- "measure_definition_name": {
199
- "description": "?????",
200
- "type": "string"
201
- },
202
- "measure_definition_name_xml": {
203
- "description": "?????",
204
- "type": "null"
205
- },
206
- "measure_definition_uuid": {
207
- "description": "UUID of measure in measure.xml",
208
- "type": "string"
209
- },
210
- "measure_definition_version_uuid": {
211
- "description": "UUID of measure version in measure.xml",
212
- "type": "string"
213
- },
214
- "arguments": {
215
- "$ref": "#/definitions/Argument Array"
216
- },
217
- "variables": {
218
- "$ref": "#/definitions/Variable Array"
219
- },
220
- "workflow_index": {
221
- "description": "Index in workflow array, indexing from 0",
222
- "type": "number"
223
- },
224
- "workflow_step_type": {
225
- "description": "???????",
226
- "type": "string"
227
- },
228
- "version_uuid": {
229
- "description": "UUID of measure version from the measure.xml",
230
- "type": "string"
231
- },
232
- "uuid": {
233
- "description": "UUID of measure from the measure.xml",
234
- "type": "string"
235
- }
236
- },
237
- "required": [
238
- "name",
239
- "display_name",
240
- "measure_type",
241
- "measure_definition_class_name",
242
- "measure_definition_directory",
243
- "measure_definition_uuid",
244
- "measure_definition_version_uuid",
245
- "arguments",
246
- "variables",
247
- "workflow_index",
248
- "workflow_step_type",
249
- "version_uuid",
250
- "uuid"
251
- ],
252
- "additionalProperties": false
253
- },
254
- "Uncertainty Definition": {
255
- "title": "uncertainty_description",
256
- "description": "Set of attributes defining the variability of the input",
257
- "type": "object",
258
- "properties": {
259
- "type": {
260
- "description": "Uncertainty type, accepting values of 'triangle', 'uniform', 'discrete', and 'normal'",
261
- "type": "string",
262
- "oneof": [
263
- "triangle",
264
- "uniform",
265
- "normal",
266
- "discrete"
267
- ]
268
- },
269
- "attributes": {
270
- "$ref": "#/definitions/Distribution Definition"
271
- }
272
- },
273
- "required": [
274
- "type",
275
- "attributes"
276
- ],
277
- "additionalProperties": false
278
- },
279
- "Design Alternative": {
280
- "description": "Individual design alternative instance",
281
- "type": "object",
282
- "properties": {
283
- "name": {
284
- "description": "Name of design alternative",
285
- "type": "string"
286
- },
287
- "description": {
288
- "description": "Description of design alternative",
289
- "type": "string"
290
- },
291
- "seed": {
292
- "$ref": "#/definitions/Seed Object"
293
- },
294
- "options": {
295
- "description": "Each option corresponds to one WorkflowStep (i.e. Measure). Options are listed in order",
296
- "type": "array",
297
- "items": {
298
- "type": "object",
299
- "properties": {
300
- "measure_name": {
301
- "description": "Name of the measure in this workflow",
302
- "type": "string"
303
- },
304
- "workflow_index": {
305
- "description": "Index of the measure in the workflow",
306
- "type": "number"
307
- },
308
- "name": {
309
- "description": "Name of the user specified option",
310
- "type": "string"
311
- },
312
- "description": {
313
- "description": "Description of the user specified option",
314
- "type": "string"
315
- }
316
- },
317
- "additionalProperties": false
318
- }
319
- }
320
- },
321
- "required": [
322
- "name",
323
- "description"
324
- ],
325
- "additionalProperties": false
326
- },
327
- "Variable": {
328
- "description": "Individual variable instance",
329
- "type": "object",
330
- "properties": {
331
- "argument": {
332
- "$ref": "#/definitions/Argument"
333
- },
334
- "display_name": {
335
- "description": "User-facing display name which must be unique",
336
- "type": "string"
337
- },
338
- "display_name_short": {
339
- "description": "Optional user-facing name under 20 characters",
340
- "type": "string"
341
- },
342
- "variable_type": {
343
- "description": "Definition of variable type",
344
- "type": "string",
345
- "oneof": [
346
- "variable",
347
- "pivot"
348
- ]
349
- },
350
- "units": {
351
- "description": "Haystack compliant units with an empty string if not defined.",
352
- "type": "null"
353
- },
354
- "minimum": {
355
- "description": "????",
356
- "type": "number"
357
- },
358
- "maximum": {
359
- "description": "????",
360
- "type": "number"
361
- },
362
- "relation_to_output": {
363
- "description": "????",
364
- "type": "null"
365
- },
366
- "static_value": {
367
- "description": "Value to default to in the case of this variable not being perturbed in a datapoint",
368
- "type": "number"
369
- },
370
- "uuid": {
371
- "description": "Variable UUID to link against in the .osd file",
372
- "type": "string"
373
- },
374
- "version_uuid": {
375
- "description": "???",
376
- "type": "string"
377
- },
378
- "variable": {
379
- "description": "????",
380
- "type": "boolean"
381
- },
382
- "uncertainty_description": {
383
- "$ref": "#/definitions/Uncertainty Definition"
384
- },
385
- "workflow_index": {
386
- "description": "???????",
387
- "type": "number"
388
- },
389
- "machine_name": {
390
- "description": "???????",
391
- "type": "string"
392
- }
393
- },
394
- "required": [
395
- "argument",
396
- "display_name",
397
- "variable_type",
398
- "units",
399
- "static_value",
400
- "uuid",
401
- "version_uuid",
402
- "uncertainty_description",
403
- "machine_name"
404
- ],
405
- "additionalProperties": false
406
- },
407
- "Problem": {
408
- "title": "problem",
409
- "description": "Defines procedure for running the analysis",
410
- "type": "object",
411
- "properties": {
412
- "analysis_type": {
413
- "description": "Type of analysis to be run, e.g. LHS or nsga2",
414
- "type": "string",
415
- "oneof": [
416
- "morris",
417
- "lhs",
418
- "rgenound",
419
- "nsga_nrel",
420
- "spea",
421
- "sequential_search",
422
- "single_run",
423
- "batch_run",
424
- "doe",
425
- "repeat_run",
426
- "optim",
427
- "baseline_perturbation",
428
- "preflight"
429
- ]
430
- },
431
- "algorithm": {
432
- "$ref": "#/definitions/Algorithm Attributes"
433
- },
434
- "workflow": {
435
- "$ref": "#/definitions/Workflow"
436
- },
437
- "random_seed": {
438
- "description": "Random seed to set server to for the execution of the OSA file",
439
- "type": "number"
440
- },
441
- "name": {
442
- "description": "??????",
443
- "type": "string"
444
- },
445
- "design_alternatives": {
446
- "description": "Array of design alternative names and descriptions",
447
- "type": "array",
448
- "items": {
449
- "$ref": "#/definitions/Design Alternative"
450
- }
451
- }
452
- },
453
- "required": [
454
- "analysis_type",
455
- "algorithm",
456
- "workflow",
457
- "random_seed"
458
- ],
459
- "additionalProperties": false
460
- },
461
- "Output Array": {
462
- "description": "Array of objects which define user-desired outputs from the analysis ",
463
- "type": "array",
464
- "items": {
465
- "$ref": "#/definitions/Output"
466
- }
467
- },
468
- "Workflow": {
469
- "description": "Definition of measures to be applied in the analysis",
470
- "type": "array",
471
- "items": {
472
- "$ref": "#/definitions/Workflow Step"
473
- }
474
- },
475
- "Seed Object": {
476
- "title": "seed",
477
- "description": "Seed osm or idf file for default use",
478
- "type": "object",
479
- "properties": {
480
- "file_type": {
481
- "description": "Accepted values of 'osm' and 'idf'",
482
- "type": "string",
483
- "oneonf": [
484
- "osm",
485
- "idf"
486
- ]
487
- },
488
- "path": {
489
- "description": "Path to the seed file from the project directory",
490
- "type": "string"
491
- }
492
- },
493
- "required": [
494
- "file_type"
495
- ],
496
- "additionalProperties": false
497
- },
498
- "Weather File": {
499
- "title": "weather_file",
500
- "description": "Weather file for default use in the simulation",
501
- "type": "object",
502
- "properties": {
503
- "file_type": {
504
- "description": "Weather file type, e.g. TMY3",
505
- "type": "string"
506
- },
507
- "path": {
508
- "description": "Path to weather file from the project directory",
509
- "type": "string"
510
- }
511
- },
512
- "required": [
513
- "file_type",
514
- "path"
515
- ],
516
- "additionalProperties": false
517
- },
518
- "Analysis": {
519
- "title": "analysis",
520
- "description": "Analysis object",
521
- "type": "object",
522
- "properties": {
523
- "display_name": {
524
- "description": "User facing string, spaces & capitals allowed",
525
- "type": "string"
526
- },
527
- "name": {
528
- "description": "snake_cassed machine name",
529
- "type": "string"
530
- },
531
- "output_variables": {
532
- "$ref": "#/definitions/Output Array"
533
- },
534
- "problem": {
535
- "$ref": "#/definitions/Problem"
536
- },
537
- "seed": {
538
- "$ref": "#/definitions/Seed Object"
539
- },
540
- "weather_file": {
541
- "$ref": "#/definitions/Weather File"
542
- },
543
- "file_format_version": {
544
- "description": "1.0",
545
- "type": "number"
546
- },
547
- "_id": {
548
- "description": "UUID of the OSA file",
549
- "type": "string"
550
- },
551
- "uuid": {
552
- "description": "UUID of the OSA file",
553
- "type": "string"
554
- },
555
- "project_id": {
556
- "description": "?????",
557
- "type": "string"
558
- }
559
- },
560
- "required": [
561
- "output_variables",
562
- "problem",
563
- "seed",
564
- "weather_file",
565
- "_id",
566
- "uuid",
567
- "project_id"
568
- ],
569
- "additionalProperties": false
570
- },
571
- "Argument Array": {
572
- "description": "Array of fixed inputs for the measure",
573
- "type": "array",
574
- "items": {
575
- "$ref": "#/definitions/Argument"
576
- }
577
- },
578
- "Variable Array": {
579
- "description": "Array of variable inputs for the measure",
580
- "type": "array",
581
- "items": {
582
- "$ref": "#/definitions/Variable"
583
- }
584
- },
585
- "Distribution Definition": {
586
- "title": "attributes",
587
- "description": "Array of attributes defining the distribution type properties",
588
- "type": "array",
589
- "items": {
590
- "title": "Distribution Attributes",
591
- "type": "object",
592
- "properties": {
593
- "name": {
594
- "type": "string"
595
- },
596
- "value": {
597
- "type": [
598
- "array",
599
- "string",
600
- "number",
601
- "boolean"
602
- ]
603
- }
604
- },
605
- "required": [
606
- "name",
607
- "value"
608
- ],
609
- "additionalProperties": false
610
- }
611
- }
612
- }
613
- }