Skip to content
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

ADD: Capacitor control for IVR and FOTP formulations #404

Merged
merged 3 commits into from
Nov 14, 2022
Merged

ADD: Capacitor control for IVR and FOTP formulations #404

merged 3 commits into from
Nov 14, 2022

Conversation

keatsig
Copy link
Collaborator

@keatsig keatsig commented Oct 25, 2022

This PR adds capacitor control to current-voltage variable space (IVR) and first-order Taylor polar (FOTP) formulations. This control emulates a typical utility wye-connected capacitor by sending switching messages.

@keatsig keatsig linked an issue Oct 25, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Merging #404 (c85278e) into main (b66b42a) will increase coverage by 0.44%.
The diff coverage is 90.90%.

@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
+ Coverage   69.69%   70.14%   +0.44%     
==========================================
  Files          59       59              
  Lines       14652    14831     +179     
==========================================
+ Hits        10212    10403     +191     
+ Misses       4440     4428      -12     
Impacted Files Coverage Δ
src/form/acp.jl 61.59% <ø> (-0.12%) ⬇️
src/form/acr.jl 63.79% <ø> (-0.12%) ⬇️
src/form/bf_fbs.jl 96.78% <ø> (-0.02%) ⬇️
src/form/fotr.jl 97.23% <ø> (-0.02%) ⬇️
src/form/fotp.jl 94.01% <84.37%> (-2.61%) ⬇️
src/prob/opf_capc.jl 90.26% <91.66%> (+0.65%) ⬆️
src/form/ivr.jl 74.24% <94.59%> (+3.28%) ⬆️
src/core/constraint_template.jl 74.78% <100.00%> (+0.59%) ⬆️
src/core/variable.jl 83.03% <100.00%> (+3.36%) ⬆️
src/core/data.jl 67.85% <0.00%> (+0.80%) ⬆️
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

src/form/ivr.jl Outdated
Comment on lines 194 to 203
"""
variable_mc_capcontrol(pm::AbstractUnbalancedIVRModel; nw::Int=nw_id_default, relax::Bool=false, report::Bool=true)

Capacitor switching variables.
"""
function variable_mc_capcontrol(pm::AbstractUnbalancedIVRModel; nw::Int=nw_id_default, relax::Bool=false, report::Bool=true)
variable_mc_capacitor_switch_state(pm; nw=nw, relax=relax, report=report)
end


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? Is having a function with pm::AbstractUnbalancedPowerModels would be enough, I don't see any custom version of variable_mc_capacitor_switch_state for IVR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might not be necessary. I think the other formulations (ACP, ACR) also have individual variable_mc_capcontrol but call the same variable_mc_capacitor_switch_state function. I can modify this and create a single variable_mc_capcontrol(pm::AbstractUnbalancedPowerModels;...) that should work for all formulations.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, let's do that. the current way seems redundant, and this would reduce the amount of code we need to maintain in the future

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes have been made. Also, FOTP formulation did not have CapControl and the feature has now been added (changed the PR description accordingly).

@keatsig keatsig changed the title ADD: Capacitor control for IVR formulation ADD: Capacitor control for IVR and FOTP formulations Oct 26, 2022
@pseudocubic pseudocubic marked this pull request as ready for review October 27, 2022 20:10
@pseudocubic pseudocubic added Type: Enhancement New feature or request Category: Formulations Network Formulation Category: Problem Specifications Problem specification labels Oct 27, 2022
@pseudocubic pseudocubic merged commit c9d7b87 into lanl-ansi:main Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Formulations Network Formulation Category: Problem Specifications Problem specification Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Multi-network OPF for capacitor control?
2 participants