I suppose it could be a numerical issue, possibly related to the large numerical values on variables that are essentially unconstrained. You might try Inf and -Inf, which should eliminate those constraints entirely, to see if that makes any difference.
You can also just try temporarily setting branch(:, RATE_A) to zero to eliminate those constraints to see if it makes a difference numerically. Ray > On Oct 24, 2019, at 11:39 AM, Diego Piserà <piseradi...@gmail.com> wrote: > > Yes, > PMIN = -9999 > PMAX = 9999 > QMIN = -9999 > QMAX = 9999 > > These are the constrains that i put in the mpc. > > > > > > Diego > > Da: Ray Zimmerman <mailto:r...@cornell.edu> > Inviato: giovedì 24 ottobre 2019 15:53 > A: MATPOWER discussion forum <mailto:matpowe...@list.cornell.edu> > Oggetto: Re: Problems with OPF > > Have you checked the generator limits, e.g. PMIN, PMAX, QMIN, QMAX? > > You can use the checklimits() function in extras/misc to check OPF limits for > you. > > Ray > > > > On Oct 23, 2019, at 12:19 PM, Diego Piserà <piseradi...@gmail.com > <mailto:piseradi...@gmail.com>> wrote: > > Dear Dr. Zimmerman > > I have a problem with the runopf function. > > I have a network with only one generator, > this models the primary substation. > > %tap change > tap = 1.1; > % > mpc.bus(1,8) = tap; % VM voltage magnitude > mpc.gen(1,6) = tap; % VG voltage generator setpoint > % > mpc.bus(1,12) = tap; % VMAX > mpc.bus(1,13) = tap; % VMIN > then I try to run both the runpf and runopf function: > > runpf Converges and gives me a result. > From these results I can observe that with the assignments made I have no > violation of the voltage limits (VMIN & VMAX) or of power passing in the > branches (RATEA) imposed in the OPF problem, so I would expect the runopf > function to converge. > > Instead the OPF run function does not converge. > > What could it be due to? > > Diego