GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions  www.geatbx.com 

GEATbx: Tutorial 5 Overview of GEA Toolbox Structure

Previous PageTable Of ContentsIndexList Of FiguresNext Page



5 Overview of GEA Toolbox Structure

The GEATbx is build around a layer model. Figure 5-1 gives a first overview of the layers used for the GEATbx.

Fig. 5-1: Layer model of the GEATbx

Fig. 5-1: Layer model of the GEATbx

Central point is the Main function (geamain2). This function is called from the user interface (Demo functions, for instance, demofun1, demogeatbx). The Toolbox functions define default parameters for a number of different evolutionary algorithms. The Main function calls all necessary evolutionary operators. The call of evolutionary operators is done by a high-level layer calling the low-level layer. The Main function also calls the objective function. Additionally, the Main function performs nearly all the data management and result collection.

Figure 5-2 shows the full structure of the GEATbx using the names of the corresponding m-functions. Even in this detailed view the layer model is visible. Center of the toolbox is the Main function geamain2. The Main function is called by the Demo functions. The Demo functions get parameter sets of predefined algorithms via the Toolbox functions (tbx3*, tbx3real, tbx3bin, tbx3es1). The Main function calls the high-level operators (selection, recombin, mutate). The high-level operators call the low-level operators (selsus, recdis, mutreal). This layer model not only provides a good overview of the structure of the GEATbx. It makes the extension of the toolbox by new operators or special functions straightforward.

In this structure there are two main points of user input; the objective function and the demo function.. On the one hand the user must provide an objective function implementing its problem to solve. This task is described in Chapter 3. On the other hand the user must define the evolutionary algorithm to employ and define none, some or many of the provided options of the GEATbx. This can done in one central place. All the provided examples of the GEATbx are called demo functions and can be used as a starting point.

5.1 Naming Convention

Previous SectionNext SectionTop Of Page

Throughout the GEATbx the functions are named according to the following conventions.

Tab. 5-1: Naming convention of the GEATbx

Präfix

      group of functions or operators

demo

high-level demo functions
(set of options for a special problem, often used as demonstration)

tbx3

high-level toolbox algorithms
(define a special evolutionary algorithm of the toolbox)

init

initialization functions

sel

low-level selection operators

rec

low-level recombination operators

mut

low-level mutation operators

reins

low-level reinsertion operators

obj
mobj
sim

objective functions (implement a special problem)
m
ulti-objective functions
sim
ulation function (called by corresponding objective function)

plot

application specific plot functions

5.2 Calling Tree

Previous SectionNext SectionTop Of Page

Fig. 5-2: Calling tree of the Genetic and Evolutionary Algorithm Toolbox (GEATbx)

Fig. 5-2: Calling tree of the Genetic and Evolutionary Algorithm Toolbox (GEATbx)

5.3 Demo / Startup function

Previous SectionNext SectionTop Of Page

At the beginning there is a high-level function for defining some parameters and the application specific details. These functions are called demo function (demo*.m).

Inside a demo function all parameters of the EA and the optimization process can be defined. Every aspect of the behavior of the GEATbx can be controlled from the outside via parameters set in the demo functions. Thus, all things necessary to define a large optimization or to define special demonstrations are provided by the demo functions. This is the ideal point to define tailored parameter sets for public demonstrations, demos during lectures or to present special aspects of a large system.

5.4 Toolbox functions (Predefined algorithms)

Previous SectionNext SectionTop Of Page

The GEATbx contains a number of predefined EA. They are not more than a set of parameter options defined in a Toolbox function (tbx3*.m). The whole process of option setting, the meaning of the options and more is described in the document Parameter options of the GEATbx.

Examples of toolbox functions:

By using one of these functions the respective options are set at ones. This makes reading the demo functions easier. And the options set defined in the toolbox functions can be reused by other optimizations. Further parameters can be set in the demo functions, even the ones provided by the toolbox function overwritten. All options not defined are set automatically inside the main function geamain2 by calling geaoptset, checking the validity of the options at the same time.

5.5 Evolutionary Algorithm - Main function

Previous SectionNext SectionTop Of Page

The demo functions call the working horse of the GEATbx:

Here all the administrative work is done: resolve parameter values, initialize the population, run the evolutionary algorithm including call of the objective function, and display and saving the results.

5.5.1 Initialization

The initialization is done by:

