Why adding a non-constraint expression will make the problem infeasible?

Hi, everyone. The non-constraint expression is “sum_m2_2= sum( ( permute( sum_square( permute( repmat( q_mn , 1, 1, 1, I ) - permute( repmat( s_i , 1, 1, M , N ), [ 3 4 2 1 ]), [ 1 2 4 3]), 4) , [ 3 2 1 ] ) -tempp)./((tempp+H^2).^2), 3);” . After deleting it, the problem become feasible. Why will its existence make the problem infeasible? Note that it is not a constraint but a expression holder. Here is my code before deleting it:

I=10;
M=4;
N=150;
H=100;
b0=1.0000e-06;
Pu=1.9953e-04;
s_i =[-162.1208   57.6451;
 -173.1831   80.7379;
 -184.7079   65.4968;
 -136.9000   87.8228;
 -168.3625   90.2373;
 -104.0888   15.2233;
 -150.1326   19.2580;
 -126.1391   79.0976;
 -198.7244    6.0705;
 -139.4647   38.9827];
qL=ones(M,N,2);
qL(:,:,1) =[
    [ -100.0000 -104.1268 -108.0684 -111.8179 -115.3685 -118.7141 -121.8486 -124.7664 -127.4624 -129.9318 -132.1702 -134.1735 -135.9384 -137.4615 -138.7402 -139.7723 -140.5558 -141.0895 -141.3722 -141.4037 -141.1837 -140.7127;
  100.0000   95.6954   91.2208   86.5839   81.7930   76.8568   71.7839   66.5834   61.2645   55.8366   50.3095   44.6930   38.9969   33.2316   27.4071   21.5340   15.6225    9.6833    3.7268   -2.2363   -8.1954  -14.1399;
  100.0000  104.1268  108.0684  111.8179  115.3685  118.7141  121.8486  124.7664  127.4624  129.9318  132.1702  134.1735  135.9384  137.4615  138.7402  139.7723  140.5558  141.0895  141.3722  141.4037  141.1837  140.7127;
 -100.0000  -95.6954  -91.2208  -86.5839  -81.7930  -76.8568  -71.7839  -66.5834  -61.2645  -55.8366  -50.3095  -44.6930  -38.9969  -33.2316  -27.4071  -21.5340  -15.6225   -9.6833   -3.7268    2.2363    8.1954   14.1399],...
 [-139.9915 -139.0214 -137.8042 -136.3419 -134.6372 -132.6932 -130.5132 -128.1012 -125.4614 -122.5985 -119.5177 -116.2244 -112.7244 -109.0240 -105.1298 -101.0486  -96.7878  -92.3549  -87.7579  -83.0047  -78.1040  -73.0644;
  -20.0593  -25.9430  -31.7806  -37.5617  -43.2760  -48.9134  -54.4638  -59.9173  -65.2644  -70.4954  -75.6010  -80.5723  -85.4003  -90.0764  -94.5924  -98.9402 -103.1121 -107.1007 -110.8989 -114.4998 -117.8973 -121.0850;
  139.9915  139.0214  137.8042  136.3419  134.6372  132.6932  130.5132  128.1012  125.4614  122.5985  119.5177  116.2244  112.7244  109.0240  105.1298  101.0486   96.7878   92.3549   87.7579   83.0047   78.1040   73.0644;
   20.0593   25.9430   31.7806   37.5617   43.2760   48.9134   54.4638   59.9173   65.2644   70.4954   75.6010   80.5723   85.4003   90.0764   94.5924   98.9402  103.1121  107.1007  110.8989  114.4998  117.8973  121.0850],...
 [  -67.8950  -62.6048  -57.2033  -51.7001  -46.1049  -40.4278  -34.6789  -28.8682  -23.0063  -17.1034  -11.1701   -5.2170    0.7454    6.7065   12.6557   18.5824   24.4760   30.3261   36.1223   41.8542   47.5118   53.0849;
 -124.0575 -126.8095 -129.3359 -131.6325 -133.6949 -135.5197 -137.1035 -138.4436 -139.5375 -140.3833 -140.9795 -141.3251 -141.4194 -141.2622 -140.8539 -140.1952 -139.2872 -138.1316 -136.7303 -135.0860 -133.2015 -131.0801;
   67.8950   62.6048   57.2033   51.7001   46.1049   40.4278   34.6789   28.8682   23.0063   17.1034   11.1701    5.2170   -0.7454   -6.7065  -12.6557  -18.5824  -24.4760  -30.3261  -36.1223  -41.8542  -47.5118  -53.0849;
  124.0575  126.8095  129.3359  131.6325  133.6949  135.5197  137.1035  138.4436  139.5375  140.3833  140.9795  141.3251  141.4194  141.2622  140.8539  140.1952  139.2872  138.1316  136.7303  135.0860  133.2015  131.0801],...
[   58.5636   63.9381   69.1990   74.3369   79.3426   84.2072   88.9221   93.4789   97.8695  102.0861  106.1212  109.9676  113.6184  117.0673  120.3081  123.3349  126.1424  128.7257  131.0801  133.2015  135.0860  136.7303;
 -128.7257 -126.1424 -123.3349 -120.3081 -117.0673 -113.6184 -109.9676 -106.1212 -102.0861  -97.8695  -93.4789  -88.9221  -84.2072  -79.3426  -74.3369  -69.1990  -63.9381  -58.5636  -53.0849  -47.5118  -41.8542  -36.1223;
  -58.5636  -63.9381  -69.1990  -74.3369  -79.3426  -84.2072  -88.9221  -93.4789  -97.8695 -102.0861 -106.1212 -109.9676 -113.6184 -117.0673 -120.3081 -123.3349 -126.1424 -128.7257 -131.0801 -133.2015 -135.0860 -136.7303;
  128.7257  126.1424  123.3349  120.3081  117.0673  113.6184  109.9676  106.1212  102.0861   97.8695   93.4789   88.9221   84.2072   79.3426   74.3369   69.1990   63.9381   58.5636   53.0849   47.5118   41.8542   36.1223],...
 [  138.1316  139.2872  140.1952  140.8539  141.2622  141.4194  141.3251  140.9795  140.3833  139.5375  138.4436  137.1035  135.5197  133.6949  131.6325  129.3359  126.8095  124.0575  121.0850  117.8973  114.4998  110.8989;
  -30.3261  -24.4760  -18.5824  -12.6557   -6.7065   -0.7454    5.2170   11.1701   17.1034   23.0063   28.8682   34.6789   40.4278   46.1049   51.7001   57.2033   62.6048   67.8950   73.0644   78.1040   83.0047   87.7579;
 -138.1316 -139.2872 -140.1952 -140.8539 -141.2622 -141.4194 -141.3251 -140.9795 -140.3833 -139.5375 -138.4436 -137.1035 -135.5197 -133.6949 -131.6325 -129.3359 -126.8095 -124.0575 -121.0850 -117.8973 -114.4998 -110.8989;
   30.3261   24.4760   18.5824   12.6557    6.7065    0.7454   -5.2170  -11.1701  -17.1034  -23.0063  -28.8682  -34.6789  -40.4278  -46.1049  -51.7001  -57.2033  -62.6048  -67.8950  -73.0644  -78.1040  -83.0047  -87.7579],...
  [107.1007  103.1121   98.9402   94.5924   90.0764   85.4003   80.5723   75.6010   70.4954   65.2644   59.9173   54.4638   48.9134   43.2760   37.5617   31.7806   25.9430   20.0593   14.1399    8.1954    2.2363   -3.7268;
   92.3549   96.7878  101.0486  105.1298  109.0240  112.7244  116.2244  119.5177  122.5985  125.4614  128.1012  130.5132  132.6932  134.6372  136.3419  137.8042  139.0214  139.9915  140.7127  141.1837  141.4037  141.3722;
 -107.1007 -103.1121  -98.9402  -94.5924  -90.0764  -85.4003  -80.5723  -75.6010  -70.4954  -65.2644  -59.9173  -54.4638  -48.9134  -43.2760  -37.5617  -31.7806  -25.9430  -20.0593  -14.1399   -8.1954   -2.2363    3.7268;
  -92.3549  -96.7878 -101.0486 -105.1298 -109.0240 -112.7244 -116.2244 -119.5177 -122.5985 -125.4614 -128.1012 -130.5132 -132.6932 -134.6372 -136.3419 -137.8042 -139.0214 -139.9915 -140.7127 -141.1837 -141.4037 -141.3722],...
  [-9.6833  -15.6225  -21.5340  -27.4071  -33.2316  -38.9969  -44.6930  -50.3095  -55.8366  -61.2645  -66.5834  -71.7839  -76.8568  -81.7930  -86.5839  -91.2208  -95.6954 -100.0000;
  141.0895  140.5558  139.7723  138.7402  137.4615  135.9384  134.1735  132.1702  129.9318  127.4624  124.7664  121.8486  118.7141  115.3685  111.8179  108.0684  104.1268  100.0000;
    9.6833   15.6225   21.5340   27.4071   33.2316   38.9969   44.6930   50.3095   55.8366   61.2645   66.5834   71.7839   76.8568   81.7930   86.5839   91.2208   95.6954  100.0000;
 -141.0895 -140.5558 -139.7723 -138.7402 -137.4615 -135.9384 -134.1735 -132.1702 -129.9318 -127.4624 -124.7664 -121.8486 -118.7141 -115.3685 -111.8179 -108.0684 -104.1268 -100.0000]];


