openstudio-analysis 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/lib/openstudio/analysis/server_api.rb +1 -1
  4. data/lib/openstudio/analysis/translator/excel.rb +55 -7
  5. data/lib/openstudio/analysis/version.rb +1 -1
  6. data/lib/openstudio/helpers/string.rb +7 -1
  7. data/lib/openstudio/templates/analysis.json.erb +1 -0
  8. data/spec/files/discrete_variables.xlsx +0 -0
  9. data/spec/files/export/analysis/discrete_seed.json +81 -75
  10. data/spec/files/export/analysis/discrete_seed.zip +0 -0
  11. data/spec/files/export/analysis/output_vars.json +654 -0
  12. data/spec/files/export/analysis/output_vars.zip +0 -0
  13. data/spec/files/export/analysis/small_seed.json +83 -77
  14. data/spec/files/export/analysis/small_seed.zip +0 -0
  15. data/spec/files/no_variables.xlsx +0 -0
  16. data/spec/files/outputvars.xlsx +0 -0
  17. data/spec/files/proxy.xlsx +0 -0
  18. data/spec/files/proxy_user.xlsx +0 -0
  19. data/spec/files/setup_version_2.xlsx +0 -0
  20. data/spec/files/small_list.xlsx +0 -0
  21. data/spec/files/small_list_incomplete.xlsx +0 -0
  22. data/spec/files/small_list_repeat_vars.xlsx +0 -0
  23. data/spec/files/small_list_validation_errors.xlsx +0 -0
  24. data/spec/files/template_input_0.1.10.xlsx +0 -0
  25. data/spec/openstudio/analysis/translator/excel_spec.rb +86 -2
  26. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.47.xml +9 -0
  27. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.48.xml +9 -0
  28. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.49.xml +9 -0
  29. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.50.xml +9 -0
  30. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.47.xml +9 -0
  31. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.48.xml +9 -0
  32. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.49.xml +9 -0
  33. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.50.xml +9 -0
  34. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.47.xml +7 -0
  35. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.48.xml +7 -0
  36. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.49.xml +7 -0
  37. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.50.xml +7 -0
  38. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.5.xml +21 -0
  39. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.6.xml +21 -0
  40. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.7.xml +21 -0
  41. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.8.xml +21 -0
  42. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.47.xml +20 -0
  43. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.48.xml +20 -0
  44. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.49.xml +20 -0
  45. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.50.xml +20 -0
  46. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.13.xml +9 -0
  47. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.14.xml +9 -0
  48. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.15.xml +9 -0
  49. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.16.xml +9 -0
  50. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.19.xml +9 -0
  51. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.20.xml +9 -0
  52. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.21.xml +9 -0
  53. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.22.xml +9 -0
  54. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.0.xml +35 -0
  55. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.1.xml +35 -0
  56. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.2.xml +37 -0
  57. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.xml +35 -0
  58. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.xml +21 -0
  59. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.40.xml +21 -0
  60. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.41.xml +21 -0
  61. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.42.xml +21 -0
  62. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.47.xml +9 -0
  63. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.48.xml +9 -0
  64. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.49.xml +9 -0
  65. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.50.xml +9 -0
  66. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.47.xml +9 -0
  67. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.48.xml +9 -0
  68. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.49.xml +9 -0
  69. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.50.xml +9 -0
  70. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.47.xml +24 -0
  71. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.48.xml +24 -0
  72. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.49.xml +24 -0
  73. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.50.xml +24 -0
  74. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.47.xml +9 -0
  75. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.48.xml +9 -0
  76. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.49.xml +9 -0
  77. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.50.xml +9 -0
  78. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.xml +13 -0
  79. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.47.xml +7 -0
  80. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.48.xml +7 -0
  81. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.49.xml +7 -0
  82. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.50.xml +7 -0
  83. metadata +124 -2
@@ -4,12 +4,18 @@
4
4
  "name": "example_analysis",
5
5
  "parameter_space": [
6
6
 
7
+ ],
8
+ "output_variables": [
9
+
7
10
  ],
