Friday, June 8, 2007

OpenOpt LP solvers

some days ago I published a short benchmark of LP solvers available in OpenOpt.
Currently they are:
LPSolve (LGPL) - requires lpsolve + Python bindings installations (all mentioned is available in here)
cvxopt_lp (GPL) - requires CVXOPT
cvxopt_glpk(GPL2) - requires CVXOPT & glpk
cvxopt_mosek(non-free) - requires CVXOPT & mosek

However, I have some problems with mosek (even with trial license), it don't want to run in my AMD 64 + Linux, yielding 'inner mosek error'. Maybe, you will be more lucky:)

So, that report showed LPSolve to be much more better than other solvers.

Now I found the matter (and it's not my bug).
So, this is due to handling of lb-ub bounds: they are absent in CVXOPT (hence in glpk, mosek), and I used a routine that translated lb-ub bounds to Ax> nVars (however, other tasks can yield other results).
BTW, I think that LP solvers by themself should handle lines with single non-zero, but these ones involved don't. So, in future (but I guess not nearest) I intend to add the handling to the OpenOpt Kernel.
However, it has disadvantage: no correct duals will be returned, or it will require restart LP solver with unchanged LP problem from x_opt once again.

--------------------------------------------------------------------------------------
See whole LP bench results in my comment.

1 comment:

  1. ***********************************************
    density = 1
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 200 density = 1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 0.17 0.09
    glpk 0.11 0.1
    lpsolve 0.13 0.12
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 1100 density = 1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 0.83 0.71
    glpk 1.69 1.61
    lpsolve 0.87 0.83
    -----------------------------------------------
    func trig : nVars = 1000 nConstraints = 1100 density = 1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 40.92 40.42
    glpk 46.83 46.17
    lpsolve 47.45 46.56
    -----------------------------------------------
    func trig : nVars = 500 nConstraints = 1500 density = 1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 19.09 18.6
    glpk 19.65 19.42
    lpsolve 16.64 16.43
    -----------------------------------------------
    func trig : nVars = 1000 nConstraints = 1500 density = 1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 71.12 70.29
    glpk 55.65 53.87
    lpsolve 63.32 62.5
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 5100 density = 1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 4.45 4.14
    glpk 26.34 25.89
    lpsolve 8.01 7.81
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 10100 density = 1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 9.01 8.58
    glpk 99.77 95.76
    lpsolve 25.94 25.59
    whole timeElapsed = 560.718302011
    whole cpuTimeElapsed = 548.01
    ***********************************************
    density = 0.1
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 200 density = 0.1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 0.09 0.07
    glpk 0.05 0.02
    lpsolve 0.03 0.03
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 1100 density = 0.1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 0.72 0.68
    glpk 0.3 0.29
    lpsolve 0.13 0.12
    -----------------------------------------------
    func trig : nVars = 1000 nConstraints = 1100 density = 0.1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 10.73 10.42
    glpk 1.93 1.91
    lpsolve 3.91 3.84
    -----------------------------------------------
    func trig : nVars = 500 nConstraints = 1500 density = 0.1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 6.89 6.68
    glpk 1.56 1.56
    lpsolve 1.69 1.58
    -----------------------------------------------
    func trig : nVars = 1000 nConstraints = 1500 density = 0.1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 15.87 15.38
    glpk 3.0 2.77
    lpsolve 5.14 5.06
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 5100 density = 0.1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 14.7 14.49
    glpk 3.77 3.55
    lpsolve 0.97 0.93
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 10100 density = 0.1
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 61.2 60.8
    glpk 8.69 8.55
    lpsolve 2.44 2.42
    whole timeElapsed = 149.099064827
    whole cpuTimeElapsed = 146.06

    ***********************************************
    density = 0.02
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 200 density = 0.02
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 0.04 0.04
    glpk 0.02 0.02
    lpsolve 0.02 0.02
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 1100 density = 0.02
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 0.2 0.16
    glpk 0.24 0.23
    lpsolve 0.08 0.08
    -----------------------------------------------
    func trig : nVars = 1000 nConstraints = 1100 density = 0.02
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 1.26 1.23
    glpk 0.91 0.89
    lpsolve 1.53 1.51
    -----------------------------------------------
    func trig : nVars = 500 nConstraints = 1500 density = 0.02
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 1.25 1.12
    glpk 0.75 0.74
    lpsolve 0.74 0.74
    -----------------------------------------------
    func trig : nVars = 1000 nConstraints = 1500 density = 0.02
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 2.09 2.03
    glpk 1.32 1.29
    lpsolve 2.07 2.02
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 5100 density = 0.02
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 2.18 2.08
    glpk 2.59 2.56
    lpsolve 0.58 0.54
    -----------------------------------------------
    func trig : nVars = 100 nConstraints = 10100 density = 0.02
    Solver TimeElapsed CPUTimeElapsed
    cvxopt 8.92 8.59
    glpk 6.84 6.78
    lpsolve 1.2 1.19
    whole timeElapsed = 39.8548879623
    whole cpuTimeElapsed = 38.67
    ***********************************************

    ReplyDelete

Note: Only a member of this blog may post a comment.