Sie sind auf Seite 1von 21

Aide MATLab sur les algorithmes gntiques

1) Genetic algorithm tool

Fitness function is the objective function you want to minimize. You can specify the function as a function handle of the form @objfun, where objfun.m is an M-file that returns a scalar. Number of variables is the number of independent variables for the fitness function.

Constraints
Linear inequalities of the form A*x <= b are specified by the matrix A and the vector b. Linear equalities of the form Aeq*x = beq are specified by the matrix Aeq and the vector beq. Bounds are lower and upper bounds for the variables:

Lower = specifies lower bounds as a vector. Upper = specifies upper bounds as a vector.

Nonlinear constraint function defines the nonlinear constraints. You can specify the function as a function handle of the form @nonlcon, where nonlcon.m is an M-file that returns the vectors C and Ceq. The nonlinear equalities are of the form Ceq = 0, and the nonlinear inequalities are of the form C <= 0.

Plot Functions
Plot functions enable you to plot various aspects of the genetic algorithm as it is executing. Each one will draw in a separate axis on the display window. Use the Stop button on the window to interrupt a running process. Plot interval specifies the number of generations between successive updates of the plot. Best fitness plots the best function value in each generation versus iteration number. Expectation plots the expected number of children versus the raw scores at each generation. 1

Score diversity plots a histogram of the scores at each generation. Stopping plots stopping criteria levels. Best individual plots the vector entries of the individual with the best fitness function value in each generation. Genealogy plots the genealogy of individuals. Lines from one generation to the next are color-coded as follows: o Red lines indicate mutation children. o Blue lines indicate crossover children. o Black lines indicate elite individuals. Scores plots the scores of the individuals at each generation. Max constraint plots the maximum nonlinear constraint violation. Distance plots the average distance between individuals at each generation. Range plots the minimum, maximum, and mean fitness function values in each generation. Selection plots a histogram of the parents. This shows you which parents are contributing to each generation. Custom enables you to use your own plot function. Enter a function handle of the form @myplotfcn.

Population Options
Population options specify options for the population of the genetic algorithm. Population type specifies the type of the input to the fitness function. You can set Population type to be Double vector, or Bit string, or Custom. If you select Custom, you must write your own creation, mutation, and crossover functions that work with your population type, and specify these functions in the fields Creation function, Mutation function, and Crossover function, respectively. Population size specifies how many individuals there are in each generation. If you set Population size to be a vector of length greater than 1, the algorithm creates multiple subpopulations. Each entry of the vector specifies the size of a subpopulation. Creation function specifies the function that creates the initial population. The default creation function Uniform creates a random initial population with a uniform distribution. Custom enables you to provide your own creation function, which must generate data of the type that you specify in Population type. See in the online documentation to learn how to write a creation function. Initial population enables you to specify an initial population for the genetic algorithm. If you do not specify an initial population, the algorithm creates one using the Creation function. Initial scores enables you to specify scores for initial population. If you do not specify Initial scores, the algorithm computes the scores using the fitness function. Initial range specifies lower and upper bounds for the entries of the vectors in the initial population. You can specify Initial range as a matrix with 2 rows and Initial length columns. The first row contains lower bounds for the entries of the vectors in the initial population, while the second row contains upper bounds. If you specify Initial range as a 2-by-1 matrix, the two scalars are expanded to constant vectors of length Initial length.

Fitness Scaling Options


The scaling function converts raw fitness scores returned by the fitness function to values in a range that is suitable for the selection function. Scaling function specifies the function that performs the scaling. You can choose from the following functions:

scales the raw scores based on the rank of each individual, rather than its score. The rank of an individual is its position in the sorted scores. The rank of the fittest individual is 1, the next fittest is 2 and so on. Rank fitness scaling removes the effect of the spread of the raw scores. Proportional makes the expectation proportional to the raw fitness score. This strategy has weaknesses when raw scores are not in a "good" range. Top scales the individuals with the highest fitness values equally. If you select this option, you can specify Quantity, the number of fittest individuals that produce offspring. Quantity must be an integer between 1 and PopulationSize or a fraction between 0 and 1 specifying a fraction of the population size. Each of these individuals has an equal probability of reproducing. The rest have probability 0 of reproducing. The expectation has the form [ 0 1/n 1/n 0 0 1/n 0 0 1/n ...]. Shift linear - The function scales the raw scores so that the expectation of the fittest individual is equal to a constant, which you can specify as Maximum survival rate, multiplied by the average score. Custom enables you to write you own scaling function.
Rank

Selection Options
The selection function chooses parents for the next generation based on their scaled values from the fitness scaling function. You can specify the function that performs the selection in the Selection function field. You can choose from the following functions:

lays out a line in which each parent corresponds to a section of the line of length proportional to its expectation. The algorithm moves along the line in steps of equal size, one step for each parent. At each step, the algorithm allocates a parent from the section it lands on. The first step is a uniform random number less than the step size. Remainder assigns parents deterministically from the integer part of each individual's scaled value and then uses roulette selection on the remaining fractional part. Uniform select parents at random from a uniform distribution using the expectations and number of parents. This results in an undirected search. Uniform selection is not a useful search strategy, but you can use it to test the genetic algorithm. Roulette simulates a roulette wheel with the area of each segment proportional to its expectation. The algorithm then uses a random number to select one of the sections with a probability equal to its area. Tournament - The function selects each parent by choosing individuals at random, the number of which you can specify by TournamentSize, and then choosing the best individual out of that set to be a parent. Custom enables you to write you own selection function.
Stochastic uniform

Reproduction Options
Reproduction options determine how the genetic algorithm creates children at each new generation. Elite count specifies the number of individuals that are guaranteed to survive to the next generation. Set Elite count to be a positive integer less than or equal to Population Size. Crossover fraction specifies the fraction of the next generation, other than elite individuals, that are produced by crossover. The remaining individuals, other than elite individuals, in the next generation are produced by mutation. Set Crossover fraction to be a fraction between 0 and 1, either by entering the fraction in the text box or moving the slider.

Mutation Options
Mutation functions make small random changes in the individuals in the population, which provide genetic diversity and enable the GA to search a broader space. You can specify the function that performs the mutation in the Mutation function field. You can choose from the following functions: 3