8
11
  "problem": {
9
12
  "algorithm": {
10
13
  "sample_method": "all_variables",
11
14
  "number_of_samples": 100,
12
- "number_of_generations": 20
15
+ "number_of_generations": 20,
16
+ "objective_functions": [
17
+
18
+ ]
13
19
  },
14
20
  "name": "Problem",
15
21
  "workflow": [
@@ -20,64 +26,64 @@
20
26
  "machine_name": "apply_the_measure_to_a_specific_space_type_or_to_the_entire_model.",
21
27
  "name": "space_type",
22
28
  "value": "*Entire Building*",
23
- "uuid": "3ed7c540-6ad6-0131-5a4a-14109fdf0b37",
24
- "version_uuid": "3ed7e410-6ad6-0131-5a4b-14109fdf0b37"
29
+ "uuid": "073815e0-6dfc-0131-db2b-14109fdf0b37",
30
+ "version_uuid": "073832f0-6dfc-0131-db2c-14109fdf0b37"
25
31
  },
26
32
  {
27
33
  "display_name": "Increase in Material and Installation Cost for Lighting per Floor Area (%).",
28
34
  "machine_name": "increase_in_material_and_installation_cost_for_lighting_per_floor_area_(%).",
29
35
  "name": "material_and_installation_cost",
30
36
  "value": 0.0,
31
- "uuid": "3ed807c0-6ad6-0131-5a4c-14109fdf0b37",
32
- "version_uuid": "3ed82f00-6ad6-0131-5a4d-14109fdf0b37"
37
+ "uuid": "073857d0-6dfc-0131-db2d-14109fdf0b37",
38
+ "version_uuid": "073875d0-6dfc-0131-db2e-14109fdf0b37"
33
39
  },
34
40
  {
35
41
  "display_name": "Increase in Demolition Costs for Lighting per Floor Area (%).",
36
42
  "machine_name": "increase_in_demolition_costs_for_lighting_per_floor_area_(%).",
37
43
  "name": "demolition_cost",
38
44
  "value": 0.0,
39
- "uuid": "3ed85c90-6ad6-0131-5a4e-14109fdf0b37",
40
- "version_uuid": "3ed87d30-6ad6-0131-5a4f-14109fdf0b37"
45
+ "uuid": "073892d0-6dfc-0131-db2f-14109fdf0b37",
46
+ "version_uuid": "0738b1f0-6dfc-0131-db30-14109fdf0b37"
41
47
  },
42
48
  {
43
49
  "display_name": "Years Until Costs Start (whole years).",
44
50
  "machine_name": "years_until_costs_start_(whole_years).",
45
51
  "name": "years_until_costs_start",
46
52
  "value": 0,
47
- "uuid": "3ed89cf0-6ad6-0131-5a50-14109fdf0b37",
48
- "version_uuid": "3ed8b5c0-6ad6-0131-5a51-14109fdf0b37"
53
+ "uuid": "0738d490-6dfc-0131-db31-14109fdf0b37",
54
+ "version_uuid": "0738f1e0-6dfc-0131-db32-14109fdf0b37"
49
55
  },
50
56
  {
51
57
  "display_name": "Demolition Costs Occur During Initial Construction?",
52
58
  "machine_name": "demolition_costs_occur_during_initial_construction?",
53
59
  "name": "demo_cost_initial_const",
54
60
  "value": true,
55
- "uuid": "3ed8d170-6ad6-0131-5a52-14109fdf0b37",
56
- "version_uuid": "3ed8ed90-6ad6-0131-5a53-14109fdf0b37"
61
+ "uuid": "07391230-6dfc-0131-db33-14109fdf0b37",
62
+ "version_uuid": "073930f0-6dfc-0131-db34-14109fdf0b37"
57
63
  },
58
64
  {
59
65
  "display_name": "Expected Life (whole years).",
60
66
  "machine_name": "expected_life_(whole_years).",
61
67
  "name": "expected_life",
62
68
  "value": 15,
63
- "uuid": "3ed90b70-6ad6-0131-5a54-14109fdf0b37",
64
- "version_uuid": "3ed927d0-6ad6-0131-5a55-14109fdf0b37"
69
+ "uuid": "07394ce0-6dfc-0131-db35-14109fdf0b37",
70
+ "version_uuid": "073966c0-6dfc-0131-db36-14109fdf0b37"
65
71
  },
66
72
  {
67
73
  "display_name": "Increase O & M Costs for Lighting per Floor Area (%).",
68
74
  "machine_name": "increase_o_&_m_costs_for_lighting_per_floor_area_(%).",
69
75
  "name": "om_cost",
70
76
  "value": 0.0,
71
- "uuid": "3ed94620-6ad6-0131-5a56-14109fdf0b37",
72
- "version_uuid": "3ed96680-6ad6-0131-5a57-14109fdf0b37"
77
+ "uuid": "073983a0-6dfc-0131-db37-14109fdf0b37",
78
+ "version_uuid": "0739a000-6dfc-0131-db38-14109fdf0b37"
73
79
  },
74
80
  {
75
81
  "display_name": "O & M Frequency (whole years).",
76
82
  "machine_name": "o_&_m_frequency_(whole_years).",
77
83
  "name": "om_frequency",
78
84
  "value": 1,
79
- "uuid": "3ed98540-6ad6-0131-5a58-14109fdf0b37",
80
- "version_uuid": "3ed9a350-6ad6-0131-5a59-14109fdf0b37"
85
+ "uuid": "0739bd80-6dfc-0131-db39-14109fdf0b37",
86
+ "version_uuid": "0739d900-6dfc-0131-db3a-14109fdf0b37"
81
87
  }
82
88
  ],
83
89
  "bcl_measure_directory": "./measures/reduce_lighting_loads_by_percentage",
@@ -85,14 +91,14 @@
85
91
  "bcl_measure_class_name_ADDME": "ReduceLightingLoadsByPercentage",
