"yalmiptest" fails in MATLAB R2016a

356 views
Skip to first unread message

Tuukka J

unread,
May 12, 2016, 1:21:23 PM5/12/16
to YALMIP
Dear Jonathan,

Recently, I installed MATLAB R2016a and run the yalmiptest. The following message appears:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|                   Test|   Solution|                          Solver message|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|   Core functionalities|        N/A|            Successfully solved (YALMIP)|
|                     LP|    Correct|   Successfully solved (GLPK-GLPKMEX-CC)|
|                     LP|    Correct|   Successfully solved (GLPK-GLPKMEX-CC)|
|                     QP|    Correct|          Successfully solved (QUADPROG)|
|                     QP|    Correct|          Successfully solved (QUADPROG)|
|                   SOCP|    Correct|        Successfully solved (SeDuMi-1.3)|
|                   SOCP|    Correct|        Successfully solved (SeDuMi-1.3)|
|                   SOCP|    Correct|        Successfully solved (SeDuMi-1.3)|
|                    SDP|    Correct|        Successfully solved (SeDuMi-1.3)|
|                    SDP|    Correct|        Successfully solved (SeDuMi-1.3)|
|                    SDP|    Correct|        Successfully solved (SeDuMi-1.3)|
|                    SDP|    Correct|        Successfully solved (SeDuMi-1.3)|
|                 MAXDET|    Correct|        Successfully solved (SeDuMi-1.3)|
|                 MAXDET|    Correct|        Successfully solved (SeDuMi-1.3)|
|          Infeasible LP|        N/A|    Infeasible problem (GLPK-GLPKMEX-CC)|
|          Infeasible QP|        N/A|           Infeasible problem (QUADPROG)|
|         Infeasible SDP|        N/A|         Infeasible problem (SeDuMi-1.3)|
|      Moment relaxation|    Correct|        Successfully solved (SeDuMi-1.3)|
|         Sum-of-squares|        NAN|               Unknown problem in YALMIP|
|           Bilinear SDP|        N/A|                      No suitable solver|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Error using export
Too many input arguments.

Error in yalmiptest (line 263)
x = sdpvar(2);[p,aux1,aux2,m] = export(x>=0,[],[],[],[],0);


However, when I run the test in MATLAB R2015b. It works fine.

What do you think could be the issue?

Regards,
Tushar

Johan Löfberg

unread,
May 12, 2016, 1:23:11 PM5/12/16
to YALMIP
you might have a function export which shadows yalmips export


run which export -all

Tuukka J

unread,
May 12, 2016, 1:27:29 PM5/12/16
to YALMIP
Thanks, that was quick.

Meriem Labourel

unread,
May 15, 2017, 7:52:31 AM5/15/17
to YALMIP
Dear Jonathan,
I have the same problem:
Error using export
Too many input arguments.

Error in yalmiptest (line 263)
x = sdpvar(2);[p,aux1,aux2,m] = export(x>=0,[],[],[],[],0);

I didn t understand your solution

please, can you explain more

Johan Löfberg

unread,
May 15, 2017, 8:06:07 AM5/15/17
to YALMIP
if you type

which export -all

