What is the Reason for the infeasibility of the AC-OPF in my Pyomo code?

195 views
Skip to first unread message

sinaT

unread,
Jan 29, 2021, 9:46:18 AM1/29/21
to Pyomo Forum
Hi Everyone.
I was coding the AC-OPF problem for the 9Bus network in Pyomo.

I checked the formulations and equations many times, but I assume I didn't find any errors. When I run this code by Knitro and Ipopt solvers, They all say that:

Convergence to an infeasible point. The problem may be locally infeasible.

Then when I write log_infeasible_constraints(model) to see the infeasibility.

Anyone Knows what the problem with the code is? 
The question's link and the main part of code in StackOverflow is:

Daniel Gebbran

unread,
Jan 31, 2021, 7:47:21 PM1/31/21
to Pyomo Forum
Hi sinaT,

I encourage you to follow some steps to debug the AC OPF.
Start by reducing (nearly removing) the load and analysing the voltages and power profiles. If that does work, but the full load doesn't work, you probably have an error related to the data (whether admittance matrix, load, or associated parameters). You could also try simply multiplying the admittance by enough, so that your grid should be able to deal with 'whatever' power flow and loads you're inputting.

In parallel, you could try a more simple 2- or 3-bus system and retain the same equations, using a very simple (and large) admittance for the grid.

If both of the above still return an infeasible point, then it's pretty going to point towards an error on your algorithm/modelling/equations.

Best of luck, and best regards,
Daniel Gebbran

Laird, Carl Damon

unread,
Jan 31, 2021, 10:14:49 PM1/31/21
to pyomo...@googlegroups.com

Hi sinaT and Daniel,

 

I would recommend getting the solution of an ACOPF problem from Matpower or EGRET (or another source) and initialize your model at that solution. If the model is correct, then the constraints should all be satisfied. You can check which constraints are violated, and this will point directly to any differences in your model. Look into pyomo/util/infeasible.py for some helpful functions.

 

Regards,

 

Carl.

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyomo-forum/21096e51-8ae2-48cd-af44-5531192d0077n%40googlegroups.com.

sinaT

unread,
Feb 1, 2021, 4:08:18 AM2/1/21
to Pyomo Forum
Hi Daniel,
Thanks for your response and guidance.
Actually, I implemented this code from a GAMS code. The data are all correct according to the results of GAMS. I certainly will follow your recommended steps. Thank you so much
Best Regards,
Sina

sinaT

unread,
Feb 1, 2021, 4:12:53 AM2/1/21
to Pyomo Forum
Hi Carl,
Thanks for your response.
 I will surely check the util/infeasible more carefully. Thank you so much
Best Regards,
Sina
Reply all
Reply to author
Forward
0 new messages