Have you tried simply using a different solver? It could also be a problem with the starting point, so you might try setting the opf.init_from_mpc option to 1 and possibly even solve the power flow problem first and use it’s solution as the starting point. E.g.
mpopt = mpoption('opf.init_from_mpc', 1); pf = runpf(mpc); r = runopf(mpc, mpopt); — Ray > On Nov 21, 2017, at 4:47 AM, Gamze Dogan <gamgam...@hotmail.com> wrote: > > > Dear all, > > I wanted to compare the results of the OPF with the two types of model for > the generator costs (polynomial and piecewise linear cost). > > So first, I launched an OPF with polynomial cost which converged, then I > launched one with linear cost and it does not converge. > > I know that my formulation of the linear cost is correct as it has already > converged for several cases, but for some it does not. > > As the first OPF has converged, it means that there is an electrical solution > to my problem, but with linear cost it seem that the OPF cannot verify the > constraints on the cost function (minimal f(x)). > > I suppose that there is a way to make it converge, do you have any idea how? > > Thank you for your time, > > Gamze > > >