Help implementing this problem

28 views
Skip to first unread message

optimizer

unread,
May 9, 2019, 7:48:49 AM5/9/19
to YALMIP
Dear Sir.Johan, i have a question on how to implement this problem:

%Objective
yavar=sdpvar(3,1);
f=Lproj*yavar-U;

y=[0;0.0005;0;0.0056464;0;0.011;0;0.0082782;0.0005;-0.0046464];

%Constraint
limit=0.9;
epsilon=limit*[-9.9332e+06;1.8386e+07;-9.9332e+06];
r=A'*yavar+B*y;
Constraints = [A*r <= epsilon*norm(r)];   

%Optimization
assign(yavar,xa0)
options = sdpsettings('verbose',1,'solver','fmincon');
sol = optimize(Constraints,f'*f,options);


Matrices of real numbers:
size(Lproj)=  13 rows    3 columns
size(A)=        3  rows    10 columns
size(B)=        10  rows      10 columns
size(U)=        13  rows      1 columns

I get this error:
sol = 

  struct with fields:

    solvertime: 0
       problem: 14
          info: 'Model creation failed (Only 1- and inf-norms can be used in a nonconvex fashion)'
    yalmiptime: 0.04

How can i avoid using norm(r)?


Johan Löfberg

unread,
May 9, 2019, 8:01:26 AM5/9/19
to YALMIP
You would have to square you model accordingly, such as

sdpvar t
[A*r <= epsilon*t, t^2 = r'*r]

non-convex of course, since your model is non-convex

optimizer

unread,
May 9, 2019, 11:31:07 AM5/9/19
to YALMIP
There is a simple way to understand if the problem is convex or not?

Johan Löfberg

unread,
May 9, 2019, 12:44:00 PM5/9/19
to YALMIP
To prove sufficiency for convexity, you use propagation of convexity through composition rules, which is what YALMIP uses

To disprove convexity, you typically use trivial counterproofs. norm(x) > is generally non-convex, just draw the set  |x| >= 1 for scalar x.
Reply all
Reply to author
Forward
0 new messages