-
Notifications
You must be signed in to change notification settings - Fork 57
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
Support in the loop PowerFlow evaluation #1040
base: main
Are you sure you want to change the base?
Conversation
Requires NREL-Sienna/PowerFlows.jl#48. |
@jd-lara I can't tag you for review on this since it's technically your PR, so this is me letting you know that this is ready for review. There's a few |
One issue to consider is the following, in Models with unit commitment (hydro and thermal) if the unit is connected to a PV Bus bus it is essentially off the bus type needs to change to PQ to make the power flow problem feasible. This implies that we need an aux variable for the bus type and then enact that change both in the call to solve as well as in the exporter for any models of the subtype Commitment |
Union{String, Int64}} mapping component name/bus number to component name/bus number. | ||
""" | ||
input_key_map::Dict{<:OptimizationContainerKey, <:Any} | ||
input_key_map::Dict{Symbol, <:Dict{<:OptimizationContainerKey, <:Any}} |
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.
Why this change?
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.
Separate dicts for active and reactive power, basically. There were other ways to do it but I think this is the most natural.
# association | ||
for entry_type in precedence | ||
for (key, val) in available_keys | ||
(get_entry_type(key) === entry_type) || continue |
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.
make this if statement for readability
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.
Done
This is finally ready for review! It has a ton of unreleased dependencies so it can't actually be released yet, but I think there is no outstanding work to be done on this PR. The three test files modified here pass when run with the branches of PF, PNM, and PSY I'm currently working on; more thorough testing should be run when those dependencies are finalized. |
This is a WIP branch to integrate the evaluation of PowerFlows into a simulation loop.
GKS edit: depends on NREL-Sienna/PowerFlows.jl#53GKS edit: temporarily depends on PowerFlows'
gks/finalize_export_naming
instead