qL(:,:,2) =[
    [ 100.0000   95.6954   91.2208   86.5839   81.7930   76.8568   71.7839   66.5834   61.2645   55.8366   50.3095   44.6930   38.9969   33.2316   27.4071   21.5340   15.6225    9.6833    3.7268   -2.2363   -8.1954  -14.1399;
  100.0000  104.1268  108.0684  111.8179  115.3685  118.7141  121.8486  124.7664  127.4624  129.9318  132.1702  134.1735  135.9384  137.4615  138.7402  139.7723  140.5558  141.0895  141.3722  141.4037  141.1837  140.7127;
 -100.0000  -95.6954  -91.2208  -86.5839  -81.7930  -76.8568  -71.7839  -66.5834  -61.2645  -55.8366  -50.3095  -44.6930  -38.9969  -33.2316  -27.4071  -21.5340  -15.6225   -9.6833   -3.7268    2.2363    8.1954   14.1399;
 -100.0000 -104.1268 -108.0684 -111.8179 -115.3685 -118.7141 -121.8486 -124.7664 -127.4624 -129.9318 -132.1702 -134.1735 -135.9384 -137.4615 -138.7402 -139.7723 -140.5558 -141.0895 -141.3722 -141.4037 -141.1837 -140.7127;],...
[-20.0593  -25.9430  -31.7806  -37.5617  -43.2760  -48.9134  -54.4638  -59.9173  -65.2644  -70.4954  -75.6010  -80.5723  -85.4003  -90.0764  -94.5924  -98.9402 -103.1121 -107.1007 -110.8989 -114.4998 -117.8973 -121.0850;
  139.9915  139.0214  137.8042  136.3419  134.6372  132.6932  130.5132  128.1012  125.4614  122.5985  119.5177  116.2244  112.7244  109.0240  105.1298  101.0486   96.7878   92.3549   87.7579   83.0047   78.1040   73.0644;
   20.0593   25.9430   31.7806   37.5617   43.2760   48.9134   54.4638   59.9173   65.2644   70.4954   75.6010   80.5723   85.4003   90.0764   94.5924   98.9402  103.1121  107.1007  110.8989  114.4998  117.8973  121.0850;
 -139.9915 -139.0214 -137.8042 -136.3419 -134.6372 -132.6932 -130.5132 -128.1012 -125.4614 -122.5985 -119.5177 -116.2244 -112.7244 -109.0240 -105.1298 -101.0486  -96.7878  -92.3549  -87.7579  -83.0047  -78.1040  -73.0644;],...
[-124.0575 -126.8095 -129.3359 -131.6325 -133.6949 -135.5197 -137.1035 -138.4436 -139.5375 -140.3833 -140.9795 -141.3251 -141.4194 -141.2622 -140.8539 -140.1952 -139.2872 -138.1316 -136.7303 -135.0860 -133.2015 -131.0801;
   67.8950   62.6048   57.2033   51.7001   46.1049   40.4278   34.6789   28.8682   23.0063   17.1034   11.1701    5.2170   -0.7454   -6.7065  -12.6557  -18.5824  -24.4760  -30.3261  -36.1223  -41.8542  -47.5118  -53.0849;
  124.0575  126.8095  129.3359  131.6325  133.6949  135.5197  137.1035  138.4436  139.5375  140.3833  140.9795  141.3251  141.4194  141.2622  140.8539  140.1952  139.2872  138.1316  136.7303  135.0860  133.2015  131.0801;
  -67.8950  -62.6048  -57.2033  -51.7001  -46.1049  -40.4278  -34.6789  -28.8682  -23.0063  -17.1034  -11.1701   -5.2170    0.7454    6.7065   12.6557   18.5824   24.4760   30.3261   36.1223   41.8542   47.5118   53.0849;],...
 [-128.7257 -126.1424 -123.3349 -120.3081 -117.0673 -113.6184 -109.9676 -106.1212 -102.0861  -97.8695  -93.4789  -88.9221  -84.2072  -79.3426  -74.3369  -69.1990  -63.9381  -58.5636  -53.0849  -47.5118  -41.8542  -36.1223;
  -58.5636  -63.9381  -69.1990  -74.3369  -79.3426  -84.2072  -88.9221  -93.4789  -97.8695 -102.0861 -106.1212 -109.9676 -113.6184 -117.0673 -120.3081 -123.3349 -126.1424 -128.7257 -131.0801 -133.2015 -135.0860 -136.7303;
  128.7257  126.1424  123.3349  120.3081  117.0673  113.6184  109.9676  106.1212  102.0861   97.8695   93.4789   88.9221   84.2072   79.3426   74.3369   69.1990   63.9381   58.5636   53.0849   47.5118   41.8542   36.1223;
   58.5636   63.9381   69.1990   74.3369   79.3426   84.2072   88.9221   93.4789   97.8695  102.0861  106.1212  109.9676  113.6184  117.0673  120.3081  123.3349  126.1424  128.7257  131.0801  133.2015  135.0860  136.7303;],...
  [ -30.3261  -24.4760  -18.5824  -12.6557   -6.7065   -0.7454    5.2170   11.1701   17.1034   23.0063   28.8682   34.6789   40.4278   46.1049   51.7001   57.2033   62.6048   67.8950   73.0644   78.1040   83.0047   87.7579;
 -138.1316 -139.2872 -140.1952 -140.8539 -141.2622 -141.4194 -141.3251 -140.9795 -140.3833 -139.5375 -138.4436 -137.1035 -135.5197 -133.6949 -131.6325 -129.3359 -126.8095 -124.0575 -121.0850 -117.8973 -114.4998 -110.8989;
   30.3261   24.4760   18.5824   12.6557    6.7065    0.7454   -5.2170  -11.1701  -17.1034  -23.0063  -28.8682  -34.6789  -40.4278  -46.1049  -51.7001  -57.2033  -62.6048  -67.8950  -73.0644  -78.1040  -83.0047  -87.7579;
  138.1316  139.2872  140.1952  140.8539  141.2622  141.4194  141.3251  140.9795  140.3833  139.5375  138.4436  137.1035  135.5197  133.6949  131.6325  129.3359  126.8095  124.0575  121.0850  117.8973  114.4998  110.8989;],...
 [92.3549   96.7878  101.0486  105.1298  109.0240  112.7244  116.2244  119.5177  122.5985  125.4614  128.1012  130.5132  132.6932  134.6372  136.3419  137.8042  139.0214  139.9915  140.7127  141.1837  141.4037  141.3722;
 -107.1007 -103.1121  -98.9402  -94.5924  -90.0764  -85.4003  -80.5723  -75.6010  -70.4954  -65.2644  -59.9173  -54.4638  -48.9134  -43.2760  -37.5617  -31.7806  -25.9430  -20.0593  -14.1399   -8.1954   -2.2363    3.7268;
  -92.3549  -96.7878 -101.0486 -105.1298 -109.0240 -112.7244 -116.2244 -119.5177 -122.5985 -125.4614 -128.1012 -130.5132 -132.6932 -134.6372 -136.3419 -137.8042 -139.0214 -139.9915 -140.7127 -141.1837 -141.4037 -141.3722;
  107.1007  103.1121   98.9402   94.5924   90.0764   85.4003   80.5723   75.6010   70.4954   65.2644   59.9173   54.4638   48.9134   43.2760   37.5617   31.7806   25.9430   20.0593   14.1399    8.1954    2.2363   -3.7268;],...
  [ 141.0895  140.5558  139.7723  138.7402  137.4615  135.9384  134.1735  132.1702  129.9318  127.4624  124.7664  121.8486  118.7141  115.3685  111.8179  108.0684  104.1268  100.0000;
    9.6833   15.6225   21.5340   27.4071   33.2316   38.9969   44.6930   50.3095   55.8366   61.2645   66.5834   71.7839   76.8568   81.7930   86.5839   91.2208   95.6954  100.0000;
 -141.0895 -140.5558 -139.7723 -138.7402 -137.4615 -135.9384 -134.1735 -132.1702 -129.9318 -127.4624 -124.7664 -121.8486 -118.7141 -115.3685 -111.8179 -108.0684 -104.1268 -100.0000;
   -9.6833  -15.6225  -21.5340  -27.4071  -33.2316  -38.9969  -44.6930  -50.3095  -55.8366  -61.2645  -66.5834  -71.7839  -76.8568  -81.7930  -86.5839  -91.2208  -95.6954 -100.0000;]];

 cvx_begin 
     variables q_mn(M,N,2)  T_n(N)  x_imn(I,M,N) ;
     expressions  T_in(I,N)  sum_m2_2(I,N)  temp3 temp4(I,M,N,M);
     
     tempp=permute(  sum_square( permute( repmat( qL , 1, 1, 1, I ) - permute( repmat( s_i , 1, 1, M , N ), [ 3 4 2 1 ]), [ 1 2 4 3]),   4) , [ 3 2 1 ] );
     
  sum_m2_2= sum( ( permute(  sum_square( permute( repmat( q_mn , 1, 1, 1, I ) - permute( repmat( s_i , 1, 1, M , N ), [ 3 4 2 1 ]), [ 1 2 4 3]),   4) , [ 3 2 1 ] ) -tempp)./((tempp+H^2).^2),  3);
     
     minimize(sum(T_n))
     subject to

     T_n >= 0;

     log( permute( 2* sum( permute( (repmat( qL , 1, 1, 1, I )- permute( repmat( s_i , 1, 1, M , N ), [ 3 4 2 1 ])).* repmat(q_mn-qL ,1,1,1,I)  , [ 1 2 4 3 ] ) , 4 ) +sum(permute((repmat( qL , 1, 1, 1, I )- permute( repmat( s_i , 1, 1, M , N ), [ 3 4 2 1 ])).^2 ,[1 2 4 3]),4)+H^2, [3 1 2]) ) >= -x_imn+log(b0*Pu);
     

 cvx_end

