urbanopt-reopt 0.2.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a833a15c613e58704915acea2d8a31cfd2ded2f9
4
- data.tar.gz: 4aa9285353fb46787c73b12d7d6b4e47da0e4098
2
+ SHA256:
3
+ metadata.gz: 90df2818b01b203209865c341bf01b102e740fac35957d0b20267c2f2137b4e7
4
+ data.tar.gz: 36779ea6879044b7ac5f5612b2b5e19a744513710cd977d6d2d2d9a7aa1a2bdf
5
5
  SHA512:
6
- metadata.gz: 364198ba99ef78bc954f94519717abb17d7e24a9d1c46c08eee4b05c4881f6b510d1557e451f64ee8e42cf00c30c4892ddf018d1b5040d88f68c31456060fb46
7
- data.tar.gz: 5040b4fdbee705eabd026c0139d76857b53fcd325aa6e0730f58eba29b5107c86d0bb8eb77c3fb064dc2173b60ed8077cb578e270305ef36ebdf09560aa1212a
6
+ metadata.gz: aa4568153ef4b63f20dc69f6a35f5bf2393cba20528e6a3aa76f0eb005cd957231feb27a42482bce82d7eda60fccd39af0269421a43a79cac0a2282dff06e4a2
7
+ data.tar.gz: 31d6fa363ca7ab0755b8a058fc856a99678ea62f89e86f8ff1c6aa33fa945cb743d0debc8ad5950254e5cfc4cce53b8a468845370e41602d9230d58f49ff5477
@@ -1,4 +1,4 @@
1
- ### Addresses #[issue number here]
1
+ ### Resolves #[issue number here]
2
2
 
3
3
  ### Pull Request Description
4
4
 
@@ -9,5 +9,5 @@
9
9
  - [ ] Unit tests have been added or updated
10
10
  - [ ] Documentation has been modified appropriately
11
11
  - [ ] All ci tests pass (green)
