OPTI Toolbox Wiki

If you are interested in optimization, use MATLAB and like free stuff, OPTI could be for you. See the What Is OPTI section for details on solving linear, nonlinear, continuous and discrete optimization problems using MATLAB!

To get right into it, jump to the downloads page!

OPTI Toolbox is on GitHub

written by Jonny on May 02, 2015, at 07:29 PM

I have created a new repository on GitHub for OPTI: https://github.com/jonathancurrie/OPTI

The repository will contain the latest version of the toolbox as I push my updates to it. However it will not contain the most recent MEX files - you must download the official toolbox version to get these (or compile them yourself).

OPTI Toolbox v2.12 Released

written by Jonny on March 23, 2015, at 09:36 PM

Version 2.12 has just been released with minor updates. Changes include:

  • Added warning to problems which did not solve correctly.
  • Updated CLP to v1.16.5, removed Aboca support (MATLAB does not play with Intel XE 2015)
  • Updated CBC to v2.9.3
  • Updated IPOPT to v3.12.1
  • Updated BONMIN to 1.8.1
  • Re-added CLP to be able to solve QPs (earlier bug appears fixed)
  • Rebuilt all solvers against MKL v11.2 R2

Note the development of new features in OPTI has effectively ended with this release. I will continue to maintain OPTI, and answer questions, but I simply don't have the time to write new functionality (goodbye being a student!).

In the near future the OPTI source will be moving to Github. Keep an eye on the announcements.

OPTI Toolbox v2.11 Released

written by Jonny on September 17, 2014, at 08:00 AM

Version 2.11 has just been released with minor updates. Changes include:

  • Rebuilt all solvers against MKL v11.2 R0
  • Added SymBuilder Examples page
  • Added extra error information to SCIP function processing
  • Fixed bug in SCNLE sparse test (thanks Stephen)
  • Fixed bug in confidence bound plotting with unsorted xdata
  • Fixed bug in DNLS problems with initialT ignored for single sampling rate problems

OPTI Toolbox v2.10 Released

written by Jonny on July 21, 2014, at 08:02 PM

Version 2.10 has just been released with numerous updates. As before, please let me know if you encounter any problems with the new version so I can correct ASAP!

Changes include:


  • Reorganised OPTI folder structure to reduce the number of folders
  • Removed support for LIPSOL and QSOPT (too many LP solvers already)
  • Removed supplied demos, replaced with updated examples
  • Rebuilt all solvers against MKL v11.1 R3
  • Updated IPOPT to v3.11.8
  • Updated NLOPT to v2.4.2
  • Data fitting weights are now treated as sqrt(weights) internally

New Functionality

  • Added RMathLib with a library of statistical functions
  • Added ability to calculate fit statistics for NLS/DNLS problems - See NLS Example 7
  • Added simple fitting object optifit
  • Added automatic plotting of confidence bounds on curve fitting problems - See this NLS Example
  • Added C/C++ code generation (including automatic derivatives via CppAD) from SymBuilder models
  • SymBuilder now identifies QCQP models
  • Added experimental function optisym for symbolic derivative generation
  • Added support for intlinprog (2014a) including opti_ overload

Bug Fixes

  • Fixed options bug in opti_nomad with Inf bounds (M. Porcelli)
  • Fixed bug in SymBuilder with 0.5 in quadratic programs
  • Fixed bug in Cbc incorrectly missing infeasibility in some models
  • Fixed bug in derivative checker with Hessian with no NL constraints

OPTI Toolbox v2.05 Released

written by Jonny on December 29, 2013, at 02:59 PM

Version 2.05 has just been released with numerous updates. As before, please let me know if you encounter any problems with the new version so I can correct ASAP!

Changes include:


  • Rebuilt all solvers against MKL v11.1 R1
  • Updated Clp to v1.15.6 (removed QP support due to heap corruption)
  • Updated Cbc to v2.8.8
  • Updated Bonmin to v1.7.4
  • Updated SCIP to v3.0.2
  • Updated IPOPT to v3.11.7, added MKL PARDISO as a linear solver option
  • Updated NOMAD to v3.6.2
  • Updated L-BFGS-B interface, added lbfgsbset
  • Updated CBC interface, added presolver + cbcset, changed return codes + arg order
  • Updated support for SeDuMi v1.32 and higher
  • Smaller fonts on higher dimensional plots

