Bug Fix #14415 - Corrected some spellings error in help pages
[scilab.git] / scilab / modules / simulated_annealing / help / en_US / utilities / temp_law_vfsa.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
5  * Copyright (C) 2010 - DIGITEO - Michael Baudin
6  *
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
9  * This file is hereby licensed under the terms of the GNU GPL v2.0,
10  * pursuant to article 5.3.4 of the CeCILL v.2.1.
11  * This file was originally licensed under the terms of the CeCILL v2.1,
12  * and continues to be available under such terms.
13  * For more information, see the COPYING file which you should have received
14  * along with this program.
15  *
16  -->
17 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="temp_law_vfsa" xml:lang="en">
18     <refnamediv>
19         <refname>temp_law_vfsa</refname>
20         <refpurpose>This function implements the Very Fast Simulated Annealing
21             from L. Ingber
22         </refpurpose>
23     </refnamediv>
24     <refsynopsisdiv>
25         <title>Syntax</title>
26         <synopsis>T_out = temp_law_vfsa(T_in,step_mean,step_var,temp_stage,n, param)</synopsis>
27     </refsynopsisdiv>
28     <refsection>
29         <title>Arguments</title>
30         <variablelist>
31             <varlistentry>
32                 <term>T_in</term>
33                 <listitem>
34                     <para>the temperature at the current stage</para>
35                 </listitem>
36             </varlistentry>
37             <varlistentry>
38                 <term>step_mean</term>
39                 <listitem>
40                     <para>the mean value of the objective function computed during the
41                         current stage
42                     </para>
43                 </listitem>
44             </varlistentry>
45             <varlistentry>
46                 <term>step_var</term>
47                 <listitem>
48                     <para>the variance value of the objective function computed during
49                         the current stage
50                     </para>
51                 </listitem>
52             </varlistentry>
53             <varlistentry>
54                 <term>temp_stage</term>
55                 <listitem>
56                     <para>the index of the current temperature stage</para>
57                 </listitem>
58             </varlistentry>
59             <varlistentry>
60                 <term>n</term>
61                 <listitem>
62                     <para>the dimension of the decision variable (the x in f(x))</para>
63                 </listitem>
64             </varlistentry>
65             <varlistentry>
66                 <term>param</term>
67                 <listitem>
68                     <para>a float: the 'c' parameter of the VFSA method (0.01 by
69                         default)
70                     </para>
71                 </listitem>
72             </varlistentry>
73             <varlistentry>
74                 <term>T_out</term>
75                 <listitem>
76                     <para>the temperature for the temperature stage to come</para>
77                 </listitem>
78             </varlistentry>
79         </variablelist>
80     </refsection>
81     <refsection>
82         <title>Description</title>
83         <para>This function implements the Very Fast Simulated Annealing from
84             L. Ingber.
85         </para>
86     </refsection>
87     <refsection>
88         <title>Examples</title>
89         <programlisting role="example"><![CDATA[
90 function y = rastrigin(x)
91   y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
92 endfunction
93
94 x0 = [-1, -1];
95 Proba_start = 0.8;
96 It_intern = 1000;
97 It_extern = 30;
98 It_Pre    = 100;
99
100 mprintf('SA: the VFSA algorithm\n');
101
102 T0 = compute_initial_temp(x0, rastrigin, Proba_start, It_Pre, neigh_func_default);
103 mprintf('Initial temperature T0 = %f\n', T0);
104
105 Log = %T;
106 [x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, rastrigin, It_extern, It_intern, T0, Log);
107
108 mprintf('optimal solution:\n'); disp(x_opt);
109 mprintf('value of the objective function = %f\n', f_opt);
110
111 scf();
112 subplot(2,1,1);
113 xtitle('VFSA simulated annealing','Iteration','Mean / Variance');
114 t = 1:length(sa_mean_list);
115 plot(t,sa_mean_list,'r',t,sa_var_list,'g');
116 legend(['Mean','Variance']);
117 subplot(2,1,2);
118 xtitle('Temperature evolution','Iteration','Temperature');
119 plot(t,temp_list,'k-');
120  ]]></programlisting>
121     </refsection>
122     <refsection role="see also">
123         <title>See Also</title>
124         <simplelist type="inline">
125             <member>
126                 <link linkend="optim_sa"> optim_sa </link>
127             </member>
128             <member>
129                 <link linkend="neigh_func_vfsa"> neigh_func_vfsa
130                 </link>
131             </member>
132             <member>
133                 <link linkend="temp_law_huang"> temp_law_huang </link>
134             </member>
135         </simplelist>
136     </refsection>
137 </refentry>