Main Content

When to Use a Hybrid Function

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

TheseGlobal Optimization Toolboxsolvers can automatically run a hybrid function, or second solver, after they finish:

To run a hybrid function, set theHybridFcnoption 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 asfmincon.

  • If the objective function or a constraint is nonsmooth near the solution, then usepatternsearchas 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 asfminunc.

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

将可用的解决者视为混合功能ions, refer to theoptionsinput 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 isfmincon:

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