Dear Prof. Zimmerman I want to do runmarket with following offers and bids also with PF=1 for generators and the following error is occurred. Could you please help me?
*define_constants; mpc0= loadcase('case9'); mpc = load2disp(mpc0); offers.P.qty = [200; 150; 180]; offers.P.prc = [30; 40; 50]; bids.P.qty = [70; 70; 70]; bids.P.prc = [100; 90; 80]; mkt.OPF = 'AC'; nb = size(mpc.bus, 1); ng = size(mpc.gen, 1); pf = 1; QPratio = sqrt(1/pf^2 -1); mpc.A = sparse([1:ng 1:ng]', [2*nb+(1:ng) 2*nb+ng+(1:ng)]', [QPratio*ones(ng,1); -ones(ng,1)], ng, 2*nb+2*ng); mpc.A = mpc.A(2:end, :); mpc.l = zeros(ng-1, 1); mpc.u = mpc.l; [r, co, cb] = runmarket(mpc, offers, bids, mkt);* Results *Warning: Matrix is singular to working precision. > In mips at 422 In mipsopf_solver at 145 In opf_execute at 106 In opf at 225 In uopf at 154 In smartmkt at 90 In runmarket at 141 Warning: Matrix is singular to working precision. > In mips at 422 In mipsopf_solver at 145 In opf_execute at 106 In opf at 225 In uopf at 154 In smartmkt at 90 In runmarket at 141 SMARTMARKET: non-convergent UOPF??? Error using ==> mtimes Inner matrix dimensions must agree. Error in ==> smartmkt at 170 price = mkt.lim.P.max_offer * ones(ng, 1); Error in ==> runmarket at 141 [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt, mpopt);* Best Wishes Carlos