adds a random number to each vector entry of an individual. This random number is taken from a Gaussian distribution centered on zero. The variance of this distribution can be controlled with two parameters. The Scale parameter determines the variance at the first generation. The Shrink parameter controls how variance shrinks as generations go by. If the Shrink parameter is 0, the variance is constant. If the Shrink parameter is 1, the variance shrinks to 0 linearly as the last generation is reached. Uniform is a two-step process. First, the algorithm selects a fraction of the vector entries of an individual for mutation, where each entry has a probability of MutationRate of being mutated. In the second step, the algorithm replaces each selected entry by a random number selected uniformly from the range for that entry. Adaptive feasible randomly generates directions that are adaptive with respect to the last successful or unsuccessful generation. A step length is chosen along each direction so that linear constraints and bounds are satisfied. Custom enables you to write you own mutation function that satisfies any constraints specified.
Gaussian

Crossover Options
Crossover combines two individuals, or parents, to form a new individual, or child, for the next generation. You can specify the function that performs the crossover in the Crossover function field. You can choose from the following functions:

creates a random binary vector. It then selects the genes where the vector is a 1 from the first parent, and the genes where the vector is a 0 from the second parent, and combines the genes to form the child. For example,
Scattered

p1 = [a b c d e f g h] p2 = [1 2 3 4 5 6 7 8] random crossover vector = [1 1 0 0 1 0 0 0] child = [a b 3 4 e 6 7 8]

chooses a random integer n between 1 and Number of variables, and selects the vector entries numbered less than or equal to n from the first parent, selects genes numbered greater than n from the second parent, and concatenates these entries to form the child. For example,
Single point

p1 = [a b c d e f g h] p2 = [1 2 3 4 5 6 7 8] crossover point (at random) = 3 child = [a b c 4 5 6 7 8]

selects two random integers m and n between 1 and Number of variables. The algorithm selects genes numbered less than or equal to m from the first parent, selects genes numbered from m+1 to n from the second parent, and selects genes numbered greater than n from the first parent. The algorithm then concatenates these genes to form a single gene. For example,
Two point

p1 = [a b c d e f g h] p2 = [1 2 3 4 5 6 7 8] crossover points (at random) = 3,6 child = [a b c 4 5 6 g h]

creates children by a weighted average of the parents. Intermediate crossover is controlled by a single parameter Ratio:
Intermediate

child1 = parent1 + rand * Ratio * ( parent2 - parent1) If Ratio is in the range [0,1] then the children produced are within the hypercube defined by the parents locations at opposite vertices. 4

If Ratio is in a larger range, say 1.1 then children can be generated outside the hypercube. Ratio can be a scalar or a vector of length Number of variables. If Ratio is a scalar, then all of the children will lie on the line between the parents. If Ratio is a vector then children can be any point within the hypercube.

creates children that lie on the line containing the two parents, a small distance away from the parent with the better fitness value in the direction away from the parent with the worse fitness value. Arithmetic creates children that are the weighted arithmetic mean of two parents. Children are feasible with respect to linear constraints and bounds. Custom enables you to write you own crossover function that satisfies any constraints specified.
Heuristic

Migration Options
Migration is the movement of individuals between subpopulations, which the algorithm creates if you set Population size to be a vector of length greater than 1. Every so often, the best individuals from one subpopulation replace the worst individuals in another subpopulation. You can control how migration occurs by the following three parameters. Direction - Migration can take place in one direction or two.

If you set Direction to Forward, migration takes place toward the last subpopulation. That is the nth subpopulation migrates into the (n+1)'th subpopulation. If you set Direction to Both, the nth subpopulation migrates into both the (n-1)th and the (n+1)th subpopulation.

Migration wraps at the ends of the subpopulations. That is, the last subpopulation migrates into the first, and the first may migrate into the last. To prevent wrapping, specify a subpopulation of size zero. Fraction controls how many individuals move between subpopulations. Fraction is the fraction of the smaller of the two subpopulations that moves. If individuals migrate from a subpopulation of 50 individuals into a population of 100 individuals and Fraction is 0.1, 5 individuals (0.1 * 50) migrate. Individuals that migrate from one subpopulation to another are copied. They are not removed from the source subpopulation. Interval controls how many generations pass between migrations. If you set Interval to 20, for example, migration between subpopulations takes place every 20 generations.

Algorithm Settings
Algorithm settings define algorithmic specific parameters. Nonlinear Constraint Algorithm: Initial Penalty specifies an initial value to be used by the algorithm.Initial Penalty must be greater than or equal to 1. Penalty Factor increases the penalty parameter when the problem is not solved to required accuracy and constraints are not satisfied. Penalty Factor must be greater than 1.

Hybrid Function Options


Hybrid Function enables you to specify another minimization function that runs after the genetic algorithm terminates. The choices are
None fminsearch (unconstrained only) patternsearch fminunc (unconstrained only)

fmincon

(constrained only)

Stopping Criteria Options


Stopping criteria determine what causes the algorithm to terminate. Generations specifies the maximum number of iterations the genetic algorithm performs. Time limit specifies the maximum time in seconds the genetic algorithm runs before stopping. Fitness limit - If the best fitness value is less than or equal to the value of Fitness limit, the algorithm stops. Stall generations - If the weighted average change in the fitness function value over Stall Generations is less than Function Tolerance, the algorithm stops. Stall time limit - If there is no improvement in the best fitness value for an interval of time in seconds specified by Stall time limit, the algorithm stops. Function tolerance - If the cumulative change in the fitness function value over Stall Generations is less than Function Tolerance, the algorithm stops. Nonlinear constraint tolerance specifies the termination tolerance for the maximum nonlinear constraint violation.

Output Function Options


History to new window outputs the iterative history of the algorithm to a separate window. Interval specifies the number of generations between successive outputs. Custom enables you to write you own output function.

Display to Command Window Options


Level of display specifies the amount of information displayed in the MATLAB Command Window when you run the genetic algorithm. You can choose from the following options: Off - No output is displayed. Iterative - Information is displayed at each iteration of the algorithm. Diagnose - Information is displayed at each iteration. In addition, the diagnostic lists some problem information and the options that are changed from the defaults. Final - The reason for stopping is displayed.

Vectorize Option
The vectorize option specifies whether the computation of the fitness function is vectorized. Set Objective function is vectorized to On to indicate that the fitness function is vectorized.When Objective function is vectorized is Off, the algorithm calls the fitness function on one individual at a time as it loops through the population.

Traduction
Fonction est la fonction objectif que vous souhaitez rduire. Vous pouvez spcifier la fonction de faire en fonction de la forme @ objfun, o objfun.m est un M-file qui renvoie un scalaire. 6

