FUNCTION REFERENCE

patternsearch

Find a minimum by generalized pattern search (derivative free).

Find a minimum by generalized pattern search (derivative free).

Syntax

[x, fval, exitflag, output] = patternsearch(fun, x0, A, b, Aeq, beq, lb, ub, nonlcon, options)

Arguments after x0 can be omitted or given as []. x keeps x0's shape.

Algorithm: generalized pattern search (Torczon 1997; Audet & Dennis 2003)

with the 2N positive basis [I -I], opportunistic polling (complete poll off),

mesh expansion 2 after a successful poll and contraction 0.5 after a failed

one. Bounds and linear constraints reject infeasible poll points; near active

linear constraints the poll set adds tangent-cone generators (Lewis & Torczon

2000) so the search can follow them. x0 is first moved into the bounds and

linear constraints by cyclic projections. nonlcon [c,ceq] is handled by a

quadratic penalty f + rho*(sum(max(c,0).^2) + sum(ceq.^2)) with rho = 10,

1e3, ... until ConstraintTolerance is met (MATLAB uses an augmented

Lagrangian instead). Options: InitialMeshSize (1), MeshTolerance (1e-6),

StepTolerance (1e-6), FunctionTolerance (1e-6), ConstraintTolerance (1e-6),

MaxIterations (100*n), MaxFunctionEvaluations (2000*n), Display. Exitflags:

1 mesh below MeshTolerance, 2 step and change in f below tolerances, 0

budget, -2 no feasible point. output has function, problemtype, pollmethod,

iterations, funccount, meshsize, maxconstraint and message. Differences from

MATLAB: iterates and evaluation counts differ (different internals); no

search methods, cache or output functions.

Example

[x,f]=patternsearch(@(x)(x(1)-1)^2+(x(2)+2)^2,[0 0])

Example

x=patternsearch(@(x)x(1)^2+x(2)^2,[3 3],[],[],[],[],[1 1],[5 5])

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.