Loading [MathJax]/jax/output/CommonHTML/jax.js

Thursday, November 17, 2016

Constrained Least Squares solution times

In this post a somewhat larger linearly constrained least squares problem is solved using R. The problem is simply:

minP||Psf||2ipi,j1pi,j0

To make things easier for the QP solver I implemented the model (in GAMS) as:

minP,eie2ijpi,jsj=fi+eiipi,j1pi,j0

The timings for a problem with 39×196 elements in P are:

R+constrOptim 15 hours
R+auglag 2 hours
GAMS+IPOPT 1.2 seconds
GAMS+Cplex 0.15 seconds

Cplex uses a specialized convex quadratic solver, while IPOPT is a general purpose NLP (nonlinear programming) solver.

Sometimes it helps to choose the right solver for the problem at hand.

References
  1. Follow-up on this blog detailing the effects on my reformulation is here: http://yetanothermathprogrammingconsultant.blogspot.com/2016/11/constrained-least-squares-solution.html

No comments:

Post a Comment