Re: 'Unknown problem in solver (Turn on 'debug' in sdpsettings) (MOSEK)'

1,075 views
Skip to first unread message
Message has been deleted

Johan Löfberg

unread,
Oct 19, 2017, 6:08:07 AM10/19/17
to YALMIP
So what is displayed by the solver? and what happens when you do as YALMIP tells you which is to turn on the debug flag? and better yet supply a reproducible example.




Shen Feifan

unread,
Oct 20, 2017, 4:42:28 AM10/20/17
to YALMIP
Dear Johan, I am sorry for providing limited information. 
This Code includes two optimize probelms, the first one can be solved sucessfully, while the second one can not be sloved and output unknow problem information. The result is weird because the second one optimizaton include the same objective problem as the first one and with less constraints.  In addition, in some computer, these two optimization problem are solved successfully.


result of second optimization is as follows: (code is in attachment, for confidentiality, some input data are not includes but with some explaination)
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 96001           
  Cones                  : 1               
  Scalar variables       : 241002          
  Matrix variables       : 0               
  Integer variables      : 0               

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

Optimizer  - threads                : 4               
Optimizer  - solved problem         : the primal      
Optimizer  - Constraints            : 47081
Optimizer  - Cones                  : 2
Optimizer  - Scalar variables       : 162243            conic                  : 48083           
Optimizer  - Semi-definite variables: 0                 scalarized             : 0               
Factor     - setup time             : 0.13              dense det. time        : 0.00            
Factor     - ML order time          : 0.01              GP order time          : 0.00            
Factor     - nonzeros before factor : 3.70e+05          after factor           : 3.70e+05        
Factor     - dense dim.             : 4                 flops                  : 5.08e+06        
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
0   1.0e+00  2.4e+04  1.0e+00  0.00e+00   -7.568927526e+02  -7.888927526e+02  1.0e+00  0.59  
1   9.4e-01  2.2e+04  9.4e-01  -9.97e-01  -8.328274041e+02  -7.967731471e+02  9.4e-01  0.84  
2   2.1e-01  5.1e+03  1.0e-01  -9.97e-01  -4.788819668e+03  -1.103999965e+03  2.1e-01  0.89  
3   2.2e-02  5.2e+02  3.6e-03  -9.85e-01  -4.484441442e+04  -3.432818610e+03  2.2e-02  0.94  
4   3.5e-05  8.2e-01  1.6e-06  -8.60e-01  -5.521905223e+05  -3.767897681e+04  3.5e-05  0.98  
5   5.6e-06  1.3e-01  7.5e-07  1.10e+00   -8.839480710e+04  -3.030132117e+04  5.6e-06  1.03  
6   4.5e-07  1.1e-02  2.8e-07  1.19e+00   -3.085745566e+04  -2.820407337e+04  3.6e-07  1.08  
7   8.5e-08  1.2e-03  1.0e-07  9.96e-01   -2.837572783e+04  -2.809789289e+04  3.8e-08  1.13  
8   3.7e-09  8.2e-05  4.2e-08  1.00e+00   -2.808612748e+04  -2.806631416e+04  2.7e-09  1.17  
9   3.7e-09  8.2e-05  4.2e-08  1.00e+00   -2.808612748e+04  -2.806631416e+04  2.7e-09  1.36  
Optimizer terminated. Time: 1.66    


Interior-point solution summary
  Problem status  : UNKNOWN
  Solution status : UNKNOWN
  Primal.  obj: -2.8086127479e+04   nrm: 4e+01    Viol.  con: 3e+00    var: 4e-01    cones: 0e+00  
  Dual.    obj: -2.8066301980e+04   nrm: 3e+01    Viol.  con: 0e+00    var: 1e+00    cones: 0e+00  
Optimizer summary
  Optimizer                 -                        time: 1.66    
    Interior-point          - iterations : 10        time: 1.58    
      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    


ans =

    'Unknown problem in solver (Turn on 'debug' in sdpsettings) (MOSEK)'
TEST.m

Joachim Dahl

unread,
Oct 20, 2017, 5:02:27 AM10/20/17
to YALMIP
It looks like MOSEK almost solved your problem.  In the first iteration DFEAS is very large, which suggests you have large bounds in your model.

