solve SOCP with rcone constraints

80 views
Skip to first unread message

A. Castillo

unread,
Jun 30, 2016, 5:53:43 PM6/30/16
to YALMIP
Hello forum:

I'm solving a SOCP that includes rcone constraints and linear constraints, and then a quadratic objective function, with the following general stats:

Optimize a model with 107799 rows, 45408 columns and 240330 nonzeros
Model has 28992 quadratic objective terms
Model has 4464 quadratic constraints
Coefficient statistics:
  Matrix range    [6e-03, 2e+02]
  Objective range [1e-01, 6e+01]
  Bounds range    [0e+00, 0e+00]
  RHS range       [1e-02, 1e+01]
Presolve removed 57032 rows and 10606 columns
Presolve time: 0.26s
Presolved: 52064 rows, 55180 columns, 175946 nonzeros
Presolved model has 4465 second-order cone constraints
Ordering time: 0.62s

I solved this problem with both Mosek 7 and Gurobi 6.0; however Gurobi takes about twice as long to solve the problem to optimality. Both solvers recover the same solution.  I would expect Gurobi to be much faster than Mosek. Any ideas why this isn't the case?

I look forward to your insights.

Thank you! Anya



A. Castillo

unread,
Jun 30, 2016, 7:23:55 PM6/30/16
to YALMIP
Here are the solution stats (including results for CPLEX 12.6.2):

      yalmiptime: 22.4032
      solvertime: 21.2215
            info: 'Successfully solved (GUROBI-GUROBI)'
         problem: 0
    solveroutput: [1x1 struct]
     solverinput: [1x1 struct]
            opti: 5.9020e+06

---------------------------------------------------------

      yalmiptime: 25.9645
      solvertime: 10.5236
            info: 'Successfully solved (MOSEK)'
         problem: 0
    solveroutput: [1x1 struct]
     solverinput: [1x1 struct]
            opti: 5.9020e+06

----------------------------------------------------------

      yalmiptime: 22.2619
      solvertime: 27.3574
            info: 'Successfully solved (CPLEX-IBM)'
         problem: 0
    solveroutput: [1x1 struct]
     solverinput: [1x1 struct]
            opti: 5.9020e+06

Johan Löfberg

unread,
Jul 1, 2016, 2:56:51 AM7/1/16
to YALMIP
Mosek is fast on your socp problem. Not much to discuss.

YALMIP  overhead looks excessive though, so feel free to supply the code

A. Castillo

unread,
Jul 1, 2016, 11:41:07 AM7/1/16
to YALMIP
I suppose my question was--does it make sense to others that Mosek is
faster than Gurobi and Cplex on the SOCP? Gurobi and Cplex are commercial
grade solvers, and typically faster than open source for MILP and LP
problems, so I was expecting similar behavior on the SOCP. Maybe those
expectations are misplaced.

Anya

Johan Löfberg

unread,
Jul 1, 2016, 11:44:16 AM7/1/16
to YALMIP
Mosek is a commercial grade solver too, so your question appears to come from a misunderstanding.

A. Castillo

unread,
Jul 1, 2016, 11:50:03 AM7/1/16
to YALMIP
Ok, thanks Johan. Hans Mittlemann had done some benchmarking of these solvers on SOCP: http://www.gurobi.com/pdfs/benchmarks.pdf (slide 16) and my results are not in line with those posted here. I will probably contact Hans directly for his insight on this, but my SOCP is fairly simple and straightforward.

I'm curious if it has anything to do with Yalmip interface to these solvers, or even how I represented the constraints and objective.

Best, Anya

Johan Löfberg

unread,
Jul 1, 2016, 12:55:54 PM7/1/16
to YALMIP
Solver A might generally be faster than solver B on most problems, but you will almost always find problems where solver B will be faster than solver A.

The way you model things in YALMIP will not affect mosek/gurobi/cplex performance in the end unless you are doing something fundamentally weird (but then all solvers should suffer). A larger risk is that YALMIPs internal normalizations performed to easily setup the numerical models cause problems for some problems on some solvers. That is the risk of not doing it all 100% manually and controlling every single modelling step.


You are welcome to post the code.

Joachim Dahl

unread,
Jul 6, 2016, 2:15:09 AM7/6/16
to YALMIP
If you are concerned about benchmarking the different commericial solvers,  I would suggest to install MOSEK 8 Beta, which was recently released.  On averrage it seems to give a good reduction in computation time, especially for large problems.   And the new SDP solver is signficantly better, both in terms of speed and accuracy.

Erling D. Andersen

unread,
Jul 14, 2016, 3:08:14 AM7/14/16
to YALMIP
BTW you can donate your problem to cblib.zib.de and it might Enter Mittlemans benchmark.

Also mosek is the oldest commercial code for socp. I have spend the last 15+ years tuning so it S-holdet fast. The upcoming V8 as mentioned by Joachim is likely to be faster than your v7.

Reply all
Reply to author
Forward
0 new messages