Nombre de variables est le nombre de variables indpendantes de la fonction de remise en forme. Contraintes Ingalits linaires de la forme A * x <= b sont dfinis par la matrice A et le vecteur b. Linear galits de la forme Aeq * x = BEQ sont spcifies par la matrice et le vecteur Aeq BEQ. Bounds sont limites infrieure et suprieure pour les variables: Basse = spcifie lower bounds comme un vecteur. Upper = spcifie limites suprieures comme un vecteur. Nonlinear contrainte dfinit la fonction de contraintes non-linaires. Vous pouvez spcifier la fonction de faire en fonction de la forme @ nonlcon, o nonlcon.m est un M-file qui renvoie les vecteurs C et CEQ. Les ingalits sont non-linaires de la forme CEQ = 0, et les ingalits sont non-linaires de la forme C <= 0. Terrain Fonctions Terrain fonctions vous permettent de tracer les diffrents aspects de l'algorithme gntique car il est excut. Chacun fera appel un axe sur la fentre d'affichage. Utilisez le bouton Stop de la fentre d'interrompre un processus en cours. Terrain intervalle spcifie le nombre de gnrations entre les mises jour successives de l'intrigue. Meilleure aptitude des parcelles de la meilleure valeur en fonction de chaque gnration par nombre d'itration. Expectation parcelles le nombre d'enfants par les scores bruts chaque gnration. Score diversit des parcelles d'un histogramme des scores obtenus chaque gnration. Arrter de parcelles d'arrter les critres les niveaux. Best parcelles individuelles le vecteur des entres de l'individu avec la meilleure valeur en fonction de l'aptitude de chaque gnration. Gnalogie des parcelles de la gnalogie des individus. Lignes d'une gnration l'autre sont de couleur comme suit: Les lignes rouges indiquent mutation enfants. Les lignes bleues indiquent crossover enfants. Lignes noires indiquent les individus d'lite. Partitions parcelles les scores des individus chaque gnration. Max parcelles de la contrainte maximale nonlinear violation de contrainte. Distance des parcelles de la distance moyenne entre les individus chaque gnration. Gamme de parcelles minimum, maximum, moyenne et de valeurs de fonction de remise en forme chaque gnration. Slection des parcelles d'un histogramme des parents. Cela vous montre que les parents contribuent chaque gnration. Custom vous permet d'utiliser votre propre fonction de la parcelle. Entrez une fonction traiter de la forme @ myplotfcn. Population Options Population options de spcifier les options pour la population de l'algorithme gntique. Population type spcifie le type de l'entre la fonction de remise en forme. Vous pouvez dfinir le type de population double vecteur, ou la chane de bits, ou Custom. Si vous choisissez Personnalis, vous devez crire votre propre cration, de mutation et de croisement des fonctions qui fonctionnent avec votre type de population, et de prciser ces fonctions dans les domaines de cration fonction, la fonction de mutation, et la fonction de coupure, respectivement. La taille de la population prcise combien de personnes il ya dans chaque gnration. Si vous dfinissez la population de la taille d'un vecteur de longueur suprieure 1, l'algorithme cre plusieurs sous-populations. Chaque entre du vecteur prcise de la taille d'une sous-population. Cration fonction prcise de la fonction qui cre la population initiale. Par dfaut, la cration d'uniforme cre une fonction alatoire population initiale avec une distribution uniforme. Custom vous permet de vous fournir votre propre fonction de cration, qui doit gnrer des donnes du type que vous indiquez dans la population type. Voir dans la documentation en ligne pour apprendre crire une fonction de cration. Population initiale vous permet de spcifier une population initiale de l'algorithme gntique. Si vous ne spcifiez pas une population initiale, l'algorithme cre un en utilisant la fonction de cration. Les premires notes vous permet de spcifier les valuations initiales de la population. Si vous ne spcifiez pas les valuations initiales, l'algorithme calcule les scores en utilisant la fonction de remise en forme. Initial gamme prcise limites infrieure et suprieure pour les entres des vecteurs de la population initiale. Vous pouvez spcifier initiale gamme comme une matrice de 2 lignes et les colonnes de longueur initiale. La premire ligne contient des limites infrieures pour les entres des vecteurs de la population initiale, tandis que la seconde 7

contient limites suprieures. Si vous spcifiez un nombre initial 2-en-1 matrix, les deux scalaires sont tendues des vecteurs de longueur longueur initiale. Fitness Scaling Options La fonction convertit l'chelle de fitness scores bruts renvoy par la fonction de remise en forme des valeurs dans une gamme qui convient la fonction de slection. Scaling fonction prcise de la fonction qui effectue la plus grande chelle. Vous pouvez choisir parmi les fonctions suivantes: Classement des chelles de notes brutes sur la base du rang de chaque individu, plutt que de son client. Le rang d'un individu est sa position dans le tris scores. Le rang du plus fort est de 1 personne, la prochaine est fort 2 et ainsi de suite. Classement fitness chelle supprime l'effet de la propagation de la crue scores. Proportional fait proportionnelle l'attente de la crue de fitness score. Cette stratgie a des faiblesses lors de rsultats bruts ne sont pas dans une "bonne" srie. Haut de la balance des individus avec la plus grande aptitude des valeurs gales. Si vous slectionnez cette option, vous pouvez spcifier la quantit, le nombre de personnes qui produisent de forts progniture. Quantit doit tre un entier compris entre 1 et PopulationSize ou d'une fraction entre 0 et 1 indiquant qu'une fraction de la taille de la population. Chacun de ces individus a une probabilit gale de se reproduire. Les autres ont probabilit 0 de se reproduire. L'attente a la forme [0 1 / n 1 / n 0 0 1 / 0 0 1 n / n ...]. Shift linaire - Les chelles de la fonction de scores bruts de sorte que les attentes de l'individu est fort gal une constante, qui vous permet de spcifier que le taux de survie maximum, multipli par la moyenne. Custom vous permet d'crire votre propre fonction de l'chelle. Options de slection La fonction de slection choisit les parents pour la prochaine gnration sur la base de leur chelle de valeurs de la fonction de remise en forme d'chelle. Vous pouvez spcifier la fonction qui effectue la slection dans la fonction de slection du domaine. Vous pouvez choisir parmi les fonctions suivantes: Stochastic uniforme nonce une ligne dans laquelle chaque parent correspond une section de la ligne de longueur proportionnelle son attente. L'algorithme se dplace le long de la ligne en pas de mme taille, un pas pour chaque parent. A chaque tape, l'algorithme attribue un parent de la section, il atterrit sur. La premire tape est un nombre alatoire uniforme infrieure la taille de l'tape. Reste parents ayants dterministe de la partie de chaque chelle de valeur, puis utilise la roulette de slection sur les autres partie fractionnaire. Uniforme de slectionner au hasard les parents partir d'une distribution uniforme en utilisant les attentes et le nombre de parents. Il en rsulte une recherche non dirige. Uniforme de la slection n'est pas une bonne stratgie de recherche, mais vous pouvez l'utiliser pour tester l'algorithme gntique. Roulette simule une roulette avec la surface de chaque segment proportionnel ses attentes. L'algorithme utilise ensuite un nombre alatoire pour slectionner l'une des sections, avec une probabilit gale sa rgion. Tournoi - La fonction slectionne chaque parent par le choix des individus au hasard, le nombre de laquelle vous pouvez indiquer par TournamentSize, puis choisir la meilleure personne qui est prt tre un parent. Custom vous permet d'crire votre propre fonction de slection. Reproduction Options Reproduction de dterminer comment les options algorithme gntique cre des enfants, chaque nouvelle gnration. Elite count indique le nombre de personnes qui sont garantis survivre la prochaine gnration. Set Elite compter pour tre un nombre entier positif infrieur ou gal la taille de la population. Crossover fraction prcise de la fraction de la gnration suivante, les personnes autres que les lites, qui sont produites par croisement. Le reste des personnes, autres que les individus d'lite, dans la prochaine gnration sont fabriqus par mutation. Set Crossover fraction une fraction entre 0 et 1, soit par l'entre de la fraction dans la zone de texte ou de dplacer le curseur. Mutation Options Mutation fonctions de faire de petits changements alatoires dans les individus de la population, qui fournissent la diversit gntique et de permettre l'AG de la recherche un plus large espace. Vous pouvez spcifier la fonction qui effectue la mutation dans le domaine de la fonction de mutation. Vous pouvez choisir parmi les fonctions suivantes: Gaussien ajoute un nombre alatoire chaque vecteur d'entre d'un individu. Ce nombre alatoire est tir d'une distribution gaussienne centre sur zro. La variation de cette rpartition peut tre contrl avec deux paramtres. Le paramtre d'chelle dtermine l'cart lors de la premire gnration. Le paramtre contrle Shrink cart se rtrcit la 8

