urbanopt-reopt 0.11.0 → 1.0.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/workflows/nightly_ci_build.yml +5 -7
- data/.gitignore +1 -1
- data/CHANGELOG.md +24 -0
- data/Gemfile +16 -11
- data/LICENSE.md +1 -1
- data/RDOC_MAIN.md +6 -6
- data/README.md +6 -6
- data/doc_templates/LICENSE.md +1 -1
- data/doc_templates/copyright_erb.txt +1 -1
- data/docs/README.md +6 -6
- data/docs/schemas/reopt-input-schema.md +25 -23
- data/docs/schemas/reopt-output-schema.md +7 -7
- data/index.md +9 -9
- data/lib/urbanopt/reopt/feature_report_adapter.rb +230 -198
- data/lib/urbanopt/reopt/reopt_ghp_adapter.rb +337 -0
- data/lib/urbanopt/reopt/reopt_ghp_api.rb +156 -0
- data/lib/urbanopt/reopt/reopt_ghp_files/reopt_ghp_assumption.json +27 -0
- data/lib/urbanopt/reopt/reopt_ghp_post_processor.rb +149 -0
- data/lib/urbanopt/reopt/reopt_lite_api.rb +84 -46
- data/lib/urbanopt/reopt/reopt_logger.rb +1 -1
- data/lib/urbanopt/reopt/reopt_post_processor.rb +12 -12
- data/lib/urbanopt/reopt/reopt_schema/REopt-GHP-input.json +148 -0
- data/lib/urbanopt/reopt/reopt_schema/reopt_input_schema.json +1125 -1105
- data/lib/urbanopt/reopt/reopt_schema/reopt_output_schema.json +488 -523
- data/lib/urbanopt/reopt/scenario_report_adapter.rb +260 -229
- data/lib/urbanopt/reopt/utilities.rb +2 -2
- data/lib/urbanopt/reopt/version.rb +1 -1
- data/lib/urbanopt/reopt.rb +3 -0
- data/urbanopt-reopt.gemspec +9 -10
- metadata +27 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7585e601e08ef8ae4b677124c3f6790129b44dbfe7da4c701168698437df94c
|
4
|
+
data.tar.gz: fb375bcd95645f6821ee8f06fce5d27eb682f1253db82d71ada98b9f043c921f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8d65764ca0eb6ec58a63f188882c2e70ba5457299f7ddbac75c7a98cc5d2762f62a82f1ecb7cb5d61c330d9ad29d6e7a38d1b24ee429c5d30ef910199f1919c
|
7
|
+
data.tar.gz: c91ec78859161c11e381771b0a5f231e7ee168dc758f49f9e80035e15483ca8c1b95c42a32334dca830f60c67d167c5016cc6ea776be2cff39180bde42091852
|
@@ -1,13 +1,12 @@
|
|
1
1
|
name: REopt-gem CI
|
2
2
|
|
3
3
|
on:
|
4
|
-
|
4
|
+
workflow_dispatch:
|
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'
|
9
|
-
pull_request:
|
10
|
-
types: [review_requested]
|
11
10
|
|
12
11
|
env:
|
13
12
|
# This env var should enforce develop branch of all dependencies
|
@@ -20,17 +19,16 @@ jobs:
|
|
20
19
|
# https://github.com/rbenv/ruby-build/discussions/1940
|
21
20
|
runs-on: ubuntu-latest
|
22
21
|
container:
|
23
|
-
image: docker://nrel/openstudio:3.
|
22
|
+
image: docker://nrel/openstudio:3.9.0
|
24
23
|
steps:
|
25
24
|
- uses: actions/checkout@v4
|
26
25
|
- name: set git config options
|
27
26
|
shell: bash
|
28
|
-
run:
|
29
|
-
git config --global --add safe.directory '*'
|
27
|
+
run: git config --global --add safe.directory '*'
|
30
28
|
- name: Update gems
|
31
29
|
run: |
|
30
|
+
bundle install
|
32
31
|
bundle update
|
33
|
-
bundle exec certified-update
|
34
32
|
- name: Run Rspec
|
35
33
|
run: bundle exec rspec
|
36
34
|
- name: Coveralls
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,29 @@
|
|
1
1
|
# URBANopt REopt Gem
|
2
2
|
|
3
|
+
## Version 1.0.0
|
4
|
+
|
5
|
+
## What's Changed
|
6
|
+
|
7
|
+
* Upgrade to OpenStudio 3.9 and Ruby 3.2.2 by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/155
|
8
|
+
* Updates for REopt v3.11 by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/157
|
9
|
+
|
10
|
+
### Other Changes
|
11
|
+
|
12
|
+
* expose error messages for certificate verify failed by @kflemin in https://github.com/urbanopt/urbanopt-reopt-gem/pull/151
|
13
|
+
* REopt GHP LCCA Analysis by @tanushree04 in https://github.com/urbanopt/urbanopt-reopt-gem/pull/153
|
14
|
+
|
15
|
+
**Full Changelog**: https://github.com/urbanopt/urbanopt-reopt-gem/compare/v0.12.0...v1.0.0
|
16
|
+
|
17
|
+
## Version 0.12.0
|
18
|
+
|
19
|
+
Date Range: 01/11/24 - 05/06/24
|
20
|
+
|
21
|
+
* Use Reopt v3 by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/149
|
22
|
+
|
23
|
+
**Full Changelog**: https://github.com/urbanopt/urbanopt-reopt-gem/compare/v0.11.0...v0.12.0
|
24
|
+
|
3
25
|
## Version 0.11.0
|
26
|
+
|
4
27
|
Date Range: 07/06/23 - 01/11/24
|
5
28
|
|
6
29
|
* Use different error messages in different places by @vtnate in https://github.com/urbanopt/urbanopt-reopt-gem/pull/145
|
@@ -11,6 +34,7 @@ Date Range: 07/06/23 - 01/11/24
|
|
11
34
|
**Full Changelog**: https://github.com/urbanopt/urbanopt-reopt-gem/compare/v0.10.0...v0.11.0
|
12
35
|
|
13
36
|
## Version 0.10.0
|
37
|
+
|
14
38
|
Date Range: 12/13/22 - 7/6/23
|
15
39
|
|
16
40
|
- Update dependencies for OpenStudio 3.6.1
|
data/Gemfile
CHANGED
@@ -17,7 +17,9 @@ 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
|
-
#
|
20
|
+
# gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
|
21
|
+
# else
|
22
|
+
# gem 'openstudio-extension', '~> 0.8.1'
|
21
23
|
# end
|
22
24
|
#
|
23
25
|
# if allow_local && File.exist?('../openstudio-common-measures-gem')
|
@@ -41,14 +43,17 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
41
43
|
# gem 'openstudio-model-articulation', '0.1.0'
|
42
44
|
# end
|
43
45
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
if allow_local && File.exist?('../urbanopt-scenario-gem')
|
47
|
+
gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
|
48
|
+
elsif allow_local
|
49
|
+
gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
|
50
|
+
end
|
49
51
|
|
50
|
-
#
|
51
|
-
#
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
# Temporary! Remove this once reporting-gem is merged/released
|
53
|
+
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
|
54
|
+
|
55
|
+
if allow_local && File.exist?('../urbanopt-geojson-gem')
|
56
|
+
gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
|
57
|
+
elsif allow_local
|
58
|
+
gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
|
59
|
+
end
|
data/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt (tm), Copyright (c) 2019-
|
1
|
+
URBANopt (tm), Copyright (c) 2019-2025, 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
@@ -35,12 +35,12 @@ This gem is used to call the REopt API on a Scenario Report or Feature Report to
|
|
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
|
},
|
data/README.md
CHANGED
@@ -41,12 +41,12 @@ Or install it yourself as:
|
|
41
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
|
},
|
data/doc_templates/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt (tm), Copyright (c) 2019-
|
1
|
+
URBANopt (tm), Copyright (c) 2019-2025, 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-2025, 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
@@ -52,12 +52,12 @@ Or install it yourself as:
|
|
52
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
|
},
|
@@ -8,15 +8,19 @@ The following shows the complete set of inputs to the REopt Lite AP which is cal
|
|
8
8
|
|
9
9
|
## Required Inputs
|
10
10
|
|
11
|
-
The only required parameters to the REopt Lite API (called internally by the gem) are:
|
11
|
+
The only required parameters to the REopt Lite API (called internally by the gem) are:
|
12
12
|
- *latitude*
|
13
|
-
- *longitude*
|
14
|
-
- *urdb_response*
|
15
|
-
|
16
|
-
|
17
|
-
- *
|
18
|
-
|
19
|
-
|
13
|
+
- *longitude*
|
14
|
+
- *urdb_response* OR one of the following sets:
|
15
|
+
- *urdb_label*
|
16
|
+
- *monthly_energy_rates* **and** *monthly_demand_rates*
|
17
|
+
- *blended_annual_demand_rate* **and** *blended_annual_energy_rate*
|
18
|
+
- *urdb_utility_name* **and** *urdb_rate_name*
|
19
|
+
- *tou_energy_rates_per_kwh*
|
20
|
+
|
21
|
+
- *loads_kw* OR one of the following sets:
|
22
|
+
- *doe_reference_name* **and** *annual_kwh*
|
23
|
+
- *doe_reference_name* **and** *monthly_totals_kwh*
|
20
24
|
|
21
25
|
The gem sources *latitude*, *longitude* and *loads_kw* from a Feature or Scenario Report directly. If no specific *urdb_response* or *urdb_label* is specified as an custom assumption (see below), then a constant rate of $0.13/kWh with no demand charge is provided by the gem as a default to the REopt API.
|
22
26
|
|
@@ -24,28 +28,26 @@ Otherwise, all non-required input parameters will be filled in with default valu
|
|
24
28
|
|
25
29
|
|
26
30
|
```
|
27
|
-
{
|
28
|
-
"
|
29
|
-
"
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
}
|
39
|
-
}
|
31
|
+
{
|
32
|
+
"Site":{
|
33
|
+
"latitude":45,
|
34
|
+
"longitude":-110
|
35
|
+
},
|
36
|
+
"ElectricTariff": {
|
37
|
+
"urdb_label":"594976725457a37b1175d089"
|
38
|
+
},
|
39
|
+
"ElectricLoad":{
|
40
|
+
"doe_reference_name":"Hospital",
|
41
|
+
"annual_kwh":1000000
|
40
42
|
}
|
41
43
|
}
|
42
44
|
```
|
43
45
|
|
44
46
|
## Setting Custom Assumptions
|
45
47
|
|
46
|
-
If you wish to use custom input parameters, other than default values, you have a couple of options.
|
48
|
+
If you wish to use custom input parameters, other than default values, you have a couple of options.
|
47
49
|
|
48
|
-
* 1) Custom hashes, formatted as described above, can be directly paramaterized when invoking _reopt_json_from_scenario_report_ or _reopt_jsons_from_scenario_feature_reports_ from a **URBANopt::REopt::ScenarioReportAdapter**, or _reopt_json_from_feature_report_ from a **URBANopt::REopt::FeatureReportAdapter**.
|
50
|
+
* 1) Custom hashes, formatted as described above, can be directly paramaterized when invoking _reopt_json_from_scenario_report_ or _reopt_jsons_from_scenario_feature_reports_ from a **URBANopt::REopt::ScenarioReportAdapter**, or _reopt_json_from_feature_report_ from a **URBANopt::REopt::FeatureReportAdapter**.
|
49
51
|
|
50
52
|
* 2) Paths to custom hashes, formatted as described above and saved as JSON files in a common folder, can be specified in the input REopt Scenario CSV. See the [example project](https://github.com/TK-23/urbanopt-example-geojson-reopt-project.git) for more information on how to do this.
|
51
53
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# REopt Lite Outputs Schema
|
2
2
|
|
3
|
-
When the gem calls the REopt Lite APUI it
|
3
|
+
When the gem calls the REopt Lite APUI it receives the following complete set of results described in the data dictionary below. Only those needed to update a Feature or Scenario Report's distributed_generation attribute set and timeseries CSV are pulled from the response and transferred to the Feature or Scenario Report. You may choose to modify the code to include more or less of the full REopt Lite response.
|
4
4
|
|
5
5
|
## Data Dictionary
|
6
6
|
<ReoptOutputSchema />
|
@@ -12,12 +12,12 @@ The REopt Lite API updates the distributed_generation attributes of a Scenario o
|
|
12
12
|
|
13
13
|
```
|
14
14
|
"distributed_generation": {
|
15
|
-
"
|
16
|
-
"
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
15
|
+
"lcc": 100000000.0,
|
16
|
+
"npv": 10000000.0,
|
17
|
+
"year_one_energy_cost_before_tax": 7000000.0,
|
18
|
+
"year_one_demand_cost_before_tax": 3000000.0,
|
19
|
+
"year_one_bill_before_tax": 10000000.0,
|
20
|
+
"lifecycle_energy_cost_after_tax": 70000000.0,
|
21
21
|
"solar_pv": {
|
22
22
|
"size_kw": 30000.0
|
23
23
|
},
|
data/index.md
CHANGED
@@ -10,9 +10,9 @@ See the [example project](https://github.com/urbanopt/urbanopt-example-reopt-pro
|
|
10
10
|
## Installation
|
11
11
|
|
12
12
|
See [https://docs.urbanopt.net/installation/installation.html](https://docs.urbanopt.net/installation/installation.html) for instructions on prerequiste software, including:
|
13
|
-
- Ruby 2.2
|
14
|
-
- Bundler 1.
|
15
|
-
- OpenStudio
|
13
|
+
- Ruby 2.7.2
|
14
|
+
- Bundler 1.21.0
|
15
|
+
- OpenStudio 3.7.0
|
16
16
|
|
17
17
|
Add this line to your application's Gemfile:
|
18
18
|
|
@@ -35,12 +35,12 @@ This gem is used to call the REopt API on a Scenario Report or Feature Report to
|
|
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
|
},
|