urbanopt-reopt 0.10.0 → 0.12.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_ci_build.yml +10 -3
- data/CHANGELOG.md +16 -0
- data/Gemfile +1 -1
- data/LICENSE.md +1 -1
- data/RDOC_MAIN.md +19 -19
- data/README.md +20 -20
- data/doc_templates/LICENSE.md +1 -1
- data/doc_templates/copyright_erb.txt +1 -1
- data/docs/README.md +18 -18
- data/docs/package-lock.json +4806 -4836
- data/docs/schemas/reopt-input-schema.md +25 -23
- data/docs/schemas/reopt-output-schema.md +7 -7
- data/index.md +22 -22
- data/lib/urbanopt/reopt/feature_report_adapter.rb +241 -208
- data/lib/urbanopt/reopt/reopt_lite_api.rb +98 -59
- data/lib/urbanopt/reopt/reopt_post_processor.rb +34 -33
- data/lib/urbanopt/reopt/reopt_schema/reopt_input_schema.json +1126 -1106
- data/lib/urbanopt/reopt/reopt_schema/reopt_output_schema.json +449 -524
- data/lib/urbanopt/reopt/scenario/reopt_scenario_csv.rb +7 -7
- data/lib/urbanopt/reopt/scenario_report_adapter.rb +275 -240
- data/lib/urbanopt/reopt/version.rb +1 -1
- data/urbanopt-reopt.gemspec +5 -3
- metadata +35 -8
- 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: ebc2f3c6f40a363e9f234917e55bd165eab74734c2ae477dd393893fb6210a3d
|
4
|
+
data.tar.gz: a2502bf5a657e7d256e39be74426f8eb91d7774f64851274a98c67347a33de12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfad70c6283e27679164c2b6c14dcbb7a009643a838614a4d31f04aca864f548324cea4dfa0978e02eba29bd7705ea32a31867763aca16120a90205cf10ad241
|
7
|
+
data.tar.gz: 243aca41f2c5f45970f346cb7d430a7443fd8f0a5db08b59e43db23ef8a6063d9aefd56e4a5b45a54cb89d708c147531e34424f8172c23276943faa987169b74
|
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,11 +1,14 @@
|
|
1
|
-
name:
|
1
|
+
name: REopt-gem CI
|
2
2
|
|
3
3
|
on:
|
4
|
+
workflow_dispatch:
|
4
5
|
# push:
|
5
6
|
schedule:
|
6
7
|
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
7
8
|
# 5:23 am UTC (11:23pm MDT the day before) every weekday night in MDT
|
8
9
|
- cron: '23 5 * * 2-6'
|
10
|
+
pull_request:
|
11
|
+
types: [review_requested]
|
9
12
|
|
10
13
|
env:
|
11
14
|
# This env var should enforce develop branch of all dependencies
|
@@ -18,9 +21,13 @@ jobs:
|
|
18
21
|
# https://github.com/rbenv/ruby-build/discussions/1940
|
19
22
|
runs-on: ubuntu-latest
|
20
23
|
container:
|
21
|
-
image: docker://nrel/openstudio:3.
|
24
|
+
image: docker://nrel/openstudio:3.7.0
|
22
25
|
steps:
|
23
|
-
- uses: actions/checkout@
|
26
|
+
- uses: actions/checkout@v4
|
27
|
+
- name: set git config options
|
28
|
+
shell: bash
|
29
|
+
run: |
|
30
|
+
git config --global --add safe.directory '*'
|
24
31
|
- name: Update gems
|
25
32
|
run: |
|
26
33
|
bundle update
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# URBANopt REopt Gem
|
2
2
|
|
3
|
+
## Version 0.12.0
|
4
|
+
Date Range: 01/11/24 - 05/06/24
|
5
|
+
* Use Reopt v3 by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/149
|
6
|
+
|
7
|
+
**Full Changelog**: https://github.com/urbanopt/urbanopt-reopt-gem/compare/v0.11.0...v0.12.0
|
8
|
+
|
9
|
+
## Version 0.11.0
|
10
|
+
Date Range: 07/06/23 - 01/11/24
|
11
|
+
|
12
|
+
* Use different error messages in different places by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/145
|
13
|
+
* Support OpenStudio 3.7 by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/146
|
14
|
+
* Remove jenkins by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/142
|
15
|
+
* remove "lite" name from reopt by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/143
|
16
|
+
|
17
|
+
**Full Changelog**: https://github.com/urbanopt/urbanopt-reopt-gem/compare/v0.10.0...v0.11.0
|
18
|
+
|
3
19
|
## Version 0.10.0
|
4
20
|
Date Range: 12/13/22 - 7/6/23
|
5
21
|
|
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
|
-
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: '
|
47
|
+
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'reopt-v3'
|
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 (tm), Copyright (c) 2019-
|
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,
|
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,16 +31,16 @@ 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": {
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
38
|
+
"lcc": 100000000.0,
|
39
|
+
"npv": 10000000.0,
|
40
|
+
"year_one_energy_cost_before_tax": 7000000.0,
|
41
|
+
"year_one_demand_cost_before_tax": 3000000.0,
|
42
|
+
"year_one_bill_before_tax": 10000000.0,
|
43
|
+
"lifecycle_energy_cost_after_tax": 70000000.0,
|
44
44
|
"solar_pv": {
|
45
45
|
"size_kw": 30000.0
|
46
46
|
},
|
@@ -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,10 +1,10 @@
|
|
1
1
|
# URBANopt REopt Gem
|
2
2
|
|
3
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)
|
5
5
|
|
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
|
7
|
-
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.
|
8
8
|
|
9
9
|
See the [example project](https://github.com/urbanopt/urbanopt-example-geojson-reopt-project) for more infomation about usage of this gem.
|
10
10
|
|
@@ -38,15 +38,15 @@ Or install it yourself as:
|
|
38
38
|
|
39
39
|
## Functionality
|
40
40
|
|
41
|
-
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:
|
42
42
|
```
|
43
43
|
"distributed_generation": {
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"
|
44
|
+
"lcc": 100000000.0,
|
45
|
+
"npv": 10000000.0,
|
46
|
+
"year_one_energy_cost_before_tax": 7000000.0,
|
47
|
+
"year_one_demand_cost_before_tax": 3000000.0,
|
48
|
+
"year_one_bill_before_tax": 10000000.0,
|
49
|
+
"lifecycle_energy_cost_after_tax": 70000000.0,
|
50
50
|
"solar_pv": {
|
51
51
|
"size_kw": 30000.0
|
52
52
|
},
|
@@ -88,9 +88,9 @@ Moreover, the following optimal dispatch fields are added to its timeseries CSV.
|
|
88
88
|
| ElectricityProduced:Wind:ToGrid | kWh |
|
89
89
|
|
90
90
|
|
91
|
-
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.
|
92
92
|
|
93
|
-
<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).
|
94
94
|
|
95
95
|
|
96
96
|
|
@@ -106,19 +106,19 @@ feature_reports_hash = {} # <insert a Feature Report hash here>
|
|
106
106
|
#Create a Feature Report
|
107
107
|
feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
|
108
108
|
|
109
|
-
#Specify a file name where REopt
|
109
|
+
#Specify a file name where REopt results will be written in JSON format
|
110
110
|
reopt_output_file = File.join(feature_report.directory_name, 'feature_report_reopt_run1.json')
|
111
111
|
|
112
|
-
#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
|
113
113
|
timeseries_output_file = File.join(feature_report.directory_name, 'feature_report_timeseries1.csv')
|
114
114
|
|
115
|
-
#Specify non-default REopt
|
115
|
+
#Specify non-default REopt assumptions, saved in JSON format, to be used in calling the API
|
116
116
|
reopt_assumptions_file = File.join(File.dirname(__FILE__), '../files/reopt_assumptions_basic.json')
|
117
117
|
|
118
|
-
#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
|
119
119
|
reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(nil, nil, nil, DEVELOPER_NREL_KEY)
|
120
120
|
|
121
|
-
#Call REopt
|
121
|
+
#Call REopt with the post processor to update the feature's distributed generation attributes and timeseries CSV.
|
122
122
|
updated_feature_report = reopt_post_processor.run_feature_report(feature_report,reopt_assumptions_file,reopt_output_file,timeseries_output_file)
|
123
123
|
|
124
124
|
```
|
@@ -146,13 +146,13 @@ scenario_report = URBANopt::Reporting::DefaultReports::ScenarioReport.new({:dire
|
|
146
146
|
scenario_report.add_feature_report(feature_report)
|
147
147
|
end
|
148
148
|
|
149
|
-
#Specify non-default REopt
|
149
|
+
#Specify non-default REopt assumptions, saved in JSON format, to be used in calling the API
|
150
150
|
reopt_assumptions_file = File.join(File.dirname(__FILE__), '../files/reopt_assumptions_basic.json')
|
151
151
|
|
152
|
-
#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
|
153
153
|
reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(scenario_report, reopt_assumptions_file, nil, DEVELOPER_NREL_KEY)
|
154
154
|
|
155
|
-
#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.
|
156
156
|
updated_scenario_report = reopt_post_processor.run_scenario_report(scenario_report)
|
157
157
|
|
158
158
|
```
|
data/doc_templates/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt (tm), Copyright (c) 2019-
|
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,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%
|
2
2
|
# *********************************************************************************
|
3
|
-
# URBANopt (tm), Copyright (c) 2019-
|
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,
|
data/docs/README.md
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
### <StaticLink target="\_blank" href="rdoc/">Rdocs</StaticLink>
|
4
4
|
|
5
|
-
The **URBANopt<sup>™</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
|
6
|
-
REopt
|
5
|
+
The **URBANopt<sup>™</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</StaticLink> decision support platform.
|
6
|
+
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 <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.
|
7
7
|
|
8
8
|
The REopt Gem accomplishes three basic functions (described more below in the _Functionality_ section):
|
9
9
|
|
@@ -49,15 +49,15 @@ Or install it yourself as:
|
|
49
49
|
|
50
50
|
## Functionality
|
51
51
|
|
52
|
-
This gem is used to call the REopt
|
52
|
+
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:
|
53
53
|
```
|
54
54
|
"distributed_generation": {
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
55
|
+
"lcc": 100000000.0,
|
56
|
+
"npv": 10000000.0,
|
57
|
+
"year_one_energy_cost_before_tax": 7000000.0,
|
58
|
+
"year_one_demand_cost_before_tax": 3000000.0,
|
59
|
+
"year_one_bill_before_tax": 10000000.0,
|
60
|
+
"lifecycle_energy_cost_after_tax": 70000000.0,
|
61
61
|
"solar_pv": {
|
62
62
|
"size_kw": 30000.0
|
63
63
|
},
|
@@ -99,7 +99,7 @@ Moreover, the following optimal dispatch fields are added to its timeseries CSV.
|
|
99
99
|
| ElectricityProduced:Wind:ToGrid | kWh |
|
100
100
|
|
101
101
|
|
102
|
-
The REopt
|
102
|
+
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.
|
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
|
|
@@ -120,19 +120,19 @@ feature_reports_hash = {} # <insert a valid Feature Report hash here with latitu
|
|
120
120
|
#Create a Feature Report
|
121
121
|
feature_report = URBANopt::Reporting::DefaultReports::FeatureReport.new(feature_reports_hash)
|
122
122
|
|
123
|
-
#Specify a file name where REopt
|
123
|
+
#Specify a file name where REopt results will be written in JSON format
|
124
124
|
reopt_output_file = File.join(feature_report.directory_name, 'feature_report_reopt_run.json')
|
125
125
|
|
126
|
-
#Specify a file name where the new timeseries CSV will be written after REopt
|
126
|
+
#Specify a file name where the new timeseries CSV will be written after REopt has determined cost optimal dispatch
|
127
127
|
timeseries_output_file = File.join(feature_report.directory_name, 'feature_report_timeseries.csv')
|
128
128
|
|
129
|
-
#Specify non-default REopt
|
129
|
+
#Specify non-default REopt assumptions, saved in JSON format, to be used in calling the API
|
130
130
|
reopt_assumptions_file = File.join(File.dirname(__FILE__), '../files/reopt_assumptions_basic.json')
|
131
131
|
|
132
|
-
#Create a REopt
|
132
|
+
#Create a REopt Post Processor to call the API, note you will need a Developer.nrel.gov API key in this step
|
133
133
|
reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(nil, nil, nil, DEVELOPER_NREL_KEY)
|
134
134
|
|
135
|
-
#Call REopt
|
135
|
+
#Call REopt 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
|
```
|
@@ -162,13 +162,13 @@ scenario_report = URBANopt::Reporting::DefaultReports::ScenarioReport.new({:dire
|
|
162
162
|
scenario_report.add_feature_report(feature_report)
|
163
163
|
end
|
164
164
|
|
165
|
-
#Specify non-default REopt
|
165
|
+
#Specify non-default REopt assumptions, saved in JSON format, to be used in calling the API
|
166
166
|
reopt_assumptions_file = File.join(File.dirname(__FILE__), 'files/reopt_assumptions_basic.json')
|
167
167
|
|
168
|
-
#Create a REopt
|
168
|
+
#Create a REopt Post Processor to call the API, note you will need a Developer.nrel.gov API key in this step
|
169
169
|
reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(scenario_report, reopt_assumptions_file, nil, DEVELOPER_NREL_KEY)
|
170
170
|
|
171
|
-
#Call REopt
|
171
|
+
#Call REopt 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
|
```
|