Try to normalize the data, so that the objective values get closer to one.  That might be enough to swing the model from UNKNOWN to OPTIMAL.

Shen Feifan

unread,
Oct 20, 2017, 5:24:50 AM10/20/17
to YALMIP
hi, Joachim, i am appreciate for your anwer. Could you please further explain the sentence " normalize the data, so that objective values get closer to one", 
I can't clearly understand this sentence because i am not familar with yalmip. Thanks!

Johan Löfberg

unread,
Oct 20, 2017, 5:41:39 AM10/20/17
to YALMIP
The data (which we don't have...) that defines you model is probably badly scaled leading to huge numbers during the process, so Mosek has troubles to make a judgement about whether the computed actually is good or not, hence the status Problem status  : UNKNOWN , Solution status : UNKNOWN. Currently, YALMIP does not recognize the diagnostic flag issued by Mosek in this case, and simply says that there is some unknown problem (the word unknown here completely unrelated to moseks use of the word unknown). 

In the next version of yalmip, the diagnostic code is checked for in a more robust sense and YALMIP will actually say that the problem was solved, but as always it is up to you to actually look the printout that mosek shows which indicates something is fishy, despite the problem having been solved.

Shen Feifan

unread,
Oct 20, 2017, 6:39:59 AM10/20/17
to YALMIP
Hi Johan, thanks for your reply, I will cheak my code carefully again. Why the first optimization problem can be sloved sucessfully, but the second one is not. The objective functions of two problems are the same and the second one has less  constraints than the first one.

Shen Feifan

unread,
Oct 20, 2017, 6:48:14 AM10/20/17
to YALMIP
and thses two optimization problems can be sloved sucessfully in other computers

Johan Löfberg

unread,
Oct 20, 2017, 7:07:08 AM10/20/17
to YALMIP
How do you mean? The problem you showed has been solved successfully, albeit with UKNOWN status in mosek, meaning that this problem hasperformed worse in terms of numerics. A small epsilon change (different ordering of constraints, other constraints, other computer, different os, different matlab version) on a generally badly posed problem can make a big change.

Shen Feifan

unread,
Oct 20, 2017, 7:39:52 AM10/20/17
to YALMIP
Thanks for your help, this problem can be successfully solved by quadprog solver.  Result of quadprog solver is reasonable (i think the result is right) and is quite different from the result of mosek. So, whether the problem solved successfully by mosek although unknow status in mosek? or say two solver both successfully solve the problem but with different result, and two results are different because of badly problem formulation? Thanks for your help.

Johan Löfberg

unread,
Oct 20, 2017, 7:51:11 AM10/20/17
to YALMIP
So what does check(Constraints_w) and value(objective) for those to solvers?

Shen Feifan

unread,
Oct 20, 2017, 8:15:09 AM10/20/17
to YALMIP

value of objectives are different as using two solvers, and all constraints are satisfied for two kinds results.

ans =

    'Unknown problem in solver (Turn on 'debug' in sdpsettings) (MOSEK)'


objective =

   2.8094e+04

++++++++++++++++++++++++++++++++++++++
Optimization terminated successfully.

ans =

    'Successfully solved (QUADPROG)'

objective =

   2.3398e+04

Johan Löfberg

unread,
Oct 20, 2017, 8:21:59 AM10/20/17
to YALMIP
and feasibility?, i.e. check(Constraints_w)

Joachim Dahl

unread,
Oct 20, 2017, 8:30:25 AM10/20/17
to YALMIP
You should figure out why MOSEK returns UNKNOWN, if you want to use MOSEK.  Very likely your input data is giving the solver a hard time, and you need to look at scaling.

Johan Löfberg

unread,
Oct 20, 2017, 8:35:43 AM10/20/17
to YALMIP
you are welcome to send the data by mail if you don't want to have it public. Without data we can never help you.and pin-point what is wrong with your model

Shen Feifan

unread,
Oct 21, 2017, 11:52:13 AM10/21/17
to YALMIP
Thanks for your help.

Reply all
Reply to author
Forward
0 new messages