Function File: x = ga (fitnessfcn, nvars)
Function File: x = ga (fitnessfcn, nvars, A, b)
Function File: x = ga (fitnessfcn, nvars, A, b, Aeq, beq)
Function File: x = ga (fitnessfcn, nvars, A, b, Aeq, beq, LB, UB)
Function File: x = ga (fitnessfcn, nvars, A, b, Aeq, beq, LB, UB, nonlcon)
Function File: x = ga (fitnessfcn, nvars, A, b, Aeq, beq, LB, UB, nonlcon, options)
Function File: x = ga (problem)
Function File: [x, fval] = ga (…)
Function File: [x, fval, exitflag] = ga (…)
Function File: [x, fval, exitflag, output] = ga (…)
Function File: [x, fval, exitflag, output, population] = ga (…)
Function File: [x, fval, exitflag, output, population, scores] = ga (…)

Find minimum of function using genetic algorithm.

Inputs

fitnessfcn

The objective function to minimize. It accepts a vector x of size 1-by-nvars, and returns a scalar evaluated at x.

nvars

The dimension (number of design variables) of fitnessfcn.

options

The structure of the optimization parameters; can be created using the gaoptimset function. If not specified, ga minimizes with the default optimization parameters.

problem

A structure containing the following fields:

  • fitnessfcn
  • nvars
  • Aineq
  • Bineq
  • Aeq
  • Beq
  • lb
  • ub
  • nonlcon
  • randstate
  • randnstate
  • solver
  • options

Outputs

x

The local unconstrained found minimum to the objective function, fitnessfcn.

fval

The value of the fitness function at x.

See also: gaoptimset.

Package: ga