Documentation of initip
Global Index (all files) (short | long)
| Local contents
| Local Index (files in subdir) (short | long)
Function Synopsis
Chrom = initip(Nind, VLUB);
Help text
CReaTe an initial (Integer value) Population
This function creates a population of given size of random integer value.
It is ensured, that the values are created uniform at random, even at the
bounds of the initialization range.
What is the problem?
Try hist(initip(10000, [1; 10])), look for the first and last area.
Then try hist(initip(10000, [0.5001; 10.4999])) for a solution.
Thus, the upper and lower boundary is extended, to give the bounded
integers also a uniform initialization range of (nearly) 1.
Syntax: Chrom = initip(Nind, FieldDR);
Input parameters:
Nind - A scalar containing the number of individuals in the new population.
VLUB - A matrix of size 2 by number of variables describing the boundaries
of each variable. The bounds should be integers, to get an even
distribution of the values.
For more info, see initrp.
Output parameter:
Chrom - A matrix containing the random valued individuals of the
new population of size Nind by number of variables.
See also: initrp, initbp
Cross-Reference Information
| This function calls |
This function is called by |
|
|
|
Listing of function initip
% Author: Hartmut Pohlheim
% History: 17.10.1997 file created
% 13.03.2005 bounds are extended by (nearly) 0.5 for uniform initialization
% at the defined bounds
function Chrom = initip(Nind, VLUB);
% Create initial population
% First, extend the bound array
ValExtend = 0.4999;
VLUBIntern = VLUB + repmat([-ValExtend; ValExtend], [1, size(VLUB,2)]);
% Create real population and round the values
Chrom = round(initrp(Nind, VLUBIntern));
% End of function
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).