which calls the representation specific low-level initialization functions:

An application specific initialization function (for instance initdopi) may also be employed. However, the already created/initialized individuals can be directly input to the main function (4th input parameter) via the demo function. The high-level initialization function initpop handles all aspects of population size, additional randomization or inclusion of randomly generated individuals.

5.5.2 Generational loop of the EA

As soon as the population of individuals is initialized and evaluated, the evolutionary algorithm starts. For as many generations as necessary/defined, new populations are produced and evaluated. All functions of the evolutionary algorithm are called via high-level functions, thus supporting the multi-population (distributed) concept.

Inside the high-level functions the appropriate functions are called.

5.5.3 Fitness assignment by ranking

For fitness assignment by ranking the toolbox provides one function, no low-level functions are used:

Low-level functions are only used for multi-objective ranking, especially GOAL attainment and sharing:

5.5.4 Selection

For selection a high-level function is provided:

By parameter low-level selection functions can be chosen, which will be called for the subpopulations inside the high-level function:

5.5.5 Recombination/Crossover

For recombination/crossover a high-level function is provided:

By parameter low-level recombination/crossover functions can be chosen which will be called for the subpopulations inside the high-level function. The term recombination is now used for all recombination functions (other publications use the term crossover to refer to recombination of binary valued variables).

Recombination for all parameter optimizations:

Recombination for real valued parameter optimizations:

Recombination for binary valued parameter optimizations (all implemented in recmp, they are special cases of discrete recombination):

Currently, for integer valued parameter optimizations recdis must be used.

Recombination for permutation/ordering/combinatorial optimizations:

5.5.6 Mutation

For mutation a high-level function is provided:

Depending on the variable representation one of the low-level mutation functions will be called for every subpopulation:

Real values:

Integer values:

Binary values:

For real valued representation a number of additional mutation functions are provided. These functions use the mutation operators of evolution strategies. Thus, an adaptation of strategy parameters takes place.

Evolution strategy mutation operators:

Mutation for permutation/ordering/combinatorial optimizations (all implemented in mutcomb):

5.5.7 Evaluation

The toolbox provides many examples for objective functions. These functions are called "obj*.m". All functions use the same calling syntax.

Standard evolutionary algorithm test functions with a free definable dimension using the real valued representation are provided in:

Binary valued representation is used in:

Dynamic optimization is implemented in:

Standard optimization test functions with 2 independent variables (dimension = 2) are provided in:

A number of multi-objective functions are also provided:

A rudimentary interface to the tsp-lib is also provided (not fully implemented, take it as a starting point and send me your extended implementation):

See M-functions - Index (part of online documentation) for all functions or Examples of objective functions (part of online documentation) for a mathematical description.

It is possible to pass any number of additional parameters to the objective function, as long as the respective objective function can handle them. These parameters can be defined or loaded in the demo function and send as 5th parameter (and more) to geamain2. All these parameters are directly passed to the objective functions. This can be used to optimize a special aspect of the objective function or to define one or multiple parameter sets inside the objective function.

Instead of writing an objective function file and passing the name of the function, the objective function can be passed directly in a string to the main function as well. However, it is recommended to use one of the provided objective functions as a template and pass over only the file name.

5.5.8 Reinsertion

For reinsertion the toolbox provides a high-level function:

Depending on the used population model (global/regional or local), a corresponding low-level reinsertion function is called from inside the high-level reinsertion function.

Low-level reinsertion functions:

5.5.9 Migration

For migration the toolbox provides 1 function, no low-level functions are used:

5.5.10 Competition

For competition between subpopulations the toolbox provides 1 function, no low-level functions are used:

5.5.11 Visualization

The visualization of the results is implemented on 3 different levels:

5.6 Utility functions

Previous SectionNext SectionTop Of Page

Throughout the toolbox low-level utility functions are used. They are useful for everyday work as well:

For the handling of the options structure a few special functions are provided:

Previous PageTop Of PageTable Of ContentsIndexList Of FiguresNext Page

GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions  www.geatbx.com 

This document is part of version 3.8 of the GEATbx: Genetic and Evolutionary Algorithm Toolbox for use with Matlab - www.geatbx.com.
The Genetic and Evolutionary Algorithm Toolbox is not public domain.
© 1994-2006 Hartmut Pohlheim, All Rights Reserved, (support@geatbx.com).