86
92
  "measure_definition_class_name_CHANGE_TO_ME": "ReduceLightingLoadsByPercentage",
87
93
  "measure_definition_class_name": "ReduceLightingLoadsByPercentage",
88
- "bcl_measure_uuid": "3ed6d210-6ad6-0131-5a44-14109fdf0b37",
89
- "measure_definition_uuid_CHANGE_TO_ME": "3ed735b0-6ad6-0131-5a45-14109fdf0b37",
90
- "bcl_measure_version_uuid": "3ed75320-6ad6-0131-5a46-14109fdf0b37",
91
- "measure_definition_version_uuid_CHANGE_TO_ME": "3ed76f60-6ad6-0131-5a47-14109fdf0b37",
94
+ "bcl_measure_uuid": "07375450-6dfc-0131-db25-14109fdf0b37",
95
+ "measure_definition_uuid_CHANGE_TO_ME": "07377340-6dfc-0131-db26-14109fdf0b37",
96
+ "bcl_measure_version_uuid": "073797b0-6dfc-0131-db27-14109fdf0b37",
97
+ "measure_definition_version_uuid_CHANGE_TO_ME": "0737b750-6dfc-0131-db28-14109fdf0b37",
92
98
  "measure_type": "RubyMeasure",
93
99
  "name": "reduce_lighting_loads_by_percentage",
94
100
  "display_name": "Reduce Lighting Loads by Percentage",
95
- "uuid": "3ed78bf0-6ad6-0131-5a48-14109fdf0b37",
101
+ "uuid": "0737d630-6dfc-0131-db29-14109fdf0b37",
96
102
  "variables": [
97
103
  {
98
104
  "argument": {
@@ -137,7 +143,7 @@
137
143
  "version_uuid": "26e7d8de-83e3-4a53-938b-45d3e0f29953"
138
144
  }
139
145
  ],
140
- "version_uuid": "3ed7a810-6ad6-0131-5a49-14109fdf0b37",
146
+ "version_uuid": "0737f340-6dfc-0131-db2a-14109fdf0b37",
141
147
  "workflow_index": 0,
142
148
  "workflow_step_type": "Measure"
143
149
  },
@@ -148,32 +154,32 @@
148
154
  "machine_name": "apply_the_measure_to_a_specific_space_type_or_to_the_entire_model.",
149
155
  "name": "space_type",
150
156
  "value": "*Entire Building*",
151
- "uuid": "3eda8070-6ad6-0131-5a60-14109fdf0b37",
152
- "version_uuid": "3eda9ec0-6ad6-0131-5a61-14109fdf0b37"
157
+ "uuid": "073abca0-6dfc-0131-db41-14109fdf0b37",
158
+ "version_uuid": "073ad500-6dfc-0131-db42-14109fdf0b37"
153
159
  },
154
160
  {
155
161
  "display_name": "Increase in Material and Installation Costs for Building per Affected Floor Area ($/ft^2).",
156
162
  "machine_name": "increase_in_material_and_installation_costs_for_building_per_affected_floor_area_($/ft^2).",
157
163
  "name": "material_and_installation_cost",
158
164
  "value": 0.0,
159
- "uuid": "3edac4f0-6ad6-0131-5a62-14109fdf0b37",
160
- "version_uuid": "3edae250-6ad6-0131-5a63-14109fdf0b37"
165
+ "uuid": "073af730-6dfc-0131-db43-14109fdf0b37",
166
+ "version_uuid": "073b1220-6dfc-0131-db44-14109fdf0b37"
161
167
  },
162
168
  {
163
169
  "display_name": "O & M Costs for Construction per Affected Floor Area ($/ft^2).",
164
170
  "machine_name": "o_&_m_costs_for_construction_per_affected_floor_area_($/ft^2).",
165
171
  "name": "om_cost",
166
172
  "value": 0.0,
167
- "uuid": "3edb0260-6ad6-0131-5a64-14109fdf0b37",
168
- "version_uuid": "3edb2990-6ad6-0131-5a65-14109fdf0b37"
173
+ "uuid": "073b2ce0-6dfc-0131-db45-14109fdf0b37",
174
+ "version_uuid": "073b4920-6dfc-0131-db46-14109fdf0b37"
169
175
  },
170
176
  {
171
177
  "display_name": "O & M Frequency (whole years).",
172
178
  "machine_name": "o_&_m_frequency_(whole_years).",
173
179
  "name": "om_frequency",
174
180
  "value": 1,
175
- "uuid": "3edb4790-6ad6-0131-5a66-14109fdf0b37",
176
- "version_uuid": "3edb6110-6ad6-0131-5a67-14109fdf0b37"
181
+ "uuid": "073b6530-6dfc-0131-db47-14109fdf0b37",
182
+ "version_uuid": "073b80e0-6dfc-0131-db48-14109fdf0b37"
177
183
  }
178
184
  ],