The output is

Calling Mosek_2 9.2.47: 42000 variables, 13200 equality constraints
   For improved efficiency, Mosek_2 is solving the dual problem.
------------------------------------------------------------

MOSEK Version 9.2.47 (Build date: 2021-6-15 12:45:51)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 13200           
  Cones                  : 12000           
  Scalar variables       : 42000           
  Matrix variables       : 0               
  Integer variables      : 0               

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 2                 time                   : 0.00            
Lin. dep.  - tries                  : 1                 time                   : 0.00            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.03    
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 13200           
  Cones                  : 12000           
  Scalar variables       : 42000           
  Matrix variables       : 0               
  Integer variables      : 0               

Optimizer  - threads                : 2               
Optimizer  - solved problem         : the primal      
Optimizer  - Constraints            : 7200
Optimizer  - Cones                  : 12000
Optimizer  - Scalar variables       : 42000             conic                  : 42000           
Optimizer  - Semi-definite variables: 0                 scalarized             : 0               
Factor     - setup time             : 0.05              dense det. time        : 0.00            
Factor     - ML order time          : 0.00              GP order time          : 0.00            
Factor     - nonzeros before factor : 1.98e+04          after factor           : 1.98e+04        
Factor     - dense dim.             : 0                 flops                  : 2.61e+05        
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
0   1.1e+01  3.2e+04  1.1e+08  0.00e+00   -1.079272815e+08  0.000000000e+00   1.0e+00  0.11  
Optimizer terminated. Time: 0.16    


