urbanopt-scenario 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83796097a5f686acd20742f96e200bf8aad68da3b75a9be322f05c51b18943fd
4
- data.tar.gz: 4339b212379a76572caa58449834c7604efd3e0d24e350ad795220735586ca2e
3
+ metadata.gz: f430f39b9184f46050ae315d4498fcf7290df2fab93eb83e1639121abba7491a
4
+ data.tar.gz: 064f4da2695d4fe81f28515dce7e68da15590d470789903ce9d6a0f925f9cfcf
5
5
  SHA512:
6
- metadata.gz: 340cbd98d6aa3bfac31ca64df64783d3458430b5b04eaac54418ddd2ef2eebfc14185a1a4cb7d033c3c188af8a61610fc27daf6fa939f39797aee0fcb53c9f32
7
- data.tar.gz: 8ef58e7a6ad864289f70cc1e0617e2cc1c83850948fa20b8fdc8bb385393244ba3dc92a17231d56a812cdadbbaef35d484dc103c1c0f486e26bd18e87042177f
6
+ metadata.gz: b190ff1ed4016f43a9d226cc528294de0af82d3d8b181040a9c2f20ff88259d003d206d0bbd4ce983ca394a20c445bb9b85d924d87fab527f0a79f20187f2309
7
+ data.tar.gz: 4e6d4b70a1200fdad7d575b5f225a232fe1df4d2af3298f72f4b8194e5b7a5e6fc1d7428efca6ddab74e1cb51b4ed141f95c6fd81dd7af664db2e64b07d253e8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # URBANopt Scenario Gem
2
2
 
3
+ ## Version 0.6.3
4
+ Date Range: 07/01/21 - 10/15/21:
5
+
6
+ - Fixed [#219]( https://github.com/urbanopt/urbanopt-scenario-gem/issues/219), Add support for REopt
7
+ results for Electricity Produced in Scenario and Feature visualization
8
+
3
9
  ## Version 0.6.2
4
10
  Date Range: 05/15/21 - 06/30/21:
5
11
 
data/Gemfile CHANGED
@@ -39,8 +39,11 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
39
39
  # end
40
40
 
41
41
  # if allow_local && File.exist?('../urbanopt-reporting-gem')
42
- # gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
42
+ # gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
43
43
  # elsif allow_local
44
+ # gem 'urbanopt-reporting', github: 'NREL/urbanopt-reporting', branch: 'develop'
45
+ # end
46
+
44
47
 
45
48
  # if allow_local && File.exist?('../openstudio-load-flexibility-measures-gem')
46
49
  # gem 'openstudio-load-flexibility-measures', path: '../openstudio-load-flexibility-measures-gem'
@@ -24,7 +24,7 @@
24
24
  "node-forge": ">=0.10.0",
25
25
  "postcss": "^8.2.15",
26
26
  "serialize-javascript": "^5.0.1",
27
- "set-value": "^3.0.2",
27
+ "set-value": "^4.0.1",
28
28
  "ssri": ">=8.0.1",
29
29
  "vuepress": "^1.8.2",
30
30
  "yargs-parser": "^20.2.1"
@@ -12728,15 +12728,20 @@
12728
12728
  "dev": true
12729
12729
  },
12730
12730
  "node_modules/set-value": {
12731
- "version": "3.0.2",
12732
- "resolved": "https://registry.npmjs.org/set-value/-/set-value-3.0.2.tgz",
12733
- "integrity": "sha512-npjkVoz+ank0zjlV9F47Fdbjfj/PfXyVhZvGALWsyIYU/qrMzpi6avjKW3/7KeSU2Df3I46BrN1xOI1+6vW0hA==",
12731
+ "version": "4.0.1",
12732
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-4.0.1.tgz",
12733
+ "integrity": "sha512-ayATicCYPVnlNpFmjq2/VmVwhoCQA9+13j8qWp044fmFE3IFphosPtRM+0CJ5xoIx5Uy52fCcwg3XeH2pHbbPQ==",
12734
12734
  "dev": true,
12735
+ "funding": [
12736
+ "https://github.com/sponsors/jonschlinkert",
12737
+ "https://paypal.me/jonathanschlinkert",
12738
+ "https://jonschlinkert.dev/sponsor"
12739
+ ],
12735
12740
  "dependencies": {
12736
12741
  "is-plain-object": "^2.0.4"
12737
12742
  },
12738
12743
  "engines": {
12739
- "node": ">=6.0"
12744
+ "node": ">=11.0"
12740
12745
  }
12741
12746
  },