179
185
  "bcl_measure_directory": "./measures/reduce_space_infiltration_by_percentage",
@@ -181,14 +187,14 @@
181
187
  "bcl_measure_class_name_ADDME": "ReduceSpaceInfiltrationByPercentage",
182
188
  "measure_definition_class_name_CHANGE_TO_ME": "ReduceSpaceInfiltrationByPercentage",
183
189
  "measure_definition_class_name": "ReduceSpaceInfiltrationByPercentage",
184
- "bcl_measure_uuid": "3ed9cc20-6ad6-0131-5a5a-14109fdf0b37",
185
- "measure_definition_uuid_CHANGE_TO_ME": "3ed9ea40-6ad6-0131-5a5b-14109fdf0b37",
186
- "bcl_measure_version_uuid": "3eda0660-6ad6-0131-5a5c-14109fdf0b37",
187
- "measure_definition_version_uuid_CHANGE_TO_ME": "3eda2210-6ad6-0131-5a5d-14109fdf0b37",
190
+ "bcl_measure_uuid": "0739fbd0-6dfc-0131-db3b-14109fdf0b37",
191
+ "measure_definition_uuid_CHANGE_TO_ME": "073a1a40-6dfc-0131-db3c-14109fdf0b37",
192
+ "bcl_measure_version_uuid": "073a4140-6dfc-0131-db3d-14109fdf0b37",
193
+ "measure_definition_version_uuid_CHANGE_TO_ME": "073a6250-6dfc-0131-db3e-14109fdf0b37",
188
194
  "measure_type": "RubyMeasure",
189
195
  "name": "reducespaceinfiltrationbypercentage",
190
196
  "display_name": "ReduceSpaceInfiltrationByPercentage",
191
- "uuid": "3eda3b60-6ad6-0131-5a5e-14109fdf0b37",
197
+ "uuid": "073a7fe0-6dfc-0131-db3f-14109fdf0b37",
192
198
  "variables": [
193
199
  {
194
200
  "argument": {
@@ -233,7 +239,7 @@
233
239
  "version_uuid": "26e7d8de-83e3-4a53-938b-45d3e0f29953"
234
240
  }
235
241
  ],
236
- "version_uuid": "3eda5e10-6ad6-0131-5a5f-14109fdf0b37",
242
+ "version_uuid": "073a9df0-6dfc-0131-db40-14109fdf0b37",
237
243
  "workflow_index": 1,
238
244
  "workflow_step_type": "Measure"
239
245
  },
@@ -244,8 +250,8 @@
244
250
  "machine_name": "alter_design_day_thermostats?",
245
251
  "name": "alter_design_days",
246
252
  "value": false,
247
- "uuid": "3edc4dd0-6ad6-0131-5a6e-14109fdf0b37",
248
- "version_uuid": "3edc6d90-6ad6-0131-5a6f-14109fdf0b37"
253
+ "uuid": "073c7490-6dfc-0131-db4f-14109fdf0b37",
254
+ "version_uuid": "073c9160-6dfc-0131-db50-14109fdf0b37"
249
255
  }
250
256
  ],
251
257
  "bcl_measure_directory": "./measures/adjust_theromstat_setpoints_by_degrees",
@@ -253,14 +259,14 @@
253
259
  "bcl_measure_class_name_ADDME": "AdjustTheromstatSetpointsByDegrees",
254
260
  "measure_definition_class_name_CHANGE_TO_ME": "AdjustTheromstatSetpointsByDegrees",
255
261
  "measure_definition_class_name": "AdjustTheromstatSetpointsByDegrees",
256
- "bcl_measure_uuid": "3edb88e0-6ad6-0131-5a68-14109fdf0b37",
257
- "measure_definition_uuid_CHANGE_TO_ME": "3edba330-6ad6-0131-5a69-14109fdf0b37",
258
- "bcl_measure_version_uuid": "3edbbf00-6ad6-0131-5a6a-14109fdf0b37",
259
- "measure_definition_version_uuid_CHANGE_TO_ME": "3edbdd90-6ad6-0131-5a6b-14109fdf0b37",
262
+ "bcl_measure_uuid": "073ba880-6dfc-0131-db49-14109fdf0b37",
263
+ "measure_definition_uuid_CHANGE_TO_ME": "073bc5a0-6dfc-0131-db4a-14109fdf0b37",
264
+ "bcl_measure_version_uuid": "073be8d0-6dfc-0131-db4b-14109fdf0b37",
265
+ "measure_definition_version_uuid_CHANGE_TO_ME": "073c0860-6dfc-0131-db4c-14109fdf0b37",
260
266
  "measure_type": "RubyMeasure",
261
267
  "name": "adjust_thermostat_setpoints_by_degrees",
262
268
  "display_name": "Adjust Thermostat Setpoints by Degrees",