Interior-point solution summary
  Problem status  : DUAL_INFEASIBLE
  Solution status : DUAL_INFEASIBLE_CER
  Primal.  obj: -1.0792728145e+08   nrm: 1e+00    Viol.  con: 3e+03    var: 0e+00    cones: 0e+00  
Optimizer summary
  Optimizer                 -                        time: 0.16    
    Interior-point          - iterations : 0         time: 0.14    
      Basis identification  -                        time: 0.00    
        Primal              - iterations : 0         time: 0.00    
        Dual                - iterations : 0         time: 0.00    
        Clean primal        - iterations : 0         time: 0.00    
        Clean dual          - iterations : 0         time: 0.00    
    Simplex                 -                        time: 0.00    
      Primal simplex        - iterations : 0         time: 0.00    
      Dual simplex          - iterations : 0         time: 0.00    
    Mixed integer           - relaxations: 0         time: 0.00    

------------------------------------------------------------
Status: Infeasible
Optimal value (cvx_optval): +Inf

After deleting it, the problem becomes feasible and the output is:

Calling Mosek_2 9.2.47: 18000 variables, 7200 equality constraints
   For improved efficiency, Mosek_2 is solving the dual problem.
------------------------------------------------------------

MOSEK Version 9.2.47 (Build date: 2021-6-15 12:45:51)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 7200            
  Cones                  : 6000            
  Scalar variables       : 18000           
  Matrix variables       : 0               
  Integer variables      : 0               

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 1                 time                   : 0.00            
Lin. dep.  - tries                  : 1                 time                   : 0.02            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.02    
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 7200            
  Cones                  : 6000            
  Scalar variables       : 18000           
  Matrix variables       : 0               
  Integer variables      : 0               