12742
12747
  "node_modules/setimmediate": {
@@ -16899,6 +16904,7 @@
16899
16904
  "integrity": "sha512-pM7CR3yXB6L8Gfn6EmX7FLNE3+V/15I3o33GkSNsWvgsMp6HVGXKkXgojrcfUUauyL1LZOdvTmu4enU2RePGHw==",
16900
16905
  "dev": true,
16901
16906
  "requires": {
16907
+ "@babel/core": "^7.11.0",
16902
16908
  "@babel/helper-compilation-targets": "^7.9.6",
16903
16909
  "@babel/helper-module-imports": "^7.8.3",
16904
16910
  "@babel/plugin-proposal-class-properties": "^7.8.3",
@@ -16911,6 +16917,7 @@
16911
16917
  "@vue/babel-plugin-jsx": "^1.0.3",
16912
16918
  "@vue/babel-preset-jsx": "^1.2.4",
16913
16919
  "babel-plugin-dynamic-import-node": "^2.3.3",
16920
+ "core-js": "^3.6.5",
16914
16921
  "core-js-compat": "^3.6.5",
16915
16922
  "semver": "^6.1.0"
16916
16923
  }
@@ -25942,9 +25949,9 @@
25942
25949
  "dev": true
25943
25950
  },
25944
25951
  "set-value": {
25945
- "version": "3.0.2",
25946
- "resolved": "https://registry.npmjs.org/set-value/-/set-value-3.0.2.tgz",
25947
- "integrity": "sha512-npjkVoz+ank0zjlV9F47Fdbjfj/PfXyVhZvGALWsyIYU/qrMzpi6avjKW3/7KeSU2Df3I46BrN1xOI1+6vW0hA==",
25952
+ "version": "4.0.1",
25953
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-4.0.1.tgz",
25954
+ "integrity": "sha512-ayATicCYPVnlNpFmjq2/VmVwhoCQA9+13j8qWp044fmFE3IFphosPtRM+0CJ5xoIx5Uy52fCcwg3XeH2pHbbPQ==",
25948
25955
  "dev": true,
25949
25956
  "requires": {
25950
25957
  "is-plain-object": "^2.0.4"
data/docs/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "node-forge": ">=0.10.0",
27
27
  "postcss": "^8.2.15",
28
28
  "serialize-javascript": "^5.0.1",
29
- "set-value": "^3.0.2",
29
+ "set-value": "^4.0.1",
30
30
  "ssri": ">=8.0.1",
31
31
  "vuepress": "^1.8.2",
32
32
  "yargs-parser": "^20.2.1"
@@ -47,18 +47,19 @@ module URBANopt
47
47
  class ResultVisualization
48
48
  def self.create_visualization(run_dir, feature = true, feature_names = false)
49
49
  @all_results = []
50
-
50
+ name = nil
51
51
  run_dir.each do |folder|
52
52
  # create visualization for scenarios
53
53
  case feature
54
54
  when false
55
- name = folder.split('/')[-1]
56
- csv_dir = File.join(folder, 'default_scenario_report.csv')
55
+ name = folder.split('/')[-2]
56
+ csv_dir = folder
57
+
57
58
  # create visualization for features
58
59
  when true
59
60
  index = run_dir.index(folder)
60
- name = "#{folder.split('/')[-1]}-#{feature_names[index]}"
61
- csv_dir = File.join(folder, 'feature_reports/default_feature_report.csv')
61
+ name = "#{folder.split('/')[-3]}-#{feature_names[index]}"
62
+ csv_dir = folder
62
63
  end
63
64
 
64
65
  if File.exist?(csv_dir)
@@ -205,38 +206,45 @@ module URBANopt
205
206
  annual_values[headers_unitless[j]] = annual_sum
206
207
  end
207
208
 
208
- @results = {}
209
- @results['name'] = name
210
- @results['monthly_values'] = {}
211
- @results['annual_values'] = {}
209
+ results = {}
210
+ results['name'] = name
211
+ results['monthly_values'] = {}
212
+ results['annual_values'] = {}
212
213
 
213
214
  if @jan_next_year_index.nil? || @feb_index.nil? || @mar_index.nil? || @apr_index.nil? || @may_index.nil? || @jun_index.nil? || @jul_index.nil? || @aug_index.nil? || @sep_index.nil? || @oct_index.nil? || @nov_index.nil? || @dec_index.nil?
214
- @results['complete_simulation'] = false
215
+ results['complete_simulation'] = false
215
216
  puts "#{name} did not contain an annual simulation…visualizations will not render for it."
216
217
  else
217
- @results['complete_simulation'] = true
218
+ results['complete_simulation'] = true
218
219
  end
219
220
 
220
221
  monthly_totals&.each do |key, value|
221
222
  unless key == 'Datetime'
222
- @results['monthly_values'][key] = value
223
+ results['monthly_values'][key] = value
223
224
  end
224
225
  end
225
226
 
226
227
  annual_values&.each do |key, value|
227
228
  unless key == 'Datetime'
228
- @results['annual_values'][key] = value
229
+ results['annual_values'][key] = value
229
230
  end
230
231
  end
231
232
 
232
233
  end
233
234
 
234
- unless @results.nil?
235
- @all_results << @results
235
+ unless results.nil?
236
+ @all_results << results
236
237
  end
237
238
  end
239
+
238
240
  # create json with required data stored in a variable
239
- results_path = File.join(run_dir[0], '../scenarioData.js')
241
+ if feature == false
242
+ # In case of scenario visualization store result at top of the run folder
243
+ results_path = File.expand_path('../../scenarioData.js', run_dir[0])
244
+ else
245
+ # In case of feature visualization store result at top of scenario folder folder
246
+ results_path = File.expand_path('../../../scenarioData.js', run_dir[0])
247
+ end
240
248
  File.open(results_path, 'w') do |file|
241
249
  file << "var scenarioData = #{JSON.pretty_generate(@all_results)};"
242
250
  end
@@ -40,6 +40,6 @@
40
40
 
41
41
  module URBANopt
42
42
  module Scenario
43
- VERSION = '0.6.2'.freeze
43
+ VERSION = '0.6.3'.freeze
44
44
  end
45
45
  end
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
 
33
33
  spec.add_runtime_dependency 'sqlite3', '1.4.2'
34
34
  spec.add_runtime_dependency 'urbanopt-core', '~> 0.6.1'
35
- spec.add_runtime_dependency 'urbanopt-reporting', '~> 0.4.1'
35
+ spec.add_runtime_dependency 'urbanopt-reporting', '~> 0.4.2'
36
36
 
37
37
  # no longer need the below
38
38
  # need to include all measure gems listed in mappers in project gemfiles
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urbanopt-scenario
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rawad El Kontar
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-07-01 00:00:00.000000000 Z
12
+ date: 2021-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -115,14 +115,14 @@ dependencies:
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: 0.4.1
118
+ version: 0.4.2
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: 0.4.1
125
+ version: 0.4.2
126
126
  description: Library to export data point OSW files from URBANopt Scenario CSV
127
127
  email:
128
128
  - rawad.elkontar@nrel.gov