ConstraintTolerance |
Determines the feasibility with respect to nonlinear constraints. Also,max(sqrt(eps),ConstraintTolerance) determines feasibility with respect to linear constraints. For an options structure, useTolCon . |
Positive scalar |{1e-3} |
CreationFcn
|
I*Function that creates the initial population. Specify as a name of a built-in creation function or a function handle. SeePopulation Options. |
{'gacreationuniform'} |{'gacreationlinearfeasible'}* |Custom creation function
|
CrossoverFcn
|
I*Function that the algorithm uses to create crossover children. Specify as a name of a built-in crossover function or a function handle. SeeCrossover Options. |
{'crossoverscattered'} forga ,{'crossoverintermediate'}* forgamultiobj |'crossoverheuristic' |'crossoversinglepoint' |'crossovertwopoint' |'crossoverarithmetic' |Custom crossover function
|
CrossoverFraction
|
The fraction of the population at the next generation, not including elite children, that the crossover function creates. |
Positive scalar |{0.8} |
Display
|
Level of display. |
'off' |'iter' |'diagnose' |{'final'}
|
DistanceMeasureFcn
|
Function that computes distance measure of individuals. Specify as a name of a built-in distance measure function or a function handle. The value applies to decision variable or design space (genotype) or to function space (phenotype). The default'distancecrowding' is in function space (phenotype). Forgamultiobj only. SeeMultiobjective Options. For an options structure, use a function handle, not a name. |
{'distancecrowding'} means the same as{@distancecrowding,'phenotype'} |{@distancecrowding,'genotype'} |Custom distance function
|
EliteCount
|
NMPositive integer specifying how many individuals in the current generation are guaranteed to survive to the next generation. Not used ingamultiobj . |
Positive integer |{ceil(0.05*PopulationSize)} |{0.05*(default PopulationSize)} for mixed-integer problems |
FitnessLimit
|
NMIf the fitness function attains the value ofFitnessLimit , the algorithm halts. |
Scalar |{-Inf} |
FitnessScalingFcn
|
Function that scales the values of the fitness function. Specify as a name of a built-in scaling function or a function handle. Option unavailable forgamultiobj . |
{'fitscalingrank'} |'fitscalingshiftlinear' |'fitscalingprop' |'fitscalingtop' |Custom fitness scaling function
|
FunctionTolerance |
The algorithm stops if the average relative change in the best fitness function value overMaxStallGenerations generations is less than or equal toFunctionTolerance .IfStallTest is'geometricWeighted' , then the algorithm stops if theweightedaverage relative change is less than or equal toFunctionTolerance . Forgamultiobj , the algorithm stops when the geometric average of the relative change in value of the spread overoptions.MaxStallGenerations generations is less thanoptions.FunctionTolerance , and the final spread is less than the mean spread over the pastoptions.MaxStallGenerations generations. Seegamultiobj Algorithm. For an options structure, useTolFun . |
Positive scalar |{1e-6} forga ,{1e-4} forgamultiobj |
HybridFcn
|
I*Function that continues the optimization afterga terminates. Specify as a name or a function handle. Alternatively, a cell array specifying the hybrid function and its options. Seega Hybrid Function. Forgamultiobj , the only hybrid function is@fgoalattain .Seegamultiobj Hybrid Function. SeeWhen to Use a Hybrid Function. |
Function name or handle |'fminsearch' | 'patternsearch' | 'fminunc' | 'fmincon' | {[]} or 1-by-2 cell array |{@solver, hybridoptions} , wheresolver = fminsearch ,patternsearch ,fminunc , orfmincon {[]} |
InitialPenalty |
NMI*Initial value of penalty parameter |
Positive scalar |{10} |
InitialPopulationMatrix
|
Initial population used to seed the genetic algorithm. Has up toPopulationSize rows andN columns, whereN is the number of variables. You can pass a partial population, meaning one with fewer thanPopulationSize rows. In that case, the genetic algorithm usesCreationFcn to generate the remaining population members. SeePopulation Options For an options structure, useInitialPopulation . |
Matrix |{[]} |
InitialPopulationRange
|
Matrix or vector specifying the range of the individuals in the initial population. Applies togacreationuniform creation function.ga shifts and scales the default initial range to match any finite bounds. For an options structure, usePopInitRange . |
Matrix or vector |{[-10;10]} for unbounded components,{[-1e4+1;1e4+1]} for unbounded components of integer-constrained problems,{[lb;ub]} for bounded components, with the default range modified to match one-sided bounds. |
InitialScoresMatrix
|
I*Initial scores used to determine fitness. Has up toPopulationSize rows and hasNf columns, whereNf is the number of fitness functions (1 forga , greater than1 forgamultiobj ). You can pass a partial scores matrix, meaning one with fewer thanPopulationSize rows. In that case, the solver fills in the scores when it evaluates the fitness functions. For an options structure, useInitialScores . |
Column vector for single objective | matrix for multiobjective |{[]} |
MaxGenerations
|
Maximum number of iterations before the algorithm halts. For an options structure, useGenerations . |
Positive integer |{100*numberOfVariables} forga ,{200*numberOfVariables} forgamultiobj |
MaxStallGenerations
|
The algorithm stops if the average relative change in the best fitness function value overMaxStallGenerations generations is less than or equal toFunctionTolerance .IfStallTest is'geometricWeighted' , then the algorithm stops if the weighted average relative change is less than or equal toFunctionTolerance . Forgamultiobj , the algorithm stops when the geometric average of the relative change in value of the spread overoptions.MaxStallGenerations generations is less thanoptions.FunctionTolerance , and the final spread is less than the mean spread over the pastoptions.MaxStallGenerations generations. Seegamultiobj Algorithm. For an options structure, useStallGenLimit . |
Positive integer |{50} forga ,{100} forgamultiobj |
MaxStallTime
|
NMThe algorithm stops if there is no improvement in the objective function forMaxStallTime seconds, as measured bytic andtoc . For an options structure, useStallTimeLimit . |
Positive scalar| {Inf} |
MaxTime
|
The algorithm stops after running afterMaxTime seconds, as measured bytic andtoc .This limit is enforced after each iteration, soga can exceed the limit when an iteration takes substantial time. For an options structure, useTimeLimit . |
Positive scalar |{Inf} |
MigrationDirection |
Direction of migration. See迁移选项 |
'both' |{'forward'}
|
MigrationFraction |
Scalar from 0 through 1 specifying the fraction of individuals in each subpopulation that migrates to a different subpopulation. See迁移选项 |
Scalar |{0.2} |
MigrationInterval |
Positive integer specifying the number of generations that take place between migrations of individuals between subpopulations. See迁移选项. |
Positive integer |{20} |
MutationFcn
|
I*Function that produces mutation children. Specify as a name of a built-in mutation function or a function handle. SeeMutation Options. |
{'mutationgaussian'} forga ,{'mutationadaptfeasible'}* forgamultiobj |'mutationuniform' |Custom mutation function
|
NonlinearConstraintAlgorithm
|
Nonlinear constraint algorithm. SeeNonlinear Constraint Solver Algorithms.Option unchangeable forgamultiobj . For an options structure, useNonlinConAlgorithm . |
{'auglag'} forga ,{'penalty'} forgamultiobj
|
OutputFcn
|
Functions thatga calls at each iteration. Specify as a function handle or a cell array of function handles. SeeOutput Function Options. For an options structure, useOutputFcns . |
Function handle or cell array of function handles |{[]} |
ParetoFraction
|
Scalar from 0 through 1 specifying the fraction of individuals to keep on the first Pareto front while the solver selects individuals from higher fronts, forgamultiobj only. SeeMultiobjective Options. |
Scalar |{0.35} |
PenaltyFactor |
NMI*Penalty update parameter. |
Positive scalar |{100} |
PlotFcn
|
Function that plots data computed by the algorithm. Specify as a name of a built-in plot function, a function handle, or a cell array of built-in names or function handles. SeePlot Options. For an options structure, usePlotFcns . |
ga orgamultiobj :{[]} | 'gaplotdistance' | 'gaplotgenealogy' | 'gaplotselection' | 'gaplotscorediversity' |'gaplotscores' | 'gaplotstopping' | 'gaplotmaxconstr' | Custom plot function
ga only:'gaplotbestf' | 'gaplotbestindiv' | 'gaplotexpectation' | 'gaplotrange'
gamultiobj only:'gaplotpareto' | 'gaplotparetodistance' | 'gaplotrankhist' | 'gaplotspread'
|
PlotInterval |
Positive integer specifying the number of generations between consecutive calls to the plot functions. |
Positive integer |{1} |
PopulationSize
|
Size of the population. |
Positive integer |{50} whennumberOfVariables <= 5 ,{200} otherwise |{min(max(10*nvars,40),100)} for mixed-integer problems |
PopulationType
|
Data type of the population. Must be'doubleVector' for mixed integer problems. |
'bitstring' |'custom' |{'doubleVector'}
ga ignores all constraints whenPopulationType is set to'bitString' or'custom' .SeePopulation Options.
|
SelectionFcn
|
I*Function that selects parents of crossover and mutation children. Specify as a name of a built-in selection function or a function handle. gamultiobj uses only'selectiontournament' .
|
{'selectionstochunif'} forga ,{'selectiontournament'} forgamultiobj |'selectionremainder' |'selectionuniform' |'selectionroulette' |Custom selection function
|
StallTest |
NMStopping test type. |
'geometricWeighted' |{'averageChange'}
|
UseParallel |
Compute fitness and nonlinear constraint functions in parallel. SeeVectorize and Parallel Options (User Function Evaluation)andHow to Use Parallel Processing in Global Optimization Toolbox. |
true |{false}
|
UseVectorized
|
Specifies whether functions are vectorized. SeeVectorize and Parallel Options (User Function Evaluation)andVectorize the Fitness Function. For an options structure, useVectorized with the values'on' or'off' . |
true |{false}
|