Optimizer  - threads                : 2               
Optimizer  - solved problem         : the primal      
Optimizer  - Constraints            : 1200
Optimizer  - Cones                  : 6000
Optimizer  - Scalar variables       : 18000             conic                  : 18000           
Optimizer  - Semi-definite variables: 0                 scalarized             : 0               
Factor     - setup time             : 0.00              dense det. time        : 0.00            
Factor     - ML order time          : 0.00              GP order time          : 0.00            
Factor     - nonzeros before factor : 1800              after factor           : 1800            
Factor     - dense dim.             : 0                 flops                  : 7.50e+04        
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
0   1.1e+01  1.1e+04  5.2e+07  0.00e+00   5.246584861e+07   0.000000000e+00   1.0e+00  0.05  
1   1.9e+00  1.9e+03  2.2e+07  -1.00e+00  5.245785361e+07   0.000000000e+00   1.7e-01  0.08  
2   1.2e-01  1.2e+02  5.6e+06  -9.99e-01  5.221066639e+07   0.000000000e+00   1.1e-02  0.09  
3   1.8e-02  1.8e+01  2.1e+06  -9.89e-01  5.055855428e+07   0.000000000e+00   1.7e-03  0.11  
4   8.6e-03  8.5e+00  1.3e+06  -8.82e-01  4.550274707e+07   0.000000000e+00   7.9e-04  0.11  
5   3.1e-03  3.0e+00  4.2e+05  -4.63e-01  2.495266344e+07   0.000000000e+00   2.8e-04  0.13  
6   1.8e-04  1.8e-01  8.3e+03  4.01e-01   1.876448123e+06   0.000000000e+00   1.6e-05  0.14  
7   4.4e-08  4.4e-05  4.5e-02  9.59e-01   4.779370601e+02   0.000000000e+00   4.0e-09  0.16  
8   6.7e-13  6.7e-10  2.7e-09  1.00e+00   7.292779021e-03   0.000000000e+00   6.1e-14  0.17  
9   5.1e-18  3.0e-13  2.0e-14  1.00e+00   5.563948831e-08   0.000000000e+00   4.7e-19  0.17  
Optimizer terminated. Time: 0.19    


