Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Surrogate optimization for global minimization of time-consuming objective functions

The `surrogateopt`

function is a global solver for
time-consuming objective functions.

The solver searches for the global minimum of a real-valued objective function in
multiple dimensions, subject to bound constraints. `surrogateopt`

is
best suited to objective functions that take a long time to evaluate. The objective
function can be nonsmooth. The solver requires finite bounds on all variables. The
solver can optionally maintain a checkpoint file to enable recovery from crashes or
partial execution, or optimization continuation after meeting a stopping
condition.

`x = surrogateopt(fun,lb,ub)`

`x = surrogateopt(fun,lb,ub,options)`

`x = surrogateopt(problem)`

`x = surrogateopt(checkpointFile)`

`x = surrogateopt(checkpointFile,opts)`

`[x,fval] = surrogateopt(___)`

`[x,fval,exitflag,output] = surrogateopt(___)`

`[x,fval,exitflag,output,trials] = surrogateopt(___)`

searches for a global minimum of `x`

= surrogateopt(`fun`

,`lb`

,`ub`

)`fun(x)`

in the region ```
lb
<= x <= ub
```

.

Passing Extra Parameters (Optimization Toolbox) explains how to pass extra parameters to the objective function, if necessary.

continues running the optimization from the state in a saved checkpoint file. See
Work with Checkpoint Files.`x`

= surrogateopt(`checkpointFile`

)

continues running the optimization from the state in a saved checkpoint file, and
replaces options in `x`

= surrogateopt(`checkpointFile`

,`opts`

)`checkpointFile`

with those in
`opts`

. See Checkpoint File.

`surrogateopt`

repeatedly performs the following steps:

Create a set of trial points by sampling

`MinSurrogatePoints`

random points within the bounds, and evaluate the objective function at the trial points.Create a surrogate model of the objective function by interpolating a radial basis function through all of the random trial points.

Create a merit function that gives some weight to the surrogate and some weight to the distance from trial points. Locate a small value of the merit function by randomly sampling the merit function in a region around the incumbent point (best point found since the last surrogate reset). Use this point, called the adaptive point, as a new trial point.

Evaluate the objective at the adaptive point, and update the surrogate based on this point and its value. Count a "success" if the objective function value is sufficiently lower than the previous best (lowest) value observed, and count a "failure" otherwise.

Update the dispersion of the sample distribution upwards if there are three successes before

`max(nvar,5)`

failures, where`nvar`

is the number of dimensions. Update the dispersion downwards if there are`max(nvar,5)`

failures before three successes.Continue from step 3 until all trial points are within

`MinSampleDistance`

of the evaluated points. At that time, reset the surrogate by discarding all adaptive points from the surrogate, reset the scale, and go back to step 1 to create`MinSurrogatePoints`

new random trial points for evaluation.

For details, see Surrogate Optimization Algorithm.

- Surrogate Optimization
- Local vs. Global Optima (Optimization Toolbox)
- Surrogate Optimization Options