New Functionality

  • Added support for BARON (Global MINLP solver)
  • (Re)Added support for MOSEK ((MI)LP/QP/QCQP solver)
  • Added ability to solve SNLE/SCNLE problems as NLP without dummy objective - see SNLE Examples
  • Added ability to plot SLE/SNLE/SCNLE problems
  • Added ability to supply weights for NLS and DNLS problems - see NLS Example 4
  • Added ability to change fmincon algorithm via optimset options
  • Added plotting of the initial guess to plot(optiObj)
  • Added build date to MEX files
  • Added ability to specify 'solver' option in opti arg list
  • Added ability to read mathematical files directly into opti constructor, e.g. opti('batch.nl')
  • Added cstepJac, cstepHess and cstepHessLag for complex step first and second derivatives
  • Added mkltrnlsset for setting MKLTRNLS options

Bug Fixes

  • Fixed slow code for checking integer variable arrays
  • Fixed bug in Clp when suppling H with no nonzero terms (J.Lofberg)
  • Fixed bug when writing MPS files with SOS
  • Fixed bug in HYBRJ, LMDER and LEVMAR with large problems
  • Fixed bug in symJac, symHess, symHessLag with scalar problems
  • Fixed bug in mklJac when supplied sparse data (now returns an error)

OPTI Toolbox v2.00 Released

written by Jonny on June 20, 2013, at 09:06 PM

Version 2.00 has just been released with numerous updates. Please let me know if you encounter any problems with the new version so I can correct ASAP!

