Skip to content

Commit 12ed42c

Browse files
authored
Merge pull request #485 from NREL/develop
After-tax savings, update docs pages March 2025
2 parents 8e84116 + ce10fb2 commit 12ed42c

35 files changed

Lines changed: 350 additions & 107 deletions

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ Classify the change according to the following categories:
2424
### Fixed
2525
### Deprecated
2626
### Removed
27+
28+
29+
## v0.51.1
30+
### Added
31+
- Added the following output fields: `year_one_fuel_cost_after_tax` for `ExistingBoiler`, `CHP`, `Generator`, and `Boiler`; `ElectricTariff`: `year_one_bill_after_tax` and `year_one_export_benefit_after_tax`, `Financial`: `capital_costs_after_non_discounted_incentives`, `year_one_total_operating_cost_savings_before_tax`, `year_one_total_operating_cost_savings_after_tax`, `year_one_total_operating_cost_before_tax`, `year_one_total_operating_cost_after_tax`, `year_one_fuel_cost_before_tax`, `year_one_fuel_cost_after_tax`, `year_one_chp_standby_cost_after_tax`, `year_one_chp_standby_cost_after_tax`, `GHP.avoided_capex_by_ghp_present_value`
32+
- Add a warning so that when **SteamTurbine** is included, renewable energy fractions may not be accurate.
33+
- Added new attribute **fuel_renewable_energy_fraction** to the technology **Boiler**.
34+
### Changed
35+
- Updated and fixed some `docs` pages: improved setup, using HiGHS solver, fixed docstrings
36+
- Changed the name of the following output fields: `Financial.capital_costs_after_incentives_without_macrs` to `Financial.capital_costs_after_non_discounted_incentives_without_macrs`
37+
### Fixed
38+
- Update the **REoptInputs** parameter **tech_renewable_energy_fraction** so that only electricity-producing and fuel-burning heating technologies are included (instead of all technologies).
39+
- Included the following in the `Financial.lifecycle_capital_costs` and `Financial.initial_capital_costs`: `m[Symbol("OffgridOtherCapexAfterDepr"*_n)] - m[Symbol("AvoidedCapexByGHP"*_n)] - m[Symbol("ResidualGHXCapCost"*_n)] - m[Symbol("AvoidedCapexByASHP"*_n)]`
2740

2841
## v0.51.0
2942
### Added
@@ -53,7 +66,7 @@ Classify the change according to the following categories:
5366
### Fixed
5467
- Make **ElectricTariff** **export_rate_beyond_net_metering_limit** and **wholesale_rate** with sub-hour time step work
5568
- Update the expression `m[:AnnualEleckWh]` to include electrified thermal loads
56-
- Update expressions `m[AnnualREHeatkWh]` and `AnnualHeatkWh` so that only non-electrified thermal loads are included and storage losses are proportional to the contribution of fuel-burning technologies to charging storage
69+
- Update expressions `m[:AnnualREHeatkWh]` and `m[:AnnualHeatkWh]` so that only non-electrified thermal loads are included and storage losses are proportional to the contribution of fuel-burning technologies to charging storage
5770

5871
## v0.50.0
5972
### Added

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "REopt"
22
uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6"
33
authors = ["Nick Laws", "Hallie Dunham <hallie.dunham@nrel.gov>", "Bill Becker <william.becker@nrel.gov>", "Bhavesh Rathod <bhavesh.rathod@nrel.gov>", "Alex Zolan <alexander.zolan@nrel.gov>", "Amanda Farthing <amanda.farthing@nrel.gov>", "Xiangkun Li <xiangkun.li@nrel.gov>", "An Pham <an.pham@nrel.gov>", "Byron Pullutasig <byron.pullatasig@nrel.gov>"]
4-
version = "0.51.0"
4+
version = "0.51.1"
55

66
[deps]
77
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@ For more information about REopt.jl please see the Julia documentation:
99

1010

1111
## Quick Start
12-
Evaluating only `PV` and `Storage` requires a linear program solver. Adding a generator and/or multiple outages makes the problem mixed-integer linear, and thus requires a MILP solver. See https://jump.dev/JuMP.jl/stable/installation/ for a list of solvers. The REopt package has been tested with `Xpress`, `Cbc`, `HiGHS` and `CPLEX`.
13-
14-
Note that not all solvers support indicator constraints and special order sets (such as HiGHS), and so not all REopt problems can be solved with solvers lacking these capabilities.
12+
Evaluating simple `PV` and `ElectricStorage` scenarios requires a linear program solver. Evaluating net-metering, `Generator`, multiple outages, or other more complex scenario makes the problem mixed-integer linear, and thus requires a MILP solver. See https://jump.dev/JuMP.jl/stable/installation/ for a list of solvers. The REopt package has been tested with , `HiGHS`, `Cbc`, `SCIP`, `Xpress` (commercial), and `CPLEX` (commercial).
1513

