-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Battery storage cost constant version 2 #348
base: develop
Are you sure you want to change the base?
Conversation
@toddleif could you add the new inputs to this text in
|
@toddleif in general this is looking good! In addition to my in-line comments above, just a few high-level notes:
|
@toddleif could you please update the |
…m/NREL/REopt.jl into storage-cost-constraints-version2
…ithub.com/NREL/REopt.jl into storage-cost-constraints-version2" This reverts commit c8c247d, reversing changes made to 8e5943d.
Updates to the method of applying the ElectricStorage cost constant constraints, the binary variable name for including the cost constants, and the tests for the ElectricStorage cost constant
@@ -169,10 +172,13 @@ end | |||
can_grid_charge::Bool = off_grid_flag ? false : true | |||
installed_cost_per_kw::Real = 910.0 | |||
installed_cost_per_kwh::Real = 455.0 | |||
installed_cost_constant::Real = 0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toddleif could you please add a brief description of this input to this markdown area?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great idea. I just added a description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toddleif I just modified the description to be in-line with the inputs and to just give a short high-level description of what that input is. Could you review?
@toddleif I think this is looking good! I left a few comments throughout, and have noticed just two more places where changes may need to be made:
|
Also noting that the tests did fail previously (looks like they may have timed out) so I re-ran them on Tucker's last commit. The commit that I made was just a change to the Changelog, so only the documentation tests passed, which is misleading :) |
@adfarth I addressed these edits too, thanks for catching these as well! |
@@ -128,6 +128,16 @@ function add_elec_storage_dispatch_constraints(m, p, b; _n="") | |||
end | |||
end | |||
|
|||
function add_elec_storage_cost_constant_constraints(m, p, b; _n="") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toddleif If I'm understanding correctly, I think the following could work for avoiding the increased run time even when a cost constant isn't included:
- Move the if statement
if p.s.storage.attr[b].installed_cost_constant != 0 || p.s.storage.attr[b].replace_cost_constant != 0
toreopt.jl
. Within that statement, add a warning about binary vars and then call "add_elec_storage_cost_constant_constraints". - Define the binary vars within "add_elec_storage_cost_constant_constraints" here. (see
add_prod_incent_vars_and_constraints
as an example)
This new code allows for a battery storage cost constant to be included in the model. This feature was added in order to align REopt's battery cost modeling with NREL's Annual Technology Baseline (ATB). Changes to the code include:
src/core/energy_storage/electric_storage.jl
struct, the following fields were added: installed_cost_constant, replace_cost_constant, and cost_constant_replacement_year. All three of the added fields default to zero.p.s.storage.types.elec
.