manire dont les gnrations passent. Si le paramtre Shrink est 0, la variance est constante. Si le paramtre est Rtractable 1, l'cart rtrcit 0 linairement comme la dernire gnration est atteint. Uniforme est un processus en deux tapes. Tout d'abord, l'algorithme slectionne une fraction du vecteur des entres d'un individu de mutation, o chaque entre a une probabilit d'MutationRate d'tre mut. Dans la deuxime tape, l'algorithme remplace chaque entre slectionne au hasard par un nombre choisi de manire uniforme partir de la gamme pour cette entre. Adaptive possible gnre alatoirement directions qui sont adaptes l'gard de la dernire gnration de succs ou de l'chec. Un pas en longueur est choisie le long de chaque direction linaire de sorte que les contraintes et les limites sont respectes. Custom vous permet de vous crire propre mutation fonction qui satisfait toutes les contraintes spcifies. Crossover Options Crossover combine deux individus, ou des parents, pour former un nouvel individu, ou de l'enfant, pour la prochaine gnration. Vous pouvez spcifier la fonction qui effectue la liaison dans le domaine de la fonction de coupure. Vous pouvez choisir parmi les fonctions suivantes: Scattered cre un vecteur binaire alatoire. Il slectionne ensuite les gnes, o le vecteur est un 1 partir du premier parent, les gnes et o le vecteur est un 0 partir du deuxime parent, les gnes et les combine pour former l'enfant. Par exemple, p1 = [ABCDEFGH] p2 = [1 2 3 4 5 6 7 8] vecteur alatoire crois = [1 1 0 0 1 0 0 0] = enfant [ab 3 4 e 6 7 8] Seul point choisit un nombre entier alatoire entre 1 et n Nombre de variables, et slectionne le vecteur des entres numrotes infrieur ou gal n de la premire des parents, de choisir les gnes de plus de n numrotes partir de la deuxime parent, et concatne ces entres de formulaire de l'enfant . Par exemple, p1 = [ABCDEFGH] p2 = [1 2 3 4 5 6 7 8] croisement (au hasard) = 3 = enfant [abc 4 5 6 7 8] Deux point alatoire choisit deux entiers m et n entre 1 et le nombre de variables. L'algorithme slectionne les gnes numrots infrieur ou gal m de la premire parent, numrotes de gnes choisit m +1 n de la deuxime parent, numrotes et slectionne les gnes de plus de n de la premire de ses parents. L'algorithme puis concatne ces gnes pour former un seul gne. Par exemple, p1 = [ABCDEFGH] p2 = [1 2 3 4 5 6 7 8] crossover points (au hasard) = 3,6 enfant = [abc gh 4 5 6] Cre par l'intermdiaire des enfants d'une moyenne pondre des parents. Intermdiaire de liaison est contrle par un seul paramtre Ratio: child1 = rand parent1 + Ratio * * (parent2 - parent1) Si le ratio est dans l'intervalle [0,1], puis les enfants sont produites au sein de l'hypercube dfinis par les parents face l'endroits des sommets. Si le ratio est un plus grand nombre, par exemple 1.1 puis les enfants peuvent tre gnrs l'extrieur de l'hypercube. Ratio peut tre un scalaire ou un vecteur de longueur Nombre de variables. Si le ratio est un scalaire, puis tous les enfants se trouvent sur la ligne entre les parents. Si le ratio est un vecteur alors les enfants peuvent tre n'importe quel point dans le hypercube. Heuristic cre les enfants qui se trouvent sur la ligne contenant les deux parents, une petite distance de la mre avec la meilleure valeur de remise en forme dans le sens loin de la mre la pire valeur de remise en forme. Arithmetic cre les enfants qui sont la moyenne arithmtique pondre des deux parents. Les enfants sont possibles l'gard des contraintes linaires et de limites. Custom vous permet d'crire votre propre fonction de filtre qui satisfait toutes les contraintes spcifies. Migration Options La migration est la circulation des personnes entre les sous-populations, dont l'algorithme cre si vous dfinissez la population de la taille d'un vecteur de longueur suprieure 1. Tout aussi souvent, les meilleures personnes d'un sousremplacer le pire des individus dans un autre sous-population. Vous pouvez contrler la faon dont la migration se fait par trois paramtres suivants. Direction - Les migrations peuvent avoir lieu dans un sens ou deux. Si vous dfinissez Direction de l'avant, la migration a lieu vers la dernire sous-population. C'est la nime sous migre dans le (n +1) 'e sous-population. Si vous dfinissez la fois de direction, sous la nime fois dans la migration (n-1) et e (n +1) e sous-population. Migration enveloppe l'extrmit des sous-populations. C'est sous le dernier migre dans le premier, et le premier mai de migrer dans la dernire. Pour viter d'emballage, de spcifier un sous-taille zro. Fraction contrle le nombre de personnes se dplacent entre sous-populations. Fraction est la fraction de la plus petite des deux sous-ce qui bouge. Si des personnes de migrer partir d'un sous de 50 individus dans une population de 100 individus et fraction est de 0,1, 5 personnes (0,1 * 50) migrer. Les personnes qui migrent d'un sous l'autre sont copis. Ils ne sont pas supprims de la source sous-population. 9

