Simple SCOPF model leveraging MadNLP two-stage solver#49
Open
michel2323 wants to merge 1 commit into
Open
Conversation
fc983f9 to
6e44636
Compare
Add a lightweight N-1 security-constrained AC OPF independent of the GOC3
machinery, in both monolithic and Schur-decomposable forms:
- scopf_model (src/scopf_simple.jl): replicates the base AC OPF across a
scenario dimension (column 1 = base, 2..K+1 = contingencies), supporting
generator and branch outages with bounded corrective generator recourse.
Includes the MATPOWER rateA == 0 ("unlimited") fix. polar and rect forms.
- scopf_twostage_model (src/scopf_twostage.jl): the same problem on a
TwoStageExaCore (base = first stage, each contingency = an EachScenario
block), solved with MadNLP's SchurComplementKKTSystem; returns the Schur
partition tags as a 4th value.
- examples/scopf.jl: CLI-driven driver (case/mode/form/gpu/inertia/...) over
the matching <case>.Ctgs line-contingency list, plus case9/case118 data.
- test/scopf_tests.jl: case9 N-1 agreement test (CPU single vs CPU/GPU
two-stage) on objective and base/scenario dispatch, wired into runtests.jl.
- Pin MadNLP + MadNLPGPU to the schur-design-constraints branch via [sources]
so Pkg.test (local and CI) gets the SchurComplementKKTSystem support; the
registry release rejects it. README/docs touchups.
f97b01f to
1fb3efe
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
==========================================
- Coverage 88.86% 86.81% -2.05%
==========================================
Files 9 11 +2
Lines 1275 1547 +272
==========================================
+ Hits 1133 1343 +210
- Misses 142 204 +62 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a lightweight N-1 security-constrained AC OPF independent of the GOC3 machinery, in both monolithic and Schur-decomposable forms:
scopf_model(src/scopf_simple.jl): replicates the base AC OPF across a scenario dimension (column 1 = base, 2..K+1 = contingencies), supporting generator and branch outages with bounded corrective generator recourse. Includes the MATPOWERrateA == 0("unlimited") fix. polar and rect forms.scopf_twostage_model(src/scopf_twostage.jl): the same problem on aTwoStageExaCore(base = first stage, each contingency = anEachScenarioblock), solved with MadNLP'sSchurComplementKKTSystem; returns the Schur partition tags as a 4th value.examples/scopf.jl: CLI-driven driver (case/mode/form/gpu/inertia/...) over the matching<case>.Ctgsline-contingency list, pluscase9/case118data.test/scopf_tests.jl: case9 N-1 agreement test (CPU single vs CPU/GPU two-stage) on objective and base/scenario dispatch, wired into runtests.jl.