Skip to content

Commit

Permalink
Merge pull request #333 from NREL/develop
Browse files Browse the repository at this point in the history
v0.38.2 master < develop
  • Loading branch information
adfarth authored Dec 6, 2023
2 parents 32eeca3 + e1c37e2 commit d135263
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Classify the change according to the following categories:
### Deprecated
### Removed

## v0.38.2
### Added
- Added the following BAU outputs: lifecycle_chp_standby_cost_after_tax, lifecycle_elecbill_after_tax, lifecycle_production_incentive_after_tax, lifecycle_outage_cost, lifecycle_MG_upgrade_and_fuel_cost
### Fixed
- Don't allow **Site** **min_resil_time_steps** input to be greater than the maximum value element in **ElectricUtility** **outage_durations**

## v0.38.1
### Fixed
- Fix CHP standby charge modeling - bad reference to pwf_e
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "REopt"
uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6"
authors = ["Nick Laws", "Hallie Dunham <[email protected]>", "Bill Becker <[email protected]>", "Bhavesh Rathod <[email protected]>", "Alex Zolan <[email protected]>", "Amanda Farthing <[email protected]>"]
version = "0.38.1"
version = "0.38.2"

[deps]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
Expand Down
16 changes: 16 additions & 0 deletions src/core/electric_utility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,24 @@
```
!!! note "Outage modeling"
# Indexing
Outage indexing begins at 1 (not 0) and the outage is inclusive of the outage end time step.
For instance, to model a 3-hour outage from 12AM to 3AM on Jan 1, outage_start_time_step = 1 and outage_end_time_step = 3.
To model a 1-hour outage from 6AM to 7AM on Jan 1, outage_start_time_step = 7 and outage_end_time_step = 7.
# Can use either singular or multiple outage modeling inputs, not both
Cannot supply singular outage_start(or end)_time_step and multiple outage_start_time_steps. Must use one or the other.
# Using min_resil_time_steps to ensure critical load is met
With multiple outage modeling, the model will choose to meet the critical loads only as cost-optimal. This trade-off depends on cost of not meeting load (see `Financial | value_of_lost_load_per_kwh`)
and the costs of meeting load, such as microgrid upgrade cost (see `Financial | microgrid_upgrade_cost_fraction`), fuel costs, and additional DER capacity. To ensure that REopt recommends a system that can meet
critical loads during a defined outage period, specify this duration using `Site | min_resil_time_steps`.
# Outage costs will be included in NPV and LCC
Note that when using multiple outage modeling, the expected outage cost will be included in the net present value and lifecycle cost calculations (for both the BAU and optimized case).
You can set `Financial | value_of_lost_load_per_kwh` to 0 to ignore these costs. However, doing so will remove incentive for the model to meet critical loads during outages,
and you should therefore consider also specifying `Site | min_resil_time_steps`. You can alternatively post-process results to remove `lifecycle_outage_cost` from the NPV and LCCs.
!!! note "Outages, Emissions, and Renewable Energy Calculations"
If a single deterministic outage is modeled using outage_start_time_step and outage_end_time_step,
emissions and renewable energy percentage calculations and constraints will factor in this outage.
Expand Down Expand Up @@ -105,6 +117,7 @@ struct ElectricUtility
# fields from other models needed for validation
CO2_emissions_reduction_min_fraction::Union{Real, Nothing} = nothing, # passed from Site
CO2_emissions_reduction_max_fraction::Union{Real, Nothing} = nothing, # passed from Site
min_resil_time_steps::Int=0, # passed from Site
include_climate_in_objective::Bool = false, # passed from Settings
include_health_in_objective::Bool = false # passed from Settings
)
Expand Down Expand Up @@ -156,6 +169,9 @@ struct ElectricUtility
end
end

if !isempty(outage_durations) && min_resil_time_steps > maximum(outage_durations)
throw(@error("Site input min_resil_time_steps cannot be greater than the maximum value in ElectricUtility input outage_durations"))
end
if (!isempty(outage_start_time_steps) && isempty(outage_durations)) || (isempty(outage_start_time_steps) && !isempty(outage_durations))
throw(@error("ElectricUtility inputs outage_start_time_steps and outage_durations must both be provided to model multiple outages"))
end
Expand Down
1 change: 1 addition & 0 deletions src/core/scenario.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function Scenario(d::Dict; flex_hvac_from_json=false)
latitude=site.latitude, longitude=site.longitude,
CO2_emissions_reduction_min_fraction=site.CO2_emissions_reduction_min_fraction,
CO2_emissions_reduction_max_fraction=site.CO2_emissions_reduction_max_fraction,
min_resil_time_steps=site.min_resil_time_steps,
include_climate_in_objective=settings.include_climate_in_objective,
include_health_in_objective=settings.include_health_in_objective,
off_grid_flag=settings.off_grid_flag,
Expand Down
5 changes: 5 additions & 0 deletions src/results/results.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ function combine_results(p::REoptInputs, bau::Dict, opt::Dict, bau_scenario::BAU
("Financial", "lifecycle_om_costs_after_tax"),
("Financial", "year_one_om_costs_before_tax"),
("Financial", "lifecycle_fuel_costs_after_tax"),
("Financial", "lifecycle_chp_standby_cost_after_tax"),
("Financial", "lifecycle_elecbill_after_tax"),
("Financial", "lifecycle_production_incentive_after_tax"),
("Financial", "lifecycle_outage_cost"),
("Financial", "lifecycle_MG_upgrade_and_fuel_cost"),
("ElectricTariff", "year_one_energy_cost_before_tax"),
("ElectricTariff", "year_one_demand_cost_before_tax"),
("ElectricTariff", "year_one_fixed_cost_before_tax"),
Expand Down

0 comments on commit d135263

Please sign in to comment.