Is there something funny about case300? makeJac returns errors. Since makeJac() fails I'd expect runpf() to fail as well but it does not.
I wrote a plain vanilla power flow without enforcing Qg limits and get the same results for other cases but |V| in case300 are much lower than with Matpower runpf. It seems that makeYbus() fails on case3012wp, case3375wp. Note that runpf() executes for both of these cases with case3012wp badly conditioned Jacobian. Should runpf() fail here since MakeYbus() fails? I should probably spend more time going through Matpower code than asking these questions but if somebody has already figured out what is going on maybe you can save me some time. Thanks, Jovan >> makeJac(case300) Error using sparse Index exceeds matrix dimensions. Error in bustypes (line 49) Cg = sparse(gen(:, GEN_BUS), (1:ng)', gen(:, GEN_STATUS) > 0, nb, ng); %% gen connection matrix Error in makeJac (line 63) [ref, pv, pq] = bustypes(bus, gen); >> condest(makeJac(100,case300.bus,case300.branch,case300.gen)) Error using sparse Index exceeds matrix dimensions. Error in bustypes (line 49) Cg = sparse(gen(:, GEN_BUS), (1:ng)', gen(:, GEN_STATUS) > 0, nb, ng); %% gen connection matrix Error in makeJac (line 63) [ref, pv, pq] = bustypes(bus, gen); >> >> makeYbus(case3012wp); Error using makeYbus (line 65) buses must appear in order by bus number On Mon, Mar 10, 2014 at 4:38 PM, Ray Zimmerman <[email protected]> wrote: > Yes, both were bugs. I believe I've fixed them in my dev version so they > should be fine in the next release, thanks to your excellent reporting > complete with examples. > > Thanks, > > -- > Ray Zimmerman > Senior Research Associate > B30 Warren Hall, Cornell University, Ithaca, NY 14853 > phone: (607) 255-9645 > > > > On Mar 10, 2014, at 10:06 AM, Jovan Ilic <[email protected]> wrote: > > > I ran Matpower 4.1 on the included cases and ran into a couple of > things which might be bugs or features. I included examples below. > > Jovan Ilic > > > 1) ENFORCE_Q_LIMS = 1 in mpopt does not work if there is only one PV bus > ( guessing the reason) > > Example: > >> mpopt4 = mpoption(mpopt, 'OUT_ALL', 0, 'VERBOSE',0, 'ENFORCE_Q_LIMS', > 0); > >> mpopt = mpoption(mpopt, 'OUT_ALL', 0, 'VERBOSE',0, 'ENFORCE_Q_LIMS', 1); > >> case4gs = loadcase('case4gs'); > >> case4gsSolved = runpf(case4gs,mpopt4); > >> case4gsSolved = runpf(case4gs,mpopt) > Attempted to access pv(1); index out of bounds because numel(pv)=0. > > Error in bustypes (line 61) > ref = pv(1); %% use the first PV bus > > Error in runpf (line 291) > [ref, pv, pq] = bustypes(bus, gen); > > >> > > 2) ENFORCE_Q_LIMS = 1 in mpopt can set slack bus to PQ bus type > > I am not sure if this is what we want. You should be careful to set it > back to slack bus if using the solved case to run runpf again. > > Example: > > >> mpopt = mpoption(mpopt, 'OUT_ALL', 0, 'VERBOSE',0, 'ENFORCE_Q_LIMS', 1); > >> case300 = loadcase('case300') > > case300 = > > version: '2' > baseMVA: 100 > bus: [300x13 double] > gen: [69x21 double] > branch: [411x13 double] > gencost: [69x7 double] > > >> case300Solved = runpf(case300,mpopt); > >> sum(case300.bus(:,2)==3) > > ans = > > 1 > > >> sum(case300Solved.bus(:,2)==3) > > ans = > > 0 > > > > > -- A pessimist is an optimist with experience.
