Optimization Toolbox    

Problems Covered by Large-Scale Methods

Not all possible problem formulations are covered by the large-scale algorithms. The following table describes what functionality is covered by the large-scale methods. For example, for fmincon, the large-scale algorithm covers the case where there are only bound constraints or only linear equalities. For each problem formulation, the third column describes what additional information is needed for the large-scale algorithms. For fminunc and fmincon, the gradient must be computed along with the objective in the user-supplied function (the gradient is not required for the medium-scale algorithms).

Since these methods can also be used on small- to medium-scale problems that are not necessarily sparse, the last column of the table emphasizes what conditions are needed for large-scale problems to run efficiently without exceeding your computer system's memory capabilities, e.g., the linear constraint matrices should be sparse. For smaller problems the conditions in the last column are unnecessary.

Several examples, which follow this table, clarify the contents of the table.

Table 2-4: Large-Scale Problem Coverage and Requirements 
Function
Problem
Formulations

Additional Information Needed
For Large Problems
fminunc

Must provide gradient for f(x) in fun.
  • Provide sparsity structure of the Hessian, or compute the Hessian in fun.
  • The Hessian should be sparse.
fmincon
  • such that where

  • such that , and is an m-by-n matrix where

Must provide gradient for f(x) in fun.
  • Provide sparsity structure of the Hessian or compute the Hessian in fun.
  • The Hessian should be sparse.
  • should be sparse.
lsqnonlin
  • such that where

F(x) must be overdetermined (have at least as many equations as variables).
None
  • Provide sparsity structure of the Jacobian or compute the Jacobian in fun.
  • The Jacobian should be sparse.
lsqcurvefit
  • such that where

must be overdetermined (have at least as many equations as variables).
None
  • Provide sparsity structure of the Jacobian or compute the Jacobian in fun.
  • The Jacobian should be sparse.
fsolve

must have the same number of equations as variables.
None
  • Provide sparsity structure of the Jacobian or compute the Jacobian in fun.
  • The Jacobian should be sparse.
lsqlin

such that where
is an m-by-n matrix where i.e., the problem must be overdetermined.
None
should be sparse.
linprog

such that and , where
None
and should be sparse.
quadprog
  • such that where

  • such that , and is an m-by-n matrix where

None
  • should be sparse.
  • should be sparse.

In the following examples, many of the M-file functions are available in the Optimization Toolbox optim directory. Most of these do not have a fixed problem size, i.e., the size of your starting point xstart determines the size problem that is computed. If your computer system cannot handle the size suggested in the examples below, use a smaller-dimension start point to run the problems. If the problems have upper or lower bounds or equalities, you must adjust the size of those vectors or matrices as well.


  Large-Scale Examples Nonlinear Equations with Jacobian