263
- "uuid": "3edbf980-6ad6-0131-5a6c-14109fdf0b37",
269
+ "uuid": "073c2c70-6dfc-0131-db4d-14109fdf0b37",
264
270
  "variables": [
265
271
  {
266
272
  "argument": {
@@ -347,7 +353,7 @@
347
353
  "version_uuid": "26e7d8de-83e3-4a53-938b-45d3e0f29953"
348
354
  }
349
355
  ],
350
- "version_uuid": "3edc1580-6ad6-0131-5a6d-14109fdf0b37",
356
+ "version_uuid": "073c4920-6dfc-0131-db4e-14109fdf0b37",
351
357
  "workflow_index": 2,
352
358
  "workflow_step_type": "Measure"
353
359
  },
@@ -358,24 +364,24 @@
358
364
  "machine_name": "increase_in_material_and_installation_costs_for_construction_per_area_used_($/ft^2).",
359
365
  "name": "material_cost_increase_ip",
360
366
  "value": 0.0,
361
- "uuid": "3edd5f70-6ad6-0131-5a76-14109fdf0b37",
362
- "version_uuid": "3edd7da0-6ad6-0131-5a77-14109fdf0b37"
367
+ "uuid": "073d7760-6dfc-0131-db57-14109fdf0b37",
368
+ "version_uuid": "073d95b0-6dfc-0131-db58-14109fdf0b37"
363
369
  },
364
370
  {
365
371
  "display_name": "One Time Retrofit Cost to Add Insulation to Construction ($/ft^2).",
366
372
  "machine_name": "one_time_retrofit_cost_to_add_insulation_to_construction_($/ft^2).",
367
373
  "name": "one_time_retrofit_cost_ip",
368
374
  "value": 0.0,
369
- "uuid": "3edd9f40-6ad6-0131-5a78-14109fdf0b37",
370
- "version_uuid": "3eddbb30-6ad6-0131-5a79-14109fdf0b37"
375
+ "uuid": "073db770-6dfc-0131-db59-14109fdf0b37",
376
+ "version_uuid": "073dd660-6dfc-0131-db5a-14109fdf0b37"
371
377
  },
372
378
  {
373
379
  "display_name": "Year to Incur One Time Retrofit Cost (whole years).",
374
380
  "machine_name": "year_to_incur_one_time_retrofit_cost_(whole_years).",
375
381
  "name": "years_until_retrofit_cost",
376
382
  "value": 0,
377
- "uuid": "3eddd810-6ad6-0131-5a7a-14109fdf0b37",
378
- "version_uuid": "3eddf2e0-6ad6-0131-5a7b-14109fdf0b37"
383
+ "uuid": "073df870-6dfc-0131-db5b-14109fdf0b37",
384
+ "version_uuid": "073e1480-6dfc-0131-db5c-14109fdf0b37"
379
385
  }
380
386
  ],
381
387
  "bcl_measure_directory": "./measures/increase_insulation_r_value_for_exterior_walls",
@@ -383,14 +389,14 @@
383
389
  "bcl_measure_class_name_ADDME": "IncreaseInsulationRValueForExteriorWalls",
384
390
  "measure_definition_class_name_CHANGE_TO_ME": "IncreaseInsulationRValueForExteriorWalls",
385
391
  "measure_definition_class_name": "IncreaseInsulationRValueForExteriorWalls",
386
- "bcl_measure_uuid": "3edc9400-6ad6-0131-5a70-14109fdf0b37",
387
- "measure_definition_uuid_CHANGE_TO_ME": "3edcb380-6ad6-0131-5a71-14109fdf0b37",
388
- "bcl_measure_version_uuid": "3edcd2a0-6ad6-0131-5a72-14109fdf0b37",
389
- "measure_definition_version_uuid_CHANGE_TO_ME": "3edcf090-6ad6-0131-5a73-14109fdf0b37",
392
+ "bcl_measure_uuid": "073cb440-6dfc-0131-db51-14109fdf0b37",
393
+ "measure_definition_uuid_CHANGE_TO_ME": "073cd1e0-6dfc-0131-db52-14109fdf0b37",
394
+ "bcl_measure_version_uuid": "073cf0e0-6dfc-0131-db53-14109fdf0b37",
395
+ "measure_definition_version_uuid_CHANGE_TO_ME": "073d0fb0-6dfc-0131-db54-14109fdf0b37",
390
396
  "measure_type": "RubyMeasure",
391
397
  "name": "set_r_value_of_insulation_for_exterior_walls_to_a_specific_value",
392
398
  "display_name": "Set R-value of Insulation for Exterior Walls to a Specific Value",
393
- "uuid": "3edd1290-6ad6-0131-5a74-14109fdf0b37",
399
+ "uuid": "073d2db0-6dfc-0131-db55-14109fdf0b37",
394
400
  "variables": [
395
401
  {
396
402
  "argument": {
@@ -435,7 +441,7 @@
435
441
  "version_uuid": "26e7d8de-83e3-4a53-938b-45d3e0f29953"
436
442
  }
437
443
  ],
438
- "version_uuid": "3edd2f20-6ad6-0131-5a75-14109fdf0b37",
444
+ "version_uuid": "073d4d70-6dfc-0131-db56-14109fdf0b37",
439
445
  "workflow_index": 3,
440
446
  "workflow_step_type": "Measure"
441
447
  },