Interior-point solution summary
  Problem status  : PRIMAL_AND_DUAL_FEASIBLE
  Solution status : OPTIMAL
  Primal.  obj: 5.5639488306e-08    nrm: 2e-12    Viol.  con: 3e-12    var: 0e+00    cones: 0e+00  
  Dual.    obj: 0.0000000000e+00    nrm: 1e+04    Viol.  con: 0e+00    var: 2e-10    cones: 0e+00  
Optimizer summary
  Optimizer                 -                        time: 0.19    
    Interior-point          - iterations : 9         time: 0.17    
      Basis identification  -                        time: 0.00    
        Primal              - iterations : 0         time: 0.00    
        Dual                - iterations : 0         time: 0.00    
        Clean primal        - iterations : 0         time: 0.00    
        Clean dual          - iterations : 0         time: 0.00    
    Simplex                 -                        time: 0.00    
      Primal simplex        - iterations : 0         time: 0.00    
      Dual simplex          - iterations : 0         time: 0.00    
    Mixed integer           - relaxations: 0         time: 0.00    

------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +0

I ran with and without the unused expression assignment using Mosek 9.3.10 (you ran 9.2.47), and it solved to claimed optimality, in both cases with cvx_optval = 0.

When I ran them, based on the Problem reporting by Mosek, the version with the unused expression assignment has the same number of variables and constraints as the version without. Your version with the unused expression assignment has more variables and constraints. I don’t know what happened with your runs.