Intervalle de contrle le nombre de gnrations passent entre migrations. Si vous dfinissez l'intervalle 20, par exemple, la migration a lieu entre les sous toutes les 20 gnrations. Algorithme Paramtres Algorithme de dfinir les paramtres des algorithmes de paramtres spcifiques. Nonlinear Constraint Algorithme: Amende initiale spcifie une valeur initiale utiliser par les algorithm.Initial Peine doit tre suprieur ou gal 1. Peine de facteur augmente la peine de paramtre lorsque le problme n'est pas rsolu la prcision requise et les contraintes ne sont pas remplies. Peine de facteur doit tre suprieur 1. Hybrid Fonction Options Hybrid Fonction vous permet de spcifier une autre fonction que de minimisation des pistes aprs l'algorithme gntique se termine. Les choix sont Aucun fminsearch (illimit uniquement) patternsearch fminunc (illimit uniquement) fmincon (limit seulement) Critres d'arrt Options Arrter de critres dterminent les causes de l'algorithme de rsiliation. Generations spcifie le nombre maximal d'itrations de l'algorithme gntique se produit. Spcifie le dlai maximum de temps en secondes, l'algorithme gntique fonctionne avant de s'arrter. Limite de remise en forme - Si la meilleure forme physique est la valeur infrieure ou gale la valeur limite de remise en forme, l'algorithme s'arrte. Dcrochage gnrations - Si la moyenne pondre des changements dans la valeur de la fonction de remise en forme sur des gnrations de dcrochage est infrieure la fonction de tolrance, l'algorithme s'arrte. Dcrochage dlai - S'il n'ya pas d'amlioration dans la meilleure forme physique pour un intervalle de temps en secondes spcifi par Stall dlai, l'algorithme s'arrte. Fonction de la tolrance - Si la variation cumule de la valeur de la fonction de l'aptitude des gnrations de plus de dcrochage est infrieure la fonction de tolrance, l'algorithme s'arrte. Nonlinear contrainte de tolrance prcise la fin de tolrance maximale pour la violation de contrainte non-linaire. Options de sortie de fonction Histoire d'une nouvelle fentre affiche le itratif l'histoire de l'algorithme une fentre spare. Intervalle de spcifier le nombre de gnrations entre les sorties successives. Custom vous permet d'crire votre propre fonction de sortie. Affichage de la fentre Options de commande Niveau de visualisation prcise de la quantit d'informations affiches dans la fentre de commande MATLAB, lorsque vous lancez l'algorithme gntique. Vous pouvez choisir parmi les options suivantes: Off - Aucune sortie n'est affiche. Iterative - L'information est affiche chaque itration de l'algorithme. Diagnose - L'information est affiche chaque itration. En outre, les listes de diagnostic des problmes d'information et les options qui sont modifis partir de la valeur par dfaut. Final - La raison de l'arrt est affich. Vectorise Option Le vectorize option spcifie si le calcul de la fonction est vectoris. Dfinir l'objectif de la fonction est vectoris pour indiquer que la fonction est vectorized.When objectif est vectoris fonction est dsactive, l'algorithme appelle la fonction de remise en forme sur un individu un moment o il boucle travers la population.

10

2) Pattern search tool

Objective function is the function you want to minimize. You must enter an objective function. You can specify the function as a function handle of the form @objfun, where objfun.m is an M-file that returns a scalar function value. Start point is the initial point for the pattern search. You must enter a start point.

Constraints
Linear inequalities of the form A*x <= b are specified by the matrix A and the vector b. Linear equalities of the form Aeq*x = beq are specified by the matrix Aeq and the vector beq. Bounds are lower and upper bounds for the variables:

Lower = specifies lower bounds as a vector. Upper = specifies upper bounds as a vector.

Nonlinear constraint function defines the nonlinear constraints. You can specify the function as a function handle of the form @nonlcon, where nonlcon.m is an M-file that returns the vectors C and Ceq. The nonlinear equalities are of the form Ceq = 0, and the nonlinear inequalities are of the form C <= 0.

Plot Functions
Plot functions plot output from the pattern search at each iteration. The following plots are available: Best function value plots the best objective function value at each multiple of Interval iterations. Mesh size plots the mesh size at each multiple of Interval iterations. Function count plots the number of function evaluations at each multiple of Interval iterations. Best point plots the best point at each multiple of Interval iterations. Max constraint plots the maximum nonlinear constraint violation. Custom enables you to use your own plot function. 11

Poll Options
Poll options control how the pattern search polls the mesh points. These options depend on which class of algorithms is used - generalized pattern search algorithms, GPS, or mesh adaptive direct search algorithms, MADS. Poll method specifies which method the poll algorithm uses to create the mesh. The options are
GPS Positive basis 2N GPS Positive basis Np1 MADS Positive basis 2N MADS Positive basis Np1

Complete poll specifies whether all the points in the current mesh are polled at each iteration. Polling order specifies the order in which the GPS method searches the points in the current mesh. The options are
Consecutive Random Success

Note: the value of this option also specifies the search order when a GPS method is selected as a Search method.

Search Options
Search options specify an optional search that the algorithm can perform at each iteration prior to the polling. If the search returns a point that improves the objective function, the algorithm uses that point at the next iteration and omits the polling. Search method specifies the method of the search. The options are
None GPS Positive basis 2N GPS Positive basis Np1 MADS Positive basis 2N MADS Positive basis Np1 Genetic Algorithm Latin hypercube Nelder-Mead Custom

Complete search specifies whether all the points must be searched at each iteration.Complete search only applies when you set Search method to GPS Positive basis Np1, GPS Positive basis 2N, MADS Positive basis Np1, MADS Positive basis 2N, or Latin hypercube.