12
- - [ ] An [ISSUE](https://github.com/urbanopt/urbanopt-cli/issues) has been created that this is addressing. Issues will get added to the Change Log when the change_log.rb script is run
12
+ - [ ] An [issue](https://github.com/urbanopt/urbanopt-reopt-gem/issues) has been created (which will be used for the changelog)
13
13
  - [ ] This branch is up-to-date with develop
data/.gitignore CHANGED
@@ -15,6 +15,9 @@
15
15
  /test/
16
16
  /lib/measures/test_results
17
17
  /lib/measures/.rubocop*
18
+ # test files
19
+ spec/run/
20
+
18
21
  developer_nrel_key.rb
19
22
  # rspec failure tracking
20
23
  .rspec_status
@@ -17,7 +17,7 @@ exclude:
17
17
  - LICENSE.md
18
18
  - README.md
19
19
  - Rakefile
20
- - urbanopt-scenario-gem.gemspec
20
+ - urbanopt-reopt-gem.gemspec
21
21
  - JSON
22
22
  - Object
23
23
  hyperlink_all: false
@@ -6,4 +6,4 @@ AllCops:
6
6
 
7
7
 
8
8
  inherit_from:
9
- - http://s3.amazonaws.com/openstudio-resources/styles/rubocop.yml
9
+ - http://s3.amazonaws.com/openstudio-resources/styles/rubocop_v3.yml
@@ -1,5 +1,45 @@
1
1
  # URBANopt REopt Gem
2
2
 
3
+ ## Version 0.4.1
4
+
5
+ Date range: 9/23/20 - 11/12/20
6
+
7
+ * PR template now automatically closes issue on merge
8
+ * Remove unnecessary require statement
9
+ * Reporting bugfix
10
+ * Working with reporting gem updates
11
+
12
+ ## Version 0.4.0
13
+
14
+ Date range: 6/5/20 - 9/22/20
15
+
16
+ * Changes to support the new reporting gem
17
+ * Parsing additional results from the REopt Lite API:
18
+ - lcc_bau_us_dollars
19
+ - year_one_energy_cost_bau_us_dollars
20
+ - year_one_demand_cost_bau_us_dollars
21
+ - year_one_bill_bau_us_dollars
22
+ - total_energy_cost_bau_us_dollars
23
+ - total_demand_cost_us_dollars
24
+ - total_demand_cost_bau_us_dollars
25
+ * Makes separate calls to the REopt Lite API for new resilience statistics:
26
+ - resilience_hours_min
27
+ - resilience_hours_max
28
+ - resilience_hours_avg
29
+ - probs_of_surviving
30
+ - probs_of_surviving_by_month
31
+ - probs_of_surviving_by_hour_of_the_day
32
+
33
+
34
+ ## Version 0.3.0
35
+
36
+ * Updating to support OpenStudio 3.0 and Ruby 2.5
37
+
38
+ ## Version 0.2.1
39
+ * Corrects code checking PV size that fails on multi PV
40
+ * Corrects parsing of site energy at timesteps other than 1 per hour
41
+
42
+
3
43
  ## Version 0.2.0
4
44
 
5
45
  * Handles multiple PV systems in the REopt Lite assumptions
@@ -2,13 +2,13 @@
2
2
 
3
3
  ## Version 1.0
4
4
 
5
- The URBANopt team welcomes your contribution to the project. You can contribute to the URBANopt project in several ways: by using the software, reporting issues, contributing documentation, or contributing code back to the project. The GitHub [Contributing to Open Source](https://opensource.guide/how-to-contribute/) guide provides a good overview. If you contribute code, you agree that your contribution may be incorporated into the URBANopt Software Development Kit (SDK) and made available under the URBANopt SDK license.
5
+ The URBANopt<sup>&trade;</sup> team welcomes your contribution to the project. You can contribute to the URBANopt project in several ways: by using the software, reporting issues, contributing documentation, or contributing code back to the project. The GitHub [Contributing to Open Source](https://opensource.guide/how-to-contribute/) guide provides a good overview. If you contribute code, you agree that your contribution may be incorporated into the URBANopt Software Development Kit (SDK) and made available under the URBANopt SDK license.
6
6
 
7
7
  The contribution process for URBANopt is composed of three steps:
8
8
 
9
9
  ## 1. Send consent email
10
10
 
11
- In order for us to distribute your code as part of URBANopt under the URBANopt SDK [license](https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md), we’ll need your consent. An email acknowledging your understanding of these terms and agreeing to them is all that will be asked of any contributor. Send an email to the URBANopt project manager ([see below](#documentation) for the address) including the following text and a list of co-contributors (if any):
11
+ In order for us to distribute your code as part of URBANopt under the URBANopt SDK [license](https://github.com/urbanopt/urbanopt-reopt-gem/blob/develop/LICENSE.md), we’ll need your consent. An email acknowledging your understanding of these terms and agreeing to them is all that will be asked of any contributor. Send an email to the URBANopt project manager ([see below](#documentation) for the address) including the following text and a list of co-contributors (if any):
12
12
 
13
13
  *I agree to contribute to the URBANopt SDK. I agree to the following terms and conditions for my contributions: First, I agree that I am licensing the copyright to my contributions under the terms of the current URBANopt SDK license. Second, I hereby grant to Alliance for Sustainable Energy, LLC, to any successor manager and distributor of URBANopt SDK appointed by the U.S. Department of Energy, and to all recipients of a version of URBANopt SDK that includes my contributions, a non-exclusive, worldwide, royalty-free, irrevocable patent license under any patent claims owned by me, or owned by my employer and known to me, that are or will be,necessarily infringed upon by my contributions alone, or by combination of my contributions with the version of URBANopt SDK to which they are contributed, to make, have made, use, offer to sell, sell, import, and otherwise transfer any version of URBANopt SDK that includes my contributions, in source code and object code form. Third, I represent and warrant that I am authorized to make the contributions and grant the foregoing license(s). Additionally, if, to my knowledge, my employer has rights to intellectual property that covers my contributions, I represent and warrant that I have received permission to make these contributions and grant the foregoing license(s) on behalf of my employer.*
14
14
 
@@ -16,7 +16,7 @@ Once we have your consent on file, you’ll only need to redo it if conditions c
16
16
 
17
17
  ## 2. Scope agreement and timeline commitment
18
18
 
19
- If your contribution is small (e.g. a bug fix), simply submit your contribution via GitHub. If you find a bug, first make sure it is not an already known issue, then report it in the GitHub [issue tracker](https://github.com/urbanopt/urbanopt-scenario-gem/issues) for this repository. If your contribution is larger (e.g. a new feature or new functionality/capability), we’ll need to evaluate your proposed contribution first. We may ask you to revise your materials and make changes to it, which we will then re-review.
19
+ If your contribution is small (e.g. a bug fix), simply submit your contribution via GitHub. If you find a bug, first make sure it is not an already known issue, then report it in the GitHub [issue tracker](https://github.com/urbanopt/urbanopt-reopt-gem/issues) for this repository. If your contribution is larger (e.g. a new feature or new functionality/capability), we’ll need to evaluate your proposed contribution first. We may ask you to revise your materials and make changes to it, which we will then re-review.
20
20
 
21
21
  ## 3. Technical contribution process
22
22
 
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in urbanopt-scenario-gem.gemspec
3
+ # Specify your gem's dependencies in urbanopt-reopt-gem.gemspec
4
4
  gemspec
5
5
 
6
6
  # Local gems are useful when developing and integrating the various dependencies.
@@ -41,26 +41,16 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
41
41
  # gem 'openstudio-model-articulation', '0.1.0'
42
42
  # end
43
43
 
44
- if allow_local && File.exist?('../urbanopt-scenario-gem')
45
- gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
46
- elsif allow_local
47
- gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
48
- else
49
- gem 'urbanopt-scenario', '0.2.0'
50
- end
51
-
52
- if allow_local && File.exists?('../urbanopt-geojson-gem')
53
- gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
54
- elsif allow_local
55
- gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
56
- else
57
- gem 'urbanopt-geojson', '0.2.0'
58
- end
59
-
60
- # simplecov has an unnecessary dependency on native json gem, use fork that does not require this
61
- gem 'simplecov', github: 'NREL/simplecov'
44
+ # if allow_local && File.exist?('../urbanopt-scenario-gem')
45
+ # gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
46
+ # elsif allow_local
47
+ # gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
48
+ # end
62
49
 
63
- # Support requests in windows
64
- gem 'certified'
50
+ # if allow_local && File.exists?('../urbanopt-geojson-gem')
51
+ # gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
52
+ # elsif allow_local
53
+ # gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
54
+ # end
65
55
 
66
- gem 'rdoc', '4.3.0'
56
+ # gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- OpenStudio(R), Copyright (c) 2008-2018, Alliance for Sustainable Energy, LLC. All rights reserved.
1
+ URBANopt<sup>&trade;</sup>, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted
4
4
  provided that the following conditions are met:
@@ -1,7 +1,7 @@
1
1
  # **URBANopt REopt Gem**
2
2
 
3
- The **URBANopt REopt Gem** extends **URBANopt::Scenario::DefaultReports::ScenarioReport** and **URBANopt::Scenario::DefaultReports::FeatureReport** with the ability to derive cost-optimal distributed energy resource (DER) technology sizes and annual dispatch strageties via the [REopt Lite](https://reopt.nrel.gov/tool) decision support platform.
4
- REopt Lite is a technoeconomic model which leverages mixed integer linear programming to identify the cost-optimal sizing of solar PV, Wind, Storage and/or diesel generation given an electric load profile, a utility rate tariff and other technoeconomic parameters. See [https://developer.nrel.gov/docs/energy-optimization/reopt-v1/](https://developer.nrel.gov/docs/energy-optimization/reopt-v1/) for more detailed information on input parameters and default assumptions.
3
+ The **URBANopt REopt Gem** extends **URBANopt::Reporting::DefaultReports::ScenarioReport** and **URBANopt::Reporting::DefaultReports::FeatureReport** with the ability to derive cost-optimal distributed energy resource (DER) technology sizes and annual dispatch strageties via the [REopt Lite](https://reopt.nrel.gov/tool) decision support platform.
4
+ REopt Lite is a technoeconomic model which leverages mixed integer linear programming to identify the cost-optimal sizing of solar PV, Wind, Storage and/or diesel generation given an electric load profile, a utility rate tariff and other technoeconomic parameters. See [https://developer.nrel.gov/docs/energy-optimization/reopt-v1/](https://developer.nrel.gov/docs/energy-optimization/reopt-v1/) for more detailed information on input parameters and default assumptions.
5
5
 
6
6
  See the [example project](https://github.com/urbanopt/urbanopt-example-reopt-project.git) for more infomation about usage of this gem.
7
7
 
@@ -9,7 +9,7 @@ See the [example project](https://github.com/urbanopt/urbanopt-example-reopt-pro
9
9
 
10
10
  ## Installation
11
11
 
12
- See [https://docs.urbanopt.net/installation/installation.html](https://docs.urbanopt.net/installation/installation.html) for instructions on prerequiste software, including:
12
+ See [https://docs.urbanopt.net/installation/installation.html](https://docs.urbanopt.net/installation/installation.html) for instructions on prerequiste software, including:
13
13
  - Ruby 2.2.6
14
14
  - Bundler 1.17.0
15
15
  - OpenStudio 2.8.1
@@ -31,7 +31,7 @@ Or install it yourself as:
31
31
 
32
32
  ## Functionality
33
33
 
34
- This gem is used to call the REopt Lite API on a Scenario Report or Feature Report to update the object's Distributed Generation attributes (including system financial and sizing metrics) as shown in an example below:
34
+ This gem is used to call the REopt Lite API on a Scenario Report or Feature Report to update the object's Distributed Generation attributes (including system financial and sizing metrics) as shown in an example below:
35
35
 
36
36
  ```
37
37
  "distributed_generation": {
@@ -83,7 +83,7 @@ Moreover, the following optimal dispatch fields are added to its timeseries CSV.
83
83
  | ElectricityProduced:Wind:ToGrid | kWh |
84
84
  ```
85
85
 
86
- The REopt Lite has default values for all non-required input parameters that are used unless the user specifies custom assumptions. See [https://developer.nrel.gov/docs/energy-optimization/reopt-v1/](https://developer.nrel.gov/docs/energy-optimization/reopt-v1/) for more detailed information on input parameters and default assumptions.
86
+ The REopt Lite has default values for all non-required input parameters that are used unless the user specifies custom assumptions. See [https://developer.nrel.gov/docs/energy-optimization/reopt-v1/](https://developer.nrel.gov/docs/energy-optimization/reopt-v1/) for more detailed information on input parameters and default assumptions.
87
87
 
88
88
  <b>Note:</b> Required attributes for a REopt run include latitude and longitude. If no utility rate is specified in your REopt Lite assumption settings, then a constant default rate of $0.13 is assumed without demand charges. Also, by default, only solar PV and storage are considered in the analysis (i.e. Wind and Generators are excluded from consideration).
89
89
 
@@ -99,7 +99,7 @@ require 'urbanopt/reopt'
99
99
  feature_reports_hash = {} # <insert a Feature Report hash here>
100
100
 
101
101
  #Create a Feature Report
102
- feature_report = URBANopt::Scenario::DefaultReports::FeatureReport.new(feature_reports_hash)
102
+ feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
103
103
 
104
104
  #Specify a file name where REopt Lite results will be written in JSON format
105
105
  reopt_output_file = File.join(feature_report.directory_name, 'feature_report_reopt_run1.json')
@@ -115,7 +115,7 @@ reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(nil, nil, nil, DE
115
115
 
116
116
  #Call REopt Lite with the post processor to update the feature's distributed generation attributes and timeseries CSV.
117
117
  updated_feature_report = reopt_post_processor.run_feature_report(feature_report,reopt_assumptions_file,reopt_output_file,timeseries_output_file)
118
-
118
+
119
119
  ```
120
120
 
121
121
  More commonly, this gem can be used to run REopt a collection of features stored in a Scenario Report as show here:
@@ -123,9 +123,9 @@ More commonly, this gem can be used to run REopt a collection of features stored
123
123
  ```ruby
124
124
  require 'urbanopt/reopt'
125
125
  #Create a Scenario Report
126
- scenario_report = URBANopt::Scenario::DefaultReports::ScenarioReport.new({:directory_name => File.join(File.dirname(__FILE__), '../run/example_scenario'), :timeseries_csv => {:path => File.join(File.dirname(__FILE__), '../run/example_scenario/timeseries.csv') }})
126
+ scenario_report = URBANopt::Reporting::DefaultReports::ScenarioReport.new({:directory_name => File.join(File.dirname(__FILE__), '../run/example_scenario'), :timeseries_csv => {:path => File.join(File.dirname(__FILE__), '../run/example_scenario/timeseries.csv') }})
127
127
 
128
- #Load Feature Reports into the Scenario Report
128
+ #Load Feature Reports into the Scenario Report
129
129
  (1..2).each do |i|
130
130
  feature_reports_path = File.join(File.dirname(__FILE__), "../run/example_scenario/#{i}/010_default_feature_reports/default_feature_reports.json")
131
131
 
@@ -134,8 +134,8 @@ scenario_report = URBANopt::Scenario::DefaultReports::ScenarioReport.new({:direc
134
134
  feature_reports_hash = JSON.parse(file.read, symbolize_names: true)
135
135
  end
136
136
 
137
- feature_report = URBANopt::Scenario::DefaultReports::FeatureReport.new(feature_reports_hash)
138
-
137
+ feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
138
+
139
139
  feature_report_dir = File.join(File.dirname(__FILE__), "../run/example_scenario/#{i}")
140
140
  feature_report.directory_name = feature_report_dir
141
141
 
@@ -150,7 +150,7 @@ reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(scenario_report,
150
150
 
151
151
  #Call REopt Lite with the post processor once on the sceanrio's aggregated load to update the scenario's distributed generation attributes and timeseries CSV.
152
152
  updated_scenario_report = reopt_post_processor.run_scenario_report(scenario_report)
153
-
153
+
154
154
  ```
155
155
 
156
156
  ## Testing
@@ -164,7 +164,7 @@ Next, obtain a developer.nrel.gov API key from the [NREL Developer Network](http
164
164
  Finally, execute:
165
165
 
166
166
  $ bundle install
167
- $ bundle update
167
+ $ bundle update
168
168
  $ bundle exec rake
169
169
 
170
170
 
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # URBANopt REopt Gem
2
2
 
3
- The **URBANopt REopt Gem** extends **URBANopt::Scenario::DefaultReports::ScenarioReport** and **URBANopt::Scenario::DefaultReports::FeatureReport** with the ability to derive cost-optimal distributed energy resource (DER) technology sizes and annual dispatch strageties via the [REopt Lite](https://reopt.nrel.gov/tool) decision support platform.
4
- REopt Lite is a technoeconomic model which leverages mixed integer linear programming to identify the cost-optimal sizing of solar PV, Wind, Storage and/or diesel generation given an electric load profile, a utility rate tariff and other technoeconomic parameters. See [https://developer.nrel.gov/docs/energy-optimization/reopt-v1/](https://developer.nrel.gov/docs/energy-optimization/reopt-v1/) for more detailed information on input parameters and default assumptions.
3
+ The **URBANopt<sup>&trade;</sup> REopt Gem** extends **URBANopt::Reporting::DefaultReports::ScenarioReport** and **URBANopt::Reporting::DefaultReports::FeatureReport** with the ability to derive cost-optimal distributed energy resource (DER) technology sizes and annual dispatch strageties via the [REopt Lite](https://reopt.nrel.gov/tool) decision support platform.
4
+ REopt Lite is a technoeconomic model which leverages mixed integer linear programming to identify the cost-optimal sizing of solar PV, Wind, Storage and/or diesel generation given an electric load profile, a utility rate tariff and other technoeconomic parameters. See [https://developer.nrel.gov/docs/energy-optimization/reopt-v1/](https://developer.nrel.gov/docs/energy-optimization/reopt-v1/) for more detailed information on input parameters and default assumptions.
5
5
 
6
6
  See the [example project](https://github.com/urbanopt/urbanopt-example-geojson-reopt-project) for more infomation about usage of this gem.
7
7
 
8
- <b>Note:</b> this module requires an API Key from the
8
+ <b>Note:</b> this module requires an API Key from the
9
9
  [NREL Developer Network](https://developer.nrel.gov/)
10
10
 
11
11
  [RDoc Documentation](https://urbanopt.github.io/urbanopt-reopt-gem/)
@@ -13,7 +13,7 @@ See the [example project](https://github.com/urbanopt/urbanopt-example-geojson-r
13
13
 
14
14
  ## Installation
15
15
 
16
- See [https://docs.urbanopt.net/installation/installation.html](https://docs.urbanopt.net/installation/installation.html) for instructions on prerequiste software, including:
16
+ See [https://docs.urbanopt.net/installation/installation.html](https://docs.urbanopt.net/installation/installation.html) for instructions on prerequiste software, including:
17
17
  - Ruby 2.2.6
18
18
  - Bundler 1.17.0
19
19
  - OpenStudio 2.8.1
@@ -35,7 +35,7 @@ Or install it yourself as:
35
35
 
36
36
  ## Functionality
37
37
 
38
- This gem is used to call the REopt Lite API on a Scenario Report or Feature Report to update the object's Distributed Generation attributes (including system financial and sizing metrics) as shown in an example below:
38
+ This gem is used to call the REopt Lite API on a Scenario Report or Feature Report to update the object's Distributed Generation attributes (including system financial and sizing metrics) as shown in an example below:
39
39
  ```
40
40
  "distributed_generation": {
41
41
  "lcc_us_dollars": 100000000.0,
@@ -83,9 +83,9 @@ Moreover, the following optimal dispatch fields are added to its timeseries CSV.
83
83
  | ElectricityProduced:Wind:ToBattery | kWh |
84
84
  | ElectricityProduced:Wind:ToLoad | kWh |
85
85
  | ElectricityProduced:Wind:ToGrid | kWh |
86
-
87
86
 
88
- The REopt Lite has default values for all non-required input parameters that are used unless the user specifies custom assumptions. See <StaticLink target="\_blank" href="https://developer.nrel.gov/docs/energy-optimization/reopt-v1/">https://developer.nrel.gov/docs/energy-optimization/reopt-v1/</StaticLink> for more detailed information on input parameters and default assumptions.
87
+
88
+ The REopt Lite has default values for all non-required input parameters that are used unless the user specifies custom assumptions. See <StaticLink target="\_blank" href="https://developer.nrel.gov/docs/energy-optimization/reopt-v1/">https://developer.nrel.gov/docs/energy-optimization/reopt-v1/</StaticLink> for more detailed information on input parameters and default assumptions.
89
89
 
90
90
  <b>Note:</b> Required attributes for a REopt run include latitude and longitude. If no utility rate is specified in your REopt Lite assumption settings, then a constant default rate of $0.13 is assumed without demand charges. Also, by default, only solar PV and storage are considered in the analysis (i.e. Wind and Generators are excluded from consideration).
91
91
 
@@ -101,7 +101,7 @@ require 'urbanopt/reopt'
101
101
  feature_reports_hash = {} # <insert a Feature Report hash here>
102
102
 
103
103
  #Create a Feature Report
104
- feature_report = URBANopt::Scenario::DefaultReports::FeatureReport.new(feature_reports_hash)
104
+ feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
105
105
 
106
106
  #Specify a file name where REopt Lite results will be written in JSON format
107
107
  reopt_output_file = File.join(feature_report.directory_name, 'feature_report_reopt_run1.json')
@@ -117,16 +117,16 @@ reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(nil, nil, nil, DE
117
117
 
118
118
  #Call REopt Lite with the post processor to update the feature's distributed generation attributes and timeseries CSV.
119
119
  updated_feature_report = reopt_post_processor.run_feature_report(feature_report,reopt_assumptions_file,reopt_output_file,timeseries_output_file)
120
-
120
+
121
121
  ```
122
122
 
123
123
  More commonly, this gem can be used to run REopt a collection of features stored in a Scenario Report as show here:
124
124
  ```ruby
125
125
  require 'urbanopt/reopt'
126
126
  #Create a Scenario Report
127
- scenario_report = URBANopt::Scenario::DefaultReports::ScenarioReport.new({:directory_name => File.join(File.dirname(__FILE__), '../run/example_scenario'), :timeseries_csv => {:path => File.join(File.dirname(__FILE__), '../run/example_scenario/timeseries.csv') }})
127
+ scenario_report = URBANopt::Reporting::DefaultReports::ScenarioReport.new({:directory_name => File.join(File.dirname(__FILE__), '../run/example_scenario'), :timeseries_csv => {:path => File.join(File.dirname(__FILE__), '../run/example_scenario/timeseries.csv') }})
128
128
 
129
- #Load Feature Reports into the Scenario Report
129
+ #Load Feature Reports into the Scenario Report
130
130
  (1..2).each do |i|
131
131
  feature_reports_path = File.join(File.dirname(__FILE__), "../run/example_scenario/#{i}/010_default_feature_reports/default_feature_reports.json")
132
132
 
@@ -135,8 +135,8 @@ scenario_report = URBANopt::Scenario::DefaultReports::ScenarioReport.new({:direc
135
135
  feature_reports_hash = JSON.parse(file.read, symbolize_names: true)
136
136
  end
137
137
 
138
- feature_report = URBANopt::Scenario::DefaultReports::FeatureReport.new(feature_reports_hash)
139
-
138
+ feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
139
+
140
140
  feature_report_dir = File.join(File.dirname(__FILE__), "../run/example_scenario/#{i}")
141
141
  feature_report.directory_name = feature_report_dir
142
142
 
@@ -151,7 +151,7 @@ reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(scenario_report,
151
151
 
152
152
  #Call REopt Lite with the post processor once on the sceanrio's aggregated load to update the scenario's distributed generation attributes and timeseries CSV.
153
153
  updated_scenario_report = reopt_post_processor.run_scenario_report(scenario_report)
154
-
154
+
155
155
  ```
156
156
 
157
157
  ## Testing
@@ -165,7 +165,7 @@ Next, obtain a developer.nrel.gov API key from the [NREL Developer Network](http
165
165
  Finally, execute:
166
166
 
167
167
  $ bundle install
168
- $ bundle update
168
+ $ bundle update
169
169
  $ bundle exec rake
170
170
 
171
171
 
data/Rakefile CHANGED
@@ -1,3 +1,33 @@
1
+ # *********************************************************************************
2
+ # URBANopt (tm), Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
3
+ # contributors. All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without modification,
6
+ # are permitted provided that the following conditions are met:
7
+ #
8
+ # Redistributions of source code must retain the above copyright notice, this list
9
+ # of conditions and the following disclaimer.
10
+ #
11
+ # Redistributions in binary form must reproduce the above copyright notice, this
12
+ # list of conditions and the following disclaimer in the documentation and/or other
13
+ # materials provided with the distribution.
14
+ #
15
+ # Neither the name of the copyright holder nor the names of its contributors may be
16
+ # used to endorse or promote products derived from this software without specific
17
+ # prior written permission.
18
+ #
19
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22
+ # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23
+ # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24
+ # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
+ # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27
+ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28
+ # OF THE POSSIBILITY OF SUCH DAMAGE.
29
+ # *********************************************************************************
30
+
1
31
  require 'bundler/gem_tasks'
2
32
  require 'rspec/core/rake_task'
3
33
 
@@ -10,7 +40,7 @@ RuboCop::RakeTask.new
10
40
  require 'openstudio/extension/rake_task'
11
41
  require 'urbanopt/reopt/extension'
12
42
  os_extension = OpenStudio::Extension::RakeTask.new
13
- os_extension.set_extension_class(URBANopt::REopt::Extension)
43
+ os_extension.set_extension_class(URBANopt::REopt::Extension, 'urbanopt/urbanopt-reopt-gem')
14
44
 
15
45
  desc 'CLI OpenSSL test'
16
46
  task :cli_openssl_test do
data/a.txt ADDED
@@ -0,0 +1 @@
1
+ 123
@@ -1,4 +1,4 @@
1
- URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
1
+ URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
2
2
  contributors. All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  # *********************************************************************************
3
- # URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
3
+ # URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
4
4
  # contributors. All rights reserved.
5
5
  #
6
6
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,4 +1,4 @@
1
1
  /* @preserve
2
- * URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
2
+ * URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
3
3
  * Use of this source code is governed by the BSD 3-Clause license.
4
4
  */
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -2,8 +2,8 @@
2
2
 
3
3
  ### <StaticLink target="\_blank" href="rdoc/">Rdocs</StaticLink>
4
4
 
5
- The **URBANopt REopt Gem** extends a **URBANopt::Scenario::DefaultReports::ScenarioReport** and **URBANopt::Scenario::DefaultReports::FeatureReport** with the ability to derive cost-optimal distributed energy resource (DER) technology sizes and annual dispatch strageties via the <StaticLink target="\_blank" href="https://reopt.nrel.gov/tool">REopt Lite</StaticLink> decision support platform.
6
- REopt Lite is a technoeconomic model which leverages mixed integer linear programming to identify the cost-optimal sizing of solar PV, Wind, Storage and/or diesel generation given an electric load profile, a utility rate tariff and other technoeconomic parameters. See <StaticLink target="\_blank" href="https://developer.nrel.gov/docs/energy-optimization/reopt-v1/">https://developer.nrel.gov/docs/energy-optimization/reopt-v1/</StaticLink> for more detailed information on input parameters and default assumptions.
5
+ The **URBANopt<sup>&trade;</sup> REopt Gem** extends a **URBANopt::Reporting::DefaultReports::ScenarioReport** and **URBANopt::Reporting::DefaultReports::FeatureReport** with the ability to derive cost-optimal distributed energy resource (DER) technology sizes and annual dispatch strageties via the <StaticLink target="\_blank" href="https://reopt.nrel.gov/tool">REopt Lite</StaticLink> decision support platform.
6
+ REopt Lite is a technoeconomic model which leverages mixed integer linear programming to identify the cost-optimal sizing of solar PV, Wind, Storage and/or diesel generation given an electric load profile, a utility rate tariff and other technoeconomic parameters. See <StaticLink target="\_blank" href="https://developer.nrel.gov/docs/energy-optimization/reopt-v1/">https://developer.nrel.gov/docs/energy-optimization/reopt-v1/</StaticLink> for more detailed information on input parameters and default assumptions.
7
7
 
8
8
  The REopt Gem accomplishes three basic functions (described more below in the _Functionality_ section):
9
9
 
@@ -13,8 +13,8 @@ The REopt Gem accomplishes three basic functions (described more below in the _F
13
13
 
14
14
  Moreover, the REopt Gem can be run in several modes, either on:
15
15
 
16
- * A Feature Report,
17
- * A collection of Feature Reports
16
+ * A Feature Report,
17
+ * A collection of Feature Reports
18
18
  * All the features in a Scenario Report before aggregating results at the scenario level
19
19
  * The collection of features in aggregate as summarized in a Scenario Report
20
20
 
@@ -27,7 +27,7 @@ See the <StaticLink target="\_blank" href="https://github.com/urbanopt/urbanopt-
27
27
 
28
28
  ## Installation
29
29
 
30
- See [https://docs.urbanopt.net/installation/installation.html](https://docs.urbanopt.net/installation/installation.html) for instructions on prerequiste software, including:
30
+ See [https://docs.urbanopt.net/installation/installation.html](https://docs.urbanopt.net/installation/installation.html) for instructions on prerequiste software, including:
31
31
  - Ruby 2.2.6
32
32
  - Bundler 1.17.0
33
33
  - OpenStudio 2.8.1
@@ -49,7 +49,7 @@ Or install it yourself as:
49
49
 
50
50
  ## Functionality
51
51
 
52
- This gem is used to call the REopt Lite API on a Scenario Report or Feature Report to update the object's Distributed Generation attributes (including system financial and sizing metrics) as shown in an example below:
52
+ This gem is used to call the REopt Lite API on a Scenario Report or Feature Report to update the object's Distributed Generation attributes (including system financial and sizing metrics) as shown in an example below:
53
53
  ```
54
54
  "distributed_generation": {
55
55
  "lcc_us_dollars": 100000000.0,
@@ -97,9 +97,9 @@ Moreover, the following optimal dispatch fields are added to its timeseries CSV.
97
97
  | ElectricityProduced:Wind:ToBattery | kWh |
98
98
  | ElectricityProduced:Wind:ToLoad | kWh |
99
99
  | ElectricityProduced:Wind:ToGrid | kWh |
100
-
101
100
 
102
- The REopt Lite has default values for all non-required input parameters that are used unless the user specifies custom assumptions. See <StaticLink target="\_blank" href="https://developer.nrel.gov/docs/energy-optimization/reopt-v1/">https://developer.nrel.gov/docs/energy-optimization/reopt-v1/</StaticLink> for more detailed information on input parameters and default assumptions.
101
+
102
+ The REopt Lite has default values for all non-required input parameters that are used unless the user specifies custom assumptions. See <StaticLink target="\_blank" href="https://developer.nrel.gov/docs/energy-optimization/reopt-v1/">https://developer.nrel.gov/docs/energy-optimization/reopt-v1/</StaticLink> for more detailed information on input parameters and default assumptions.
103
103
 
104
104
  <b>Note:</b> Required attributes for a REopt run include latitude and longitude, parsed from the Feature or Scenario Report attributes. If no utility rate is specified in your assumptions, then a constant rate of $0.13 is assumed without demand charges. Also, by default, only solar PV and storage are considered in the analysis (i.e. Wind and Generators are excluded from consideration).
105
105
 
@@ -118,7 +118,7 @@ DEVELOPER_NREL_KEY = "" # <insert a valid API key from https://developer.nrel.go
118
118
  feature_reports_hash = {} # <insert a valid Feature Report hash here with latitude and longitude filled in>
119
119
 
120
120
  #Create a Feature Report
121
- feature_report = URBANopt::Scenario::DefaultReports::FeatureReport.new(feature_reports_hash)
121
+ feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
122
122
 
123
123
  #Specify a file name where REopt Lite results will be written in JSON format
124
124
  reopt_output_file = File.join(feature_report.directory_name, 'feature_report_reopt_run.json')
@@ -134,7 +134,7 @@ reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(nil, nil, nil, DE
134
134
 
135
135
  #Call REopt Lite with the post processor to update the feature's distributed generation attributes and timeseries CSV.
136
136
  updated_feature_report = reopt_post_processor.run_feature_report(feature_report,reopt_assumptions_file,reopt_output_file,timeseries_output_file)
137
-
137
+
138
138
  ```
139
139
 
140
140
  More commonly, this gem can be used to run REopt a collection of features stored in a Scenario Report as show here:
@@ -143,9 +143,9 @@ require 'urbanopt/reopt'
143
143
  DEVELOPER_NREL_KEY = "" # <insert a valid API key from https://developer.nrel.gov/signup >
144
144
 
145
145
  #Create a Scenario Report
146
- scenario_report = URBANopt::Scenario::DefaultReports::ScenarioReport.new({:directory_name => File.join(File.dirname(__FILE__), 'run/example_scenario'), :timeseries_csv => {:path => File.join(File.dirname(__FILE__), 'run/example_scenario/timeseries.csv') }})
146
+ scenario_report = URBANopt::Reporting::DefaultReports::ScenarioReport.new({:directory_name => File.join(File.dirname(__FILE__), 'run/example_scenario'), :timeseries_csv => {:path => File.join(File.dirname(__FILE__), 'run/example_scenario/timeseries.csv') }})
147
147
 
148
- #Load Feature Reports into the Scenario Report
148
+ #Load Feature Reports into the Scenario Report
149
149
  (1..2).each do |i|
150
150
  feature_reports_path = File.join(File.dirname(__FILE__), "run/example_scenario/#{i}/010_default_feature_reports/default_feature_reports.json")
151
151
 
@@ -154,8 +154,8 @@ scenario_report = URBANopt::Scenario::DefaultReports::ScenarioReport.new({:direc
154
154
  feature_reports_hash = JSON.parse(file.read, symbolize_names: true)
155
155
  end
156
156
 
157
- feature_report = URBANopt::Scenario::DefaultReports::FeatureReport.new(feature_reports_hash)
158
-
157
+ feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
158
+
159
159
  feature_report_dir = File.join(File.dirname(__FILE__), "run/example_scenario/#{i}")
160
160
  feature_report.directory_name = feature_report_dir
161
161
 
@@ -170,7 +170,7 @@ reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(scenario_report,
170
170
 
171
171
  #Call REopt Lite with the post processor once on the sceanrio's aggregated load to update the scenario's distributed generation attributes and timeseries CSV.
172
172
  updated_scenario_report = reopt_post_processor.run_scenario_report(scenario_report)
173
-
173
+
174
174
  ```
175
175
 
176
176
  ## Testing
@@ -184,7 +184,7 @@ Next, obtain a developer.nrel.gov API key from the [NREL Developer Network](http
184
184
  Finally, execute:
185
185
 
186
186
  $ bundle install
187
- $ bundle update
187
+ $ bundle update
188
188
  $ bundle exec rake
189
189
 
190
190