source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/modules/robust/robustify_eq_conic.m @ 37

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

Added original make3d

File size: 1.4 KB
Line 
1function F = robustify_eq_conic(F_xw,Zmodel,x,w)
2
3if length(F_xw) == 0
4    F = [];
5    return;
6else
7    Ftemp = [];
8    for i = 1:length(F_xw)
9        Fi = sdpvar(F_xw(i));
10        if degree(Fi(:),w) > 0
11            [BilinearizeringConstraints,failure] = deriveBilinearizing(Fi,w,0);
12            if failure
13                error('Cannot get rid of nonlinear uncertainty in uncertain SDP')
14            else
15                Ftemp = Ftemp + BilinearizeringConstraints;
16            end
17        end
18    end
19    F = Ftemp;
20   
21   
22    if any(Zmodel.K.q) | any(Zmodel.K.s)
23        error('Only polytope uncertainty supported for uncertain equalities');
24    else
25        % FIX : Assumes all uncertainty in all constraints
26        K = Zmodel.K;
27        A = -Zmodel.F_struc((1+K.f):(K.f + K.l),2:end);
28        b =  Zmodel.F_struc((1+K.f):(K.f + K.l),1);
29
30        vertices = extreme(polytope(A,b))';
31        if K.f > 0
32            Aeq = -Zmodel.F_struc(1:K.f,2:end);
33            beq =  Zmodel.F_struc(1:K.f,1);
34            feasible = sum(abs(Aeq*vertices - repmat(beq,1,size(vertices,2))),1) < 1e-6;
35            vertices = vertices(:,feasible);
36            if isempty(feasible)
37                error('The uncertainty space is infeasible.')
38            end
39        end
40       
41        for j = 1:length(F_xw)
42            for i = 1:size(vertices,2)
43                F = F + set(replace(F_xw(j),w,vertices(:,i)));
44            end
45        end
46    end
47   
48end
Note: See TracBrowser for help on using the repository browser.