Mesh Options
Mesh options control the mesh that the pattern search uses. Initial size specifies the size of the initial mesh, which is the length of the vector from the initial point to a mesh point. Initial size should be a positive scalar. Max size specifies a maximum size for the mesh. When the maximum size is reached, the mesh size no longer increases after a successful iteration. Max size is a positive scalar and is only used when the GPS algorithm is selected as the Poll or Search method. 12

Accelerator specifies whether the Mesh contraction factor is multiplied by 0.5 after each unsuccessful iteration. Rotate specifies whether the mesh vectors are multiplied by -1 when the mesh size is less than a small value. Scale mesh specifies whether the algorithm scales the mesh points by multiplying the pattern vectors by constants. Expansion factor specifies the factor by which the mesh size is increased after an successful poll. Expansion factor must be a positive scalar and is only used when a GPS method is selected as the Poll or Search method. Contraction factor specifies the factor by which the mesh size is decreased after an unsuccessful poll. Contraction factor must be a positive scalar and is only used when the GPS method is selected as the Poll or Search method.

Algorithm Settings
Algorithm settings define algorithmic specific parameters. Nonlinear Constraint Algorithm: Initial Penalty specifies an initial value to be used by the algorithm.Initial Penalty must be greater than or equal to 1. Penalty Factor increases the penalty parameter when the problem is not solved to required accuracy and constraints are not satisfied. Penalty Factor must be greater than 1.

Cache Options
Cache options control how the pattern search uses a cache. Cache specifies whether a cache is used. When you set Cache to On, the algorithm does not evaluate the objective function at any mesh points that are within Tolerance of a point in the cache. Tolerance specifies how close a mesh point must be to a point in the cache for the algorithm to omit polling it.Tolerance must be a positive scalar. Size specifies the size of the cache, which must be a positive scalar.

Stopping Criteria Options


Stopping criteria determine what causes the pattern search algorithm to stop. Mesh tolerance specifies the minimum tolerance for mesh size. Max iteration specifies the maximum number of iterations the algorithm performs. Max function evaluations specifies the maximum number of evaluations of the objective function. Time Limit specifies the maximum time in seconds the pattern search algorithm runs before stopping. Bind tolerance specifies the minimum tolerance for the distance from the current point to the boundary of the feasible region. X Tolerance specifies the minimum distance between the current points at two consecutive iterations. Function tolerance specifies the termination tolerance for the objective function value. 13

Nonlinear constraint tolerance specifies the termination tolerance for the maximum nonlinear constraint violation.

Output Function Options


Output functions are functions that the pattern search algorithm calls at each iteration. The following options are available: History to new window returns the history of points computed by the algorithm at each multiple of Interval iterations. Custom enables you to write your own output function.

Display to Command Window Options


Level of display specifies the amount of information displayed in the MATLAB Command Window while the pattern search is running. You can choose from the following options: Off - No output is displayed. Iterative - Information is displayed at each iteration of the algorithm. Diagnose - Information is displayed at each iteration. In addition, the diagnostic lists some problem information and the options that are changed from the defaults. Final - The reason for stopping is displayed.

Vectorize Options
Objective function is vectorized specifies whether the computation of the objective function is vectorized. When Objective function is vectorized is Off, the algorithm calls the objective function on one point at a time as it loops through all of the mesh points.When Objective function is vectorized is On, the pattern search algorithm calls the objective function on all the points in the mesh at once, i.e. - in a single call to the objective function if either Complete Poll or Complete Search is On.

Traduction
Fonction objective est la fonction que vous souhaitez afin de rduire au minimum. Vous devez entrer une fonction objective. Vous pouvez spcifier la fonction de faire en fonction de la forme @ objfun, o objfun.m est un M-file qui renvoie une valeur scalaire fonction. Point de dpart est le point de dpart pour le modle de recherche. Vous devez entrer un point de dpart. Contraintes Ingalits linaires de la forme A * x <= b sont dfinis par la matrice A et le vecteur b. Linear galits de la forme Aeq * x = BEQ sont spcifies par la matrice et le vecteur Aeq BEQ. Bounds sont limites infrieure et suprieure pour les variables: Basse = spcifie lower bounds comme un vecteur. Upper = spcifie limites suprieures comme un vecteur. Nonlinear contrainte dfinit la fonction de contraintes non-linaires. Vous pouvez spcifier la fonction de faire en fonction de la forme @ nonlcon, o nonlcon.m est un M-file qui renvoie les vecteurs C et CEQ. Les ingalits sont non-linaires de la forme CEQ = 0, et les ingalits sont non-linaires de la forme C <= 0. Terrain Fonctions Terrain fonctions plot de sortie du modle de recherche chaque itration. Les parcelles suivantes sont disponibles: Meilleure fonction de la valeur des parcelles de la meilleure valeur la fonction objective de chaque intervalle de plusieurs itrations. Maillage parcelles du maillage chaque intervalle de multiples itrations. Fonction compter le nombre de parcelles de la fonction des valuations chaque multiple de l'intervalle itrations. Best point les meilleures parcelles, chaque point de l'intervalle de plusieurs itrations. Max parcelles de la contrainte maximale nonlinear violation de contrainte. Custom vous permet d'utiliser votre propre fonction de la parcelle. Poll Options Sondage options contrlent le mode de recherche le maillage des points de sondages. Ces options dpendent de la 14

