urbanopt-reopt 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/release.yml +25 -0
- data/.github/workflows/{nightly_build.yml → nightly_ci_build.yml} +14 -9
- data/CHANGELOG.md +24 -7
- data/Gemfile +1 -1
- data/LICENSE.md +26 -11
- data/RDOC_MAIN.md +13 -13
- data/README.md +15 -14
- data/developer_nrel_key.rb +2 -27
- data/doc_templates/LICENSE.md +26 -11
- data/doc_templates/copyright_erb.txt +32 -16
- data/doc_templates/copyright_js.txt +2 -2
- data/doc_templates/copyright_ruby.txt +2 -27
- data/docs/README.md +12 -12
- data/docs/package-lock.json +4806 -4836
- data/index.md +13 -13
- data/lib/urbanopt/reopt/extension.rb +2 -27
- data/lib/urbanopt/reopt/feature_report_adapter.rb +14 -39
- data/lib/urbanopt/reopt/reopt_lite_api.rb +24 -49
- data/lib/urbanopt/reopt/reopt_logger.rb +2 -27
- data/lib/urbanopt/reopt/reopt_post_processor.rb +25 -50
- data/lib/urbanopt/reopt/reopt_schema/reopt_input_schema.json +1 -1
- data/lib/urbanopt/reopt/reopt_schema/reopt_output_schema.json +1 -1
- data/lib/urbanopt/reopt/scenario/reopt_scenario_csv.rb +9 -34
- data/lib/urbanopt/reopt/scenario_report_adapter.rb +17 -42
- data/lib/urbanopt/reopt/utilities.rb +2 -27
- data/lib/urbanopt/reopt/version.rb +3 -28
- data/lib/urbanopt/reopt.rb +2 -27
- data/lib/urbanopt/reopt_scenario.rb +2 -27
- data/lib/urbanopt-reopt.rb +2 -27
- data/urbanopt-reopt.gemspec +6 -5
- metadata +33 -20
- data/Jenkinsfile +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b78fbfe26b609d2c083949334db217e9d65f848fd396e8dec3b26bebf4d7dd66
|
4
|
+
data.tar.gz: 0a44af3b1cf0bf3b27cabdec01a36141073b7d168f9bdbae734194d0a9e98e1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19ba5d9485460f460097dd6a79df124de2a6b04dfd75d00e95ccc6a44df922142b6ce4801823fbbe6725e5d84dd01bd3a1c5efc27a83e4e7022fcd64547c6f1e
|
7
|
+
data.tar.gz: e0f77546add0c86ceb72a008c84e699fee44a42906149fc157dde189c869f4820df5c5c9d21409c3f57238ca3bbb8025401a28be6d1b65f1eb7ea208db26a7ce
|
data/.github/release.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuration-options
|
2
|
+
|
3
|
+
changelog:
|
4
|
+
exclude:
|
5
|
+
labels:
|
6
|
+
- ignore-for-release
|
7
|
+
- DO NOT MERGE
|
8
|
+
- invalid
|
9
|
+
- tests
|
10
|
+
authors:
|
11
|
+
- octocat
|
12
|
+
- dependabot
|
13
|
+
categories:
|
14
|
+
- title: Breaking Changes 🛠
|
15
|
+
labels:
|
16
|
+
- Semver-Major
|
17
|
+
- breaking-change
|
18
|
+
- title: Exciting New Features 🎉
|
19
|
+
labels:
|
20
|
+
- Semver-Minor
|
21
|
+
- enhancement
|
22
|
+
- Feature
|
23
|
+
- title: Other Changes
|
24
|
+
labels:
|
25
|
+
- "*"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
name:
|
1
|
+
name: REopt-gem CI
|
2
2
|
|
3
3
|
on:
|
4
4
|
# push:
|
@@ -6,6 +6,8 @@ on:
|
|
6
6
|
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
7
7
|
# 5:23 am UTC (11:23pm MDT the day before) every weekday night in MDT
|
8
8
|
- cron: '23 5 * * 2-6'
|
9
|
+
pull_request:
|
10
|
+
types: [review_requested]
|
9
11
|
|
10
12
|
env:
|
11
13
|
# This env var should enforce develop branch of all dependencies
|
@@ -14,23 +16,26 @@ env:
|
|
14
16
|
|
15
17
|
jobs:
|
16
18
|
weeknight-tests:
|
17
|
-
#
|
18
|
-
# https://github.com/
|
19
|
-
runs-on: ubuntu-
|
19
|
+
# ubuntu-latest works since https://github.com/rbenv/ruby-build/releases/tag/v20220710 (July 10, 2022)
|
20
|
+
# https://github.com/rbenv/ruby-build/discussions/1940
|
21
|
+
runs-on: ubuntu-latest
|
20
22
|
container:
|
21
|
-
image: docker://nrel/openstudio:3.
|
23
|
+
image: docker://nrel/openstudio:3.7.0
|
22
24
|
steps:
|
23
|
-
-
|
24
|
-
|
25
|
+
- uses: actions/checkout@v4
|
26
|
+
- name: set git config options
|
27
|
+
shell: bash
|
28
|
+
run: |
|
29
|
+
git config --global --add safe.directory '*'
|
25
30
|
- name: Update gems
|
26
31
|
run: |
|
27
32
|
bundle update
|
28
33
|
bundle exec certified-update
|
29
34
|
- name: Run Rspec
|
30
35
|
run: bundle exec rspec
|
31
|
-
# coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action
|
32
36
|
- name: Coveralls
|
33
|
-
|
37
|
+
# coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action
|
38
|
+
uses: coverallsapp/github-action@v2
|
34
39
|
with:
|
35
40
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
36
41
|
path-to-lcov: "./coverage/lcov/urbanopt-reopt-gem.lcov"
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# URBANopt REopt Gem
|
2
2
|
|
3
|
+
## Version 0.11.0
|
4
|
+
Date Range: 07/06/23 - 01/11/24
|
5
|
+
|
6
|
+
* Use different error messages in different places by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/145
|
7
|
+
* Support OpenStudio 3.7 by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/146
|
8
|
+
* Remove jenkins by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/142
|
9
|
+
* remove "lite" name from reopt by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/143
|
10
|
+
|
11
|
+
**Full Changelog**: https://github.com/urbanopt/urbanopt-reopt-gem/compare/v0.10.0...v0.11.0
|
12
|
+
|
13
|
+
## Version 0.10.0
|
14
|
+
Date Range: 12/13/22 - 7/6/23
|
15
|
+
|
16
|
+
- Update dependencies for OpenStudio 3.6.1
|
17
|
+
- Update license and references to the license file
|
18
|
+
- Add badge for GHA CI nightly build status
|
19
|
+
|
3
20
|
## Version 0.9.0
|
4
21
|
|
5
22
|
Date Range: 05/11/22 - 12/13/22
|
@@ -109,9 +126,9 @@ Date range: 12/11/20 - 1/08/21
|
|
109
126
|
|
110
127
|
Date range: 11/13/20 - 12/11/20
|
111
128
|
|
112
|
-
* Updates to support OpenStudio 3.1
|
129
|
+
* Updates to support OpenStudio 3.1
|
130
|
+
|
113
131
|
|
114
|
-
|
115
132
|
## Version 0.4.1
|
116
133
|
|
117
134
|
Date range: 9/23/20 - 11/12/20
|
@@ -127,7 +144,7 @@ Date range: 9/23/20 - 11/12/20
|
|
127
144
|
Date range: 6/5/20 - 9/22/20
|
128
145
|
|
129
146
|
* Changes to support the new reporting gem
|
130
|
-
* Parsing additional results from the REopt Lite API:
|
147
|
+
* Parsing additional results from the REopt Lite API:
|
131
148
|
- lcc_bau_us_dollars
|
132
149
|
- year_one_energy_cost_bau_us_dollars
|
133
150
|
- year_one_demand_cost_bau_us_dollars
|
@@ -148,12 +165,12 @@ Date range: 6/5/20 - 9/22/20
|
|
148
165
|
|
149
166
|
* Updating to support OpenStudio 3.0 and Ruby 2.5
|
150
167
|
|
151
|
-
## Version 0.2.1
|
168
|
+
## Version 0.2.1
|
152
169
|
* Corrects code checking PV size that fails on multi PV
|
153
170
|
* Corrects parsing of site energy at timesteps other than 1 per hour
|
154
171
|
|
155
172
|
|
156
|
-
## Version 0.2.0
|
173
|
+
## Version 0.2.0
|
157
174
|
|
158
175
|
* Handles multiple PV systems in the REopt Lite assumptions
|
159
176
|
* Changes REoptPostProcessor run_scenario and run_scenario_features methods to save feature and scenario reports with custom names
|
@@ -161,6 +178,6 @@ Date range: 6/5/20 - 9/22/20
|
|
161
178
|
* Renames REopt timeseries CSV columns to include 'REopt' and units
|
162
179
|
|
163
180
|
|
164
|
-
## Version 0.1.0
|
181
|
+
## Version 0.1.0
|
165
182
|
|
166
|
-
* Initial release of URBANopt REopt Gem.
|
183
|
+
* Initial release of URBANopt REopt Gem.
|
data/Gemfile
CHANGED
@@ -44,7 +44,7 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
44
44
|
# if allow_local && File.exist?('../urbanopt-scenario-gem')
|
45
45
|
# gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
|
46
46
|
# elsif allow_local
|
47
|
-
#
|
47
|
+
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
|
48
48
|
# end
|
49
49
|
|
50
50
|
# if allow_local && File.exists?('../urbanopt-geojson-gem')
|
data/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt
|
1
|
+
URBANopt (tm), Copyright (c) 2019-2024, 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,
|
@@ -15,13 +15,28 @@ Neither the name of the copyright holder nor the names of its contributors may b
|
|
15
15
|
used to endorse or promote products derived from this software without specific
|
16
16
|
prior written permission.
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
Redistribution of this software, without modification, must refer to the software
|
19
|
+
by the same designation. Redistribution of a modified version of this software
|
20
|
+
(i) may not refer to the modified version by the same designation, or by any
|
21
|
+
confusingly similar designation, and (ii) must refer to the underlying software
|
22
|
+
originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
23
|
+
the term “URBANopt”, or any confusingly similar designation may not be used to
|
24
|
+
refer to any modified version of this software or any modified version of the
|
25
|
+
underlying software originally provided by Alliance without the prior written
|
26
|
+
consent of Alliance.
|
27
|
+
|
28
|
+
The name of the copyright holder(s), any contributors, the United States Government,
|
29
|
+
the United States Department of Energy, or any of their employees may not be used to
|
30
|
+
endorse or promote products derived from this software without specific prior written
|
31
|
+
permission from the respective party.
|
32
|
+
|
33
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
|
34
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
35
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
36
|
+
THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED STATES
|
37
|
+
DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT,
|
38
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
39
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
40
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
41
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
42
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/RDOC_MAIN.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# **URBANopt REopt Gem**
|
2
2
|
|
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
|
4
|
-
REopt
|
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](https://reopt.nrel.gov/tool) decision support platform.
|
4
|
+
REopt 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/v2/](https://developer.nrel.gov/docs/energy-optimization/reopt/v2/) 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
|
|
@@ -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
|
34
|
+
This gem is used to call the REopt 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,9 +83,9 @@ 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
|
86
|
+
The REopt 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/v2/](https://developer.nrel.gov/docs/energy-optimization/reopt/v2/) for more detailed information on input parameters and default assumptions.
|
87
87
|
|
88
|
-
<b>Note:</b> Required attributes for a REopt run include latitude and longitude. If no utility rate is specified in your REopt
|
88
|
+
<b>Note:</b> Required attributes for a REopt run include latitude and longitude. If no utility rate is specified in your REopt 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
|
|
90
90
|
|
91
91
|
|
@@ -101,19 +101,19 @@ feature_reports_hash = {} # <insert a Feature Report hash here>
|
|
101
101
|
#Create a Feature Report
|
102
102
|
feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
|
103
103
|
|
104
|
-
#Specify a file name where REopt
|
104
|
+
#Specify a file name where REopt results will be written in JSON format
|
105
105
|
reopt_output_file = File.join(feature_report.directory_name, 'feature_report_reopt_run1.json')
|
106
106
|
|
107
|
-
#Specify a file name where the new timeseries CSV will be written after REopt
|
107
|
+
#Specify a file name where the new timeseries CSV will be written after REopt has determined cost optimal dispatch
|
108
108
|
timeseries_output_file = File.join(feature_report.directory_name, 'feature_report_timeseries1.csv')
|
109
109
|
|
110
|
-
#Specify non-default REopt
|
110
|
+
#Specify non-default REopt assumptions, saved in JSON format, to be used in calling the API
|
111
111
|
reopt_assumptions_file = File.join(File.dirname(__FILE__), '../files/reopt_assumptions_basic.json')
|
112
112
|
|
113
|
-
#Create a REopt
|
113
|
+
#Create a REopt Post Processor to call the API, note you will need a Developer.nrel.gov API key in this step
|
114
114
|
reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(nil, nil, nil, DEVELOPER_NREL_KEY)
|
115
115
|
|
116
|
-
#Call REopt
|
116
|
+
#Call REopt 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
|
```
|
@@ -142,13 +142,13 @@ scenario_report = URBANopt::Reporting::DefaultReports::ScenarioReport.new({:dire
|
|
142
142
|
scenario_report.add_feature_report(feature_report)
|
143
143
|
end
|
144
144
|
|
145
|
-
#Specify non-default REopt
|
145
|
+
#Specify non-default REopt assumptions, saved in JSON format, to be used in calling the API
|
146
146
|
reopt_assumptions_file = File.join(File.dirname(__FILE__), '../files/reopt_assumptions_basic.json')
|
147
147
|
|
148
|
-
#Create a REopt
|
148
|
+
#Create a REopt Post Processor to call the API, note you will need a Developer.nrel.gov API key in this step
|
149
149
|
reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(scenario_report, reopt_assumptions_file, nil, DEVELOPER_NREL_KEY)
|
150
150
|
|
151
|
-
#Call REopt
|
151
|
+
#Call REopt 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
|
```
|
data/README.md
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
# URBANopt REopt Gem
|
2
2
|
|
3
|
-
[](https://coveralls.io/github/urbanopt/urbanopt-reopt-gem?branch=develop)
|
4
|
+
[](https://github.com/urbanopt/urbanopt-reopt-gem/actions/workflows/nightly_ci_build.yml)
|
4
5
|
|
5
|
-
The **URBANopt<sup>™</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
|
6
|
-
REopt
|
6
|
+
The **URBANopt<sup>™</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](https://reopt.nrel.gov/tool) decision support platform.
|
7
|
+
REopt 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/v2/](https://developer.nrel.gov/docs/energy-optimization/reopt/v2/) for more detailed information on input parameters and default assumptions.
|
7
8
|
|
8
9
|
See the [example project](https://github.com/urbanopt/urbanopt-example-geojson-reopt-project) for more infomation about usage of this gem.
|
9
10
|
|
@@ -37,7 +38,7 @@ Or install it yourself as:
|
|
37
38
|
|
38
39
|
## Functionality
|
39
40
|
|
40
|
-
This gem is used to call the REopt
|
41
|
+
This gem is used to call the REopt 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:
|
41
42
|
```
|
42
43
|
"distributed_generation": {
|
43
44
|
"lcc_us_dollars": 100000000.0,
|
@@ -87,9 +88,9 @@ Moreover, the following optimal dispatch fields are added to its timeseries CSV.
|
|
87
88
|
| ElectricityProduced:Wind:ToGrid | kWh |
|
88
89
|
|
89
90
|
|
90
|
-
The REopt
|
91
|
+
The REopt 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/v2/">https://developer.nrel.gov/docs/energy-optimization/reopt/v2/</StaticLink> for more detailed information on input parameters and default assumptions.
|
91
92
|
|
92
|
-
<b>Note:</b> Required attributes for a REopt run include latitude and longitude. If no utility rate is specified in your REopt
|
93
|
+
<b>Note:</b> Required attributes for a REopt run include latitude and longitude. If no utility rate is specified in your REopt 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).
|
93
94
|
|
94
95
|
|
95
96
|
|
@@ -105,19 +106,19 @@ feature_reports_hash = {} # <insert a Feature Report hash here>
|
|
105
106
|
#Create a Feature Report
|
106
107
|
feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
|
107
108
|
|
108
|
-
#Specify a file name where REopt
|
109
|
+
#Specify a file name where REopt results will be written in JSON format
|
109
110
|
reopt_output_file = File.join(feature_report.directory_name, 'feature_report_reopt_run1.json')
|
110
111
|
|
111
|
-
#Specify a file name where the new timeseries CSV will be written after REopt
|
112
|
+
#Specify a file name where the new timeseries CSV will be written after REopt has determined cost optimal dispatch
|
112
113
|
timeseries_output_file = File.join(feature_report.directory_name, 'feature_report_timeseries1.csv')
|
113
114
|
|
114
|
-
#Specify non-default REopt
|
115
|
+
#Specify non-default REopt assumptions, saved in JSON format, to be used in calling the API
|
115
116
|
reopt_assumptions_file = File.join(File.dirname(__FILE__), '../files/reopt_assumptions_basic.json')
|
116
117
|
|
117
|
-
#Create a REopt
|
118
|
+
#Create a REopt Post Processor to call the API, note you will need a Developer.nrel.gov API key in this step
|
118
119
|
reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(nil, nil, nil, DEVELOPER_NREL_KEY)
|
119
120
|
|
120
|
-
#Call REopt
|
121
|
+
#Call REopt with the post processor to update the feature's distributed generation attributes and timeseries CSV.
|
121
122
|
updated_feature_report = reopt_post_processor.run_feature_report(feature_report,reopt_assumptions_file,reopt_output_file,timeseries_output_file)
|
122
123
|
|
123
124
|
```
|
@@ -145,13 +146,13 @@ scenario_report = URBANopt::Reporting::DefaultReports::ScenarioReport.new({:dire
|
|
145
146
|
scenario_report.add_feature_report(feature_report)
|
146
147
|
end
|
147
148
|
|
148
|
-
#Specify non-default REopt
|
149
|
+
#Specify non-default REopt assumptions, saved in JSON format, to be used in calling the API
|
149
150
|
reopt_assumptions_file = File.join(File.dirname(__FILE__), '../files/reopt_assumptions_basic.json')
|
150
151
|
|
151
|
-
#Create a REopt
|
152
|
+
#Create a REopt Post Processor to call the API, note you will need a Developer.nrel.gov API key in this step
|
152
153
|
reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(scenario_report, reopt_assumptions_file, nil, DEVELOPER_NREL_KEY)
|
153
154
|
|
154
|
-
#Call REopt
|
155
|
+
#Call REopt with the post processor once on the sceanrio's aggregated load to update the scenario's distributed generation attributes and timeseries CSV.
|
155
156
|
updated_scenario_report = reopt_post_processor.run_scenario_report(scenario_report)
|
156
157
|
|
157
158
|
```
|
data/developer_nrel_key.rb
CHANGED
@@ -1,31 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
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.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-reopt-gem/blob/develop/LICENSE.md
|
29
4
|
# *********************************************************************************
|
30
5
|
|
31
6
|
DEVELOPER_NREL_KEY = (ENV['GEM_DEVELOPER_KEY'] || '< your key here https://developer.nrel.gov/signup >')
|
data/doc_templates/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt
|
1
|
+
URBANopt (tm), Copyright (c) 2019-2024, 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,
|
@@ -15,13 +15,28 @@ Neither the name of the copyright holder nor the names of its contributors may b
|
|
15
15
|
used to endorse or promote products derived from this software without specific
|
16
16
|
prior written permission.
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
Redistribution of this software, without modification, must refer to the software
|
19
|
+
by the same designation. Redistribution of a modified version of this software
|
20
|
+
(i) may not refer to the modified version by the same designation, or by any
|
21
|
+
confusingly similar designation, and (ii) must refer to the underlying software
|
22
|
+
originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
23
|
+
the term “URBANopt”, or any confusingly similar designation may not be used to
|
24
|
+
refer to any modified version of this software or any modified version of the
|
25
|
+
underlying software originally provided by Alliance without the prior written
|
26
|
+
consent of Alliance.
|
27
|
+
|
28
|
+
The name of the copyright holder(s), any contributors, the United States Government,
|
29
|
+
the United States Department of Energy, or any of their employees may not be used to
|
30
|
+
endorse or promote products derived from this software without specific prior written
|
31
|
+
permission from the respective party.
|
32
|
+
|
33
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
|
34
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
35
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
36
|
+
THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED STATES
|
37
|
+
DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT,
|
38
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
39
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
40
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
41
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
42
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -1,31 +1,47 @@
|
|
1
1
|
<%
|
2
2
|
# *********************************************************************************
|
3
|
-
# URBANopt
|
3
|
+
# URBANopt (tm), Copyright (c) 2019-2024, 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,
|
7
7
|
# are permitted provided that the following conditions are met:
|
8
|
-
|
8
|
+
|
9
9
|
# Redistributions of source code must retain the above copyright notice, this list
|
10
10
|
# of conditions and the following disclaimer.
|
11
|
-
|
11
|
+
|
12
12
|
# Redistributions in binary form must reproduce the above copyright notice, this
|
13
13
|
# list of conditions and the following disclaimer in the documentation and/or other
|
14
14
|
# materials provided with the distribution.
|
15
|
-
|
15
|
+
|
16
16
|
# Neither the name of the copyright holder nor the names of its contributors may be
|
17
17
|
# used to endorse or promote products derived from this software without specific
|
18
18
|
# prior written permission.
|
19
|
-
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
|
19
|
+
|
20
|
+
# Redistribution of this software, without modification, must refer to the software
|
21
|
+
# by the same designation. Redistribution of a modified version of this software
|
22
|
+
# (i) may not refer to the modified version by the same designation, or by any
|
23
|
+
# confusingly similar designation, and (ii) must refer to the underlying software
|
24
|
+
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
25
|
+
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
26
|
+
# refer to any modified version of this software or any modified version of the
|
27
|
+
# underlying software originally provided by Alliance without the prior written
|
28
|
+
# consent of Alliance.
|
29
|
+
|
30
|
+
# The name of the copyright holder(s), any contributors, the United States Government,
|
31
|
+
# the United States Department of Energy, or any of their employees may not be used to
|
32
|
+
# endorse or promote products derived from this software without specific prior written
|
33
|
+
# permission from the respective party.
|
34
|
+
|
35
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
|
36
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
37
|
+
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
38
|
+
# THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED STATES
|
39
|
+
# DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT,
|
40
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
41
|
+
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
42
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
43
|
+
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
44
|
+
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
45
|
+
|
30
46
|
# *********************************************************************************
|
31
47
|
%>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/* @preserve
|
2
|
-
* URBANopt
|
3
|
-
*
|
2
|
+
* URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
* See also https://github.com/urbanopt/urbanopt-reopt-gem/blob/develop/LICENSE.md
|
4
4
|
*/
|
@@ -1,29 +1,4 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
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.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-reopt-gem/blob/develop/LICENSE.md
|
29
4
|
# *********************************************************************************
|