urbanopt-reopt 1.1.0 → 1.2.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/CHANGELOG.md +7 -0
- data/CONTRIBUTING.md +3 -3
- data/Gemfile +13 -6
- data/LICENSE.md +1 -1
- data/RDOC_MAIN.md +2 -2
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/developer_nrel_key.rb +1 -1
- data/doc_templates/LICENSE.md +1 -1
- data/doc_templates/copyright_erb.txt +1 -1
- data/doc_templates/copyright_js.txt +1 -1
- data/doc_templates/copyright_ruby.txt +1 -1
- data/docs/README.md +2 -2
- data/docs/package.json +1 -1
- data/index.md +2 -2
- data/lib/urbanopt/reopt/extension.rb +1 -1
- data/lib/urbanopt/reopt/feature_report_adapter.rb +10 -11
- data/lib/urbanopt/reopt/{reopt_ghp_adapter.rb → reopt_ghp_adapter_ghp.rb} +238 -48
- data/lib/urbanopt/reopt/reopt_ghp_api.rb +3 -3
- data/lib/urbanopt/reopt/reopt_ghp_files/reopt_ghp_assumption.json +3 -3
- data/lib/urbanopt/reopt/reopt_ghp_post_processor.rb +13 -4
- data/lib/urbanopt/reopt/reopt_ghp_result.rb +145 -0
- data/lib/urbanopt/reopt/reopt_lite_api.rb +54 -13
- data/lib/urbanopt/reopt/reopt_logger.rb +1 -1
- data/lib/urbanopt/reopt/reopt_post_processor.rb +54 -18
- data/lib/urbanopt/reopt/reopt_schema/REopt-BAU-input.json +174 -0
- data/lib/urbanopt/reopt/reopt_schema/REopt-GHP-input.json +263 -95
- data/lib/urbanopt/reopt/scenario/reopt_scenario_csv.rb +1 -1
- data/lib/urbanopt/reopt/scenario_report_adapter.rb +8 -9
- data/lib/urbanopt/reopt/utilities.rb +1 -1
- data/lib/urbanopt/reopt/version.rb +2 -2
- data/lib/urbanopt/reopt.rb +3 -2
- data/lib/urbanopt/reopt_scenario.rb +1 -1
- data/lib/urbanopt-reopt.rb +1 -1
- data/urbanopt-reopt.gemspec +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f914ce58eb625102b9e996099d74ad53c12a8db4cd4c169222b04c62983a210
|
|
4
|
+
data.tar.gz: 1292d94d05fa38dafc702b11b4c50732ed4331e4d1d38f2e949d5c93b6e023c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4632f539ed5e68dde1dd5ae579f5606b0201a9083b7eaccaf77229f4320230074f0dccce601c1b13418da1900d3a599f4e0a7b79929f3352e86680bc81d1c50c
|
|
7
|
+
data.tar.gz: 630e01b66eae49563eb947d360c76b889c46f694d464cdf7f31352d5f73f2702917db2fb3545af18e042bd8899ffc502578bd2418296c8ec15d730984bf71a31
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# URBANopt REopt Gem
|
|
2
2
|
|
|
3
|
+
## Version 1.2.0
|
|
4
|
+
|
|
5
|
+
* Updates for name change and license
|
|
6
|
+
* Lifecycle Cost Analysis (LCCA) Functionality for UO-REopt GHP workflow
|
|
7
|
+
* Updates to support system parameters file schema changes
|
|
8
|
+
* Updates to support URBANopt-REopt Cost Analysis capabilities
|
|
9
|
+
|
|
3
10
|
## Version 1.1.0
|
|
4
11
|
|
|
5
12
|
* Upgrade to OpenStudio 3.10
|
data/CONTRIBUTING.md
CHANGED
|
@@ -10,7 +10,7 @@ The contribution process for URBANopt is composed of three steps:
|
|
|
10
10
|
|
|
11
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
|
-
*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
|
|
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 Energy Innovation, 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
|
|
|
15
15
|
Once we have your consent on file, you’ll only need to redo it if conditions change (e.g. a change of employer).
|
|
16
16
|
|
|
@@ -53,6 +53,6 @@ URBANopt Project Management\
|
|
|
53
53
|
ben.polly@nrel.gov\
|
|
54
54
|
(303) 384-7429
|
|
55
55
|
|
|
56
|
-
URBANopt is funded by the U.S. Department of Energy (DOE) and managed by the National
|
|
56
|
+
URBANopt is funded by the U.S. Department of Energy (DOE) and managed by the National Laboratory of the Rockies (NLR).
|
|
57
57
|
|
|
58
|
-
URBANopt is developed in collaboration with
|
|
58
|
+
URBANopt is developed in collaboration with NLR, LBNL, and private firms.
|
data/Gemfile
CHANGED
|
@@ -17,7 +17,7 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
|
17
17
|
# if allow_local && File.exist?('../OpenStudio-extension-gem')
|
|
18
18
|
# gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
|
|
19
19
|
# elsif allow_local
|
|
20
|
-
# gem 'openstudio-extension', github: '
|
|
20
|
+
# gem 'openstudio-extension', github: 'NatLabRockies/OpenStudio-extension-gem', branch: 'develop'
|
|
21
21
|
# else
|
|
22
22
|
# gem 'openstudio-extension', '~> 0.8.1'
|
|
23
23
|
# end
|
|
@@ -25,7 +25,7 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
|
25
25
|
# if allow_local && File.exist?('../openstudio-common-measures-gem')
|
|
26
26
|
# gem 'openstudio-common-measures', path: '../openstudio-common-measures-gem'
|
|
27
27
|
# elsif allow_local
|
|
28
|
-
# gem 'openstudio-common-measures', github: '
|
|
28
|
+
# gem 'openstudio-common-measures', github: 'NatLabRockies/openstudio-common-measures-gem', branch: 'develop'
|
|
29
29
|
# else
|
|
30
30
|
# gem 'openstudio-common-measures', '0.12.3'
|
|
31
31
|
# end
|
|
@@ -33,13 +33,13 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
|
33
33
|
# if allow_local && File.exist?('../urbanopt-core-gem')
|
|
34
34
|
# gem 'urbanopt-core', path: '../urbanopt-core-gem'
|
|
35
35
|
# elsif allow_local
|
|
36
|
-
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: '
|
|
36
|
+
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
|
|
37
37
|
# end
|
|
38
38
|
#
|
|
39
39
|
# if allow_local && File.exist?('../openstudio-model-articulation-gem')
|
|
40
40
|
# gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
|
|
41
41
|
# elsif allow_local
|
|
42
|
-
# gem 'openstudio-model-articulation', github: '
|
|
42
|
+
# gem 'openstudio-model-articulation', github: 'NatLabRockies/openstudio-model-articulation-gem', branch: 'develop'
|
|
43
43
|
# else
|
|
44
44
|
# gem 'openstudio-model-articulation', '0.12.2'
|
|
45
45
|
# end
|
|
@@ -47,11 +47,18 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
|
47
47
|
# if allow_local && File.exist?('../urbanopt-scenario-gem')
|
|
48
48
|
# gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
|
|
49
49
|
# elsif allow_local
|
|
50
|
-
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: '
|
|
50
|
+
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
|
|
51
51
|
# end
|
|
52
52
|
|
|
53
53
|
# if allow_local && File.exist?('../urbanopt-geojson-gem')
|
|
54
54
|
# gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
|
|
55
55
|
# elsif allow_local
|
|
56
|
-
# gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: '
|
|
56
|
+
# gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
|
|
57
|
+
# end
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
# if allow_local && File.exist?('../urbanopt-geojson-gem')
|
|
61
|
+
# gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
|
|
62
|
+
# elsif allow_local
|
|
63
|
+
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
|
|
57
64
|
# end
|
data/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
URBANopt (tm), Copyright (c) 2019-
|
|
1
|
+
URBANopt (tm), Copyright (c) 2019-2026, Alliance for Energy Innovation, 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
|
@@ -5,7 +5,7 @@ REopt is a technoeconomic model which leverages mixed integer linear programming
|
|
|
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
|
|
|
8
|
-
<b>Note:</b> This module requires an API Key from the [
|
|
8
|
+
<b>Note:</b> This module requires an API Key from the [NLR Developer Network](https://developer.nrel.gov/)
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -157,7 +157,7 @@ updated_scenario_report = reopt_post_processor.run_scenario_report(scenario_repo
|
|
|
157
157
|
|
|
158
158
|
First, check out the repository (i.e. git clone this repo).
|
|
159
159
|
|
|
160
|
-
Next, obtain a developer.nrel.gov API key from the [
|
|
160
|
+
Next, obtain a developer.nrel.gov API key from the [NLR Developer Network](https://developer.nrel.gov/]). Copy and paste your key in to the _developer_nrel_key_._rb_ file then save the file:
|
|
161
161
|
|
|
162
162
|
DEVELOPER_NREL_KEY = '<insert your key here>'
|
|
163
163
|
|
data/README.md
CHANGED
|
@@ -9,7 +9,7 @@ REopt is a technoeconomic model which leverages mixed integer linear programming
|
|
|
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
|
|
|
11
11
|
<b>Note:</b> this module requires an API Key from the
|
|
12
|
-
[
|
|
12
|
+
[NLR Developer Network](https://developer.nrel.gov/)
|
|
13
13
|
|
|
14
14
|
[RDoc Documentation](https://urbanopt.github.io/urbanopt-reopt-gem/)
|
|
15
15
|
|
|
@@ -161,7 +161,7 @@ updated_scenario_report = reopt_post_processor.run_scenario_report(scenario_repo
|
|
|
161
161
|
|
|
162
162
|
First, check out the repository (i.e. git clone this repo).
|
|
163
163
|
|
|
164
|
-
Next, obtain a developer.nrel.gov API key from the [
|
|
164
|
+
Next, obtain a developer.nrel.gov API key from the [NLR Developer Network](https://developer.nrel.gov/]). Copy and paste your key in to the _developer_nrel_key_._rb_ file then save the file:
|
|
165
165
|
|
|
166
166
|
DEVELOPER_NREL_KEY = '<insert your key here>'
|
|
167
167
|
|
data/Rakefile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt™, Copyright (c) 2019-
|
|
2
|
+
# URBANopt™, Copyright (c) 2019-2026, Alliance for Energy Innovation, 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,
|
data/developer_nrel_key.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt (tm), Copyright (c) Alliance for
|
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Energy Innovation, LLC.
|
|
3
3
|
# See also https://github.com/urbanopt/urbanopt-reopt-gem/blob/develop/LICENSE.md
|
|
4
4
|
# *********************************************************************************
|
|
5
5
|
|
data/doc_templates/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
URBANopt (tm), Copyright (c) 2019-
|
|
1
|
+
URBANopt (tm), Copyright (c) 2019-2026, Alliance for Energy Innovation, 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-2026, Alliance for Energy Innovation, 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
|
# *********************************************************************************
|
|
2
|
-
# URBANopt (tm), Copyright (c) Alliance for
|
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Energy Innovation, LLC.
|
|
3
3
|
# See also https://github.com/urbanopt/urbanopt-reopt-gem/blob/develop/LICENSE.md
|
|
4
4
|
# *********************************************************************************
|
data/docs/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Moreover, the REopt Gem can be run in several modes, either on:
|
|
|
20
20
|
|
|
21
21
|
See the <StaticLink target="\_blank" href="https://github.com/urbanopt/urbanopt-example-reopt-project.git">example project</StaticLink> for more infomation about usage of this gem.
|
|
22
22
|
|
|
23
|
-
<b>Note:</b> This module requires an API Key from the <StaticLink target='blank' href="https://developer.nrel.gov/">
|
|
23
|
+
<b>Note:</b> This module requires an API Key from the <StaticLink target='blank' href="https://developer.nrel.gov/">NLR Developer Network</StaticLink>.
|
|
24
24
|
|
|
25
25
|
<StaticLink target="\_blank" href="https://urbanopt.github.io/urbanopt-reopt-gem/">RDoc Documentation</StaticLink>
|
|
26
26
|
|
|
@@ -177,7 +177,7 @@ updated_scenario_report = reopt_post_processor.run_scenario_report(scenario_repo
|
|
|
177
177
|
|
|
178
178
|
First, check out the repository (i.e. git clone this repo).
|
|
179
179
|
|
|
180
|
-
Next, obtain a developer.nrel.gov API key from the [
|
|
180
|
+
Next, obtain a developer.nrel.gov API key from the [NLR Developer Network](https://developer.nrel.gov/]). Copy and paste your key in to the _developer_nrel_key_._rb_ file then save the file:
|
|
181
181
|
|
|
182
182
|
DEVELOPER_NREL_KEY = '<insert your key here>'
|
|
183
183
|
|
data/docs/package.json
CHANGED
data/index.md
CHANGED
|
@@ -5,7 +5,7 @@ REopt is a technoeconomic model which leverages mixed integer linear programming
|
|
|
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
|
|
|
8
|
-
<b>Note:</b> This module requires an API Key from the [
|
|
8
|
+
<b>Note:</b> This module requires an API Key from the [NLR Developer Network](https://developer.nrel.gov/)
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -157,7 +157,7 @@ updated_scenario_report = reopt_post_processor.run_scenario_report(scenario_repo
|
|
|
157
157
|
|
|
158
158
|
First, check out the repository (i.e. git clone this repo).
|
|
159
159
|
|
|
160
|
-
Next, obtain a developer.nrel.gov API key from the [
|
|
160
|
+
Next, obtain a developer.nrel.gov API key from the [NLR Developer Network](https://developer.nrel.gov/]). Copy and paste your key in to the _developer_nrel_key_._rb_ file then save the file:
|
|
161
161
|
|
|
162
162
|
DEVELOPER_NREL_KEY = '<insert your key here>'
|
|
163
163
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt (tm), Copyright (c) Alliance for
|
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Energy Innovation, LLC.
|
|
3
3
|
# See also https://github.com/urbanopt/urbanopt-reopt-gem/blob/develop/LICENSE.md
|
|
4
4
|
# *********************************************************************************
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt (tm), Copyright (c) Alliance for
|
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Energy Innovation, LLC.
|
|
3
3
|
# See also https://github.com/urbanopt/urbanopt-reopt-gem/blob/develop/LICENSE.md
|
|
4
4
|
# *********************************************************************************
|
|
5
5
|
|
|
@@ -158,8 +158,8 @@ module URBANopt # :nodoc:
|
|
|
158
158
|
# [*return:*] _URBANopt::Reporting::DefaultReports::FeatureReport_ - Returns an updated FeatureReport.
|
|
159
159
|
##
|
|
160
160
|
def update_feature_report(feature_report, reopt_output, timeseries_csv_path = nil, resilience_stats = nil)
|
|
161
|
-
# Check if the
|
|
162
|
-
if reopt_output['status'] != 'optimal'
|
|
161
|
+
# Check if the REopt response is valid
|
|
162
|
+
if reopt_output['status'] != 'optimal' && reopt_output['status'] != 'Completed'
|
|
163
163
|
@@logger.error("ERROR cannot update Feature Report #{feature_report.name} #{feature_report.id} - REopt optimization was non-optimal")
|
|
164
164
|
return feature_report
|
|
165
165
|
end
|
|
@@ -182,14 +182,13 @@ module URBANopt # :nodoc:
|
|
|
182
182
|
feature_report.distributed_generation.year_one_bill_before_tax_bau = reopt_output['outputs']['ElectricTariff']['year_one_bill_before_tax_bau'] || 0
|
|
183
183
|
feature_report.distributed_generation.lifecycle_demand_cost_after_tax_bau = reopt_output['outputs']['ElectricTariff']['lifecycle_demand_cost_after_tax_bau'] || 0
|
|
184
184
|
feature_report.distributed_generation.lifecycle_energy_cost_after_tax_bau = reopt_output['outputs']['ElectricTariff']['lifecycle_energy_cost_after_tax_bau'] || 0
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
end
|
|
185
|
+
|
|
186
|
+
# Additional Cost Analysis Fields (includes NPV already added above)
|
|
187
|
+
feature_report.distributed_generation.initial_capital_costs = reopt_output['outputs']['Financial']['initial_capital_costs']
|
|
188
|
+
feature_report.distributed_generation.initial_capital_costs_after_incentives = reopt_output['outputs']['Financial']['initial_capital_costs_after_incentives']
|
|
189
|
+
feature_report.distributed_generation.lifecycle_capital_costs = reopt_output['outputs']['Financial']['lifecycle_capital_costs']
|
|
190
|
+
feature_report.distributed_generation.lifecycle_fuel_costs_after_tax = reopt_output['outputs']['Financial']['lifecycle_fuel_costs_after_tax']
|
|
191
|
+
feature_report.distributed_generation.lifecycle_elecbill_after_tax = reopt_output['outputs']['Financial']['lifecycle_elecbill_after_tax']
|
|
193
192
|
|
|
194
193
|
if reopt_output['outputs']['PV'].is_a?(Hash)
|
|
195
194
|
reopt_output['outputs']['PV'] = [reopt_output['outputs']['PV']]
|