why my optimization didn't converge

322 views
Skip to first unread message

alexl...@gmail.com

unread,
Mar 14, 2018, 12:42:29 AM3/14/18
to mosek
Hi,

I printed out the log info, they looks fine according to 13.4.1.4 in https://docs.mosek.com/8.1/capi/solving-conic.html, except that
PRSTATUS is not exactly 1, others converged to 0.  I don't why I still didn't have near optimal solution.  Thanks.

Alex


MOSEK warning 52: A numerically large lower bound value -1.1e+08 is specified for variable '' (0).
MOSEK warning 53: A numerically large upper bound value  1.1e+08 isspecified for variable '' (0).
MOSEK warning 52: A numerically large lower bound value -2.2e+08 is specified for variable '' (6).
MOSEK warning 53: A numerically large upper bound value  2.2e+08 isspecified for variable '' (6).
MOSEK warning 52: A numerically large lower bound value -1.0e+08 is specified for variable '' (7).
MOSEK warning 53: A numerically large upper bound value  1.0e+08 is specified for variable '' (7).
MOSEK warning 52: A numerically large lower bound value -1.3e+08 is specified for variable '' (8).
MOSEK warning 53: A numerically large upper bound value  1.3e+08 is specified for variable '' (8).
MOSEK warning 52: A numerically large lower bound value -1.7e+08 is specified for variable '' (9).
MOSEK warning 53: A numerically large upper bound value  1.7e+08 is specified for variable '' (9).
MOSEK warning 52: A numerically large lower bound value -1.6e+08 is specified for variable '' (10).
MOSEK warning 53: A numerically large upper bound value  1.6e+08 is specified for variable '' (10).
MOSEK warning 52: A numerically large lower bound value -1.6e+08 is specified for variable '' (16).
MOSEK warning 53: A numerically large upper bound value  1.6e+08 is specified for variable '' (16).
MOSEK warning 52: A numerically large lower bound value -1.2e+08 is specified for variable '' (28).
MOSEK warning 53: A numerically large upper bound value  1.2e+08 is specified for variable '' (28).
MOSEK warning 52: A numerically large lower bound value -1.0e+08 is specified for variable '' (37).
MOSEK warning 53: A numerically large upper bound value  1.0e+08 is specified for variable '' (37).
MOSEK warning 52: A numerically large lower bound value -6.6e+08 is specified for variable '' (38).
MOSEK warning 53: A numerically large upper bound value  6.6e+08 is specified for variable '' (38).
Warning number 52 is disabled.
Warning number 53 is disabled.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(1) of matrix 'A'.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(2) of matrix 'A'.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(3) of matrix 'A'.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(4) of matrix 'A'.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(5) of matrix 'A'.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(6) of matrix 'A'.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(7) of matrix 'A'.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(8) of matrix 'A'.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(9) of matrix 'A'.
MOSEK warning 705: #307 (nearly) zero elements are specified in sparse row ''(10) of matrix 'A'.
Warning number 705 is disabled.Problem
  Name                   : Long Short Portfolio
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 16102           
  Cones                  : 4621            
  Scalar variables       : 20723           
  Matrix variables       : 0               
  Integer variables      : 0               
Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 6161
Eliminator terminated.
Eliminator - tries                  : 1                 time                : 0.00            
Lin. dep.  - tries                  : 1                 time                : 0.00            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.03    
Problem
  Name                   : Long Short Portfolio
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 16102           
  Cones                  : 4621            
  Scalar variables       : 20723           
  Matrix variables       : 0               
  Integer variables      : 0               
Optimizer  - threads                : 4               
Optimizer  - solved problem         : the dual        
Optimizer  - Constraints            : 3388
Optimizer  - Cones                  : 4621
Optimizer  - Scalar variables       : 18258             conic               
   
