I am writing an optimal power flow (OPF) program. OPF is an optimization problem in which some decision variables like Generation, Load dispatch are adjusted in power flow program so as to minimize the objective function (usually cost of generation).
I am using fmincon
Matlab function to solve this problem. Like any optimization problem, OPF have some linear and nonlinear constraints. These constraints are added to the problem to guarantee the feasibility of the solution.
I wrote these constraint in Matlab, but I am getting infeasible results which is due to constraints. The constraints of this problem are as follows:
In Here I have posted part of my code that I need to supply the constraints to fmincon
. Please check if I wrote the constraints are correct .
Note:I used IEEE New England test system to run OPF on it. This test system contains, 39 Buses, 19 Loads,10 Generators, 46 Lines.
fmincon
. But my suggestion is, if you can test a similar but smaller system, and then work your way up in steps. You can also remove some constraints, then sequentially add them, to single out the constraint that causes infeasibility. \$\endgroup\$fsolve
to see if the problem is feasible. I think the constraints are feasible. But when I put it in optimization (fmincon
) problem it doesn't give the optimal solution. I am now very doubtful if I wrote the constraints correctly in my codes. I also have the same problem in GAMS and that works fine. I checked my script with GAMS and I can't understand why mine doesn't work. @AdeelSabir \$\endgroup\$