@@ -446,24 +452,24 @@
446
452
  "machine_name": "increase_in_material_and_installation_costs_for_construction_per_area_used_($/ft^2).",
447
453
  "name": "material_cost_increase_ip",
448
454
  "value": 0.0,
449
- "uuid": "3edeeb90-6ad6-0131-5a82-14109fdf0b37",
450
- "version_uuid": "3edf1ba0-6ad6-0131-5a83-14109fdf0b37"
455
+ "uuid": "073ee960-6dfc-0131-db63-14109fdf0b37",
456
+ "version_uuid": "073f0670-6dfc-0131-db64-14109fdf0b37"
451
457
  },
452
458
  {
453
459
  "display_name": "One Time Retrofit Cost to Add Insulation to Construction ($/ft^2).",
454
460
  "machine_name": "one_time_retrofit_cost_to_add_insulation_to_construction_($/ft^2).",
455
461
  "name": "one_time_retrofit_cost_ip",
456
462
  "value": 0.0,
457
- "uuid": "3edf4890-6ad6-0131-5a84-14109fdf0b37",
458
- "version_uuid": "3edf6990-6ad6-0131-5a85-14109fdf0b37"
463
+ "uuid": "073f2a30-6dfc-0131-db65-14109fdf0b37",
464
+ "version_uuid": "073f4860-6dfc-0131-db66-14109fdf0b37"
459
465
  },
460
466
  {
461
467
  "display_name": "Year to Incur One Time Retrofit Cost (whole years).",
462
468
  "machine_name": "year_to_incur_one_time_retrofit_cost_(whole_years).",
463
469
  "name": "years_until_retrofit_cost",
464
470
  "value": 0,
465
- "uuid": "3edf8c70-6ad6-0131-5a86-14109fdf0b37",
466
- "version_uuid": "3edfa720-6ad6-0131-5a87-14109fdf0b37"
471
+ "uuid": "073f63f0-6dfc-0131-db67-14109fdf0b37",
472
+ "version_uuid": "073f8250-6dfc-0131-db68-14109fdf0b37"
467
473
  }
468
474
  ],
469
475
  "bcl_measure_directory": "./measures/increase_insulation_r_value_for_roofs",
@@ -471,14 +477,14 @@
471
477
  "bcl_measure_class_name_ADDME": "IncreaseInsulationRValueForRoofs",
472
478
  "measure_definition_class_name_CHANGE_TO_ME": "IncreaseInsulationRValueForRoofs",
473
479
  "measure_definition_class_name": "IncreaseInsulationRValueForRoofs",
474
- "bcl_measure_uuid": "3ede1150-6ad6-0131-5a7c-14109fdf0b37",
475
- "measure_definition_uuid_CHANGE_TO_ME": "3ede2c90-6ad6-0131-5a7d-14109fdf0b37",
476
- "bcl_measure_version_uuid": "3ede5090-6ad6-0131-5a7e-14109fdf0b37",
477
- "measure_definition_version_uuid_CHANGE_TO_ME": "3ede7840-6ad6-0131-5a7f-14109fdf0b37",
480
+ "bcl_measure_uuid": "073e3530-6dfc-0131-db5d-14109fdf0b37",
481
+ "measure_definition_uuid_CHANGE_TO_ME": "073e5160-6dfc-0131-db5e-14109fdf0b37",
482
+ "bcl_measure_version_uuid": "073e6f70-6dfc-0131-db5f-14109fdf0b37",
483
+ "measure_definition_version_uuid_CHANGE_TO_ME": "073e8a10-6dfc-0131-db60-14109fdf0b37",
478
484
  "measure_type": "RubyMeasure",
479
485
  "name": "set_r_value_of_insulation_for_roofs_to_a_specific_value",
480
486
  "display_name": "Set R-value of Insulation for Roofs to a Specific Value",
481
- "uuid": "3ede9570-6ad6-0131-5a80-14109fdf0b37",
487
+ "uuid": "073ea7c0-6dfc-0131-db61-14109fdf0b37",
482
488
  "variables": [
483
489
  {
484
490
  "argument": {
@@ -523,7 +529,7 @@
523
529
  "version_uuid": "26e7d8de-83e3-4a53-938b-45d3e0f29953"
524
530
  }
525
531
  ],
526
- "version_uuid": "3edebad0-6ad6-0131-5a81-14109fdf0b37",
532
+ "version_uuid": "073ec200-6dfc-0131-db62-14109fdf0b37",
527
533
  "workflow_index": 4,
528
534
  "workflow_step_type": "Measure"
529
535
  },
@@ -534,8 +540,8 @@
534
540
  "machine_name": "apply_the_measure_to_a_specific_space_type_or_to_the_entire_model.",
535
541
  "name": "space_type",
