norm squred in the constraint

243 views
Skip to first unread message

Yasser Naguib

unread,
Feb 5, 2016, 2:21:59 PM2/5/16
to YALMIP
the function is

obj= - (entr(data)+log2(abs(H(1,1)*(w(1)+1i*(w(2)))))); where entr(data) returns a vector of values

the constraints are

F= ((norm(w)^2)<=1) + (entr(data)+log2(abs(H(1,2)*(w(1)+1i*(w(2)))))<=epsilon); H is a complex matrix

the problem is

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

even if i used baron as a solver !

please clarify what i did wrong , Thanks

Johan Löfberg

unread,
Feb 5, 2016, 3:21:02 PM2/5/16
to YALMIP
when you use abs on absolute value, you're effectively using 2-norm, which is implemented using a convexity-aware SOCP operator only

instead of log2(norm(z))<=t, introduce r and use use log2(r)<=t, z'*z <= r^2, r>=0, which you can attack using a standard local or global solver

Yasser Naguib

unread,
Feb 5, 2016, 4:28:40 PM2/5/16
to YALMIP
Thanks for your care, but when i changed to

F=( (norm(w)^2)<=1) + (entr(data)+log2(r)<=epsilon)+((H(1,2)*(w(1)+1i*(w(2)))) ' * (H(1,2)*(w(1)+1i*(w(2))))<=r^2);

i got the same error so i need please to know

1- what does this mean and why am i getting it in the first place?

2- how should i solve it ?

Thanks


Johan Löfberg

unread,
Feb 5, 2016, 4:32:17 PM2/5/16
to YALMIP
did you replace it in the objective?


simply replace all log(norm(z)) with log(r) and add [r^2==z'*z,r>=0] if you intend to use a nonlinear local/global solver (which it looks like you have to do, i.e., the problem is not convex)

or replace log(norm(z)) with 0.5*log(z'*z)

which works best is not obvious in a nonlinear solver setting

Yasser Naguib

unread,
Feb 6, 2016, 4:30:06 AM2/6/16
to YALMIP
i downloaded opti toolbox for nonlinear programming but can you please show me how to link it with yalmip bec when i tried yalmip('solver' , 'opti') then run yalmiptest i get

Warning: Specified solver name not recognized () for all the solvers listed

please bear with me bec before posting any problem here i spend much time googling until i find no solution

Thanks

Johan Löfberg

unread,
Feb 6, 2016, 4:32:03 AM2/6/16
to YALMIP
opti is not a solver, it is a package of different solvers You have to specify the actual solver you want to use

Yasser Naguib

unread,
Feb 6, 2016, 4:42:26 AM2/6/16
to YALMIP
ok can you please guide me how to select best solver for my nonlinear problem and what is it' syntax

Thanks

Johan Löfberg

unread,
Feb 6, 2016, 7:30:23 AM2/6/16
to YALMIP
There is no best solver

'ipopt' is one local solver in opti. 'baron' and 'scip' are the global solvers
Reply all
Reply to author
Forward
0 new messages