This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

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.

When to Use a Hybrid Function

A hybrid function is a function that continues the optimization after the original solver terminates.

These Global Optimization Toolbox solvers can automatically run a hybrid function, or second solver, after they finish:

To run a hybrid function, set the HybridFcn option to the second solver.

A hybrid function can obtain a more accurate solution, starting from the relatively rough solution found by the first solver, in the following circumstances:

  • Whether or not the objective function has nonsmooth regions, if the solution is in a smooth region with smooth constraints, then use a hybrid function from Optimization Toolbox™, such as fmincon.

  • If the objective function or a constraint is nonsmooth near the solution, then use patternsearch as a hybrid function.

  • Suppose that the problem has multiple local minima, and you want to obtain an accurate global solution. The single-objective solvers can search for the vicinity of a global solution, but do not necessarily obtain an extremely accurate result. If the objective function is smooth, then use a hybrid function from Optimization Toolbox, such as fminunc.

  • For smooth multiobjective problems, a hybrid function usually improves on solutions from gamultiobj.

To see which solvers are available as hybrid functions, refer to the options input argument on the reference page for the original solver. To tune the hybrid function, you can include a separate set of options for the hybrid function. For example, if the hybrid function is fmincon:

hybridopts = optimoptions('fmincon','OptimalityTolerance',1e-10);
options = optimoptions('ga','HybridFcn',{'fmincon',hybridopts});
[x,fval] = ga(fun,nvars,A,b,Aeq,beq,lb,ub,nonlcon,options)

See Also

| | |

Related Topics