source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/solvers/callipqp.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 1.9 KB
Line 
1function output = callipqp(varargin)
2% Author Johan Löfberg
3% $Id: callipqp.m,v 1.2 2004/06/30 07:37:03 johanl Exp $
4
5
6% Retrieve needed data
7interfacedata = varargin{1};
8options = interfacedata.options;
9F_struc = interfacedata.F_struc;
10c       = interfacedata.c;
11K       = interfacedata.K;
12x0      = interfacedata.x0;
13Q       = 2*interfacedata.Q;
14ub      = interfacedata.ub;
15lb      = interfacedata.lb;
16
17
18showprogress('Calling IPQP',options.showprogress);
19
20if K.f>0
21    A = -F_struc(1:K.f,2:end);
22    b = F_struc(1:K.f,1);
23else
24    A = [];
25    b = [];
26end
27
28if K.l>0
29C = -F_struc(1+K.f:K.f+K.l,2:end);
30d = F_struc(1+K.f:K.f+K.l,1);
31else
32    C = [];
33    d = [];
34end
35
36if ~isempty(ub)
37    C = [C;eye(length(c))];
38    d = [d;ub];
39end
40if ~isempty(lb)
41    C = [C;-eye(length(c))];
42    d = [d;-lb];
43end
44
45solvertime = clock;
46[x,problem] = ipqp(2*Q,c,C,d,A,b);
47solvertime = etime(clock,solvertime);
48
49% Internal format for duals
50D_struc = [];
51
52switch problem
53case 0
54    problem = 0;
55    infostr = yalmiperror(problem,'IPQP');       
56case 1
57    problem = 1;
58    infostr = yalmiperror(problem,'IPQP');   
59otherwise
60   
61    problem = 2;
62    infostr = yalmiperror(problem,'IPQP');       
63end   
64
65% Save all data sent to solver?
66if options.savesolverinput
67%     solverinput.A = A;
68%     solverinput.b = b;
69%     solverinput.C = Aq;
70%     solverinput.q = beq;
71%     solverinput.c = c;
72%     solverinput.H = Q;
73%     solverinput.options = options.nag;
74else
75    solverinput = [];
76end
77
78% Save all data from the solver?
79if options.savesolveroutput
80%     solveroutput.x = x;
81%     solveroutput.fmin = fmin;
82%     solveroutput.flag = flag;
83%     solveroutput.output=output;
84%     solveroutput.lambda=lambda; 
85else
86    solveroutput = [];
87end
88
89
90
91% Standard interface
92output.x           = x;
93output.problem     = problem;
94output.infostr     = infostr;
95output.solverinput = solverinput;
96output.solveroutput= solveroutput;
97output.solvertime  = solvertime;
98output.D_struc = D_struc;
Note: See TracBrowser for help on using the repository browser.