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

This option controls if any and how much text output (status information) is displayed on the screen during an optimization. A value of 0 switches text output off, a value of 1 displays information every generation (one line per generation) and higher values display information only every defined generation.

- Default value: 1
- Type: integer in [0, Inf]
- Example - set text output on screen to every 5 generations:

GeaOpt = geaoptset(GeaOpt, 'Output.TextInterval', 5);

- Example - switch text output on screen off:

GeaOpt = geaoptset(GeaOpt, 'Output.TextInterval', 0);

- Option number in previous versions: 1 (2.x and 1.x)

This option controls if any and how often graphical output is presented on the screen during an optimization. The definition of the interval is similar to *Output.TextInterval*.

- Default value: 0
- Type: integer in [0, Inf]
- Example - switch graphical output every 10 generations on:

GeaOpt = geaoptset(GeaOpt, '', 10);

- The visualized data and the style of the data is defined by
*Output.GrafikMethod*and*Output.GrafikStyle.* - Option number in previous versions: 61 (2.x), 1 (1.x)

This option sets the employed methods for graphical output (here called plot mask - which graphics are plotted on screen). You may select none, one or multiple of the available methods (data sets). An overview of the available graphics/visualization methods is given under *Output.GrafikStyle*. Please look at the extensive examples in Section ??? (to be written).

- Default value: 111111
- Type: integer in [1, 1e+10]
- When
*Output.GrafikMethod*is 0, the standard plot mask defined inside resplot is used. - When defining a plot mask, each digit of the number defines, if the corresponding data type should be visualized:
- 0: no display of this data type
- 1: display this data type
- Every position of the given number determines one plot, the first number the first data type plot, the second number the second data type plot and so on. (When excluding the first data type, use a 2 at this position.) When
*Output.GrafikMethod*has fewer than the maximal digits, the remaining digits are set to zero. Currently, eight (nine) different data types can be visualized. - Example - employ only the first two data types/methods:

GeaOpt = geaoptset(GeaOpt, 'Output.GrafikMethod', 11);

- Example - employ only the third data type/method:

GeaOpt = geaoptset(GeaOpt, 'Output.GrafikMethod', 201);

- Example - employ only the first, second, and fourth data type/method:

GeaOpt = geaoptset(GeaOpt, 'Output.GrafikMethod', 1101);

- The frequency of visualization is defined by
*Output.GrafikInterval*and the styles of the displayed methods by*Output.GrafikStyle*. - Option number in previous versions: 62 (2.x), not available (1.x)

This option determines the style of the plot of each data type/method.

- Default value: 0
- Type: integer in [0, Inf]
- When
*Output.GrafikStyle*is 0, the standard plot style defined inside resplot is used. - Every digit of the given number determines one plot style , the first number the style of the first data type plot, the second number the style of the second data type plot and so on.
- Example - define the style for the first 3 data types/plots/methods:

GeaOpt = geaoptset(GeaOpt, 'Output.GrafikStyle', 244);

- Example - define the style of the first 4 data types/methods, but display only the second and the fourth:

GeaOpt = geaoptset(GeaOpt, 'Output.GrafikMethod', 2101, ... 'Output.GrafikStyle', 2441);

