14
14
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="init_ga_default" xml:lang="en">
16
<refname>init_ga_default</refname>
17
<refpurpose>A function a initialize a population</refpurpose>
20
<title>Calling Sequence</title>
21
<synopsis>Pop_init = init_ga_default(popsize,param)</synopsis>
24
<title>Arguments</title>
29
<para>the number of individuals to generate.</para>
35
<para>a list of parameters. </para>
38
<para> "dimension": the size of the vector X. Default dimension=2. </para>
41
<para> "minbound": a vector of minimum bounds for the variable
42
X. Default minbound = -2*ones(1,dimension).
46
<para> "maxbound": a vector of maximum bounds for the variable
47
X. Default maxbound=2*ones(1,dimension).
56
<para>a list which contains the initial population of
16
<refname>init_ga_default</refname>
17
<refpurpose>A function a initialize a population</refpurpose>
20
<title>Calling Sequence</title>
21
<synopsis>Pop_init = init_ga_default(popsize,param)</synopsis>
24
<title>Arguments</title>
29
<para>the number of individuals to generate.</para>
35
<para>a list of parameters. </para>
38
<para> "dimension": the size of the vector X. Default dimension=2. </para>
41
<para> "minbound": a vector of minimum bounds for the variable
42
X. Default minbound = -2*ones(1,dimension).
46
<para> "maxbound": a vector of maximum bounds for the variable
47
X. Default maxbound=2*ones(1,dimension).
56
<para>a list which contains the initial population of
64
<title>Description</title>
66
This function generate an initial population containing pop_size
64
<title>Description</title>
66
This function generate an initial population containing pop_size
68
It uses the rand function to generate the points uniformly distributed in the
70
As a side effect, it modifies the state of the random generator of the rand
72
Other initial populations might be generated from the grand
73
function, or any other uniform random generator (including low discrepancy sequences).
74
In the case were we want to compute another initial population, we
75
might define our own init function: in this case, we may use the init_ga_default
76
function as a template and plug our customized population generator.
80
<title>Examples</title>
81
<programlisting role="example"><![CDATA[
68
It uses the rand function to generate the points uniformly distributed in the
70
As a side effect, it modifies the state of the random generator of the rand
72
Other initial populations might be generated from the grand
73
function, or any other uniform random generator (including low discrepancy sequences).
74
In the case were we want to compute another initial population, we
75
might define our own init function: in this case, we may use the init_ga_default
76
function as a template and plug our customized population generator.
80
<title>Examples</title>
81
<programlisting role="example"><![CDATA[
82
82
// Generate 10 points in 2 dimensions, in the
83
83
// interval [-2,2]^2.
93
93
mprintf("x[%d]=[%s]\n",k,xstr);
95
95
]]></programlisting>
97
<refsection role="see also">
98
<title>See Also</title>
99
<simplelist type="inline">
101
<link linkend="crossover_ga_default"> crossover_ga_default
105
<link linkend="mutation_ga_default"> mutation_ga_default
109
<link linkend="mutation_ga_binary"> mutation_ga_binary
113
<link linkend="optim_ga"> optim_ga </link>
97
<refsection role="see also">
98
<title>See Also</title>
99
<simplelist type="inline">
101
<link linkend="crossover_ga_default"> crossover_ga_default
105
<link linkend="mutation_ga_default"> mutation_ga_default
109
<link linkend="mutation_ga_binary"> mutation_ga_binary
113
<link linkend="optim_ga"> optim_ga </link>