536
542
  "value": "*Entire Building*",
537
- "uuid": "3ee08100-6ad6-0131-5a8e-14109fdf0b37",
538
- "version_uuid": "3ee0a530-6ad6-0131-5a8f-14109fdf0b37"
543
+ "uuid": "07406aa0-6dfc-0131-db6f-14109fdf0b37",
544
+ "version_uuid": "074087c0-6dfc-0131-db70-14109fdf0b37"
539
545
  }
540
546
  ],
541
547
  "bcl_measure_directory": "./measures/reduce_ventilation_by_percentage",
@@ -543,14 +549,14 @@
543
549
  "bcl_measure_class_name_ADDME": "ReduceVentilationByPercentage",
544
550
  "measure_definition_class_name_CHANGE_TO_ME": "ReduceVentilationByPercentage",
545
551
  "measure_definition_class_name": "ReduceVentilationByPercentage",
546
- "bcl_measure_uuid": "3edfce30-6ad6-0131-5a88-14109fdf0b37",
547
- "measure_definition_uuid_CHANGE_TO_ME": "3edfec00-6ad6-0131-5a89-14109fdf0b37",
548
- "bcl_measure_version_uuid": "3ee00830-6ad6-0131-5a8a-14109fdf0b37",
549
- "measure_definition_version_uuid_CHANGE_TO_ME": "3ee025d0-6ad6-0131-5a8b-14109fdf0b37",
552
+ "bcl_measure_uuid": "073fa4d0-6dfc-0131-db69-14109fdf0b37",
553
+ "measure_definition_uuid_CHANGE_TO_ME": "073fc0e0-6dfc-0131-db6a-14109fdf0b37",
554
+ "bcl_measure_version_uuid": "073fdda0-6dfc-0131-db6b-14109fdf0b37",
555
+ "measure_definition_version_uuid_CHANGE_TO_ME": "073ff930-6dfc-0131-db6c-14109fdf0b37",
550
556
  "measure_type": "RubyMeasure",
551
557
  "name": "reduce_ventilation_by_percentage",
552
558
  "display_name": "Reduce Ventilation By Percentage",