1 Like

I have solved it with Mosek 9.3.10 and it is still infeasible. The code remains the same, and the output is:

Calling Mosek_2 9.3.10: 42000 variables, 13200 equality constraints
   For improved efficiency, Mosek_2 is solving the dual problem.
------------------------------------------------------------

MOSEK Version 9.3.10 (Build date: 2021-11-5 08:42:07)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 13200           
  Cones                  : 12000           
  Scalar variables       : 42000           
  Matrix variables       : 0               
  Integer variables      : 0               

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 2                 time                   : 0.00            
Lin. dep.  - tries                  : 1                 time                   : 0.02            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.03    
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 13200           
  Cones                  : 12000           
  Scalar variables       : 42000           
  Matrix variables       : 0               
  Integer variables      : 0               

Optimizer  - threads                : 2               
Optimizer  - solved problem         : the primal      
Optimizer  - Constraints            : 7200
Optimizer  - Cones                  : 12000
Optimizer  - Scalar variables       : 42000             conic                  : 42000           
Optimizer  - Semi-definite variables: 0                 scalarized             : 0               
Factor     - setup time             : 0.01              dense det. time        : 0.00            
Factor     - ML order time          : 0.00              GP order time          : 0.00            
Factor     - nonzeros before factor : 1.98e+04          after factor           : 1.98e+04        
Factor     - dense dim.             : 0                 flops                  : 2.61e+05        
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
0   1.1e+01  3.2e+04  1.1e+08  0.00e+00   -1.079272815e+08  0.000000000e+00   1.0e+00  0.08  
Optimizer terminated. Time: 0.13    


