source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/dev/regress_bmibnb_lassere1.m @ 37

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

Added original make3d

File size: 600 bytes
Line 
1function fail = regress_bmibnb_gamsrobot(ops)
2
3x = sdpvar(10,1);
4t = sdpvar(1,1);
5x(1) = 1-sum(x(2:end));
6obj = 0;
7for i = 1:9
8    obj = obj+x(i)*x(i+1);
9end
10for i = 1:8
11    obj = obj+x(i)*x(i+2);
12end
13obj = obj + x(1)*x(7)+ x(1)*x(9)+ x(2)*x(10)+ x(4)*x(7);
14F = set(1>x>0);
15F = F + set(-obj<t);
16obj = t;
17
18sol = solvesdp(F,obj,ops);
19
20fail=getfail(sol.problem,double(obj),-0.375,checkset(F));
21   
22function fail =  getfail(problem,obj,objgoal,infeas)
23fail = 0;
24if problem == 0
25    if abs(obj-objgoal)>1e-3
26        fail = 1;
27    elseif max(infeas)<-1e-6
28        fail = 2;
29    end
30else
31    fail = 3;
32end
33
Note: See TracBrowser for help on using the repository browser.