1614
### Example
1715
```
18-
using Xpress
19-
using JuMP
20-
using REopt
16+
using REopt, JuMP, HiGHS
2117
22-
m = Model(Xpress.Optimizer)
23-
results = run_reopt(m, "path/to/scenario.json")
18+
m = Model(HiGHS.Optimizer)
19+
results = run_reopt(m, "pv_storage.json")
2420
```
2521
See the `test/scenarios` directory for examples of `scenario.json`.
2622

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ REopt = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6"
66

77
[compat]
88
Documenter = "0.26"
9-
julia = "1.6, 1.7, 1.8"
9+
julia = "1"

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ Serving HTTP on ::1 port 8000 (http://[::1]:8000/) ...
2929
Alternatively, you can use `LiveServer.jl` to host the documentation locally by running `docs/src/devdeploy.jl`; e.g.:
3030
```julia
3131
[~/.julia/dev/REopt/docs]
32-
(REopt) pkg> activate .
33-
(REopt) pkg> dev REopt
32+
(docs) pkg> activate .
33+
(docs) pkg> dev REopt
3434
julia> include("devdeploy.jl")
3535
[ Info: Precompiling REopt [d36ad4e8-d74a-4f7a-ace1-eaea049febf6]
3636
...

docs/devdeploy.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ NOTE you have to dev REopt in the `docs` environment to get local changes.
77
e.g.
88
```julia
99
[~/.julia/dev/REopt/docs]
10-
(REopt) pkg> activate .
11-
(REopt) pkg> dev REopt
10+
(docs) pkg> activate .
11+
(docs) pkg> dev REopt
1212
julia> include("devdeploy.jl")
1313
[ Info: Precompiling REopt [d36ad4e8-d74a-4f7a-ace1-eaea049febf6]
1414
...

docs/src/index.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
This package is used as the core model of the [REopt API](https://github.com/NREL/REopt_API) and the [REopt Web Tool](https://reopt.nrel.gov/tool). This package contains additional functionality and flexibility to run locally and customize.
66

77
## Installing
8-
REopt evaluations for all system types **except GHP** can be performed using the following installation instructions from the Julia REPL:
9-
```julia
10-
using Pkg
11-
Pkg.add("REopt")
8+
REopt evaluations for all system types except GHP (see below) can be performed using the following installation instructions from the package manager mode (`]`) of the Julia REPL:
9+
```sh
10+
(active_env) pkg> add REopt JuMP HiGHS
1211
```
1312

1413
### Add NREL developer API key for PV and Wind
15-
If you don't have an NREL developer network API key, sign up here to get one (free): https://developer.nrel.gov/signup/; this is required to load PV and Wind resource profiles from PVWatts and the Wind Toolkit APIs from within REopt.jl.
14+
If you don't have an NREL developer network API key, [sign up here on https://developer.nrel.gov to get one (free)](https://developer.nrel.gov/signup); this is required to load PV and Wind resource profiles from PVWatts and the Wind Toolkit APIs from within REopt.jl.
1615
Assign your API key to the expected environment variable:
1716
```julia
1817
ENV["NREL_DEVELOPER_API_KEY"]="your API key"
@@ -21,7 +20,13 @@ before running PV or Wind scenarios.
2120

2221
### Additional package loading for GHP
2322
GHP evaluations must load in the [`GhpGhx.jl`](https://github.com/NREL/GhpGhx.jl) package separately because it has a more [restrictive license](https://github.com/NREL/GhpGhx.jl/blob/main/LICENSE.md) and is not a registered Julia package.
23+
24+
First add the GhpGhx.jl package to the project's dependencies from the package manager (`]`):
25+
```sh
26+
(active_env) pkg> add "https://github.com/NREL/GhpGhx.jl"
27+
```
28+
29+
Then load in the package from the script where `run_reopt()` is called:
2430
```julia
25-
Pkg.add("https://github.com/NREL/GhpGhx.jl")
2631
using GhpGhx
27-
```
32+
```

docs/src/reopt/examples.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
# Examples
2-
To use REopt you will need to have a solver installed. REopt.jl has been tested with Xpress, Cbc, and CPLEX solvers, but it should work with other Linear Progam solvers (for PV and Storage scenarios) or Mixed Integer Linear Program solvers (for scenarios with outages and/or Generators).
2+
To use REopt you will need to have a solver installed. This just requires adding one of the compatible open-source solver Julia packages to your Julia environment, along with the JuMP.jl optimization modeling package. If you want to use a commercial solver which requires a licenese, installation of that solver is required external to the Julia environment.
3+
4+
REopt.jl has been tested with HiGHS (preferred open-source), Xpress (commercial), Cbc, SCIP, and CPLEX (commercial) solvers, but it should work with other Linear Progam solvers (for PV and Storage scenarios) or Mixed Integer Linear Program solvers (for scenarios with outages and/or Generators).
35

46
## Basic
57
A REopt optimization can be run with three lines:
68
```julia
7-
using REopt, JuMP, Cbc
9+
using REopt, JuMP, HiGHS
810

9-
m = Model(Cbc.Optimizer)
10-
results = run_reopt(m, "test/scenarios/pv_storage.json")
11+
m = Model(HiGHS.Optimizer)
12+
results = run_reopt(m, "pv_storage.json")
1113
```
1214

13-
The `scenario.json` contains a `Dict` of inputs. For more on the `scenario.json` see the [REopt Inputs](@ref) section and find examples at [test/scenarios](https://github.com/NREL/REopt/blob/master/test/scenarios). For more examples of how to run REopt, see [`test_with_cplex.jl`](https://github.com/NREL/REopt/blob/master/test/test_with_cplex.jl) and [`test_with_xpress.jl`](https://github.com/NREL/REopt/blob/master/test/test_with_xpress.jl)
15+
The input file, in this case `pv_storage.json`, contains the set of user-defined inputs. For more on the inputs .json file, see the [REopt Inputs](@ref) section and find examples at [test/scenarios](https://github.com/NREL/REopt/blob/master/test/scenarios). For more examples of how to run REopt, see [`runtests.jl`](https://github.com/NREL/REopt.jl/blob/master/test/runtests.jl). To adjust settings such as optimality tolerance and logging, see more about relevant `Model()` arguments here: [open source solver setups](https://github.com/NREL/REopt_API/blob/master/julia_src/os_solvers.jl).
1416

1517
To compare the optimized case to a "Business-as-usual" case (with existing techs or no techs), you can run the [BAUScenario](@ref) scenario in parallel by providing two `JuMP.Model`s like so:
1618
```julia
17-
m1 = Model(Cbc.Optimizer)
18-
m2 = Model(Cbc.Optimizer)
19-
results = run_reopt([m1,m2], "./scenarios/pv_storage.json")
19+
m1 = Model(HiGHS.Optimizer)
20+
m2 = Model(HiGHS.Optimizer)
21+
results = run_reopt([m1,m2], "pv_storage.json")
2022
```
2123
When the [BAUScenario](@ref) is included as shown above, the outputs will include comparative results such as the net present value and emissions reductions of the optimal system as compared to the BAU Scenario.
2224

@@ -30,13 +32,13 @@ When the [BAUScenario](@ref) is included as shown above, the outputs will includ
3032
Using the `build_reopt!` method and `JuMP` methods one can modify the REopt model before optimizing.
3133
In the following example we add a cost for curtailed PV power.
3234
```julia
33-
using Xpress
35+
using HiGHS
3436
using JuMP
3537
using REopt
3638

37-
m = JuMP.Model(Xpress.Optimizer)
39+
m = JuMP.Model(HiGHS.Optimizer)
3840

39-
p = REoptInputs("scenarios/pv_storage.json");
41+
p = REoptInputs("pv_storage.json");
4042

4143
build_reopt!(m, p)
4244

docs/src/reopt/inputs.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# REopt Inputs
2-
Inputs to `run_reopt` can be provided in one of four formats:
2+
Inputs to the `run_reopt` function can be provided in one of four formats:
33
1. a file path (string) to a JSON file,
44
2. a `Dict`,
55
3. using the `Scenario` struct, or
@@ -139,7 +139,12 @@ REopt.ColdThermalStorageDefaults
139139

140140
## HeatingLoad
141141
```@docs
142-
REopt.HeatingLoad
142+
REopt.HeatingLoad()
143+
```
144+
145+
## CoolingLoad
146+
```@docs
147+
REopt.CoolingLoad
143148
```
144149

145150
## FlexibleHVAC

docs/src/reopt/outputs.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
REopt.add_financial_results
66
```
77

8+
## Financial outputs adders with BAU Scenario
9+
```@docs
10+
REopt.combine_results(p::REoptInputs, bau::Dict, opt::Dict, bau_scenario::BAUScenario)
11+
```
12+
813
## ElectricTariff outputs
914
```@docs
1015
REopt.add_electric_tariff_results(::JuMP.AbstractModel, ::REoptInputs, ::Dict)

0 commit comments

Comments
 (0)