Documentation of demobin1

Global Index (all files) (short | long) | Local contents | Local Index (files in subdir) (short | long)

Help text

 DEMO for optimizing a simple binary function

 This script provides an example for defining non-default parameters
 for an optimization. Here is the highest level entry point into the
 GEA Toolbox.

 Syntax:  demobin1

 Input parameter:
    no input parameter

 Output parameter:
    no output parameter

 See also: tbx3real, tbx3comp, geamain2

Cross-Reference Information

This script calls

Listing of script demobin1



% Author:   Hartmut Pohlheim
% History:  26.02.2002  file created


   % Get default parameters for real variables
   GeaOpt = tbx3bin;

   % Define special parameters
   GeaOpt = geaoptset( GeaOpt ...
                      , 'NumberSubpopulation',        1 ...        % Number of subpopulation
                      , 'NumberIndividuals',         [100] ...     % Number of individuals per subpopulation
                      , 'Output.TextInterval',        5 ...        % Text output every 5 generations
                      ...
                      , 'Output.GrafikInterval',      10 ...       % Grafic results every 10 generations
                      , 'Output.GrafikMethod',        111100 ...   % Grafic method to use 
                      , 'Output.GrafikStyle',         614143 ...   % Grafic styles for specified methods
                      ...
                      , 'Termination.Method',         [1  ] ...    % Termination method(s) to use
                      , 'Termination.MaxGen',         100 ...       % Terminate after xx generations
                      , 'Termination.MaxTime',        1 ...         % Terminate after xx minutes
                      );

   % Define special parameters for saving results
   FileNameBase = 'test_loadsave';
   GeaOpt = geaoptset( GeaOpt ...
                      , 'Output.SaveTextInterval',     0 ...                    % Text to File every xx generations
                      , 'Output.SaveTextFilename',    [FileNameBase '.txt'] ... % Filename of result file, absolut or relative path may be included
                      , 'Output.SaveBinDataInterval',  0 ...                    % Binary Data to File every xx generations
                      , 'Output.SaveBinDataFilename', [FileNameBase '.mat'] ... % Filename of binary file, absolut or relative path may be included
                      );


   % Define objective function to use
   GeaOpt = geaoptset( GeaOpt , 'System.ObjFunFilename', 'objone1');
   objfun = []; % 'objfun1';


   % Get variable boundaries from objective function
   VLUB = geaobjpara(GeaOpt.System.ObjFunFilename, [1 40]);
   GeaOpt = geaoptset( GeaOpt , 'System.ObjFunVarBounds', VLUB);
   VLUB = [];

   % Start optimization
   [xnew, GeaOpt] = geamain2(objfun, GeaOpt, VLUB, []);


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

This document is part of version 3.7 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-2005 Hartmut Pohlheim, All Rights Reserved, (support@geatbx.com).