Yalmip crashes when using SparsePOP

45 views
Skip to first unread message

Valentino Razza

unread,
Nov 15, 2014, 2:08:16 AM11/15/14
to yal...@googlegroups.com
When SparsePOP is set as solver through the function 'sdpsettings' and I try to solve an optimization problem through the function 'solvemoment', the Matlab script always crash with the following error message

Error using sdpsettings (line 272)
Unrecognized property name 'relaxLevel'.

Error in solvemoment (line 64)
        sol = solvesdp(F,obj,sdpsettings(options,'relaxLevel',k));

The issue is always reproducible, for instance the following code will generate the error:

x = sdpvar(1);
C = [x^2<=0.4];
P = exp(x)-sin(x);
ops = sdpsettings('solver','sparsepop');

[sol] = solvemoment(C,P,ops,2)


I am using the latest versions of Yalmip (R20141030) and the latest version of SparsePOP (v.300)
Is it a bug of Yalmip, a bug of SparsePOP or an error in my code?
Thanks

Johan Löfberg

unread,
Nov 15, 2014, 4:47:34 AM11/15/14
to
EDITED: I though you used YALMIPs function solvemoment, but it was apparantly your own file called so
EDITED again: You did use solvemoment...found the bug

Change the offending line in solvemoment to use 'sparsepop.relaxorder' instead

However, solvemoment (and semidefinite relaxations in general) only applies to polynomial programs. Transcendental function such as exp or sin can not be used when using semidefinite relaxations

Valentino Razza

unread,
Nov 15, 2014, 8:22:00 AM11/15/14
to yal...@googlegroups.com
Thanks! 
The line I've reported are just an example to obtain the error. I know that moments apply to polynomial functions.
I've tried the solution and it works.
Reply all
Reply to author
Forward
0 new messages