SDPT3: Infeasible path-following algorithms

217 views
Skip to first unread message

Hoai An Trinh

unread,
Jul 1, 2020, 3:31:14 AM7/1/20
to YALMIP

Dear fellows,

I'm using solver SDPT3 in Matlab to solve the LMI with code:
A=[ -2.548 9.1 0;1 -1 0;0 -14.2 0];
B = [1 0 0;0 1 0;0 0 1];
P=1000000*eye(3);
F=sdpvar(3,3);
GH = (A' + F'*B')*P + P*(A + B*F);
const =(GH<0);
diagnostics= solvesdp(const);
F = double(F)

But the result is:
******SDPT3: Infeasible path-following algorithms******

Please help me to solve this problem.

Johan Löfberg

unread,
Jul 1, 2020, 5:43:35 AM7/1/20
to YALMIP
1. Strict inequalities are not supported. There should be a very sad cat telling you about this.

2. solvesdp is not an official command https://yalmip.github.io/tutorial/basics

3. and neither is double

4. the term 1000000 makes absolutely no sense. it just adds numerical garbage to the model, but since the model is homogeneous in P, the scaling can be removed without changing the feasible set

5. and what is the actual question? you don't show any result but simply parts of the header that sdpt3 displays. the problem solves nicely here


 num. of constraints =  6
 dim
. of sdp    var  =  3,   num. of sdp  blk  =  1
*******************************************************************
   SDPT3
: Infeasible path-following algorithms
*******************************************************************
 version  predcorr  gam  expon  scale_data
   HKM      
1      0.000   1        0    
it pstep dstep pinfeas dinfeas  gap      prim
-obj      dual-obj    cputime
-------------------------------------------------------------------
 
0|0.000|0.000|3.5e+07|1.9e+00|7.6e+08| 7.096000e+07  0.000000e+00| 0:0:00| chol  1  1
 
1|0.989|1.000|3.8e+05|6.9e-09|8.3e+06| 7.734574e+05  0.000000e+00| 0:0:00| chol  1  1
 
2|0.989|1.000|4.1e+03|6.9e-10|9.1e+04| 8.498974e+03  0.000000e+00| 0:0:00| chol  1  1
 
3|0.989|1.000|4.6e+01|6.9e-11|1.0e+03| 9.339527e+01  0.000000e+00| 0:0:00| chol  1  1
 
4|0.989|1.000|5.0e-01|6.9e-12|1.1e+01| 1.026322e+00  0.000000e+00| 0:0:00| chol  1  1
 
5|0.989|1.000|5.5e-03|6.9e-13|1.2e-01| 1.127826e-02  0.000000e+00| 0:0:00| chol  1  1
 
6|0.989|1.000|6.1e-05|6.9e-08|1.3e-03| 1.239369e-04  0.000000e+00| 0:0:00| chol  1  1
 
7|0.989|1.000|6.6e-07|6.9e-08|1.5e-05| 1.361944e-06  0.000000e+00| 0:0:00| chol  1  1
 
8|0.989|1.000|7.3e-09|6.9e-08|1.6e-07| 1.496642e-08  0.000000e+00| 0:0:00| chol  1  1
 
9|0.989|1.000|8.0e-11|1.5e-09|1.8e-09| 1.644662e-10  0.000000e+00| 0:0:00|
  stop
: max(relative gap, infeasibilities) < 1.00e-07
-------------------------------------------------------------------
 number of iterations  
=  9
 primal objective value
=  1.64466157e-10
 dual   objective value
=  0.00000000e+00
 gap
:= trace(XZ)       = 1.77e-09
 relative gap          
= 1.77e-09
 actual relative gap    
= 1.64e-10
 rel
. primal infeas     = 8.03e-11
 rel
. dual   infeas     = 1.46e-09
 norm
(X), norm(y), norm(Z) = 4.0e-17, 2.2e+01, 4.4e+07
 norm
(A), norm(b), norm(C) = 6.0e+06, 1.0e+00, 2.5e+07
 
Total CPU time (secs)  = 0.21  
 CPU time per iteration
= 0.02  
 termination code      
=  0
 DIMACS errors
: 8.0e-11  0.0e+00  2.6e-09  0.0e+00  1.6e-10  1.8e-09
-------------------------------------------------------------------
diagnostics
=
 
struct with fields:


    yalmipversion
: '20200116'
    matlabversion
: '9.4.0.813654 (R2018a)'
       yalmiptime
: 0.2420
       solvertime
: 0.3210
             info
: 'Successfully solved (SDPT3-4)'
          problem
: 0

Message has been deleted

Hoai An Trinh

unread,
Jul 1, 2020, 8:20:16 AM7/1/20
to YALMIP
Dear Sir, 

Thanks for your answer.
Because I simulate an example from the book as follows
2.PNG
But my simulation result is not the same as above
22.PNG
I wonder whether there are some mistakes in my code or installing Yalmip toolbox causing the different results. 
I also simulate other examples and the results are different.  
Can you help me with solutions to solve this problem?

Thanks.

Vào lúc 18:43:35 UTC+9 ngày Thứ Tư, 1 tháng 7, 2020, Johan Löfberg đã viết:

Johan Löfberg

unread,
Jul 1, 2020, 10:18:04 AM7/1/20
to YALMIP
you are solving a feasibility problem so the solution is not unique

Muhammad Yasir

unread,
Oct 10, 2021, 10:18:31 AM10/10/21
to YALMIP
What do ' DIMACS errors stand for? I am also getting this message in my simulatios:

"
num. of constraints = 54
 dim. of socp   var  = 27,   num. of socp blk  =  1
 dim. of linear var  = 59
*******************************************************************
   SDPT3: Infeasible path-following algorithms
*******************************************************************
 version  predcorr  gam  expon  scale_data
   HKM      1      0.000   1        0    
it pstep dstep pinfeas dinfeas  gap      prim-obj      dual-obj    cputime
-------------------------------------------------------------------
 0|0.000|0.000|1.5e+01|1.8e+00|1.3e+07|-5.819363e+06  0.000000e+00| 0:0:00| chol  1  1 
 1|0.943|0.687|8.6e-01|5.8e-01|4.2e+06| 6.009947e+04 -2.044550e+04| 0:0:00| chol  1  1 
 2|1.000|0.907|1.2e-07|5.4e-02|5.9e+05| 2.294166e+05 -2.839086e+04| 0:0:00| chol  1  1 
 3|1.000|0.960|1.2e-07|2.2e-03|6.4e+04| 2.775807e+04 -2.221093e+04| 0:0:00| chol  1  1 
 4|0.625|0.902|1.3e-07|2.2e-04|3.3e+04| 8.862582e+03 -2.070572e+04| 0:0:00| chol  1  1 
 5|0.581|0.544|6.4e-08|1.0e-04|2.1e+04| 4.236636e+02 -1.893067e+04| 0:0:00| chol  1  1 
 6|0.623|1.000|2.5e-08|6.3e-06|1.4e+04|-5.812588e+03 -1.965088e+04| 0:0:00| chol  1  1 
 7|1.000|1.000|1.4e-09|1.9e-06|6.0e+03|-1.283317e+04 -1.873347e+04| 0:0:00| chol  1  1 
 8|0.706|0.814|8.4e-10|8.1e-07|3.4e+03|-1.462840e+04 -1.796916e+04| 0:0:00| chol  1  1 
 9|1.000|1.000|3.5e-10|1.7e-07|1.6e+03|-1.615892e+04 -1.773258e+04| 0:0:00| chol  1  1 
10|1.000|1.000|5.1e-13|5.1e-08|4.0e+02|-1.699829e+04 -1.740118e+04| 0:0:00| chol  1  1 
11|0.947|1.000|4.9e-14|1.5e-08|1.4e+02|-1.714943e+04 -1.728566e+04| 0:0:00| chol  1  1 
12|1.000|1.000|2.7e-12|4.6e-09|4.3e+01|-1.720077e+04 -1.724379e+04| 0:0:00| chol  1  1 
13|0.949|1.000|9.9e-13|1.4e-09|9.5e+00|-1.721643e+04 -1.722591e+04| 0:0:00| chol  1  1 
14|1.000|0.930|1.4e-12|4.8e-10|1.2e+00|-1.721968e+04 -1.722083e+04| 0:0:00| chol  1  1 
15|0.986|0.950|1.2e-11|2.5e-11|1.1e-01|-1.721992e+04 -1.722002e+04| 0:0:00| chol  1  1 
16|0.980|0.964|2.4e-12|2.4e-12|4.0e-03|-1.721994e+04 -1.721994e+04| 0:0:00| chol  1  1 
17|0.983|0.982|1.2e-12|5.4e-13|7.8e-05|-1.721994e+04 -1.721994e+04| 0:0:00|
  stop: max(relative gap, infeasibilities) < 1.00e-07
-------------------------------------------------------------------
 number of iterations   = 17
 primal objective value = -1.72199374e+04
 dual   objective value = -1.72199374e+04
 gap := trace(XZ)       = 7.83e-05
 relative gap           = 2.27e-09
 actual relative gap    = 2.05e-09
 rel. primal infeas     = 1.18e-12
 rel. dual   infeas     = 5.37e-13
 norm(X), norm(y), norm(Z) = 3.5e+03, 1.7e+04, 4.9e+03
 norm(A), norm(b), norm(C) = 4.6e+01, 1.7e+03, 1.9e+04
 Total CPU time (secs)  = 0.06  
 CPU time per iteration = 0.00  
 termination code       =  0
 DIMACS errors: 1.2e-12  0.0e+00  7.6e-13  0.0e+00  2.0e-09  2.3e-09
-------------------------------------------------------------------

Johan Löfberg

unread,
Oct 10, 2021, 12:22:12 PM10/10/21
to YALMIP

Muhammad Yasir

unread,
Oct 13, 2021, 11:05:17 AM10/13/21
to YALMIP
Sir, I have gone through the link that you have shared. I could not understand it. Could you please explain in simple words, what do 'DIMACS errors' stand for?
Is it indicating some erratic behaviour in my simulations?

Johan Löfberg

unread,
Oct 13, 2021, 11:27:51 AM10/13/21
to YALMIP
dimacs error measures are just somewhat standardized measures of optimality and feasibility used (some 25 years ago...) to compare different solvers
Reply all
Reply to author
Forward
0 new messages