Changes include:


  • Rebuilt all solvers against R2013a, VC++ 2012 and MKL v11 R4 (requires new runtimes, see FAQ)
  • Updated pre-requisite checking for VC++ 2012 and Intel C++ XE 2013
  • Updated SeDuMi interface to support v1.31 and above only (avoids old errors)
  • Updated amplRead to return quadratic row constraints
  • Updated NOMAD to accept problems up to 5000 variables
  • Updated 'set' routines to create common code checks
  • Updated OOQP MEX interface, added MA57 as a linear solver option (also now tril H and no A' as well as Ctrl-C, maxtime and maxiter options)
  • Updated symJac, added symHess, symHessLag, also returns sparsity pattern + more robust and added symDynJac for DNLS problems
  • Updated BONMIN to v1.7.0
  • Updated Clp to v1.15.1 (+ changes to argument order + added presolver + clpset + parallelized Aboca)
  • Updated CBC to v2.8.2
  • Updated CoinUtils to v2.9.1
  • Updated GLPK to v4.48
  • Updated NOMAD to v3.6.1 (+ changes to nomadset)
  • Updated IPOPT to v3.11.1
  • Updated CppAD in SCIP to v20130422
  • Updated ASL to v20130419
  • Removed support for CPLEX v12.5.0.0 with R2013a x64 (strange crashes)

New Functionality

  • Added LIPSOL (LP solver)
  • Added basic dynamic parameter estimation solving (+ optidynset) - see DNLS Examples
  • Added basic multi-start solver (multisolve) - see Multisolve Examples
  • Added automatic derivative checker (optiset option 'derivCheck') - see Optimization Settings
  • Added most remaining IPOPT options to ipoptset
  • Added ability to write GAMS files from OPTI (inc NL via SCIP) - see GAMS Examples
  • Added automatic VS project builder code to most solvers
  • Added objbias term for linear and quadratic problems (inc File IO) - see LP Examples
  • Added x0 as an input argument to opti_linprog and opti_quadprog
  • Added lambda as an output argument from opti_linprog and opti_quadprog
  • Added complex MUMPS build (callable via opti_zmumps)
  • Added ability for IPOPT, NOMAD, NLOPT to solve SNLE, NLS
  • Added ability to plot bounded or x0 supplied unsolved problems
  • Added ability to plot 1D to 5D problems - see Plotting Examples

Bug Fixes

  • Fixed bug in NOMAD with >= linear to nonlinear constraints
  • Fixed bug in IPOPT when not supplying opts.ipopt
  • Fixed bug in BONMIN when not supplying any constraints
  • Fixed bug in BONMIN when supplying double sided row constraints
  • Fixed bug in sdpWrite with row constraints
  • Fixed bug in SCIP with quadratic constraints (incorrect l index)
  • Fixed bug in optiprob with ndec that overwrites x0

OPTI Toolbox v1.81 Released

written by Jonny on April 02, 2013, at 10:01 PM

Version 1.81 has just been released with several updates. Changes include:

  • Added ability to specify quadratic constraints in row form (see QCQP Ex5)
  • Added support for plotting quadratic equalities
  • Changed how SOS are stored internally
  • Changed xtype specification for CBC
  • Changed SOS specification for CBC, LP_SOLVE and SCIP and coinW
  • Changed QC specification for SCIP
  • Rebuilt CSDP with aligned memory allocation
  • Rebuilt solvers and utilities against MKL 11.0 R3
  • Fixed bug in filterSD glcpd.f
  • Fixed bug in filterSD [sparse] with workspace memory allocation
  • Fixed bug in filterSD [sparse] with bounded problems
  • Fixed bug in structure generation for linear constraints with nonlinear solvers
  • Fixed bug in MIQCQPs with CPLEX

OPTI Toolbox v1.80 Released

written by Jonny on March 27, 2013, at 08:56 PM

Version 1.80 has just been released with several updates, and support for semidefinite constraints! Changes include:

  • Added Semidefinite Programming Constraints ('sdcone', 'sedumi')
  • Added Semidefinite cone plotting
  • Added DSDP (SDP solver)
  • Added CSDP (SDP solver, parallelized with OpenMP)
  • Added simple interface to SeDuMi
  • Added ability to read SeDuMi arguments into opti()
  • Added sdpRead() to read SDPA & SeDuMi problems into opti()
  • Added sdpWrite() to write OPTI problems to SDPA & SeDuMi files
  • Added some of the SDPLIB problems to opti test problems
  • Changed warning levels to 'all', 'critical' (default) or 'none'
  • Changed checkSolver to also provide solver configuration details
  • Changed IPOPT & BONMIN to accept linear constraints directly

Check out new pages on Semidefinite Programming and reading and writing Semidefinite Files. Also, many thanks to Johan Löfberg of YALMIP for feedback, testing and ideas for the latest release.

OPTI Toolbox v1.79 Released

written by Jonny on March 05, 2013, at 08:23 AM

Version 1.79 has just been released with several updates. Changes include:

  • Substantial updates to ASL mex interface, now reads QCQPs natively
  • Updated amplRead to allow linear constraints to be identified for NLPs
  • AMPL constraint linearity now available via field 'conlin' returned from amplRead
  • Changed solve(opti) to automatically write AMPL .sol files once an AMPL problem is solved
  • Changed CPLEX OPTI interface to use CPLEX class object
  • Rewrote and tidied up NLOPT MEX interface
  • Added #FuncEvals returned from NLOPT
  • Fixed bug in buildOpti QCQP checking of l
  • Fixed bug in asl when requesting Hessian structure multiple times
  • Fixed bug when plotting semidefinite / indefinite QCs
  • Fixed bug in SCIP QCQPs (important bugfix)
  • Fixed bug in NLOPT Jacobian callback (important bugfix)

OPTI Toolbox v1.78 Released

written by Jonny on February 17, 2013, at 03:54 PM

Version 1.78 has just been released with minor updates. Changes include:

  • Updated SCIP to correct for SOC bug (fixes 32bit crashes mentioned below)
  • Updated SCIP build to use CppAD v20130205
  • Updated SCIP interface to allow reading and solving of AMPL models 1

1 SCIP now utilizes its native AMPL .nl reader to parse AMPL models and solve them to global optimality. This functionality is automatically enabled when using the OPTI function amplRead to read an AMPL model, then selecting SCIP as the solver. The results of the solver run, together with iteration print out are available in MATLAB as per normal. Remember SCIP does not solve problems with trigonometric functions.