getting error: no suitable solver

951 views
Skip to first unread message

Sahere Rahimi

unread,
Nov 20, 2017, 7:16:19 AM11/20/17
to YALMIP
Hi every one
I have a problem, i hope you help me
I want to solve a function which is attached, I used random input data to solve it,
the code which used in MATLAB is as following:
s1=rand(3,3);%%% equal to Sw'
s2=rand(3,3);%%% equal to Sw
beta=sdpvar(3,1);
B=sdpvar(3,3);
F=[beta(:)>=0,B-beta*beta'>=0,trace(s2*B)==1];  %%% beta(:)>=0: equal to em'beta>=0
optimize(F,trace(s1*B));

but my output is as following:
ans = 

    solvertime: 0
          info: 'No suitable solver'
       problem: -2
    yalmiptime: 0.1720
what is wrong?
please help me about this
SDP.jpg

Johan Löfberg

unread,
Nov 20, 2017, 9:34:20 AM11/20/17
to YALMIP
You've set up a quadratic semidefinite problem, and don't have any solver for that. However, you quadratic semidefinite constraint is easily converted to an LMI, just as described in the attached picture.

Sahere Rahimi

unread,
Nov 20, 2017, 10:23:12 AM11/20/17
to YALMIP
Thank you, do you mean that i cannot solve it by YALMIP? 
sorry, i am beginner about optimization toolbox, can you explain me more what should i do? 
About LMI, do you means that i should write the constraint as its matrix form?
can you give me the correct code to solve the problem?

Sahere Rahimi

unread,
Nov 20, 2017, 10:38:01 AM11/20/17
to YALMIP
I used constraint as following:
F=[beta(:)>=0,[1 beta';beta B]>=0,(trace(s2*B))==1];

now the output is as following:
    yalmiptime: 0.1708
    solvertime: 0.2502
          info: 'Unbounded objective function (SDPT3-4)'
       problem: 2

what dose it mean? what should i do?

Johan Löfberg

unread,
Nov 20, 2017, 10:39:28 AM11/20/17
to YALMIP
Not in the current form as it is a nonlinear SDP, but if you simply implement it as it is implemented in the .jpg (where a Schur complement has been applied), YALMIP + any standard SDP solver will solve it. It is a very easy problem

Sahere Rahimi

unread,
Nov 20, 2017, 10:46:23 AM11/20/17
to YALMIP
Thank you, I am so sorry asking many questions.
I used its Schur complement as following:

F=[beta(:)>=0,[1 beta';beta B]>=0,(trace(s2*B))==1];
after running ' optimize(F,trace(s1*B)) '  the output is as following:
    yalmiptime: 0.1708
    solvertime: 0.2502
          info: 'Unbounded objective function (SDPT3-4)'
       problem: 2

is it correct? i used following:
>> value(beta)

ans =

   1.0e-04 *

    0.5102
    0.5525
    0.5557

I think the value of beta is so small

Johan Löfberg

unread,
Nov 20, 2017, 11:11:21 AM11/20/17
to YALMIP

Sahere Rahimi

unread,
Nov 20, 2017, 11:37:11 AM11/20/17
to YALMIP
I test it step by step:
1--------------> 
F=[beta(:)>=0,[1 beta';beta B]>=0,(trace(s2*B))==1];
optimize(F)
ans = 

    yalmiptime: 0.1756
    solvertime: 0.2924
          info: 'Lack of progress (SDPT3-4)'
       problem: 5
2----------------->
F=[0<=beta(:)<=1000,[1 beta';beta B]>=0,(trace(s2*B))==1];
optimize(F,trace(s1*B))

ans = 

    yalmiptime: 0.1801
    solvertime: 0.3039
          info: 'Unbounded objective function (SDPT3-4)'
       problem: 2

3------------------->
is numerical data poor?

Johan Löfberg

unread,
Nov 20, 2017, 11:45:53 AM11/20/17
to YALMIP


Looking closer, your model is theoretically bounded when you add bounds on beta, hence the problem is in your data as it still complains. Bad scaling etc

Johan Löfberg

unread,
Nov 20, 2017, 11:48:04 AM11/20/17
to YALMIP
Wrong by me. It is not necessarily bounded, Hence, either bad data, or simply unbounded by construction, i.e. flawed problem formulation. Add a bound on elements of B, and then look at how the solution of B evolves as you increase that bound, should reveal to you if it smells unbounded

Sahere Rahimi

unread,
Nov 20, 2017, 12:29:54 PM11/20/17
to YALMIP
I made input data (s1,s2) by "rand" in MATLAB.
I  added  a bound on B as following:
>> F=[0<=beta(:),0<[1 beta';beta B],B<10,(trace(s2*B))==1];

answer:
ans = 

    yalmiptime: 0.1701
    solvertime: 0.5499
          info: 'Numerical problems (SDPT3-4)'
       problem: 4


again, change the bound:
>> F=[0<=beta(:),[1 beta';beta B]>=0,B<1000,(trace(s2*B))==1];
ans = 

    yalmiptime: 0.1696
    solvertime: 0.7034
          info: 'Numerical problems (SDPT3-4)'
       problem: 4

,, I added the bound as following:
>> F=[0<=beta(:)<1000,0<[1 beta';beta B]<10000,(trace(s2*B))==1];
ans = 

    yalmiptime: 0.1751
    solvertime: 0.9639
          info: 'Infeasible problem (SDPT3-4)'
       problem: 1

>> F=[0<=beta(:)<1000,0<[1 beta';beta B]<100,(trace(s2*B))==1];
ans = 

    yalmiptime: 0.1629
    solvertime: 0.2891
          info: 'Infeasible problem (SDPT3-4)'
       problem: 1

By adding new bound , still there is problem
I am confused.

Johan Löfberg

unread,
Nov 20, 2017, 12:34:21 PM11/20/17
to YALMIP
Just random data is generically unbounded, so it makes no sense to test those models

Johan Löfberg

unread,
Nov 20, 2017, 12:45:28 PM11/20/17
to YALMIP
and I hope you realize that B<10 means B<ones(n)*10, which means you're saying the matrix largest eigenvalue is 0 (since ones(n) is singular), which causes issues as you said it is psd.

BTW, < is not supported. YALMIP screams at you about this

Sahere Rahimi

unread,
Nov 20, 2017, 12:55:18 PM11/20/17
to YALMIP
Thank you,
first, I should calculate s1 and s2 which are two graphs, after that i will solve the function.
calculation of these graphs take some hours, after that I will give you the results
Best regards
Reply all
Reply to author
Forward
0 new messages