source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/dev/tests-mbg/bmibnb/ex14_1_6.m @ 37

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

Added original make3d

File size: 1.3 KB
Line 
1function ex14_1_6
2
3sdpvar x1 x2 x3 x4 x5 x6 x7 x8 x9 objvar;
4
5F = set([]);
6
7F = F + set(  - x9 + objvar == 0);
8
9F = F + set(0.004731*x1*x3 - 0.1238*x1 - 0.3578*x2*x3 - 0.001637*x2 - 0.9338*x4 + x7      - x9 <= 0.3571);
10
11F = F + set( 0.1238*x1 - 0.004731*x1*x3 + 0.3578*x2*x3 + 0.001637*x2 + 0.9338*x4 - x7      - x9 <= -0.3571);
12
13F = F + set( 0.2238*x1*x3 + 0.2638*x1 + 0.7623*x2*x3 - 0.07745*x2 - 0.6734*x4 - x7 - x9      <= 0.60220);
14
15F = F + set( (-0.2238*x1*x3) - 0.2638*x1 - 0.7623*x2*x3 + 0.07745*x2 + 0.6734*x4 + x7      - x9 <= -0.6022);
16
17F = F + set( x6*x8 + 0.3578*x1 + 0.004731*x2 - x9 <= 0);
18
19F = F + set(  - x6*x8 - 0.3578*x1 - 0.004731*x2 - x9 <= 0);
20
21F = F + set(  - 0.7623*x1 + 0.2238*x2 == -0.3461);
22
23F = F + set( sqr(x1) + sqr(x2) - x9 <= 1);
24
25F = F + set( (-sqr(x1)) - sqr(x2) - x9 <= -1);
26
27F = F + set( sqr(x3) + sqr(x4) - x9 <= 1);
28
29F = F + set( (-sqr(x3)) - sqr(x4) - x9 <= -1);
30
31F = F + set( sqr(x5) + sqr(x6) - x9 <= 1);
32
33F = F + set( (-sqr(x5)) - sqr(x6) - x9 <= -1);
34
35F = F + set( sqr(x7) + sqr(x8) - x9 <= 1);
36
37F = F + set( (-sqr(x7)) - sqr(x8) - x9 <= -1);
38
39
40
41F = F + set( -1 < [x1 x2 x3 x4 x5 x6 x7 x8] < 1);
42
43sol = solvesdp(F,objvar,sdpsettings('solver','bmibnb','bmibnb.upper','fmincon'))
44mbg_asserttolequal(sol.problem,0);
45mbg_asserttolequal(double([objvar ]),0, 1e-5);
46
47function y = sqr(x)
48y = x*x;
Note: See TracBrowser for help on using the repository browser.