: 14254           
Optimizer  - Semi-definite variables: 0                 scalarized          : 0               
Factor     - setup time             : 0.02              dense det. time        : 0.00            
Factor     - ML order time          : 0.00              GP order time          : 0.00            
Factor     - nonzeros before factor : 3.33e+04          after factor        : 8.69e+04        
Factor     - dense dim.             : 87                flops               : 7.57e+06        

ITE PFEAS    DFEAS    GFEAS    PRSTATUS             POBJ                DOBJ                MU       TIME  
0   2.6e+06  2.0e+00  3.7e+00  0.00e+00   0.000000000e+00   -1.742311109e+05  1.0e+00  0.06  
1   1.7e+06  1.4e+00  2.2e+00  -1.00e+00  1.275939222e+03   -1.596956434e+05  6.8e-01  0.09  
2   3.5e+05  2.7e-01  2.0e-01  -1.00e+00  1.756325259e+04   2.326920534e+05   1.3e-01  0.09  
3   8.0e+04  6.2e-02  2.2e-02  -1.00e+00  8.808321736e+04   1.859461723e+06   3.1e-02  0.11  
4   1.8e+04  1.4e-02  2.4e-03  -1.00e+00  4.061665766e+05   9.180166560e+06   7.0e-03  0.13  
5   4.2e+03  3.3e-03  2.8e-04  -9.99e-01  1.707551585e+06  3.926756733e+07   1.6e-03  0.14  
6   9.6e+02  7.4e-04  3.0e-05  -9.95e-01  7.408361951e+06  1.723000874e+08   3.7e-04  0.16  
7   2.8e+02  2.2e-04  4.7e-06  -9.80e-01  2.471032539e+07   5.702104091e+08   1.1e-04  0.17  
8   1.2e+02  9.4e-05  1.4e-06  -9.36e-01  5.431557869e+07   1.214292439e+09   4.7e-05  0.19  
9   7.7e+01  6.0e-05  7.4e-07  -8.79e-01  8.336029975e+07   1.792436681e+09   3.0e-05  0.20  
10  3.1e+01  2.4e-05  2.1e-07  -8.39e-01  1.867867858e+08   3.676890446e+09   1.2e-05  0.20  
11  1.8e+01  1.4e-05  9.9e-08  -7.28e-01  3.022565821e+08   5.384310053e+09   6.9e-06  0.22  
12  9.4e+00  7.3e-06  4.3e-08  -6.73e-01  5.176755495e+08   8.138227177e+09   3.6e-06  0.23  
13  4.0e+00  3.1e-06  1.5e-08  -5.92e-01  9.938054813e+08   1.275899108e+10   1.5e-06  0.25  
14  8.7e-01  6.7e-07  2.4e-09  -4.61e-01  2.619215563e+09   2.374375889e+10   3.4e-07  0.27  
15  2.3e-01  1.8e-07  5.5e-10  -2.57e-01  5.651163938e+09   3.311065455e+10   8.8e-08  0.28  
16  6.7e-02  5.2e-08  1.6e-10  -1.30e-01  1.071434070e+10   3.997142074e+10   2.6e-08  0.30  
17  2.0e-02  1.6e-08  4.8e-11  -5.68e-02  1.890213872e+10   4.684605577e+10   7.9e-09  0.31  
18  6.2e-03  4.8e-09  1.6e-11  2.92e-02   3.068343775e+10   5.424849602e+10   2.4e-09  0.31  
19  2.5e-03  1.9e-09  7.5e-12  1.77e-01   4.135704762e+10   5.915623471e+10   9.7e-10  0.33  
20  1.0e-02  9.6e-10  4.6e-12  4.12e-01   4.447745552e+10   5.585652923e+10   4.8e-10  0.34  
21  7.1e-03  6.6e-10  3.4e-12  4.65e-01   4.672666783e+10   5.649137628e+10   3.3e-10  0.39  
22  2.5e-03  2.3e-10  2.0e-12  6.54e-01   3.909776315e+10   4.287288393e+10   1.2e-10  0.42  
23  1.1e-03  9.9e-11  1.6e-12  1.06e+00   2.145009690e+10   2.263730355e+10   5.0e-11  0.45  
24  6.4e-04  3.1e-11  9.0e-13  1.18e+00   9.798952571e+09   1.012293919e+10   1.5e-11  0.48  
25  6.9e-03  8.4e-12  6.2e-13  1.21e+00   4.961397303e+09   5.040270114e+09   4.2e-12  0.52  
26  7.4e-03  2.7e-12  3.4e-13  1.08e+00   3.626087091e+09   3.651782118e+09   1.4e-12  0.56  
27  1.3e-01  1.3e-12  1.8e-13  1.06e+00   2.635215229e+09   2.643178978e+09   4.5e-13  0.59  
28  4.9e-02  4.7e-13  7.8e-14  1.10e+00   1.685411359e+09   1.687912508e+09   1.6e-13  0.62  
29  1.1e-02  1.3e-13  1.1e-13  1.16e+00   7.699932943e+08   7.705393176e+08   4.4e-14  0.66  
30  7.3e-02  3.7e-14  6.9e-14  1.20e+00   2.513867827e+08   2.515140365e+08   1.2e-14  0.69  
31  7.3e-02  3.7e-14  6.9e-14  1.15e+00   2.513867827e+08   2.515140365e+08   1.2e-14  0.75  
Optimizer terminated. Time: 0.80    