- The frequency of visualization is defined by
*Output.GrafikInterval*and the methods for visualization by*Output.GrafikMethod*. - Option number in previous versions: 63 (2.x), not available (1.x)
- The following list gives an short overview of the available plot methods/data types and their styles.
- 1. data type: best objective value of every generation (convergence diagram)
**1:**2-D line plot of best objective value**2:**2-D line plot of best and mean objective value and standard deviation of all objective values**3:**same as 1, with log scaling**5:**2-D line plot of best objective value of every subpopulation**6:**same as 5, with log scaling- 2. data type: variables of best individuals in all generations
**1:**2-D (multi) line plot of variables of best individual in every generation, 1 line per variable**3:**3-D line plot of variables of best individual in every generation, 1 line per variable**4:**2-D image plot of variables of best individual in every generation, color is variable value**6, 8, 9:**same as 1, 3, 4 with scaled variables (normalized inside defined boundaries)- 3. data type: all objective values of all generations
**1:**2-D (multi) line plot of all objective values of all generations, 1 line per individual**3:**3-D line plot of all objective values of all generations, 1 line per individual**4:**2-D image plot (color quilt) of all objective values of all generations, color is objective value- 4. data type: variables of all individuals in current generation
**1:**2-D line plot of all variables of all individuals in current generation**2:**2-D line plot (errorbar) of all variables of all individuals in current generation**3:**3-D line plot of all variables of all individuals in current generation**4:**2-D image plot (color quilt) of all variables of all individuals in current generation**6, 7, 8, 9:**same as 1, 2, 3, 4 with scaled variables (normalized inside defined boundaries)- 5. data type: all objective values in current generation
**1:**2-D point plot (scaled to some % best) of the objective values**2:**2-D fill plot (scaled to some % best) of the objective values**3:**2-D image plot (scaled to some % best) of the objective values (2-D neighborhood)- 6. data type: size of subpopulation
**1:**2-D line plot of number of individuals in every subpopulation, 1 line per subpopulation**2:**2-D line plot of relative number of individuals in every subpopulation, 1 line per subpopulation**3:**2-D line plot of positions of subpopulations, 1 line per subpopulation- 7. data type: distance between individuals in current generation
**1:**2-D stairs plot of distance between variables of all individuals (no neighborhood)**2:**2-D stairs plot of distance between variables of neighbors (1-D neighborhood)**3:**2-D image plot of distance between variables of neighbors (2-D neighborhood)**4:**3-D surf plot of distance between variables of neighbors (2-D neighborhood)- 9. data type: cluster analysis (dendrogram and cluster tree in separate windows)
**1:**cluster tree of all individuals of current generation**2:**dendrogram of all individuals of current generation**3:**cluster tree and dendrogram of all individuals of current generation (separate windows)**6, 7, 8:**same as 1, 2, 3 for each subpopulation and the whole population of current generation (many separate windows)- 10. data type: fitness-distance scatter diagram
**1:**2-D point plot of fitness distance distribution of current generation- Inside resplot the validity of every plot style is checked. If data is missing or the given data isn't compatible with the plot style, this plot is omitted or another valid plot style for this data type is used.

This option controls if any and how much text output (status information) is saved into a text file during an optimization. The definition of the interval is similar to *Output.TextInterval*. The saved information is extended compared to the status information on screen (variables of the best individual are added).

- Default value: 0
- Type: integer in [0, Inf]
- Example - switch saving of text output every 10 generations on:

GeaOpt = geaoptset(GeaOpt, 'Output.SaveTextInterval', 10);

- The name of the file to save must be defined in
*Output.SaveTextFileName*. - Option number in previous versions: 41 (2.x), 28 (1.x)

This option contains the file name to save text output. An optional relative or absolute path may be added (employing Matlab conventions). If no path is defined, the current working directory is used.

- Default value: '
`res_gea.txt`' - Type: string
- Example - set the file name for text results to '
`res_f4_04.txt`':

GeaOpt = geaoptset(GeaOpt, 'Output.SaveTextFileName','res_f4_04.txt');

- The text result file is extended with every new run. The output is appended at the end of the file. That means multiple runs can be saved into one file. The single runs may be differentiated by the contained starting time and date stamp at the beginning of the output of every run.
- Option number in previous versions: global variable GLOBAL_FILERESULTS, this global variable is no longer necessary to define the name of the result file.

This option controls if any and how often binary data is saved into a binary (mat) file during an optimization. The definition of the interval is identical to *Output.TextInterval*. The saved information contains all data from the current generation and some data regarding the entire run.

- Default value: 0
- Type: integer in [0, Inf]
- Example - switch saving of binary data every 20 generations on:

GeaOpt = geaoptset(GeaOpt, 'Output.SaveBinDataInterval', 20);

- The binary data should not be saved too often. Especially for large populations or individuals with many variables large amount of disc space and time are needed. A good value for
*Output.SaveBinDataInterval*is every 10 to 20 generations. - The name of the file to save must be defined in
*Output.SaveBinDataFileName*. - Option number in previous versions: 44 (2.x), not available (1.x)

This option contains the file name to save binary result data (the saved data are the same as used for the visualization with resplot). An optional relative or absolute path may be added (employing Matlab conventions). If no path is defined, the current working directory is used.

- Default value: '
`res_gea.mat`' - Type: string
- Example - set the file name for binary results to '
`res_f4_04.mat`':