you might see that you have some file called export (in a non-class directory, those starting with @ doesn't matter), which YALMIP calls instead of the intended export, i.e., you have some other toolbox or file that you cannot have in the path at the same time as YALMIP, if you want to YALMIP to use the export functionality. Typically you don't use the export functionality so it really doesn't matter



Meriem Labourel

unread,
May 15, 2017, 9:05:34 AM5/15/17
to YALMIP
Thank you very much for your quick response.

To test yalmip with sedum solver, I am using an application example from a published work, the data and my code are as follows:

A1=[0 0 1 0;0 0 0 1;0 0.2524 0 -0.0001;0 15.0319 0 -0.0079];

A2=[0 0 1 0;0 0 0 1;0 0.2298 0 -0.0001;0 14.6544 0 -0.0079];

A3=[0 0 1 0;0 0 0 1;0 0.1664 0 -0.0001;0 13.5581 0 -0.0079];

 

 

B1=[0;0;0.8272;1.2370];B2=[0;0;0.8263;1.2086];B3=[0;0;0.8237;1.1253];

 

Ar=[0 1 0 0;-6 -5 0 0;0 0 0 1;0 0 -6 -5];

Br=[0;-3.1;0;4.2];

Cr=diag([1,0,0,0]);

Dr=zeros(4,1);

Q = 10^(-5)*diag([50, 50, 50, 50]);

 

    rho=0.75;

   

Aag=[A1;A2;A3];

Bag=[B1;B2;B3];

 

s1=size(Aag);

s2=size(Bag);

% s3=size(Cag);

% s4=size(Wag);

 

N=s1(1)/s1(2);

n=s1(2);

m=1;

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

Y11=sdpvar(n,n,'symmetric');

P22=sdpvar(n,n,'symmetric');

X =sdpvar(N*m,n);

 

LMI1=[Y11>=0];

LMI2=[P22>=0];

 

 

  for i=1:N

    for  j=1:N

           

  Aagi = Aag(1+(i-1)*n:i*n,:);

  Bagi = Bag(1+(i-1)*n:i*n,:);

  

 

  Xj = X(1+(j-1)*m:j*m,:);

  

 blkt11=Y11*Aagi'+Aagi*Y11+Xj'*Bagi'+Bagi*Xj+(1/rho)*eye(n) ;

 blkt12=Y11;

 blkt21=Y11;

 blkt22=-inv(Q);

H1=[blkt11 blkt12;blkt21 blkt22]

LMI1=LMI1+[H1<=0.000001*eye(size(H1))];

end 

  end

 

 

  sol=solvesdp(LMI1,[],sdpsettings('solver','sedumi'))

  Y11=double(Y11);

   X=double(X)

  P11=inv(Y11)

 

for i=1:N

K(i,:)=X(i,:)*P11;

end

 

 

 

 pause

%  K=[55.2760 -310.4392 69.6191 -79.1678

%  55.1650 -310.7216 69.5844 -79.3040

%  54.2518 -309.2168 68.8104 -79.1144];

% P11=[0.0041 -0.0131 0.0036 -0.0033

%     -0.0131 0.0621 -0.0156 0.0155

%     0.0036 -0.0156 0.0042 -0.0040

%    -0.0033 0.0155 -0.0040 0.0040 ];


  

  for i=1:N

    for  j=1:N

              

  Aagi = Aag(1+(i-1)*n:i*n,:);

  Bagi = Bag(1+(i-1)*n:i*n,:);

 

 

 Kj = K(1+(j-1)*m:j*m,:);

  

 

 blkt11=Aagi'*P11+Kj'*Bagi'*P11+P11*Aagi+P11*Bagi*Kj+(1/rho)*P11*P11+Q ;

 

 

 blkt12=-P11*Bagi*Kj-Q;

 

 blkt21=blkt12';

 

 blkt22=Ar'*P22+P22*Ar+Q;

 

 H2=[blkt11 blkt12 zeros(n,1);blkt21 blkt22 P22*Br;zeros(1,n) Br'*P22 -rho*eye(1)];

     

 

LMI2=LMI2+[H2<=0.000001*eye(size(H2))]

 

    end

  end

 

 

  sol2=solvesdp(LMI2,[],sdpsettings('solver','sedumi'))

  P22=double(P22);

  

My question is: why I can not obtain the same solution as in the article moreover I have a message of infeasible solution for the second part of the code. In the article authors say that they have used LMI of Matlab

Thank you in advance

Johan Löfberg

unread,
May 15, 2017, 9:17:19 AM5/15/17
to YALMIP
why would you expect to get the same solution when you solve a feasibility problem?

Reason for the in feasibility could be numerical issues in the solver on the first problem, a mistake by you, or a mistake by the authors of the paper

Meriem Labourel

unread,
May 15, 2017, 11:36:08 AM5/15/17
to YALMIP
because I m looking  for a controller gain. Thus, two different solution may give two different controller gains.

anthère question: when I get: numerical problem in solution information of my LMI problem,  that's means my solution is bad or infeasible solution ?

thank you 

Johan Löfberg

unread,
May 15, 2017, 11:38:05 AM5/15/17
to YALMIP
I'm not sure if that reply meant you now understand why you get a different result

Numerical problems means that the solver is honest and telling you that things can be bad as it encuntered problems. You have to judge the quality of the solution (as you always have to)
Reply all
Reply to author
Forward
0 new messages