classe d'algorithmes est utilis - modle gnralis d'algorithmes de recherche, GPS, ou de maillage adaptatif directe d'algorithmes de recherche, MADS. Sondage mthode prcise de la mthode du sondage algorithme utilise pour crer le maillage. Les options sont GPS positifs base 2N GPS positifs base NP1 MADS positifs base 2N MADS positifs base NP1 Complet sondage prcise que tous les points de l'actuel maillage sont interroges chaque itration. Bureaux de vote afin prcise l'ordre dans lequel les coordonnes GPS des points de la mthode de recherche dans le maillage. Les options sont Conscutive Random Success Note: la valeur de cette option spcifie galement l'ordre de recherche d'un GPS mode est slectionn en tant que mthode de recherche. Options de recherche Options de recherche spcifier une option de recherche que l'algorithme peut effectuer chaque itration avant le scrutin. Si la recherche retourne un point qui permet d'amliorer la fonction objectif, l'algorithme utilise ce point lors de la prochaine itration et omet les bureaux de vote. Mthode de recherche prcise la mthode de la recherche. Les options sont Aucun GPS positifs base 2N GPS positifs base NP1 MADS positifs base 2N MADS positifs base NP1 Genetic Algorithm Hypercube latin Nelder-Mead Personnalis Complet de recherche prcise si tous les points doivent tre recherches chaque iteration.Complete de recherche ne s'applique que lorsque vous dfinissez la mthode de recherche de base NP1 positifs GPS, GPS Positive base 2N, MADS positifs NP1 base, MADS Positive base 2N, ou le latin hypercube. Mesh Options Mesh options de contrle du maillage que le modle de recherche utilise. Taille initiale prcise de la taille du maillage initial, qui est la longueur du vecteur du point initial d'un point de maille. Taille initiale doit tre un scalaire. Max size spcifie une taille maximale de la maille. Lorsque la taille maximale est atteinte, le maillage n'est plus augmente aprs le succs de l'itration. Max taille est un scalaire et n'est utilise que lorsque le GPS est l'algorithme choisi comme mthode de sondage ou de recherche. Accelerator spcifie si le facteur de contraction Mesh est multipli par 0,5 aprs chaque itration succomb. Rotation prcise si le maillage des vecteurs sont multiplis par -1 lorsque le maillage est infrieur une petite valeur. Scale maillage prcise si les chelles de l'algorithme de maillage de points en multipliant le modle des vecteurs par des constantes. Facteur d'expansion prvoit le facteur par lequel le maillage est augmente aprs un sondage de succs. Facteur d'expansion doit tre un scalaire, et est utilis seulement quand un GPS mthode est choisie comme mthode de sondage ou de recherche. Contraction facteur spcifie le facteur par lequel le maillage est diminu aprs l'chec d'une enqute. Contraction facteur doit tre un scalaire, et n'est utilise que lorsque le GPS est slectionn comme mthode de la mthode de sondage ou de recherche. Algorithme Paramtres Algorithme de dfinir les paramtres des algorithmes de paramtres spcifiques. Nonlinear Constraint Algorithme: Amende initiale spcifie une valeur initiale utiliser par les algorithm.Initial Peine doit tre suprieur ou gal 1. Peine de facteur augmente la peine de paramtre lorsque le problme n'est pas rsolu la prcision requise et les contraintes ne sont pas remplies. Peine de facteur doit tre suprieur 1. Cache Options 15

Cache options contrlent le mode de recherche utilise un cache. Cache prcise de savoir si un cache est utilis. Lorsque vous dfinissez le cache de A, l'algorithme ne permet pas d'valuer la fonction objectif une maille de points qui sont la tolrance d'un point dans la mmoire cache. Tolrance spcifie comment fermer un point de maillage doit tre un point dans le cache pour l'algorithme de supprimer it.Tolerance de vote doit tre un scalaire positif. Taille prcise de la taille du cache, qui doit tre un scalaire. Critres d'arrt Options Arrter de critres dterminent les causes de l'algorithme de recherche modle pour arrter. Mesh tolrance prcise le minimum de tolrance de maillage. Max itration prcise le nombre maximal d'itrations de l'algorithme effectue. Max fonction des valuations prcise le nombre maximal d'valuations de la fonction objectif. Dlai limite le temps en secondes le modle algorithme de recherche fonctionne avant de s'arrter. Bind tolrance prcise le minimum de tolrance pour la distance entre le point courant la limite du faisable rgion. X tolrance prcise de la distance minimale entre les points au cours de deux itrations. Fonction de la tolrance prcise la fin de tolrance pour la fonction objective de valeur. Nonlinear contrainte de tolrance prcise la fin de tolrance maximale pour la violation de contrainte non-linaire. Options de sortie de fonction Fonctions de sortie sont des fonctions que le modle de recherche algorithme demande chaque itration. Les options suivantes sont disponibles: Histoire de la nouvelle fentre retours de l'histoire de points calcul par l'algorithme chaque intervalle de plusieurs itrations. Custom vous permet d'crire votre propre fonction de sortie. Affichage de la fentre Options de commande Niveau de visualisation prcise de la quantit d'informations affiches dans la fentre de commande MATLAB alors que le motif de recherche est en cours d'excution. Vous pouvez choisir parmi les options suivantes: Off - Aucune sortie n'est affiche. Iterative - L'information est affiche chaque itration de l'algorithme. Diagnose - L'information est affiche chaque itration. En outre, les listes de diagnostic des problmes d'information et les options qui sont modifis partir de la valeur par dfaut. Final - La raison de l'arrt est affich. Vectorise Options Fonction objectif est vectoris spcifie si le calcul de la fonction objectif est vectoris. Lorsque l'objectif est vectoris fonction est dsactive, l'algorithme appelle la fonction objectif sur un point un moment o il travers toutes les boucles de la maille est fonction de l'objectif points.When vectoris est On, le motif de recherche algorithme appelle la fonction objective sur tous les points dans le maillage la fois, c'est--dire - en un seul appel la fonction objectif si l'un sondage complet ou complet de recherche est activ.

Exemple
Optimization of Stochastic Objective Function This is a demonstration of how to find a minimum of a stochastic objective function using PATTERNSEARCH function in the Genetic Algorithm and Direct Search Toolbox. We also demonstrate why the Optimization Toolbox functions are not suitable for this kind of problems. A simple 2-dimensional optimization problem is selected for this demo to help visualize the objective function Contents Initialization Run FMINCON on smooth objective function Stochastic objective function Run FMINCON on stochastic objective function Run PATTERNSEARCH Initialization format compact X0 = [2.5 -2.5]; % Starting point. 16

LB = [-5 -5]; % Lower bound UB = [5 5]; % Upper bound range = [LB(1) UB(1); LB(2) UB(2)]; Objfcn = @smoothFcn; % Handle to the objective function. % Plot the smooth objective function clf;showSmoothFcn(Objfcn,range); hold on; title('Smooth objective function') plot3(X0(1),X0(2),Objfcn(X0)+30,'om','MarkerSize',12, ... 'MarkerFaceColor','r'); hold off; set(gca,'CameraPosition',[-31.0391 -85.2792 -281.4265]); set(gca,'CameraTarget',[0 0 -50]) set(gca,'CameraViewAngle',6.7937) fig = gcf;