GeaOpt = geaoptset(GeaOpt, 'Output.SaveBinDataFileName', 'res_f4_04.mat');

- The binary result file is overwritten with every new run (set a new file name for every run to save results of multiple runs).
- Using the binary result file and reslook the state and progress of the optimization can be further analyzed after the optimization is finished.
- Option number in previous versions: global variable GLOBAL_FILEMAT (2.x), not available (1.x), the global variable GLOBAL_FILEMAT is no longer necessary to define the name of the binary result file.

This option controls if any and how often the special problem specific visualization function is called during an optimization. This special visualization function is called state plot function. The definition of the interval is identical to *Output.TextInterval*.

- Default value: 0
- Type: integer in [0, Inf]
- Example - switch display of problem specific visualization every 10 generations on:

GeaOpt = geaoptset(GeaOpt, 'Output.StatePlotInterval', 10);

- The name of the file of the state plot/special visualization function must be defined in
*Output.StatePlotFunction*. - Option number in previous versions: 43 (2.x), 30 (1.x)

This option contains the function name of the special problem specific visualization function.

- Default value: ' '
- Type: string
- Example - set the function name of the state plot function to '
`plotdopi`':

GeaOpt = geaoptset(GeaOpt, 'Output.StatePlotFunction', 'plotdopi');

- The state plot function ('
`plotdopi`') is called very similar to the objective function ('`objdopi`').

Call of objective function (`Chrom`contains current population,`method`,`TSTART`and`TEND`are additional parameters):

[ObjVal, t, x] = objdopi(Chrom, method, TSTART, TEND)

Call of special state plot function '`plotdopi`' for '`objdopi`' from inside of geamain2:

x = plotdopi(OBJ_F, chrom, gen, varargin)

The variable`OBJ_F`is a string and contains the name of the objective function ('`objdopi`'),`chrom`contains the current population sorted/ranked by fitness - the first individual is the best, the second individual the second best and so on. The variable`gen`contains the number of the current generation (for documentation purpose). In`varargin`all additional parameters are contained.

Inside the state plot function the objective function is called to get the objective values and possible additional values (here`t`and`x`). In this example (provided as part of the GEATbx)`t`and`x`contain the states of a simulation (time vector and state vectors). These vectors are used for an extensive visualization of one individual or the comparison of multiple individuals in detail. - Option number in previous versions: global Variable GLOBAL_STATEPLOTFUN (2.x), not available (1.x), the global variable GLOBAL_STATEPLOTFUN is no longer required to define the name of the state plot function.

A number of options exist to define, which text information should be written on screen and saved to the result file. These options are very seldom used/changed. The handling of the text output is done in the function gearunstatus.

- Default value: 0
- Type: integer in {0, 1}
- Two variants are possible:
- 0: display the corresponding information (do not exclude)
- 1: exclude the corresponding information (no output)
- The frequency of the information output is controlled by
*Output.TextInterval*and*Output.SaveTextInterval*. The Exclude*-options are extensions of these (interval) options. - The Exclude* options exist for output on screen (
*Output.TextExclude*) and for saving to file (*Output.SaveTextExclude*). The meaning of the respective options is identical. Here a short description of these options is given (names for output on screen used): *Output.TextExcludeHead*: exclude the header information (output of options, start of optimization, header of generational output)*Output.TextExcludePara*: exclude just the additional parameters inside the header*Output.TextExcludeInd*: exclude the best individual of the population per output interval (the default value of this option is 1 for*Output.TextExclude*(no output of best individual on screen) and 0 for*Output.SaveTextInterval*)*Output.TextExcludeSub*: exclude the information about size and position of subpopulations (only applicable, when multiple subpopulations and/or competition are used)*Output.TextExcludeTerm*: exclude the information about the termination criteria*Output.TextExcludeTime*: exclude the calculation time information (how long takes one generation, how long took the whole optimization)*Output.TextExcludeHead*and*Output.TextExcludePara*are used only during the start of an optimization. All other options apply to the output for each output interval (which information is contained on the line per interval).- These options are only used for special occasions. An example are special optimizations, where only a small subset of the status/result information is needed or the available place is limited.
- Option number in previous versions: not available (2.x and 1.x).

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

This document is part of

The Genetic and Evolutionary Algorithm Toolbox is