14.01.2013 Views

Global Optimization Toolbox User's Guide - MathWorks

Global Optimization Toolbox User's Guide - MathWorks

Global Optimization Toolbox User's Guide - MathWorks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

as the upper bound for each dimension for initial point generation. For<br />

bounded problems, and problems with linear constraints, ga uses the<br />

bounds and constraints to make the initial population.<br />

Write Constraints<br />

simulannealbnd and patternsearch do not require bounds, although they<br />

can use bounds.<br />

Ensure ga Options Maintain Feasibility<br />

The ga solver generally maintains strict feasibility with respect to bounds<br />

and linear constraints. This means that, at every iteration, all members of a<br />

population satisfy the bounds and linear constraints.<br />

However, you can set options that cause this feasibility to fail. For example<br />

if you set MutationFcn to @mutationgaussian or @mutationuniform, the<br />

mutation function does not respect constraints, and your population can<br />

become infeasible. Similarly, some crossover functions can cause infeasible<br />

populations, although the default gacreationlinearfeasible does respect<br />

bounds and linear constraints. Also, ga can have infeasible points when using<br />

custom mutation or crossover functions.<br />

To ensure feasibility, use the default crossover and mutation functions for ga.<br />

Be especially careful that any custom functions maintain feasibility with<br />

respect to bounds and linear constraints.<br />

Gradients and Hessians<br />

If you use <strong>Global</strong>Search or MultiStart with fmincon, yournonlinear<br />

constraint functions can return derivatives (gradient or Hessian). For details,<br />

see “Gradients and Hessians” on page 2-4.<br />

Vectorized Constraints<br />

The ga and patternsearch solvers optionally compute the nonlinear<br />

constraint functions of a collection of vectors in one function call. This method<br />

can take less time than computing the objective functions of the vectors<br />

serially. This method is called a vectorized function call.<br />

For the solver to compute in a vectorized manner, you must vectorize both<br />

your objective (fitness) function and nonlinear constraint function. For details,<br />

see “Vectorizing the Objective and Constraint Functions” on page 4-84.<br />

2-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!