OPF_ALG = 320 relies on the optional package BPMPD_MEX. By the way, those old
LP-based OPF solvers are not very good relative to the best solvers available
now. For small problems (if you have a 32-bit Matlab) MINOPF (OPF_ALG = 500) is
still one of the best. For larger problems, the interior point solvers are
better (540, 560).
They should all give the same answer. If you are seeing differences, it's
likely because the termination tolerances on one or more of the algorithms is
not small enough.
--
Ray Zimmerman
Senior Research Associate
419A Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645
On Nov 3, 2011, at 11:05 AM, Dailan Xu wrote:
> The following error was occurred. It doesn't work.
>
>
> ??? Undefined function or variable 'bpopt'.
>
> Error in ==> qps_bpmpd at 282
> bp_opt = bpopt; %% use default options
>
> Error in ==> qps_matpower at 191
> [x, f, eflag, output, lambda] = ...
>
> Error in ==> mp_qp at 104
> [xout, fval, howout, output, lambda] = qps_matpower(H, f, A, l, b, VLB, VUB,
> x0,
> qps_opt);
>
> Error in ==> mp_lp at 83
> [varargout{1:nargout}] = mp_qp([], varargin{:});
>
> Error in ==> LPrelax at 55
> [x2, duals] = mp_lp(f, atemp, btemp, vlb, vub, [], nequs, -1, 100);
>
> Error in ==> LPsetup at 116
> [x2, dualsred, idx_workc, idx_bindc] = LPrelax(ared, fred, bred, nequsred,
> vlbred,
> vubred, idx_workc, mpopt);
>
> Error in ==> LPconstr at 225
> [dx, lambda, idx_workc, idx_bindc] = LPsetup(a_lp, f_lp, rhs_lp, nequ,
> vlbdx, vubdx,
> idx_workc, mpopt);
>
> Error in ==> lpopf_solver at 157
> [x, lambda, success] = LPconstr('fun_copf', x0, mpopt, step0, [], [],
> 'grad_copf', ...
>
> Error in ==> opf_execute at 148
> [results, success, raw] = lpopf_solver(om, mpopt);
>
> Error in ==> opf at 225
> [results, success, raw] = opf_execute(om, mpopt);
>
> Error in ==> uopf at 128
> [results, success] = opf(mpc, mpopt);
>
> Error in ==> smartmkt at 90
> [r, success] = uopf(mpc2, mpopt);
>
> Error in ==> runmarket at 141
> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt, mpopt);
>
>
>
> On Thu, Nov 3, 2011 at 15:58, Ray Zimmerman <[email protected]> wrote:
> mpopt=mpoption('OPF_ALG', 320);
> offers.P.qty = [10 120 120; 10 145 145; 10 130 130];
> offers.P.prc = [15 25 50; 10 30 40; 10 20 55];
> bids = [];
> mkt = struct();
> [r, co] = runmarket('case9', offers, bids, mkt, mpopt);
>