checkSolver

Display available solvers, or find a solver for a particular problem

Syntax

checkSolver

checkSolver('matrix')

checkSolver('config')

checkSolver('x')

list = checkSolver('x')

ok = checkSolver('solver')

solver = checkSolver('best_x')

Description

checkSolver() prints a list of all solvers, their version number and their availability on your system.

checkSolver('matrix') prints a solver versus problem matrix showing what problems each solver is setup to solve within the OPTI framework.

checkSolver('config') prints a solver versus config matrix showing which optiset options are configured for which solvers.

checkSolver('x') prints a list of all available solvers for a given problem type, specified by 'LP', 'QP', etc.

list = checkSolver('x') returns all available solvers as a cell array available for a given problem type, specified by 'LP', or 'QP', etc.

ok = checkSolver('solver') checks if the supplied solver is available on your system. It will return true if it exists, otherwise it will present an error.

solver = checkSolver('best_x') returns the best solver as a string available for a given problem type, specified by 'best_LP', or 'best_QP', etc.

Examples

The following examples show the various uses of this function. Note the example lists below will change depending on the version you have downloaded.

Checking all solvers

To see a list of all solvers interfaced to OPTI, their version number and whether they are available on your system:

>> checkSolver

------------------------------------------------
OPTI AVAILABLE SOLVERS:

BONMIN:   Available   v1.5.2
CBC:      Available   v2.7.6
CLP:      Available   v1.14.6
CPLEX:    Available   v12.4.0.0
GLPK:     Available   v4.47
GMATLAB:  Available   v3.2
HYBRJ:    Available
IPOPT:    Available   v3.10.2
LBFGSB:   Available   v3.0
LEVMAR:   Available   v2.5 (December 2009)
LMDER:    Available
LP_SOLVE: Available   v5.5.2.0
MATLAB:   Available   v6.1
MKLTRNLS: Available   v10.3 R7
MOSEK:    Available
MUMPS:    Available   v4.10.0
NL2SOL:   Available   v2.2
NLOPT:    Available   v2.2.4
NOMAD:    Available   v3.5.1
OOQP:     Available   v0.99.22
PSWARM:   Available   v1.5
QSOPT:    Available   v080725
------------------------------------------------

Returning the 'best' solver for a given problem type

Note the best solver is defined by our experience with the available solvers. It may not be the best solver for your particular problem.

>> solver = checkSolver('best_NLP')

solver =

IPOPT

Returning a list of all solvers for a given problem type

>> checkSolver('NLP')

------------------------------------------------
OPTI NLP SOLVERS:
              BD LI LE NI NE SP D1 GL
(1) IPOPT     x  *  *  x  x  x  x       Interior-Point Optimization
(2) MATLAB    x  x  x  x  x  x  x       Optimization Toolbox: fmincon
(3) NLOPT     x  *  *  x  x     *  *    Nonlinear Optimization
(4) LBFGSB    x                 x       Limited Memory Broyden-Fletcher-Goldfarb-Shanno Bounded Optimization
(5) PSWARM    x  x  *              x    Pattern and Particle Swarm Global Optimizer
-----------------------------------------------

where the interior table headings are:

BD - Bounds
LI - Linear Inequality
LE - Linear Equality
QI - Quadratic Inequality
NI - Nonlinear Inequality
NE - Nonlinear Equality
SP - Supports Sparse Matrices
D1 - Requires first derivatives
D2 - Requires second derivatives
GL - Global solver

and x means available / required, while * means solver settings dependent / optionally available.