Erling D. Andersen

unread,
Mar 14, 2018, 1:33:29 AM3/14/18
to mosek
MOSEK experiences numerical problems usually (but not always) it is caused by bad scaling of the input data.

I can see you have bounds of the form

-alpha  <= x <= alpha

where alpha is large positive number. They make your problem harder. 
Do you expect those bounds to be binding? If not, then why not remove them.

Do you have small elements in the A matri, then truncating those to zero may also help.

I can see MOSEK dualize the problems sometimes that makes the problem numerically harder. You may consider to force MOSEK to solve the primal.

alexl...@gmail.com

unread,
Mar 15, 2018, 2:03:54 AM3/15/18
to mosek
Hi Erling,

Thanks for your response.  I removed the bounds on x, set "presolveUse" be "off". Didn't help the situation.  I reduced my dimension of x to a small number, then Mosek gave some feasible solution.   I wonder what other debugging tools are available to find the problem.  How can i check the values of the matrix "A"?  I don't think I have near zero values there. 

Best,
Alex

Erling D. Andersen

unread,
Mar 15, 2018, 2:24:01 AM3/15/18
to mosek
Why did you turn presolve off. That normally make things worse. 

I suggest you email us the problem. Here is


how to dump the problem to disk. Upload it using

Erling Andersen

unread,
Mar 19, 2018, 7:42:10 AM3/19/18
to mo...@googlegroups.com
Btw did you try forcing it to solve the primal problem?

--
You received this message because you are subscribed to the Google Groups "mosek" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mosek+unsubscribe@googlegroups.com.
To post to this group, send email to mo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Erling D. Andersen
Mobile      : +4523629520
Homepage: http://erling.andersens.name
Linkedin    : http://dk.linkedin.com/in/edandersen

alexl...@gmail.com

unread,
Mar 22, 2018, 6:19:08 AM3/22/18
to mosek
Thanks, i emailed my problem to Mosek support. 

alexl...@gmail.com

unread,
Mar 22, 2018, 6:19:08 AM3/22/18
to mosek
Sorry, how to forcing it to solve the primal problem?
To unsubscribe from this group and stop receiving emails from it, send an email to mosek+un...@googlegroups.com.

To post to this group, send email to mo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

xiaoy...@gmail.com

unread,
Mar 30, 2018, 5:47:56 AM3/30/18
to mosek
This problem was a numerical issue as pointed out by Erling. I changed the unit of my variable to reduce its range.  Then Mosek converges very fast.  it is important to normalize my variables. 


On Wednesday, March 14, 2018 at 1:33:29 AM UTC-4, Erling D. Andersen wrote:
Reply all
Reply to author
Forward
0 new messages