function F = robustify_eq_conic(F_xw,Zmodel,x,w) if length(F_xw) == 0 F = []; return; else Ftemp = []; for i = 1:length(F_xw) Fi = sdpvar(F_xw(i)); if degree(Fi(:),w) > 0 [BilinearizeringConstraints,failure] = deriveBilinearizing(Fi,w,0); if failure error('Cannot get rid of nonlinear uncertainty in uncertain SDP') else Ftemp = Ftemp + BilinearizeringConstraints; end end end F = Ftemp; if any(Zmodel.K.q) | any(Zmodel.K.s) error('Only polytope uncertainty supported for uncertain equalities'); else % FIX : Assumes all uncertainty in all constraints K = Zmodel.K; A = -Zmodel.F_struc((1+K.f):(K.f + K.l),2:end); b = Zmodel.F_struc((1+K.f):(K.f + K.l),1); vertices = extreme(polytope(A,b))'; if K.f > 0 Aeq = -Zmodel.F_struc(1:K.f,2:end); beq = Zmodel.F_struc(1:K.f,1); feasible = sum(abs(Aeq*vertices - repmat(beq,1,size(vertices,2))),1) < 1e-6; vertices = vertices(:,feasible); if isempty(feasible) error('The uncertainty space is infeasible.') end end for j = 1:length(F_xw) for i = 1:size(vertices,2) F = F + set(replace(F_xw(j),w,vertices(:,i))); end end end end