Interior-point solution summary
  Problem status  : DUAL_INFEASIBLE
  Solution status : DUAL_INFEASIBLE_CER
  Primal.  obj: -1.0792728145e+08   nrm: 1e+00    Viol.  con: 3e+03    var: 0e+00    cones: 0e+00  
Optimizer summary
  Optimizer                 -                        time: 0.13    
    Interior-point          - iterations : 0         time: 0.11    
      Basis identification  -                        time: 0.00    
        Primal              - iterations : 0         time: 0.00    
        Dual                - iterations : 0         time: 0.00    
        Clean primal        - iterations : 0         time: 0.00    
        Clean dual          - iterations : 0         time: 0.00    
    Simplex                 -                        time: 0.00    
      Primal simplex        - iterations : 0         time: 0.00    
      Dual simplex          - iterations : 0         time: 0.00    
    Mixed integer           - relaxations: 0         time: 0.00    

------------------------------------------------------------
Status: Infeasible
Optimal value (cvx_optval): +Inf

I guess it is a matlab version problem? because I just tried it on another computer with matlabR2018b, it worked. Mine is matlabR2016b.

Changing the MATLAB version should not the result materially.

I can see the infeasibility certificate is not of high quality. Viol con is large!
This can imply

  • there is bug in Mosek.
  • or your problem is nearly infeasible.

You can dump the problem to disk and emailing it to Mosek support using the instructions

https://docs.mosek.com/latest/faq/faq.html

if you want us to inspect the problem.

1 Like

Apparently, when @jackfsuia is running with and without the unused expression assignment, Mosek is provided a model with a different number of variables and constrains. But when I run it, I get the same number with and without. The infeasibility is being reported by Mosek only on the problem with the greater number of variables and constraints. When I ran with and without, Mosek reported the same number of variables and constrains as @jackfsuia without. I don’t know whether the MATLAB version comes into play, and whether the 2 models provided by @jackfsuia’s CVX to Mosek are mathematically equivalent (correct).

Are you running CVX 2.2? What is the output of cvx_vesoion ?

@Mark_L_Stone What do you get here? I see the redundant model of u in the Mosek task file. With CVX2.2, Matlab 2020b.

cvx_begin
cvx_solver Mosek_3

variable x
expression u

u = square(7*x+210)

minimize x
subject to
x>=10

cvx_solver_settings('write', 'small.opf'); 
cvx_end

The suspicious infeasibility is probably due to some sort of cvx_precision we have not seen, at least so it would seem from a parallel discussion in Mosek support. When ran directly from the script it solves.

@Michal_Adamaszek

Using MATLAB 2019b, CVX 2.2 Build 1148

small.opf contents:

[comment]
   Written by MOSEK version 9.3.10
   Date 07-12-21
   Time 08:01:58
[/comment]

[hints]
  [hint NUMVAR] 4 [/hint]
  [hint NUMCON] 2 [/hint]
  [hint NUMANZ] 3 [/hint]
  [hint NUMQNZ] 0 [/hint]
  [hint NUMCONE] 1 [/hint]
[/hints]

[variables disallow_new_variables]
  'x000000000_' 'x000000001_' 'x000000002_' 'x000000003_'
[/variables]

[objective minimize]
   1.4142135623731 'x000000001_' + 5.6e+2 'x000000002_'
[/objective]

[constraints]
  [con 'c000000000_']  1.4142135623731 'x000000003_' = 0 [/con]
  [con 'c000000001_']  'x000000000_' + 1.4e+1 'x000000002_' = 1 [/con]
[/constraints]

[bounds]
  [b] 0e+00      <= 'x000000000_' [/b]
  [b]               'x000000001_','x000000002_','x000000003_' free [/b]
  [cone rquad 'k000000001_'] 'x000000001_', 'x000000003_', 'x000000002_' [/cone]
[/bounds]
1 Like

So you get pieces of u in the model (in particular - there is a cone). It is interesting you don’t see pieces of sum_m2_2 from the original problem.