urbanopt-cli 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/CMakeLists.txt +7 -7
- data/Gemfile +8 -2
- data/example_files/example_project_with_streets.json +826 -0
- data/example_files/mappers/Baseline.rb +1 -1
- data/example_files/visualization/input_visualization_feature.html +13 -14
- data/example_files/visualization/input_visualization_scenario.html +14 -9
- data/lib/uo_cli.rb +83 -14
- data/lib/uo_cli/version.rb +1 -1
- data/uo_cli.gemspec +2 -1
- metadata +19 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc3f2e38d0e23b0b01add165d3459f4abf5b37482018d148e89ffeaa024db9b9
|
4
|
+
data.tar.gz: 763bfe69e81be0763235196abb1e2749483fc1f9c6a6718e5a97222cbbd0c5fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd2a7ff86a5ba8442b9b03836c0b299d55ddad8175e9757049cfccab1877efc1cb153b9653b3725735e5d13fc161412e0d62d8d6c9a250e911dc246ef4cff4bc
|
7
|
+
data.tar.gz: 526a186e149cce00eee2ee85694a6d3b84d903d42cf94d6c214698f13c7db05aab04cc8cfef57d6f5ce0f244b55a8ee811cbcba7b3ae63c7105328b4230b5905
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 0.6.2
|
4
|
+
|
5
|
+
Date Range 7/2/21 - 7/22/21
|
6
|
+
|
7
|
+
- Fixed [#246]( https://github.com/urbanopt/urbanopt-cli/issues/246 ), Fix Visualizations for other fuels
|
8
|
+
- Fixed [#250]( https://github.com/urbanopt/urbanopt-cli/issues/250 ), Integrate RNM functionality
|
9
|
+
- Fixed [#252]( https://github.com/urbanopt/urbanopt-cli/issues/252 ), Utilize ASHRAE 90.1 Laboratory prototype model
|
10
|
+
|
3
11
|
## Version 0.6.1
|
4
12
|
|
5
13
|
Date Range 5/1/21 - 7/1/21
|
data/CMakeLists.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
cmake_minimum_required(VERSION 3.10.2)
|
2
2
|
cmake_policy(SET CMP0048 NEW)
|
3
3
|
|
4
|
-
project(UrbanOptCLI VERSION 0.6.
|
4
|
+
project(UrbanOptCLI VERSION 0.6.1)
|
5
5
|
|
6
6
|
include(FindOpenStudioSDK.cmake)
|
7
7
|
|
@@ -89,16 +89,16 @@ option(BUILD_PACKAGE "Build package" OFF)
|
|
89
89
|
# need to update the MD5sum for each platform and url below
|
90
90
|
if(UNIX)
|
91
91
|
if(APPLE)
|
92
|
-
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-
|
93
|
-
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "
|
92
|
+
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20210709-darwin.tar.gz")
|
93
|
+
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "87513383adca79de074cca2ea4ffc4a8")
|
94
94
|
else()
|
95
|
-
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-
|
96
|
-
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "
|
95
|
+
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20210709-linux.tar.gz")
|
96
|
+
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "93ce8920db98344a44abd691567c2c77")
|
97
97
|
endif()
|
98
98
|
elseif(WIN32)
|
99
99
|
if(CMAKE_CL_64)
|
100
|
-
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-
|
101
|
-
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "
|
100
|
+
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20210709-windows.tar.gz")
|
101
|
+
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "487e0668e92cc44e46a59693ccb910a3")
|
102
102
|
endif()
|
103
103
|
endif()
|
104
104
|
|
data/Gemfile
CHANGED
@@ -42,13 +42,13 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
42
42
|
# if allow_local && File.exist?('../urbanopt-geojson-gem')
|
43
43
|
# gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
|
44
44
|
# elsif allow_local
|
45
|
-
#
|
45
|
+
# gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
|
46
46
|
# end
|
47
47
|
|
48
48
|
# if allow_local && File.exist?('../urbanopt-reopt-gem')
|
49
49
|
# gem 'urbanopt-reopt', path: '../urbanopt-reopt-gem'
|
50
50
|
# elsif allow_local
|
51
|
-
gem 'urbanopt-reopt', github: 'URBANopt/urbanopt-reopt-gem', branch: 'develop'
|
51
|
+
# gem 'urbanopt-reopt', github: 'URBANopt/urbanopt-reopt-gem', branch: 'develop'
|
52
52
|
# end
|
53
53
|
|
54
54
|
# if allow_local && File.exist?('../openstudio-load-flexibility-measures')
|
@@ -62,3 +62,9 @@ gem 'urbanopt-reopt', github: 'URBANopt/urbanopt-reopt-gem', branch: 'develop'
|
|
62
62
|
# elsif allow_local
|
63
63
|
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
|
64
64
|
# end
|
65
|
+
|
66
|
+
# if allow_local && File.exist?('../urbanopt-rnm-us-gem')
|
67
|
+
# gem 'urbanopt-rnm-us', path: '../urbanopt-rnm-us-gem'
|
68
|
+
# elsif allow_local
|
69
|
+
# gem 'urbanopt-rnm-us', github: 'URBANopt/urbanopt-rnm-us-gem', branch: 'develop'
|
70
|
+
# end
|
@@ -0,0 +1,826 @@
|
|
1
|
+
{
|
2
|
+
"type": "FeatureCollection",
|
3
|
+
"project": {
|
4
|
+
"id": "7c33a001-bccb-413e-ac87-67558b5d4b07",
|
5
|
+
"name": "New Project",
|
6
|
+
"surface_elevation": null,
|
7
|
+
"import_surrounding_buildings_as_shading": null,
|
8
|
+
"weather_filename": "USA_NY_Buffalo-Greater.Buffalo.Intl.AP.725280_TMY3.epw",
|
9
|
+
"tariff_filename": null,
|
10
|
+
"climate_zone": "6A",
|
11
|
+
"cec_climate_zone": null,
|
12
|
+
"begin_date": "2017-01-01T07:00:00.000Z",
|
13
|
+
"end_date": "2017-12-31T07:00:00.000Z",
|
14
|
+
"timesteps_per_hour": 1,
|
15
|
+
"default_template": "90.1-2013",
|
16
|
+
"underground_cables_ratio": "0.9",
|
17
|
+
"only_lv_consumers": false,
|
18
|
+
"max_number_of_lv_nodes_per_building": 1
|
19
|
+
},
|
20
|
+
"features": [
|
21
|
+
{
|
22
|
+
"type": "Feature",
|
23
|
+
"properties": {
|
24
|
+
"id": "53340c2c-ab20-40db-aba1-11ac607c52a7",
|
25
|
+
"begin_date": "2017-01-01T07:00:00.000Z",
|
26
|
+
"cec_climate_zone": null,
|
27
|
+
"climate_zone": "6A",
|
28
|
+
"default_template": "90.1-2013",
|
29
|
+
"end_date": "2017-12-31T07:00:00.000Z",
|
30
|
+
"import_surrounding_buildings_as_shading": null,
|
31
|
+
"name": "Site Origin",
|
32
|
+
"surface_elevation": null,
|
33
|
+
"tariff_filename": null,
|
34
|
+
"timesteps_per_hour": 1,
|
35
|
+
"type": "Site Origin",
|
36
|
+
"weather_filename": "USA_NY_Buffalo-Greater.Buffalo.Intl.AP.725280_TMY3.epw"
|
37
|
+
},
|
38
|
+
"geometry": {
|
39
|
+
"coordinates": [
|
40
|
+
-78.84948467732347,
|
41
|
+
42.81677154451123
|
42
|
+
],
|
43
|
+
"type": "Point"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"type": "Feature",
|
48
|
+
"properties": {
|
49
|
+
"id": "1",
|
50
|
+
"building_type": "Mixed use",
|
51
|
+
"floor_area": 752184,
|
52
|
+
"footprint_area": 188046,
|
53
|
+
"mixed_type_1": "Office",
|
54
|
+
"mixed_type_1_percentage": 50,
|
55
|
+
"mixed_type_2": "Food service",
|
56
|
+
"mixed_type_2_percentage": 50,
|
57
|
+
"mixed_type_3": "Strip shopping mall",
|
58
|
+
"mixed_type_3_percentage": 0,
|
59
|
+
"mixed_type_4": "Lodging",
|
60
|
+
"mixed_type_4_percentage": 0,
|
61
|
+
"name": "Mixed_use 1",
|
62
|
+
"number_of_stories": 4,
|
63
|
+
"type": "Building"
|
64
|
+
},
|
65
|
+
"geometry": {
|
66
|
+
"coordinates": [
|
67
|
+
[
|
68
|
+
[
|
69
|
+
-78.84650338745196,
|
70
|
+
42.81331301863236
|
71
|
+
],
|
72
|
+
[
|
73
|
+
-78.84652443964629,
|
74
|
+
42.81463974371101
|
75
|
+
],
|
76
|
+
[
|
77
|
+
-78.84680142363833,
|
78
|
+
42.815293654042534
|
79
|
+
],
|
80
|
+
[
|
81
|
+
-78.84744455124724,
|
82
|
+
42.81514110006128
|
83
|
+
],
|
84
|
+
[
|
85
|
+
-78.84728610028628,
|
86
|
+
42.81478165791734
|
87
|
+
],
|
88
|
+
[
|
89
|
+
-78.84786797764677,
|
90
|
+
42.814643631760134
|
91
|
+
],
|
92
|
+
[
|
93
|
+
-78.84721106637106,
|
94
|
+
42.813153418927016
|
95
|
+
],
|
96
|
+
[
|
97
|
+
-78.84650338745196,
|
98
|
+
42.81331301863236
|
99
|
+
]
|
100
|
+
]
|
101
|
+
],
|
102
|
+
"type": "Polygon"
|
103
|
+
}
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"type": "Feature",
|
107
|
+
"properties": {
|
108
|
+
"id": "2",
|
109
|
+
"building_type": "Food service",
|
110
|
+
"floor_area": 22313,
|
111
|
+
"footprint_area": 22313,
|
112
|
+
"name": "Restaurant 1",
|
113
|
+
"number_of_stories": 1,
|
114
|
+
"type": "Building"
|
115
|
+
},
|
116
|
+
"geometry": {
|
117
|
+
"coordinates": [
|
118
|
+
[
|
119
|
+
[
|
120
|
+
-78.8500120420453,
|
121
|
+
42.81812185529549
|
122
|
+
],
|
123
|
+
[
|
124
|
+
-78.85038975191084,
|
125
|
+
42.81803226424341
|
126
|
+
],
|
127
|
+
[
|
128
|
+
-78.850630729414,
|
129
|
+
42.81857888627522
|
130
|
+
],
|
131
|
+
[
|
132
|
+
-78.85025301954843,
|
133
|
+
42.81866847653532
|
134
|
+
],
|
135
|
+
[
|
136
|
+
-78.8500120420453,
|
137
|
+
42.81812185529549
|
138
|
+
]
|
139
|
+
]
|
140
|
+
],
|
141
|
+
"type": "Polygon"
|
142
|
+
}
|
143
|
+
},
|
144
|
+
{
|
145
|
+
"type": "Feature",
|
146
|
+
"properties": {
|
147
|
+
"id": "3",
|
148
|
+
"name": "Restaurant 10",
|
149
|
+
"type": "Building",
|
150
|
+
"footprint_area": 41877,
|
151
|
+
"floor_area": 125631,
|
152
|
+
"number_of_stories": 3,
|
153
|
+
"building_type": "Food service"
|
154
|
+
},
|
155
|
+
"geometry": {
|
156
|
+
"type": "Polygon",
|
157
|
+
"coordinates": [
|
158
|
+
[
|
159
|
+
[
|
160
|
+
-78.84962224800356,
|
161
|
+
42.81329273502644
|
162
|
+
],
|
163
|
+
[
|
164
|
+
-78.84929833482822,
|
165
|
+
42.81337083838241
|
166
|
+
],
|
167
|
+
[
|
168
|
+
-78.84983265832118,
|
169
|
+
42.814563298664666
|
170
|
+
],
|
171
|
+
[
|
172
|
+
-78.85015657149653,
|
173
|
+
42.81448519681467
|
174
|
+
],
|
175
|
+
[
|
176
|
+
-78.84962224800356,
|
177
|
+
42.81329273502644
|
178
|
+
]
|
179
|
+
]
|
180
|
+
]
|
181
|
+
}
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"type": "Feature",
|
185
|
+
"properties": {
|
186
|
+
"id": "4",
|
187
|
+
"name": "Restaurant 12",
|
188
|
+
"type": "Building",
|
189
|
+
"footprint_area": 10541,
|
190
|
+
"floor_area": 31623,
|
191
|
+
"number_of_stories": 3,
|
192
|
+
"building_type": "Food service"
|
193
|
+
},
|
194
|
+
"geometry": {
|
195
|
+
"type": "Polygon",
|
196
|
+
"coordinates": [
|
197
|
+
[
|
198
|
+
[
|
199
|
+
-78.84907318596754,
|
200
|
+
42.81342719667407
|
201
|
+
],
|
202
|
+
[
|
203
|
+
-78.84862090048105,
|
204
|
+
42.81353625345659
|
205
|
+
],
|
206
|
+
[
|
207
|
+
-78.84871721918239,
|
208
|
+
42.813751210926796
|
209
|
+
],
|
210
|
+
[
|
211
|
+
-78.84916950466888,
|
212
|
+
42.81364215452331
|
213
|
+
],
|
214
|
+
[
|
215
|
+
-78.84907318596754,
|
216
|
+
42.81342719667407
|
217
|
+
]
|
218
|
+
]
|
219
|
+
]
|
220
|
+
}
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"type": "Feature",
|
224
|
+
"properties": {
|
225
|
+
"id": "5",
|
226
|
+
"name": "Restaurant 14",
|
227
|
+
"type": "Building",
|
228
|
+
"footprint_area": 8804,
|
229
|
+
"floor_area": 8804,
|
230
|
+
"number_of_stories": 1,
|
231
|
+
"building_type": "Food service"
|
232
|
+
},
|
233
|
+
"geometry": {
|
234
|
+
"type": "Polygon",
|
235
|
+
"coordinates": [
|
236
|
+
[
|
237
|
+
[
|
238
|
+
-78.84809175426629,
|
239
|
+
42.81367038997507
|
240
|
+
],
|
241
|
+
[
|
242
|
+
-78.84848670778973,
|
243
|
+
42.81357515750889
|
244
|
+
],
|
245
|
+
[
|
246
|
+
-78.84857883872144,
|
247
|
+
42.81378076888831
|
248
|
+
],
|
249
|
+
[
|
250
|
+
-78.84818388519801,
|
251
|
+
42.81387600103781
|
252
|
+
],
|
253
|
+
[
|
254
|
+
-78.84809175426629,
|
255
|
+
42.81367038997507
|
256
|
+
]
|
257
|
+
]
|
258
|
+
]
|
259
|
+
}
|
260
|
+
},
|
261
|
+
{
|
262
|
+
"type": "Feature",
|
263
|
+
"properties": {
|
264
|
+
"id": "6",
|
265
|
+
"name": "Restaurant 15",
|
266
|
+
"type": "Building",
|
267
|
+
"footprint_area": 10689,
|
268
|
+
"floor_area": 10689,
|
269
|
+
"number_of_stories": 1,
|
270
|
+
"building_type": "Food service"
|
271
|
+
},
|
272
|
+
"geometry": {
|
273
|
+
"type": "Polygon",
|
274
|
+
"coordinates": [
|
275
|
+
[
|
276
|
+
[
|
277
|
+
-78.84846106738529,
|
278
|
+
42.814495803077364
|
279
|
+
],
|
280
|
+
[
|
281
|
+
-78.8486903952376,
|
282
|
+
42.81444050756261
|
283
|
+
],
|
284
|
+
[
|
285
|
+
-78.8484977578349,
|
286
|
+
42.81401059666683
|
287
|
+
],
|
288
|
+
[
|
289
|
+
-78.84826842998261,
|
290
|
+
42.81406589256599
|
291
|
+
],
|
292
|
+
[
|
293
|
+
-78.84846106738529,
|
294
|
+
42.814495803077364
|
295
|
+
]
|
296
|
+
]
|
297
|
+
]
|
298
|
+
}
|
299
|
+
},
|
300
|
+
{
|
301
|
+
"type": "Feature",
|
302
|
+
"properties": {
|
303
|
+
"id": "7",
|
304
|
+
"building_type": "Office",
|
305
|
+
"detailed_model_filename": "7.osm",
|
306
|
+
"number_of_stories": 6,
|
307
|
+
"name": "Office 1",
|
308
|
+
"type": "Building"
|
309
|
+
},
|
310
|
+
"geometry": {
|
311
|
+
"coordinates": [
|
312
|
+
[
|
313
|
+
[
|
314
|
+
-78.84733878006863,
|
315
|
+
42.816466983030836
|
316
|
+
],
|
317
|
+
[
|
318
|
+
-78.84854275129324,
|
319
|
+
42.81617669028003
|
320
|
+
],
|
321
|
+
[
|
322
|
+
-78.848356395545,
|
323
|
+
42.81576080994094
|
324
|
+
],
|
325
|
+
[
|
326
|
+
-78.84715242432038,
|
327
|
+
42.81605110464406
|
328
|
+
],
|
329
|
+
[
|
330
|
+
-78.84733878006863,
|
331
|
+
42.816466983030836
|
332
|
+
]
|
333
|
+
]
|
334
|
+
],
|
335
|
+
"type": "Polygon"
|
336
|
+
}
|
337
|
+
},
|
338
|
+
{
|
339
|
+
"type": "Feature",
|
340
|
+
"properties": {
|
341
|
+
"id": "8",
|
342
|
+
"building_type": "Outpatient health care",
|
343
|
+
"name": "Hospital 1",
|
344
|
+
"detailed_model_filename": "8.osm",
|
345
|
+
"number_of_stories": 10,
|
346
|
+
"type": "Building"
|
347
|
+
},
|
348
|
+
"geometry": {
|
349
|
+
"coordinates": [
|
350
|
+
[
|
351
|
+
[
|
352
|
+
-78.84973966335251,
|
353
|
+
42.8154441454509
|
354
|
+
],
|
355
|
+
[
|
356
|
+
-78.85049562542395,
|
357
|
+
42.81525669280299
|
358
|
+
],
|
359
|
+
[
|
360
|
+
-78.85078257620685,
|
361
|
+
42.81588131780643
|
362
|
+
],
|
363
|
+
[
|
364
|
+
-78.8505086568277,
|
365
|
+
42.81594736368234
|
366
|
+
],
|
367
|
+
[
|
368
|
+
-78.85041233812638,
|
369
|
+
42.815732413845666
|
370
|
+
],
|
371
|
+
[
|
372
|
+
-78.84991755499783,
|
373
|
+
42.81585689105046
|
374
|
+
],
|
375
|
+
[
|
376
|
+
-78.84973966335251,
|
377
|
+
42.8154441454509
|
378
|
+
]
|
379
|
+
]
|
380
|
+
],
|
381
|
+
"type": "Polygon"
|
382
|
+
}
|
383
|
+
},
|
384
|
+
{
|
385
|
+
"type": "Feature",
|
386
|
+
"properties": {
|
387
|
+
"id": "9",
|
388
|
+
"building_type": "Inpatient health care",
|
389
|
+
"detailed_model_filename": "9.osm",
|
390
|
+
"name": "Hospital 2",
|
391
|
+
"number_of_stories": 3,
|
392
|
+
"type": "Building"
|
393
|
+
},
|
394
|
+
"geometry": {
|
395
|
+
"coordinates": [
|
396
|
+
[
|
397
|
+
[
|
398
|
+
-78.85083627755732,
|
399
|
+
42.81600678613279
|
400
|
+
],
|
401
|
+
[
|
402
|
+
-78.85056039001891,
|
403
|
+
42.816076133580566
|
404
|
+
],
|
405
|
+
[
|
406
|
+
-78.85072568130569,
|
407
|
+
42.816450649528036
|
408
|
+
],
|
409
|
+
[
|
410
|
+
-78.84940134236577,
|
411
|
+
42.81677160705479
|
412
|
+
],
|
413
|
+
[
|
414
|
+
-78.84958014898304,
|
415
|
+
42.81716858994267
|
416
|
+
],
|
417
|
+
[
|
418
|
+
-78.8507262115271,
|
419
|
+
42.816890840117026
|
420
|
+
],
|
421
|
+
[
|
422
|
+
-78.8508565789851,
|
423
|
+
42.81719595796099
|
424
|
+
],
|
425
|
+
[
|
426
|
+
-78.85132137101688,
|
427
|
+
42.81708331517635
|
428
|
+
],
|
429
|
+
[
|
430
|
+
-78.85083627755732,
|
431
|
+
42.81600678613279
|
432
|
+
]
|
433
|
+
]
|
434
|
+
],
|
435
|
+
"type": "Polygon"
|
436
|
+
}
|
437
|
+
},
|
438
|
+
{
|
439
|
+
"type": "Feature",
|
440
|
+
"properties": {
|
441
|
+
"id": "10",
|
442
|
+
"building_type": "Mixed use",
|
443
|
+
"floor_area": 1278384,
|
444
|
+
"footprint_area": 159798,
|
445
|
+
"mixed_type_1": "Strip shopping mall",
|
446
|
+
"mixed_type_1_percentage": 25,
|
447
|
+
"mixed_type_2": "Food service",
|
448
|
+
"mixed_type_2_percentage": 25,
|
449
|
+
"mixed_type_3": "Office",
|
450
|
+
"mixed_type_3_percentage": 15,
|
451
|
+
"mixed_type_4": "Lodging",
|
452
|
+
"mixed_type_4_percentage": 35,
|
453
|
+
"name": "Mixed use 2",
|
454
|
+
"number_of_stories": 8,
|
455
|
+
"type": "Building"
|
456
|
+
},
|
457
|
+
"geometry": {
|
458
|
+
"coordinates": [
|
459
|
+
[
|
460
|
+
[
|
461
|
+
-78.85115264550463,
|
462
|
+
42.81786093060211
|
463
|
+
],
|
464
|
+
[
|
465
|
+
-78.85163483958878,
|
466
|
+
42.81774467026972
|
467
|
+
],
|
468
|
+
[
|
469
|
+
-78.85246596719499,
|
470
|
+
42.819583261120755
|
471
|
+
],
|
472
|
+
[
|
473
|
+
-78.85082390085432,
|
474
|
+
42.819979162017745
|
475
|
+
],
|
476
|
+
[
|
477
|
+
-78.85060552295334,
|
478
|
+
42.81947573727234
|
479
|
+
],
|
480
|
+
[
|
481
|
+
-78.85174564783776,
|
482
|
+
42.81920483484765
|
483
|
+
],
|
484
|
+
[
|
485
|
+
-78.85115264550463,
|
486
|
+
42.81786093060211
|
487
|
+
]
|
488
|
+
]
|
489
|
+
],
|
490
|
+
"type": "Polygon"
|
491
|
+
}
|
492
|
+
},
|
493
|
+
{
|
494
|
+
"type": "Feature",
|
495
|
+
"properties": {
|
496
|
+
"id": "11",
|
497
|
+
"name": "Restaurant 13",
|
498
|
+
"type": "Building",
|
499
|
+
"footprint_area": 10837,
|
500
|
+
"floor_area": 32511,
|
501
|
+
"number_of_stories": 3,
|
502
|
+
"building_type": "Food service"
|
503
|
+
},
|
504
|
+
"geometry": {
|
505
|
+
"type": "Polygon",
|
506
|
+
"coordinates": [
|
507
|
+
[
|
508
|
+
[
|
509
|
+
-78.84961163640645,
|
510
|
+
42.81460851835703
|
511
|
+
],
|
512
|
+
[
|
513
|
+
-78.84914661048371,
|
514
|
+
42.81472064501696
|
515
|
+
],
|
516
|
+
[
|
517
|
+
-78.84905029178236,
|
518
|
+
42.81450569091638
|
519
|
+
],
|
520
|
+
[
|
521
|
+
-78.84951531770513,
|
522
|
+
42.81439356386673
|
523
|
+
],
|
524
|
+
[
|
525
|
+
-78.84961163640645,
|
526
|
+
42.81460851835703
|
527
|
+
]
|
528
|
+
]
|
529
|
+
]
|
530
|
+
}
|
531
|
+
},
|
532
|
+
{
|
533
|
+
"type": "Feature",
|
534
|
+
"properties": {
|
535
|
+
"id": "12",
|
536
|
+
"building_type": "Strip shopping mall",
|
537
|
+
"floor_area": 374409,
|
538
|
+
"footprint_area": 124803,
|
539
|
+
"name": "Mall 1",
|
540
|
+
"number_of_stories": 3,
|
541
|
+
"type": "Building"
|
542
|
+
},
|
543
|
+
"geometry": {
|
544
|
+
"coordinates": [
|
545
|
+
[
|
546
|
+
[
|
547
|
+
-78.84768338040897,
|
548
|
+
42.817161656757065
|
549
|
+
],
|
550
|
+
[
|
551
|
+
-78.8482630702579,
|
552
|
+
42.8170218879136
|
553
|
+
],
|
554
|
+
[
|
555
|
+
-78.84915297130291,
|
556
|
+
42.81900776764229
|
557
|
+
],
|
558
|
+
[
|
559
|
+
-78.84857328145401,
|
560
|
+
42.81914753199706
|
561
|
+
],
|
562
|
+
[
|
563
|
+
-78.84768338040897,
|
564
|
+
42.817161656757065
|
565
|
+
]
|
566
|
+
]
|
567
|
+
],
|
568
|
+
"type": "Polygon"
|
569
|
+
}
|
570
|
+
},
|
571
|
+
{
|
572
|
+
"type": "Feature",
|
573
|
+
"properties": {
|
574
|
+
"id": "13",
|
575
|
+
"building_type": "Lodging",
|
576
|
+
"floor_area": 316160,
|
577
|
+
"footprint_area": 31616,
|
578
|
+
"name": "Hotel 1",
|
579
|
+
"number_of_stories": 10,
|
580
|
+
"type": "Building"
|
581
|
+
},
|
582
|
+
"geometry": {
|
583
|
+
"coordinates": [
|
584
|
+
[
|
585
|
+
[
|
586
|
+
-78.8494955083645,
|
587
|
+
42.819748790984335
|
588
|
+
],
|
589
|
+
[
|
590
|
+
-78.84891089471263,
|
591
|
+
42.81989327725856
|
592
|
+
],
|
593
|
+
[
|
594
|
+
-78.8491389243777,
|
595
|
+
42.82038967009544
|
596
|
+
],
|
597
|
+
[
|
598
|
+
-78.84972353802956,
|
599
|
+
42.82024518498119
|
600
|
+
],
|
601
|
+
[
|
602
|
+
-78.8494955083645,
|
603
|
+
42.819748790984335
|
604
|
+
]
|
605
|
+
]
|
606
|
+
],
|
607
|
+
"type": "Polygon"
|
608
|
+
}
|
609
|
+
},
|
610
|
+
{
|
611
|
+
"geometry": {
|
612
|
+
"type": "LineString",
|
613
|
+
"coordinates": [
|
614
|
+
[
|
615
|
+
-78.8489681482315,
|
616
|
+
42.82123330461977
|
617
|
+
],
|
618
|
+
[
|
619
|
+
-78.84544909000398,
|
620
|
+
42.812979756818265
|
621
|
+
]
|
622
|
+
]
|
623
|
+
},
|
624
|
+
"type": "Feature",
|
625
|
+
"properties": {
|
626
|
+
"type": "Road",
|
627
|
+
"id": "26956ab1-6006-410f-8761-8c5336af7478",
|
628
|
+
"total_length": 3155
|
629
|
+
}
|
630
|
+
},
|
631
|
+
{
|
632
|
+
"geometry": {
|
633
|
+
"type": "LineString",
|
634
|
+
"coordinates": [
|
635
|
+
[
|
636
|
+
-78.84535253047943,
|
637
|
+
42.813213901246286
|
638
|
+
],
|
639
|
+
[
|
640
|
+
-78.84992837905885,
|
641
|
+
42.81208842580139
|
642
|
+
]
|
643
|
+
]
|
644
|
+
},
|
645
|
+
"type": "Feature",
|
646
|
+
"properties": {
|
647
|
+
"type": "Road",
|
648
|
+
"id": "a23de270-6f78-4b8c-a94f-c33066027738",
|
649
|
+
"total_length": 1292
|
650
|
+
}
|
651
|
+
},
|
652
|
+
{
|
653
|
+
"geometry": {
|
654
|
+
"type": "LineString",
|
655
|
+
"coordinates": [
|
656
|
+
[
|
657
|
+
-78.8494884967804,
|
658
|
+
42.811915273915076
|
659
|
+
],
|
660
|
+
[
|
661
|
+
-78.85327577590942,
|
662
|
+
42.82022601764069
|
663
|
+
]
|
664
|
+
]
|
665
|
+
},
|
666
|
+
"type": "Feature",
|
667
|
+
"properties": {
|
668
|
+
"type": "Road",
|
669
|
+
"id": "edb9ec8c-1c0d-4127-bbb5-74c4694c5dfc",
|
670
|
+
"total_length": 3197
|
671
|
+
}
|
672
|
+
},
|
673
|
+
{
|
674
|
+
"geometry": {
|
675
|
+
"type": "LineString",
|
676
|
+
"coordinates": [
|
677
|
+
[
|
678
|
+
-78.85342597961424,
|
679
|
+
42.81980106352452
|
680
|
+
],
|
681
|
+
[
|
682
|
+
-78.84859800338745,
|
683
|
+
42.82096574561655
|
684
|
+
]
|
685
|
+
]
|
686
|
+
},
|
687
|
+
"type": "Feature",
|
688
|
+
"properties": {
|
689
|
+
"type": "Road",
|
690
|
+
"id": "79f54743-f060-4b70-b111-00fa146c9ed1",
|
691
|
+
"total_length": 1360
|
692
|
+
}
|
693
|
+
},
|
694
|
+
{
|
695
|
+
"geometry": {
|
696
|
+
"type": "LineString",
|
697
|
+
"coordinates": [
|
698
|
+
[
|
699
|
+
-78.85085105895996,
|
700
|
+
42.82085557392571
|
701
|
+
],
|
702
|
+
[
|
703
|
+
-78.84721398353577,
|
704
|
+
42.812592137623426
|
705
|
+
]
|
706
|
+
]
|
707
|
+
},
|
708
|
+
"type": "Feature",
|
709
|
+
"properties": {
|
710
|
+
"type": "Road",
|
711
|
+
"id": "46d5a837-c737-4ccc-bcd6-9ed019a559e5",
|
712
|
+
"total_length": 3168
|
713
|
+
}
|
714
|
+
},
|
715
|
+
{
|
716
|
+
"geometry": {
|
717
|
+
"type": "LineString",
|
718
|
+
"coordinates": [
|
719
|
+
[
|
720
|
+
-78.84607672691344,
|
721
|
+
42.815755983691304
|
722
|
+
],
|
723
|
+
[
|
724
|
+
-78.85104417800902,
|
725
|
+
42.814496760865865
|
726
|
+
]
|
727
|
+
]
|
728
|
+
},
|
729
|
+
"type": "Feature",
|
730
|
+
"properties": {
|
731
|
+
"type": "Road",
|
732
|
+
"id": "bb98d362-6e28-4968-9ca5-67f1c3232f10",
|
733
|
+
"total_length": 1406
|
734
|
+
}
|
735
|
+
},
|
736
|
+
{
|
737
|
+
"geometry": {
|
738
|
+
"type": "LineString",
|
739
|
+
"coordinates": [
|
740
|
+
[
|
741
|
+
-78.84950324892998,
|
742
|
+
42.817851352339574
|
743
|
+
],
|
744
|
+
[
|
745
|
+
-78.85200977325438,
|
746
|
+
42.817239472684264
|
747
|
+
]
|
748
|
+
]
|
749
|
+
},
|
750
|
+
"type": "Feature",
|
751
|
+
"properties": {
|
752
|
+
"type": "Road",
|
753
|
+
"id": "97b60c2e-f4d8-4375-9636-fb3622f4d746",
|
754
|
+
"total_length": 707
|
755
|
+
}
|
756
|
+
},
|
757
|
+
{
|
758
|
+
"geometry": {
|
759
|
+
"type": "LineString",
|
760
|
+
"coordinates": [
|
761
|
+
[
|
762
|
+
-78.85010808706282,
|
763
|
+
42.81902394080427
|
764
|
+
],
|
765
|
+
[
|
766
|
+
-78.84816884994507,
|
767
|
+
42.81950595478102
|
768
|
+
]
|
769
|
+
]
|
770
|
+
},
|
771
|
+
"type": "Feature",
|
772
|
+
"properties": {
|
773
|
+
"type": "Road",
|
774
|
+
"id": "316f45e4-c14a-44ee-b92f-b5521aa1a86b",
|
775
|
+
"total_length": 548
|
776
|
+
}
|
777
|
+
},
|
778
|
+
{
|
779
|
+
"type": "Feature",
|
780
|
+
"properties": {
|
781
|
+
"id": "5840ecc6-7f2b-400c-a683-528d02f140f6",
|
782
|
+
"geometryType": "Rectangle",
|
783
|
+
"name": "New District System_1",
|
784
|
+
"type": "District System",
|
785
|
+
"footprint_area": 24983,
|
786
|
+
"footprint_perimeter": 689,
|
787
|
+
"district_system_type": "Electrical Substation"
|
788
|
+
},
|
789
|
+
"geometry": {
|
790
|
+
"type": "Polygon",
|
791
|
+
"coordinates": [
|
792
|
+
[
|
793
|
+
[
|
794
|
+
-78.85567193142118,
|
795
|
+
42.81641251053426
|
796
|
+
],
|
797
|
+
[
|
798
|
+
-78.85530837052585,
|
799
|
+
42.81650816115567
|
800
|
+
],
|
801
|
+
[
|
802
|
+
-78.85561262989047,
|
803
|
+
42.81713042140092
|
804
|
+
],
|
805
|
+
[
|
806
|
+
-78.85597619078581,
|
807
|
+
42.817034771742016
|
808
|
+
],
|
809
|
+
[
|
810
|
+
-78.85567193142118,
|
811
|
+
42.81641251053426
|
812
|
+
]
|
813
|
+
]
|
814
|
+
]
|
815
|
+
}
|
816
|
+
}
|
817
|
+
],
|
818
|
+
"mappers": [],
|
819
|
+
"scenarios": [
|
820
|
+
{
|
821
|
+
"feature_mappings": [],
|
822
|
+
"id": "72301739-c6c3-4dd7-bf1a-f37c8eff40db",
|
823
|
+
"name": "New Scenario"
|
824
|
+
}
|
825
|
+
]
|
826
|
+
}
|
@@ -387,6 +387,9 @@
|
|
387
387
|
|
388
388
|
var endUseKeys = ['Heating:Electricity', 'Cooling:Electricity', 'InteriorLights:Electricity', 'ExteriorLights:Electricity', 'ExteriorEquipment:Electricity', 'InteriorEquipment:Electricity', 'Fans:Electricity', 'Pumps:Electricity', 'HeatRejection:Electricity', 'WaterSystems:Electricity'];
|
389
389
|
|
390
|
+
var kbtu_datasets = ['NaturalGas:Facility', 'Propane:Facility', 'FuelOilNo2:Facility', 'OtherFuels:Facility'];
|
391
|
+
var changeToKbtu = false;
|
392
|
+
|
390
393
|
|
391
394
|
var applicableEndUseKeys = [];
|
392
395
|
|
@@ -449,8 +452,7 @@
|
|
449
452
|
|
450
453
|
// monthly fuel use
|
451
454
|
$scope.monthlyFuelChartData[feature.name] = [];
|
452
|
-
|
453
|
-
var kbtu_datasets = ['NaturalGas:Facility', 'Propane:Facility', 'FuelOilNo2:Facility', 'OtherFuels:Facility'];
|
455
|
+
|
454
456
|
// first iterate through all kbtu datasets to see if you'll need to change to kBtu units
|
455
457
|
_.forEach(kbtu_datasets, function (kbtu_dataset) {
|
456
458
|
var values = feature.monthly_values[kbtu_dataset];
|
@@ -530,29 +532,26 @@
|
|
530
532
|
// monthly net use
|
531
533
|
if(feature['complete_simulation'] == true){
|
532
534
|
$scope.monthlyNetChartData[feature.name] = [];
|
533
|
-
var
|
534
|
-
var changeToKbtu = false;
|
535
|
-
if (!(values.every(item => item === 0))) {
|
536
|
-
changeToKbtu = true
|
537
|
-
}
|
535
|
+
var unit = ' (kWh)'
|
538
536
|
if (changeToKbtu){
|
539
|
-
|
540
|
-
}
|
541
|
-
else {
|
542
|
-
var unit = ' (kWh)'
|
537
|
+
unit = ' (kBtu)'
|
543
538
|
}
|
544
539
|
|
545
540
|
$scope.annualNetChartData[feature.name] = 0;
|
546
541
|
$scope.monthlyNetChartData[feature.name].push({
|
547
542
|
key: 'Net Energy Use' + unit,
|
548
543
|
values: _.map(months, function (month, i) {
|
544
|
+
var value = 0;
|
549
545
|
if (changeToKbtu){
|
550
|
-
|
546
|
+
value = feature.monthly_values['Electricity:Facility'][i]*3.41 - feature.monthly_values['ElectricityProduced:Facility'][i]*3.41;
|
547
|
+
_.forEach(kbtu_datasets, function(ds){
|
548
|
+
value += feature.monthly_values[ds][i];
|
549
|
+
});
|
551
550
|
}
|
552
551
|
else {
|
553
|
-
|
552
|
+
value = feature.monthly_values['Electricity:Facility'][i] - feature.monthly_values['ElectricityProduced:Facility'][i]; //Values are in kWh
|
554
553
|
}
|
555
|
-
|
554
|
+
|
556
555
|
$scope.annualNetChartData[feature.name] += value;
|
557
556
|
// global
|
558
557
|
monthlyNetYMin = _.min([monthlyNetYMin, value]);
|
@@ -377,6 +377,9 @@
|
|
377
377
|
|
378
378
|
var endUseKeys = ['Heating:Electricity', 'Cooling:Electricity', 'InteriorLights:Electricity', 'ExteriorLights:Electricity', 'InteriorEquipment:Electricity', 'ExteriorEquipment:Electricity', 'Fans:Electricity', 'Pumps:Electricity', 'HeatRejection:Electricity', 'WaterSystems:Electricity'];
|
379
379
|
|
380
|
+
var kbtu_datasets = ['NaturalGas:Facility', 'Propane:Facility', 'FuelOilNo2:Facility', 'OtherFuels:Facility'];
|
381
|
+
var changeToKbtu = false;
|
382
|
+
|
380
383
|
var applicableEndUseKeys = [];
|
381
384
|
|
382
385
|
$scope.monthlyFuelChartData = {};
|
@@ -422,8 +425,7 @@
|
|
422
425
|
|
423
426
|
// monthly fuel use
|
424
427
|
$scope.monthlyFuelChartData[scenario.name] = [];
|
425
|
-
|
426
|
-
var kbtu_datasets = ['NaturalGas:Facility', 'Propane:Facility', 'FuelOilNo2:Facility', 'OtherFuels:Facility'];
|
428
|
+
|
427
429
|
// first iterate through all kbtu datasets to see if you'll need to change to kBtu units
|
428
430
|
_.forEach(kbtu_datasets, function (kbtu_dataset) {
|
429
431
|
var values = scenario.monthly_values[kbtu_dataset];
|
@@ -502,24 +504,27 @@
|
|
502
504
|
if (!(values.every(item => item === 0))) {
|
503
505
|
changeToKbtu = true
|
504
506
|
}
|
507
|
+
var unit = ' (kWh)'
|
505
508
|
if (changeToKbtu){
|
506
|
-
|
507
|
-
}
|
508
|
-
else {
|
509
|
-
var unit = ' (kWh)'
|
509
|
+
unit = ' (kBtu)'
|
510
510
|
}
|
511
511
|
|
512
512
|
$scope.annualNetChartData[scenario.name] = 0;
|
513
513
|
$scope.monthlyNetChartData[scenario.name].push({
|
514
514
|
key: 'Net Energy Use' + unit,
|
515
515
|
values: _.map(months, function (month, i) {
|
516
|
+
var value = 0;
|
516
517
|
if (changeToKbtu){
|
517
|
-
|
518
|
+
value = scenario.monthly_values['Electricity:Facility'][i]*3.41 - scenario.monthly_values['ElectricityProduced:Facility'][i]*3.41 + scenario.monthly_values['NaturalGas:Facility'][i]; //Values are in kBtu
|
519
|
+
|
520
|
+
_.forEach(kbtu_datasets, function(ds){
|
521
|
+
value += scenario.monthly_values[ds][i];
|
522
|
+
});
|
518
523
|
}
|
519
524
|
else {
|
520
|
-
|
525
|
+
value = scenario.monthly_values['Electricity:Facility'][i] - scenario.monthly_values['ElectricityProduced:Facility'][i]; //Values are in kWh
|
521
526
|
}
|
522
|
-
value;
|
527
|
+
// value;
|
523
528
|
$scope.annualNetChartData[scenario.name] += value;
|
524
529
|
monthlyNetYMin = _.min([monthlyNetYMin, value]);
|
525
530
|
monthlyNetYMax = _.max([monthlyNetYMax, value]);
|
data/lib/uo_cli.rb
CHANGED
@@ -46,6 +46,7 @@ require 'urbanopt/geojson'
|
|
46
46
|
require 'urbanopt/scenario'
|
47
47
|
require 'urbanopt/reopt'
|
48
48
|
require 'urbanopt/reopt_scenario'
|
49
|
+
require 'urbanopt/rnm'
|
49
50
|
require 'csv'
|
50
51
|
require 'fileutils'
|
51
52
|
require 'json'
|
@@ -59,10 +60,11 @@ module URBANopt
|
|
59
60
|
COMMAND_MAP = {
|
60
61
|
'create' => 'Make new things - project directory or files',
|
61
62
|
'run' => 'Use files in your directory to simulate district energy use',
|
62
|
-
'opendss' => 'Run OpenDSS simulation',
|
63
63
|
'process' => 'Post-process URBANopt simulations for additional insights',
|
64
64
|
'visualize' => 'Visualize and compare results for features and scenarios',
|
65
65
|
'validate' => 'Validate results with custom rules',
|
66
|
+
'opendss' => 'Run OpenDSS simulation',
|
67
|
+
'rnm' => 'Run RNM simulation',
|
66
68
|
'delete' => 'Delete simulations for a specified scenario',
|
67
69
|
'des_params' => 'Make a DES system parameters config file',
|
68
70
|
'des_create' => 'Create a Modelica model',
|
@@ -106,9 +108,6 @@ module URBANopt
|
|
106
108
|
"Add additional tags to specify the method for creating geometry, or use the default urban geometry creation method to create building geometry from geojson coordinates with core and perimeter zoning\n" \
|
107
109
|
'Example: uo create --project-folder urbanopt_example_project', type: String, short: :p
|
108
110
|
|
109
|
-
opt :electric, "\nCreate default project with FeatureFile containing electrical network\n" \
|
110
|
-
"Example: uo create --project-folder urbanopt_example_project --electric", short: :l
|
111
|
-
|
112
111
|
opt :create_bar, "\nCreate building geometry and add space types using the create bar from building type ratios measure\n" \
|
113
112
|
"Refer to https://docs.urbanopt.net/ for more details about the workflow\n" \
|
114
113
|
"Used with --project-folder\n" \
|
@@ -123,6 +122,12 @@ module URBANopt
|
|
123
122
|
"This functionality has not been exhaustively tested and currently supports the Single-Family Detached building type and the Baseline Scenario only\n" \
|
124
123
|
"Used with --project-folder\n" \
|
125
124
|
"Example: uo create --project-folder urbanopt_example_project --combined\n", short: :d
|
125
|
+
|
126
|
+
opt :electric, "\nCreate default project with FeatureFile containing electrical network, used for OpenDSS analysis\n" \
|
127
|
+
"Example: uo create --project-folder urbanopt_example_project --electric", short: :l
|
128
|
+
|
129
|
+
opt :streets, "\nCreate default project wiht FeatureFile containing streets, used for RNM analysis\n" \
|
130
|
+
"Example: uo create --project-folder urbanopt_example_project --streets", short: :t
|
126
131
|
|
127
132
|
opt :empty, "\nUse with --project-folder argument to create an empty project folder\n" \
|
128
133
|
"Then add your own Feature file in the project directory you created,\n" \
|
@@ -173,11 +178,11 @@ module URBANopt
|
|
173
178
|
|
174
179
|
opt :scenario, "\nRun OpenDSS simulations for <scenario>\n" \
|
175
180
|
"Requires --feature also be specified\n" \
|
176
|
-
'Example: uo opendss --scenario baseline_scenario-2.csv --feature example_project.json', default: 'baseline_scenario.csv', short: :s
|
181
|
+
'Example: uo opendss --scenario baseline_scenario-2.csv --feature example_project.json', default: 'baseline_scenario.csv', required: true, short: :s
|
177
182
|
|
178
183
|
opt :feature, "\nRun OpenDSS simulations according to <featurefile>\n" \
|
179
184
|
"Requires --scenario also be specified\n" \
|
180
|
-
'Example: uo opendss --scenario baseline_scenario.csv --feature example_project.json', default: 'example_project_with_electric_network.json', short: :f
|
185
|
+
'Example: uo opendss --scenario baseline_scenario.csv --feature example_project.json', default: 'example_project_with_electric_network.json', required: true, short: :f
|
181
186
|
|
182
187
|
opt :equipment, "\nRun OpenDSS simulations using <equipmentfile>. If not specified, the electrical_database.json from urbanopt-ditto-reader will be used.\n" \
|
183
188
|
'Example: uo opendss --scenario baseline_scenario.csv --feature example_project.json', type: String, short: :e
|
@@ -204,6 +209,33 @@ module URBANopt
|
|
204
209
|
end
|
205
210
|
end
|
206
211
|
|
212
|
+
# Define RNM commands
|
213
|
+
def opt_rnm
|
214
|
+
@subopts = Optimist.options do
|
215
|
+
banner "\nURBANopt #{@command}:\n\n"
|
216
|
+
|
217
|
+
opt :scenario, "\nRun RNM simulation for <scenario>. Scenario must be run and post-processed prior to calling the rnm command.\n" \
|
218
|
+
"Requires --feature also be specified\n" \
|
219
|
+
'Example: uo rnm --scenario baseline_scenario-2.csv --feature example_project.json', default: 'baseline_scenario.csv', required: true, short: :s
|
220
|
+
|
221
|
+
opt :feature, "\nRun RNM simulation according to <featurefile>\n" \
|
222
|
+
"Requires --scenario also be specified\n" \
|
223
|
+
'Example: uo rnm --scenario baseline_scenario.csv --feature example_project.json', default: 'example_project_with_streets.json', required: true, short: :f
|
224
|
+
|
225
|
+
opt :reopt, "\nInclude processed REopt optimization results in the simulation.\n" \
|
226
|
+
"Example: uo rnm --scenario baseline_scenario.csv --feature example_project.json --reopt", short: :r
|
227
|
+
|
228
|
+
opt :extended_catalog, "\nUse this option to specify the extended electrical catalog path.\n" \
|
229
|
+
"If this option is not included, the default catalog will be used", short: :c
|
230
|
+
|
231
|
+
opt :average_peak_catalog, "\nUse this option to specify the average peak catalog path.\n" \
|
232
|
+
"If this option is not included, the default catalog will be used", short: :a
|
233
|
+
|
234
|
+
opt :opendss, "\n If this option is specified, an OpenDSS-compatible electrical database will be created \n" \
|
235
|
+
"Example: uo rnm --scenario baseline_scenario.csv --feature example_project_with_streets.json --opendss", short: :o
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
207
239
|
# Define post-processing commands
|
208
240
|
def opt_process
|
209
241
|
@subopts = Optimist.options do
|
@@ -350,7 +382,7 @@ module URBANopt
|
|
350
382
|
@scenario_name = File.basename(@scenario_file_name, File.extname(@scenario_file_name))
|
351
383
|
end
|
352
384
|
|
353
|
-
# Simulate energy usage as defined by ScenarioCSV
|
385
|
+
# Simulate energy usage as defined by ScenarioCSV
|
354
386
|
def self.run_func
|
355
387
|
run_dir = File.join(@root_dir, 'run', @scenario_name.downcase)
|
356
388
|
csv_file = File.join(@root_dir, @scenario_file_name)
|
@@ -499,11 +531,13 @@ module URBANopt
|
|
499
531
|
|
500
532
|
if @opthash.subopts[:electric] == true
|
501
533
|
FileUtils.cp(File.join(path_item, 'example_project_with_electric_network.json'), dir_name)
|
534
|
+
elsif @opthash.subopts[:streets] == true
|
535
|
+
FileUtils.cp(File.join(path_item, 'example_project_with_streets.json'), dir_name)
|
502
536
|
end
|
503
537
|
|
504
538
|
if @opthash.subopts[:floorspace] == false
|
505
539
|
|
506
|
-
if @opthash.subopts[:electric] != true
|
540
|
+
if @opthash.subopts[:electric] != true && @opthash.subopts[:streets] != true
|
507
541
|
# copy feature file
|
508
542
|
FileUtils.cp(File.join(path_item, 'example_project.json'), dir_name)
|
509
543
|
end
|
@@ -734,6 +768,7 @@ module URBANopt
|
|
734
768
|
puts "\nDone\n"
|
735
769
|
end
|
736
770
|
|
771
|
+
# Run OpenDSS simulation
|
737
772
|
if @opthash.command == 'opendss'
|
738
773
|
|
739
774
|
# first check python
|
@@ -803,9 +838,43 @@ module URBANopt
|
|
803
838
|
begin
|
804
839
|
system(ditto_cli_root + ditto_cli_addition)
|
805
840
|
rescue FileNotFoundError
|
806
|
-
abort("\nMust post-process results before running
|
807
|
-
"Once
|
841
|
+
abort("\nMust post-process results before running OpenDSS. We recommend 'process --default'." \
|
842
|
+
"Once OpenDSS is run, you may then 'process --opendss'")
|
843
|
+
end
|
844
|
+
end
|
845
|
+
|
846
|
+
# Run RNM Simulation
|
847
|
+
if @opthash.command == 'rnm'
|
848
|
+
|
849
|
+
run_dir = File.join(@root_dir, 'run', @scenario_name.downcase)
|
850
|
+
# check if project has been post-processed appropriately
|
851
|
+
if !File.exist?(File.join(run_dir, 'default_scenario_report.json'))
|
852
|
+
abort("\nYou must first post-process the scenario before running RNM. We recommend 'process --default'.")
|
808
853
|
end
|
854
|
+
|
855
|
+
puts 'Preparing RNM inputs'
|
856
|
+
# prep arguments
|
857
|
+
reopt = @opthash.subopts[:reopt] ? true : false
|
858
|
+
opendss_catalog = @opthash.subopts[:opendss] ? true : false
|
859
|
+
|
860
|
+
# if paths below are nil, default paths will be used
|
861
|
+
extended_catalog_path = @opthash.subopts[:extended_catalog] ? @opthash.subopts[:extended_catalog] : nil
|
862
|
+
average_peak_catalog_path = @opthash.subopts[:average_peak_catalog] ? @opthash.subopts[:average_peak_catalog] : nil
|
863
|
+
|
864
|
+
# create inputs, run sim and get results
|
865
|
+
begin
|
866
|
+
runner = URBANopt::RNM::Runner.new(@scenario_name, run_dir, @opthash.subopts[:scenario], @opthash.subopts[:feature], extended_catalog_path:extended_catalog_path, average_peak_catalog_path:average_peak_catalog_path, reopt:reopt, opendss_catalog:opendss_catalog)
|
867
|
+
runner.create_simulation_files
|
868
|
+
runner.run
|
869
|
+
runner.post_process
|
870
|
+
rescue => error
|
871
|
+
abort("\nError: #{error.message}")
|
872
|
+
end
|
873
|
+
|
874
|
+
# TODO: aggregate back into scenario reports and geojson file
|
875
|
+
puts "\nRNM Results saved to: #{File.join(run_dir, 'rnm-us', 'results')}"
|
876
|
+
puts "\nDone\n"
|
877
|
+
|
809
878
|
end
|
810
879
|
|
811
880
|
# Post-process the scenario
|
@@ -835,7 +904,7 @@ module URBANopt
|
|
835
904
|
results << { "process_type": 'default', "status": 'Complete', "timestamp": Time.now.strftime('%Y-%m-%dT%k:%M:%S.%L') }
|
836
905
|
elsif @opthash.subopts[:opendss] == true
|
837
906
|
puts "\nPost-processing OpenDSS results\n"
|
838
|
-
opendss_folder = File.join(@root_dir, 'run', @scenario_name, 'opendss')
|
907
|
+
opendss_folder = File.join(@root_dir, 'run', @scenario_name.downcase, 'opendss')
|
839
908
|
if File.directory?(opendss_folder)
|
840
909
|
opendss_folder_name = File.basename(opendss_folder)
|
841
910
|
opendss_post_processor = URBANopt::Scenario::OpenDSSPostProcessor.new(scenario_report, opendss_results_dir_name = opendss_folder_name)
|
@@ -965,7 +1034,7 @@ module URBANopt
|
|
965
1034
|
end
|
966
1035
|
end
|
967
1036
|
end
|
968
|
-
html_out_path = File.join(@root_dir, 'run', @scenario_name, 'feature_comparison.html')
|
1037
|
+
html_out_path = File.join(@root_dir, 'run', @scenario_name.downcase, 'feature_comparison.html')
|
969
1038
|
FileUtils.cp(html_in_path, html_out_path)
|
970
1039
|
puts "\nDone\n"
|
971
1040
|
end
|
@@ -987,8 +1056,8 @@ module URBANopt
|
|
987
1056
|
feature_ids = CSV.read(@opthash.subopts[:scenario], headers: true)
|
988
1057
|
feature_list = []
|
989
1058
|
feature_ids['Feature Id'].each do |feature|
|
990
|
-
if Dir.exist?(File.join(@root_dir, 'run', @scenario_name, feature))
|
991
|
-
feature_list << File.join(@root_dir, 'run', @scenario_name, feature)
|
1059
|
+
if Dir.exist?(File.join(@root_dir, 'run', @scenario_name.downcase, feature))
|
1060
|
+
feature_list << File.join(@root_dir, 'run', @scenario_name.downcase, feature)
|
992
1061
|
else
|
993
1062
|
puts "Warning: did not find a directory for FeatureID: #{feature} ...skipping"
|
994
1063
|
end
|
data/lib/uo_cli/version.rb
CHANGED
data/uo_cli.gemspec
CHANGED
@@ -34,10 +34,11 @@ Gem::Specification.new do |spec|
|
|
34
34
|
|
35
35
|
# use specific versions of urbanopt and openstudio dependencies while under heavy development
|
36
36
|
spec.add_runtime_dependency 'optimist', '~> 3'
|
37
|
-
spec.add_runtime_dependency 'urbanopt-geojson', '~> 0.6.
|
37
|
+
spec.add_runtime_dependency 'urbanopt-geojson', '~> 0.6.5'
|
38
38
|
spec.add_runtime_dependency 'urbanopt-reporting', '~> 0.4.1'
|
39
39
|
spec.add_runtime_dependency 'urbanopt-scenario', '~> 0.6.2'
|
40
40
|
spec.add_runtime_dependency 'urbanopt-reopt', '~> 0.6.1'
|
41
|
+
spec.add_runtime_dependency 'urbanopt-rnm-us', '~> 0.1.0'
|
41
42
|
|
42
43
|
spec.add_development_dependency 'bundler', '>= 2.1.0'
|
43
44
|
spec.add_development_dependency 'rake', '~> 13.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urbanopt-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: optimist
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.6.
|
33
|
+
version: 0.6.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.6.
|
40
|
+
version: 0.6.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: urbanopt-reporting
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.6.1
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: urbanopt-rnm-us
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.1.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.1.0
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: bundler
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,6 +210,7 @@ files:
|
|
196
210
|
- example_files/example_project.json
|
197
211
|
- example_files/example_project_combined.json
|
198
212
|
- example_files/example_project_with_electric_network.json
|
213
|
+
- example_files/example_project_with_streets.json
|
199
214
|
- example_files/mappers/Baseline.rb
|
200
215
|
- example_files/mappers/CreateBar.rb
|
201
216
|
- example_files/mappers/EvCharging.rb
|