|
1 |
| -function [x,obj,INFO,output,lambda,states] = sqopt(Hx, c, x0, xl, xu, A, al, au, varargin) |
2 |
| -% function [x,obj,INFO,output,lambda,states] = sqopt(Hx, c, x0, xl, xu, A, al, au, varargin) |
| 1 | +function [x,obj,info,output,lambda,states] = sqopt(Hx, c, x0, xl, xu, A, al, au, varargin) |
| 2 | +% function [x,obj,info,output,lambda,states] = sqopt(Hx, c, x0, xl, xu, A, al, au, varargin) |
3 | 3 | %
|
4 | 4 | % This function solves the quadratic optimization problem:
|
5 | 5 | % minimize:
|
|
22 | 22 | % [] = sqopt(Hx, c, x0, xl, xu, A, al, au, states, lambda)
|
23 | 23 | % [] = sqopt(Hx, c, x0, xl, xu, A, al, au, states, lambda, options)
|
24 | 24 | %
|
25 |
| -% [x,obj,INFO,output,lambda,states] = sqopt(...) |
| 25 | +% [x,obj,info,output,lambda,states] = sqopt(...) |
26 | 26 | %
|
27 | 27 | %
|
28 | 28 | % INPUT:
|
29 | 29 | % x0 is the initial guess for x
|
30 | 30 | %
|
31 | 31 | % Hx is a Matlab function that computes H*x for a given x.
|
32 |
| -% Hx can be a Matlab function handle or a string |
| 32 | +% Hx can be a Matlab function handle or a string. If the |
| 33 | +% problem is an LP (H = 0), then set Hx = 0 (or call lpopt). |
33 | 34 | %
|
34 | 35 | % c is the linear term of the quadratic objective
|
35 | 36 | %
|
|
49 | 50 | %
|
50 | 51 | % obj is the final objective value
|
51 | 52 | %
|
52 |
| -% exitFlag is the exit flag returned by DQOPT |
| 53 | +% info is the exit flag returned by the solver |
53 | 54 | %
|
54 | 55 | % output is a structure containing run information --
|
55 | 56 | % output.iterations is the total number of iterations
|
|
163 | 164 | au = colvec(au,'au',1,m);
|
164 | 165 | c = colvec(c,'c',1,0);
|
165 | 166 |
|
166 |
| -[x,obj,INFO,itn,y,state] = sqoptmex(solveOpt, start, probName, ... |
| 167 | +[x,obj,info,itn,y,state] = sqoptmex(solveOpt, start, probName, ... |
167 | 168 | m, n, userHx, c, ...
|
168 | 169 | x0, xl, xu, xstate, xmul, ...
|
169 | 170 | neA, indA, locA, valA, al, au, astate, amul);
|
170 | 171 |
|
171 | 172 | % Set output
|
172 | 173 | output.iterations = itn;
|
173 |
| -output.info = INFO; |
| 174 | +output.info = info; |
174 | 175 |
|
175 | 176 | zero = zeros(n,1);
|
176 | 177 | states.x = state(1:n);
|
|
0 commit comments