add opf controllability option for from_mpc - #2978
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2978 +/- ##
========================================
Coverage 72.00% 72.00%
========================================
Files 352 352
Lines 38311 38316 +5
========================================
+ Hits 27584 27589 +5
Misses 10727 10727 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@jerelang , thanks for the PR. Do I understand it correctly, that this will set all ext_grid / gens to controllable if the flag is selected? Would it not make more sense to select which one is actually controllable, based on for example if a user defined price curve is available? |
|
@vogt31337 , thanks for the review. Yes, this just sets all ext_grids/gens to controllable. I should have moved this up into from_mpc, as it is only MATPOWER specific. |
5b08951 to
40f2712
Compare
|
|
@jerelang , hmm seems to be specific for the matpower opf. Would you think it would make Sense to make These gens / ext_grids always controllable? |
|
@vogt31337 If I understood it correctly, MATPOWER handles controllability completely using just the P and Q limits for each gen, so setting all to controllable by default for MATPOWER specifically and therefore not ignoring the limits anymore should be correct. I do not know however if the controllable flag for the gens has use or implications outside of OPF, which is why I implemented it as an opt-in argument. |
|
I think this greatly depends on the modelling. I can Imagine scenarios in which only some gens are controllable. For example to calculate If redispatching renewables will solve a Problem. |
|
You are absolutely right about scenarios where one does not want all gens to be controllable! |
|
@jerelang , I thought about your proposal, and I think you are right. Setting everything to controllable and then fixing it with the boundaries P_min = P_max seems like a viable option. Therefore I would like to include your PR. But a small fix has to be done. |
40f2712 to
28a8ba0
Compare
|
|
Alright, I moved the test inside the existing from_mpc test file and used the same example networks. I left the controllability option turned off as default. |



ext_grid/genelements from importing MATPOWER/PYPOWER OPF cases may be treated as fixed setpoints, ignoring their limits