553
- "uuid": "3ee044c0-6ad6-0131-5a8c-14109fdf0b37",
559
+ "uuid": "074020b0-6dfc-0131-db6d-14109fdf0b37",
554
560
  "variables": [
555
561
  {
556
562
  "argument": {
@@ -595,7 +601,7 @@
595
601
  "version_uuid": "26e7d8de-83e3-4a53-938b-45d3e0f29953"
596
602
  }
597
603
  ],
598
- "version_uuid": "3ee060f0-6ad6-0131-5a8d-14109fdf0b37",
604
+ "version_uuid": "07404090-6dfc-0131-db6e-14109fdf0b37",
599
605
  "workflow_index": 5,
600
606
  "workflow_step_type": "Measure"
601
607
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -104,7 +104,7 @@ describe OpenStudio::Analysis::Translator::Excel do
104
104
  end
105
105
  end
106
106
 
107
- context "setup version 2" do
107
+ context "setup version 0.1.9" do
108
108
  before(:all) do
109
109
  @excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/setup_version_2.xlsx")
110
110
  @excel.process
@@ -178,12 +178,96 @@ describe OpenStudio::Analysis::Translator::Excel do
178
178
  end
179
179
  end
180
180
  end
181
-
181
+
182
182
  it "should save the file" do
183
183
  @excel.save_analysis
184
184
  end
185
185
  end
186
186
 
187
+ context "setup output variables" do
188
+ before(:all) do
189
+ @excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/outputvars.xlsx")
190
+ @excel.process
191
+ end
192
+
193
+ it "should have a model" do
194
+ @excel.models.first.should_not be_nil
195
+ puts @excel.models.first[:name].should eq("output_vars")
196
+ end
197
+
198
+ it "should have a weather file" do
199
+ @excel.weather_files.first.should_not be_nil
200
+ puts @excel.weather_files.first
201
+ expect(@excel.weather_files.first.include?("partial_weather.epw")).to eq(true)
202
+ end
203
+
204
+ it "should have notes and source" do
205
+ @excel.variables['data'].each do |measure|
206
+ measure['variables'].each do |var|
207
+ if var['machine_name'] == 'lighting_power_reduction'
208
+ expect(var['distribution']['source']).to eq("some data source")
209
+ elsif var['machine_name'] == 'demo_cost_initial_const'
210
+ expect(var['notes']).to eq("some note")
211
+ end
212
+ end
213
+ end
214
+ end
215
+
216
+ it "should have typed booleans" do
217
+ expect(@excel.run_setup['use_server_as_worker']).to eq(true)
218
+ expect(@excel.run_setup['allow_multiple_jobs']).to eq(true)
219
+ end
220
+
221
+ it "should have algorithm setup" do
222
+ expect(@excel.algorithm["number_of_samples"]).to eq(100)
223
+ expect(@excel.algorithm["number_of_generations"]).to eq(20)
224
+ expect(@excel.algorithm["sample_method"]).to eq("all_variables")
225
+ expect(@excel.algorithm["number_of_generations"]).to be_a Integer
226
+ #expect(@excel.algorithm["tolerance"]).to eq(0.115)
227
+ #expect(@excel.algorithm["tolerance"]).to be_a Float
228
+
229
+ end
230
+
231
+ it "should create a valid hash" do
232
+ h = @excel.create_analysis_hash
233
+
234
+ expect(h['analysis']['problem']['analysis_type']).to eq("nsga")
235
+ expect(h['analysis']['problem']['algorithm']).not_to be_nil
236
+ expect(h['analysis']['problem']['algorithm']['number_of_samples']).to eq(100)
237
+ expect(h['analysis']['problem']['algorithm']['sample_method']).to eq("all_variables")
238
+ end
239
+
240
+
241
+ it "should write a json" do
242
+ @excel.save_analysis
243
+ expect(File).to exist("spec/files/export/analysis/output_vars.json")
244
+ expect(File).to exist("spec/files/export/analysis/output_vars.zip")
245
+
246
+ expect(JSON.parse(File.read("spec/files/export/analysis/output_vars.json"))).not_to be_nil
247
+
248
+ end
249
+ end
250
+
251
+ context "version 0.1.10" do
252
+ before(:all) do
253
+ @excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/template_input_0.1.10.xlsx")
254
+ end
255
+
256
+ it "should process" do
257
+ expect(@excel.process).to eq(true)
258
+ end
259
+
260
+ it "should have new setting variables" do
261
+ puts @excel.settings.inspect
262
+ expect(@excel.settings["user_id"]).to eq('new_user')
263
+ expect(@excel.settings["openstudio_server_version"]).to eq('1.3.2')
264
+ expect(@excel.settings["cluster_name"]).to eq('analysis_cluster')
265
+ puts @excel.run_setup.inspect
266
+ expect(@excel.run_setup["analysis_name"]).to eq('LHS Example Project')
267
+ end
268
+ end
269
+
270
+
187
271
  end
188
272
 
189
273
 
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.018595" failures="0" errors="0" skipped="0">
3
+ <testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.001994">
4
+ </testcase>
5
+ <system-out>
6
+ </system-out>
7
+ <system-err>
8
+ </system-err>
9
+ </testsuite>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.016529" failures="0" errors="0" skipped="0">
3
+ <testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000576">
4
+ </testcase>
5
+ <system-out>
6
+ </system-out>
7
+ <system-err>
8
+ </system-err>
9
+ </testsuite>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.042088" failures="0" errors="0" skipped="0">
3
+ <testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000637">
4
+ </testcase>
5
+ <system-out>
6
+ </system-out>
7
+ <system-err>
8
+ </system-err>
9
+ </testsuite>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.032464" failures="0" errors="0" skipped="0">
3
+ <testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000614">
4
+ </testcase>
5
+ <system-out>
6
+ </system-out>
7
+ <system-err>
8
+ </system-err>
9
+ </testsuite>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="OpenStudio::Analysis::ServerApi test not localhost" tests="1" time="0.000765" failures="0" errors="0" skipped="0">
3
+ <testcase name="OpenStudio::Analysis::ServerApi test not localhost should have a not localhost URL" time="0.000438">
4
+ </testcase>
5
+ <system-out>
6
+ </system-out>
7
+ <system-err>
8
+ </system-err>
9
+ </testsuite>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="OpenStudio::Analysis::ServerApi test not localhost" tests="1" time="0.000575" failures="0" errors="0" skipped="0">
3
+ <testcase name="OpenStudio::Analysis::ServerApi test not localhost should have a not localhost URL" time="0.000333">
4
+ </testcase>
5
+ <system-out>
6
+ </system-out>
7
+ <system-err>
8
+ </system-err>
9
+ </testsuite>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="OpenStudio::Analysis::ServerApi test not localhost" tests="1" time="0.000631" failures="0" errors="0" skipped="0">
3
+ <testcase name="OpenStudio::Analysis::ServerApi test not localhost should have a not localhost URL" time="0.000371">
4
+ </testcase>
5
+ <system-out>
6
+ </system-out>
7
+ <system-err>
8
+ </system-err>
9
+ </testsuite>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="OpenStudio::Analysis::ServerApi test not localhost" tests="1" time="0.000655" failures="0" errors="0" skipped="0">
3
+ <testcase name="OpenStudio::Analysis::ServerApi test not localhost should have a not localhost URL" time="0.000393">
4
+ </testcase>
5
+ <system-out>
6
+ </system-out>
7
+ <system-err>
8
+ </system-err>
9
+ </testsuite>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite name="OpenStudio::Analysis::ServerApi" tests="0" time="0.000161" failures="0" errors="0" skipped="0">
3
+ <system-out>
4
+ </system-out>
5
+ <system-err>
6
+ </system-err>
7
+ </testsuite>