Equality constraints make solution infeasible

94 views
Skip to first unread message

Brett Hannigan

unread,
Jan 20, 2018, 3:18:15 PM1/20/18
to YALMIP
I am using YALMIP to solve a linear matrix inequality problem with an equality constraint. The equality constraint is of the form A + B*X*C = 0 where A, B, C are constant matrices and X is a matrix variable. If I set up the problem where I directly solve for X = -B^-1*A*C^-1, then use it in the other inequalities as a constant, the linear matrix inequality is feasible. If I do not solve for X and add it as an equality constraint in YALMIP, the SDP problem is infeasible. Is this expected behaviour? If this is a solver issue, I have tried it with SDPT3 and SeDuMi with the same results.

Thanks in advance, 
Brett

Johan Löfberg

unread,
Jan 21, 2018, 7:08:50 AM1/21/18
to YALMIP

Brett Hannigan

unread,
Jan 22, 2018, 12:42:13 PM1/22/18
to YALMIP
Good thought, but I defined X as full:
X = sdpvar(nu, ny, 'full')

Johan Löfberg

unread,
Jan 22, 2018, 1:48:24 PM1/22/18
to YALMIP
then it makes no sense, and can only be answered if you supply data and code

Rayza Araújo

unread,
Oct 20, 2025, 5:57:34 PMOct 20
to YALMIP

Hi!

I am actually having this same issue. I have some LMI problem that is feasible and gives me an answer. When I add the equality contraint to calculate the eigenvalue of a matrix, it results in infeasible. I am fowarding the code to you, it uses yalmip and sedumi. I created a section called "%% If I uncomment this part, its not feasible" to make it easier to understand. But if something is not clear, feel free to ask. I am sure what's causing this is silly, but I have stared at this script for so long I can't even see it anymore. 

Thaks in advance!
sent2groups.m

Rayza Araújo

unread,
Oct 20, 2025, 6:00:34 PMOct 20
to YALMIP
Oops, I forgot to comment line 169. Here's the updated version.  
sent2groups.m

Johan Löfberg

unread,
Oct 28, 2025, 6:40:05 AMOct 28
to YALMIP
I cannot reproduce that. When I add the equalities it runs into numerical issues.

However, if I leave the options alone, it has no problems solving the problem. Why are you touching those?

Problem looks ill-posed though, as P{2} = 0 is a feasible choice

K>> sol = optimize(LMIS)
SeDuMi 1.3.7 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500
eqs m = 15, order n = 21, dim = 51, blocks = 6
nnz(A) = 79 + 0, nnz(ADA) = 157, nnz(L) = 87
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            7.97E+05 0.000
  1 :   0.00E+00 1.99E+05 0.000 0.2501 0.9000 0.9000   1.00  1  1  1.0E+03
  2 :   0.00E+00 6.04E+04 0.000 0.3033 0.9000 0.9000   1.00  1  1  3.1E+02
  3 :   0.00E+00 4.38E+03 0.000 0.0726 0.9900 0.9900   1.00  1  1  2.3E+01
  4 :   0.00E+00 1.53E+03 0.000 0.3485 0.9000 0.9000   1.00  1  1  7.8E+00
  5 :   0.00E+00 5.63E+02 0.000 0.3685 0.9000 0.9000   1.00  1  1  2.9E+00
  6 :   0.00E+00 1.50E+02 0.000 0.2673 0.9000 0.9000   1.00  1  1  7.7E-01
  7 :   0.00E+00 3.28E+01 0.000 0.2182 0.9000 0.9000   1.00  1  1  1.7E-01
  8 :   0.00E+00 6.29E+00 0.000 0.1914 0.9000 0.9000   1.00  1  1  3.2E-02
  9 :   0.00E+00 1.42E+00 0.000 0.2257 0.9000 0.9000   1.00  1  1  7.3E-03
 10 :   0.00E+00 3.67E-01 0.000 0.2590 0.9000 0.9000   1.00  2  2  1.9E-03
 11 :   0.00E+00 9.93E-02 0.000 0.2702 0.9000 0.9000   1.00  1  1  5.1E-04
 12 :   0.00E+00 2.59E-02 0.000 0.2608 0.9000 0.9000   1.00  1  1  1.3E-04
 13 :   0.00E+00 6.21E-03 0.000 0.2397 0.9000 0.9000   1.00  1  3  3.2E-05
 14 :   0.00E+00 1.34E-03 0.000 0.2161 0.9000 0.9000   1.00  1  4  6.9E-06
 15 :   0.00E+00 2.65E-04 0.000 0.1972 0.9000 0.9000   1.00  2  5  1.4E-06
 16 :   0.00E+00 4.93E-05 0.000 0.1863 0.9000 0.9000   1.00  2  2  2.5E-07
 17 :   0.00E+00 9.40E-06 0.000 0.1906 0.9000 0.9000   1.00  2  7  4.8E-08
 18 :   0.00E+00 1.88E-06 0.000 0.2001 0.9000 0.9000   1.00  5  7  9.5E-09
 19 :   0.00E+00 5.75E-07 0.000 0.3056 0.9000 0.9000   1.00  6 14  2.5E-09
 20 :   0.00E+00 1.39E-07 0.000 0.2414 0.9000 0.9000   1.01  7 15  6.1E-10

iter seconds digits       c*x               b*y
 20      0.3   Inf  0.0000000000e+00  0.0000000000e+00
|Ax-b| =   2.4e-09, [Ay-c]_+ =   1.1E-13, |x|=  1.1e+01, |y|=  1.3e+00

Detailed timing (sec)
   Pre          IPM          Post
1.992E-03    1.030E-01    2.002E-03    
Max-norms: ||b||=0, ||c|| = 0,
Cholesky |add|=1, |skip| = 0, ||L.L|| = 528865.

sol =

  struct with fields:

    yalmipversion: '20250626'
    matlabversion: '9.6.0.1072779 (R2019a)'
       yalmiptime: 0.1470
       solvertime: 0.1080
             info: 'Successfully solved (SeDuMi)'
          problem: 0
Reply all
Reply to author
Forward
0 new messages