# Global Optimization Toolbox

## Solve multiple maxima, multiple minima, and nonsmooth optimization problems

Global Optimization Toolbox provides functions that search for global solutions to problems that contain multiple maxima or minima. Toolbox solvers include surrogate, pattern search, genetic algorithm, particle swarm, simulated annealing, multistart, and global search. You can use these solvers for optimization problems where the objective or constraint function is continuous, discontinuous, stochastic, does not possess derivatives, or includes simulations or black-box functions. For problems with multiple objectives, you can identify a Pareto front using genetic algorithm or pattern search solvers.

You can improve solver effectiveness by adjusting options and, for applicable solvers, customizing creation, update, and search functions. You can use custom data types with the genetic algorithm and simulated annealing solvers to represent problems not easily expressed with standard data types. The hybrid function option lets you improve a solution by applying a second solver after the first.

## Solving Optimization Problems

Choose a solver, define your optimization problem, and set options for algorithm behavior, tolerances, stopping criteria, visualizations, and customizations.

### Specify Solver and Problem

Decide on the solver based on problem characteristics and desired results. Write functions to specify nonlinear objectives and constraints.

### Set Common Options

Set the stopping criteria applicable to the selected solver. Set tolerances for optimality and constraints. Accelerate with parallel computing.

### Assess Intermediate Results

Use plotting functions to get live feedback about optimization progress. Write your own or use those provided. Use output functions to create your own stopping criteria, write results to files, or write your own apps to run the solvers.

## GlobalSearch and MultiStart

Apply gradient-based solvers to find local minima from multiple starting points in search of global minima. Other local or global minima are returned. Solve unconstrained and constrained problems that are smooth.

### Compare Solvers

Use GlobalSearch to generate multiple starting points and filter them before starting the nonlinear solver, often resulting in high-quality solutions. MultiStart lets you choose local solvers and a variety of ways to create starting points.

### Select GlobalSearch Options

Specify the number of trial points and tune the search.

### Select MultiStart Options

Specify the nonlinear solver. Choose a method to generate starting points or use a user-defined set. Accelerate with parallel computing. |

## Surrogate Optimization

Search for global minima on problems with time-consuming objective functions. The solver builds an approximation to the function that can be quickly evaluated and minimized.

### Specify the Problem

Apply to problems with finite bound constraints. The objective function does not need to be differentiable or continuous.

### Select Options

Provide a set of initial points and optional objective values for constructing the initial surrogate. Set the number of points to use for the surrogate and a minimal sample distance. Accelerate with parallel computing.

## Pattern Search

Solve optimization problems by using one of three direct search algorithms: generalized pattern search (GPS), generating set search (GSS), and mesh adaptive search (MADS). At each step, a mesh pattern of points is generated and evaluated.

### Specify the Problem

Apply to problems that are unconstrained or have bound, linear, or nonlinear constraints. The objective and constraint functions do not need to be differentiable or continuous. |

### Select Options

Choose among polling options and set the number of points to evaluate at each step. Use an optional search step to improve efficiency. Control how the mesh changes, including refinement and contraction. Accelerate with parallel computing.

## Genetic Algorithm

Search for global minima by mimicking the principles of biological evolution, repeatedly modifying a population of individual points using rules modeled on gene combinations in biological reproduction.

### Specify the Problem

Apply to problems that are unconstrained or have bound, linear, nonlinear, or integer constraints. The objective and constraint functions do not need to be differentiable or continuous.

### Select Options

Choose among options for creation, fitness scaling, selection, crossover, and mutation. Specify population size, number of elite children, and crossover fraction. Accelerate with parallel computing.

### Customize

Provide your own functions for creation, selection, and mutation. Use custom data types to more easily express your problem. Apply a second optimizer to refine solutions.

## Particle Swarm

Search for global minima using an algorithm inspired by the behavior of insects swarming. Each particle moves with a velocity and direction influenced by the best location it has found so far and the best location the swarm has found.

### Specify the Problem

Apply to unconstrained problems or problems with bound constraints. The objective function does not need to be differentiable or continuous.

### Select Options

Tune velocity computation through setting of inertia and self- and social adjustment weights. Set the neighborhood size. Accelerate with parallel computing.

### Customize

Provide your own function for creating the initial swarm. Apply a second optimizer to refine solutions. |

## Simulated Annealing

Search for global minima with a probabilistic search algorithm that mimics the physical process of annealing, in which a material is heated and then the temperature is slowly lowered to decrease defects, thus minimizing the system energy.

### Specify the Problem

Apply to unconstrained problems or problems with bound constraints. The objective function does not need to be differentiable or continuous

### Select Options

Choose among options for adaptive simulated annealing, Boltzmann annealing, or fast annealing algorithms. |

### Customize

Create functions to define the annealing process, acceptance criteria, and temperature schedule. Use custom data types to more easily express your problem. Apply a second optimizer to refine solutions.

## Multiobjective Optimization

Identify the Pareto front—the set of nondominated solutions—for problems with multiple objectives and bound, linear, or nonlinear constraints. Use either the pattern search or genetic algorithm solvers.

### Compare Solvers

Use the multiobjective pattern search algorithm to generate a Pareto front in fewer function evaluations than with the multiobjective genetic algorithm. The genetic algorithm may generate more widely spaced points.

### Select Pattern Search Options

Provide a set of initial points. Specify the desired Pareto set size, minimum polling fraction, and volume change tolerance. Automatically plot 2D and 3D Pareto fronts. Accelerate with parallel computing. |

### Set Genetic Algorithm Options

Specify the fraction of individuals to keep on the top-ranked Pareto front. Automatically plot 2D Pareto fronts. Accelerate with parallel computing. |

## Latest Features

### surrogateopt Solver

Solve time-consuming, bound-constrained optimization problems using fewer objective function evaluations

### paretosearch Multiobjective Solver

Find Pareto sets quickly and accurately for problems with bound, linear, or smooth nonlinear constraints

### Parallel Computation

Accelerate` surrogateopt`

and `paretosearch`

functions (using Parallel Computing Toolbox™)

See the release notes for details on any of these features and corresponding functions.

Global Optimization Toolbox™ 所提供的函数可为包含多个极大值或极小值的问题搜索全局解。该工具箱包含全局搜索、多初始点、模式搜索、遗传算法、多目标遗传算法、模拟退火求解器和粒子群求解器。对于目标函数或约束函数连续、不连续、随机、导数不存在以及包含仿真或黑箱函数的优化问题，都可使用这些求解器来求解。

可通过设置选项和自定义创建、更新和搜索函数来改进求解器效率。可以使用自定义数据类型，配合遗传算法和模拟退火求解器，来描绘采用标准数据类型不容易表达的问题。利用混合函数选项，可在第一个求解器之后应用第二个求解器来改进解算。