Home > freetb4matlab > ga > ga.m

ga

PURPOSE ^

% Find minimum of function using genetic algorithm.

SYNOPSIS ^

function [x fval exitflag output population scores] =ga (fitnessfcn_or_problem,

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn{Function File} {@var{x} =} ga (@var{fitnessfcn}, @var{nvars})
% @deftypefnx{Function File} {@var{x} =} ga (@var{fitnessfcn}, @var{nvars}, @var{A}, @var{b})
% @deftypefnx{Function File} {@var{x} =} ga (@var{fitnessfcn}, @var{nvars}, @var{A}, @var{b}, @var{Aeq}, @var{beq})
% @deftypefnx{Function File} {@var{x} =} ga (@var{fitnessfcn}, @var{nvars}, @var{A}, @var{b}, @var{Aeq}, @var{beq}, @var{LB}, @var{UB})
% @deftypefnx{Function File} {@var{x} =} ga (@var{fitnessfcn}, @var{nvars}, @var{A}, @var{b}, @var{Aeq}, @var{beq}, @var{LB}, @var{UB}, @var{nonlcon})
% @deftypefnx{Function File} {@var{x} =} ga (@var{fitnessfcn}, @var{nvars}, @var{A}, @var{b}, @var{Aeq}, @var{beq}, @var{LB}, @var{UB}, @var{nonlcon}, @var{options})
% @deftypefnx{Function File} {@var{x} =} ga (@var{problem})
% @deftypefnx{Function File} {[@var{x}, @var{fval}] =} ga (@dots{})
% @deftypefnx{Function File} {[@var{x}, @var{fval}, @var{exitflag}] =} ga (@dots{})
% @deftypefnx{Function File} {[@var{x}, @var{fval}, @var{exitflag}, @var{output}] =} ga (@dots{})
% @deftypefnx{Function File} {[@var{x}, @var{fval}, @var{exitflag}, @var{output}, @var{population}] =} ga (@dots{})
% @deftypefnx{Function File} {[@var{x}, @var{fval}, @var{exitflag}, @var{output}, @var{population}, @var{scores}] =} ga (@dots{})
% Find minimum of function using genetic algorithm.
%
% @strong{Inputs}
% @table @var
% @item fitnessfcn
% The objective function to minimize. It accepts a vector @var{x} of
% size 1-by-@var{nvars}, and returns a scalar evaluated at @var{x}.
% @item nvars
% The dimension (number of design variables) of @var{fitnessfcn}.
% @item options
% The structure of the optimization parameters; can be created using
% the @code{gaoptimset} function. If not specified, @code{ga} minimizes
% with the default optimization parameters.
% @item problem
% A structure containing the following fields:
% @itemize @bullet
% @item @code{fitnessfcn}
% @item @code{nvars}
% @item @code{Aineq}
% @item @code{Bineq}
% @item @code{Aeq}
% @item @code{Beq}
% @item @code{lb}
% @item @code{ub}
% @item @code{nonlcon}
% @item @code{randstate}
% @item @code{randnstate}
% @item @code{solver}
% @item @code{options}
% @end itemize
% @end table
%
% @strong{Outputs}
% @table @var
% @item x
% The local unconstrained found minimum to the objective function,
% @var{fitnessfcn}.
% @item fval
% The value of the fitness function at @var{x}.
% @end table
%
% @seealso{gaoptimset}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003