Run FMINCON on smooth objective function The objective function is smooth (twice continuously differentiable). We will solve the optimization problem using FMINCON function from the Optimization Toolbox. FMINCON finds a constrained minimum of a function of several variables. This function has a unique minimum at the point x* = (-5.0,-5) where it has a function value f(x*) = -250. % Set options to display iterative results. options = optimset('LargeScale','off','Display','iter', ... 'OutputFcn',@fminuncOutps); [Xop,Fop] = fmincon(Objfcn,X0,[],[],[],[],LB,UB,[],options) figure(fig); hold on; % Plot the final point plot3(Xop(1),Xop(2),Fop,'dm','MarkerSize',12,'MarkerFaceColor','m'); hold off; max Directional First-order Iter F-count f(x) constraint Step-size derivative optimality Procedure 0 3 -10.625 -2.5 1 6 -250 0 1 -787 82.1 17

2 9 -250 0 1 0 0 Hessian modified twice Optimization terminated: first-order optimality measure less than options.TolFun and maximum constraint violation is less than options.TolCon. Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 1 2 Xop = -5 -5 Fop = -250

Stochastic objective function The objective function we use now is the same as the previous example but with some random noise added to it. This is done by adding a random component to the function value. % Reset the state of random number generators randn('state',0); peaknoise = 4.5; Objfcn = @(x) smoothFcn(x,peaknoise); % Handle to the objective function. % Plot the objective function (non-smooth) fig = figure; showSmoothFcn(Objfcn,range); title('Stochastic objective function') set(gca,'CameraPosition',[-31.0391 -85.2792 -281.4265]); set(gca,'CameraTarget',[0 0 -50]) set(gca,'CameraViewAngle',6.7937)

18

Run FMINCON on stochastic objective function The objective function is stochastic and not smooth. FMINCON is a general constrained optimization solver which finds a local minima using first derivative of the objective function. If derivative of the objective function is not provided, FMINCON uses finite difference to approximate first derivative of the objective function. In this example, the objective function have some random noise in it. The derivatives hence could be highly unreliable. FMINCON can potentially stop at a point which is not a minimum. This may happen because the optimal conditions seems to be satisfied at the final point because of noise or it could not make any progress. options = optimset('LargeScale','off','Display','iter'); [Xop,Fop] = fmincon(Objfcn,X0,[],[],[],[],LB,UB,[],options) figure(fig); hold on; plot3(X0(1),X0(2),Objfcn(X0)+30,'om','MarkerSize',16,'MarkerFaceColor','r'); plot3(Xop(1),Xop(2),Fop,'dm','MarkerSize',12,'MarkerFaceColor','m'); max Directional First-order Iter F-count f(x) constraint Step-size derivative optimality Procedure 0 3 -4.77263 -2.5 1 8 -9.1855 -1.875 0.25 6.8e+008 3.51e+008 2 11 -68.8158 0 1 1.61e+007 1.55e+008 3 20 -69.0338 -0.1563 0.0156 7.01e+007 6.05e+008 4 37 -69.8872 -0.1556 -6.1e-005 -3.09e+008 5.25e+008 5 55 -72.9707 -0.1559 3.05e-005 -3.3e+008 8.6e+008 Hessian modified 6 188 -75.9747 -0.1559 -7.35e-040 -1.82e+005 2.49e+008 Hessian modified 7 202 -59.4713 -0.156 0.000488 -2.52e+004 3.32e+008 Hessian not updated Maximum number of function evaluations exceeded; increase OPTIONS.MaxFunEvals. Xop = 1.2623 -4.8441 Fop = 19

-75.9747

Run PATTERNSEARCH We will now use PATTERNSEARCH from the Genetic Algorithm and Direct Search Toolbox. Pattern search optimization techniques are a class of direct search methods for optimization. A pattern search algorithm does not require any derivative information of the objective function to find an optimal point. PSoptions = psoptimset('Display','iter','OutputFcn',@psOut); [Xps,Fps] = patternsearch(Objfcn,X0,[],[],[],[],LB,UB,PSoptions) figure(fig); hold on; plot3(Xps(1),Xps(2),Fps,'pr','MarkerSize',18,'MarkerFaceColor','r'); hold off

Iter f-count f(x) 0 1 -4.5036 1 3 -38.4084 2 3 -38.4084 3 5 -38.4084 4 6 -40.8905 5 9 -92.6282 6 10 -92.6282 7 12 -92.6282 8 15 -132.864 9 17 -132.864 10 19 -132.864 11 22 -193.342 12 24 -193.342 13 26 -193.342 14 29 -230.691 15 31 -245.208 16 33 -245.208 20

MeshSize Method 1 2 Successful Poll 1 Refine Mesh 0.5 Refine Mesh 1 Successful Poll 2 Successful Poll 1 Refine Mesh 0.5 Refine Mesh 1 Successful Poll 0.5 Refine Mesh 0.25 Refine Mesh 0.5 Successful Poll 0.25 Refine Mesh 0.125 Refine Mesh 0.25 Successful Poll 0.5 Successful Poll 0.25 Refine Mesh

17 18 19 20 21 22 23 24 25 26 27 28 29 30

35 37 39 41 44 47 50 53 56 59 62 65 68 71

-247.796 -247.796 -253.075 -253.075 -253.075 -253.075 -253.075 -253.075 -253.075 -253.075 -253.075 -253.075 -253.075 -253.075

0.5 Successful Poll 0.25 Refine Mesh 0.5 Successful Poll 0.25 Refine Mesh 0.125 Refine Mesh 0.0625 Refine Mesh 0.03125 Refine Mesh 0.01563 Refine Mesh 0.007813 Refine Mesh 0.003906 Refine Mesh 0.001953 Refine Mesh 0.0009766 Refine Mesh 0.0004883 Refine Mesh 0.0002441 Refine Mesh

Iter f-count f(x) MeshSize Method 31 74 -253.075 0.0001221 Refine Mesh 32 77 -253.075 6.104e-005 Refine Mesh 33 80 -253.075 3.052e-005 Refine Mesh 34 83 -253.075 1.526e-005 Refine Mesh 35 86 -253.075 7.629e-006 Refine Mesh 36 89 -253.075 3.815e-006 Refine Mesh 37 92 -253.075 1.907e-006 Refine Mesh 38 95 -253.075 9.537e-007 Refine Mesh Optimization terminated: mesh size less than options.TolMesh. Xps = -5.0000 -4.7500 Fps = -253.0749

Pattern search algorithm is not affected by random noise in the objective functions. Pattern search requires only function value and not the derivatives, hence noise (of some uniform kind) may not affect it. However, pattern search requires more function evaluation to find the true minimum than derivative based algorithms, a cost for not using the derivatives. 21

Das könnte Ihnen auch gefallen