summaryrefslogtreecommitdiff
path: root/modules/simulated_annealing
diff options
context:
space:
mode:
authorShashank2017-05-29 12:40:26 +0530
committerShashank2017-05-29 12:40:26 +0530
commit0345245e860375a32c9a437c4a9d9cae807134e9 (patch)
treead51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/simulated_annealing
downloadscilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip
CMSCOPE changed
Diffstat (limited to 'modules/simulated_annealing')
-rwxr-xr-xmodules/simulated_annealing/Makefile1015
-rwxr-xr-xmodules/simulated_annealing/Makefile.am21
-rwxr-xr-xmodules/simulated_annealing/Makefile.in1015
-rwxr-xr-xmodules/simulated_annealing/demos/Ising/init_ising2d.sci7
-rwxr-xr-xmodules/simulated_annealing/demos/Ising/init_potts2d.sci19
-rwxr-xr-xmodules/simulated_annealing/demos/Ising/ising2d.sci88
-rwxr-xr-xmodules/simulated_annealing/demos/Ising/plot_ising2d.sci17
-rwxr-xr-xmodules/simulated_annealing/demos/Ising/plot_potts2d.sci21
-rwxr-xr-xmodules/simulated_annealing/demos/SAIsing2ddemo.sce80
-rwxr-xr-xmodules/simulated_annealing/demos/SAdemo.sce272
-rwxr-xr-xmodules/simulated_annealing/demos/neigh_func_ising2d.sci22
-rwxr-xr-xmodules/simulated_annealing/demos/simulated_annealing.dem.gateway.sce10
-rwxr-xr-xmodules/simulated_annealing/etc/simulated_annealing.quit11
-rwxr-xr-xmodules/simulated_annealing/etc/simulated_annealing.start13
-rwxr-xr-xmodules/simulated_annealing/help/en_US/addchapter.sce11
-rwxr-xr-xmodules/simulated_annealing/help/en_US/algorithms/CHAPTER2
-rwxr-xr-xmodules/simulated_annealing/help/en_US/algorithms/optim_sa.xml489
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/CHAPTER2
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/accept_func_default.xml85
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/accept_func_vfsa.xml85
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/compute_initial_temp.xml147
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/neigh_func_csa.xml95
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/neigh_func_default.xml114
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/neigh_func_fsa.xml93
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/neigh_func_vfsa.xml92
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/temp_law_csa.xml133
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/temp_law_default.xml117
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/temp_law_fsa.xml132
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/temp_law_huang.xml135
-rwxr-xr-xmodules/simulated_annealing/help/en_US/utilities/temp_law_vfsa.xml134
-rwxr-xr-xmodules/simulated_annealing/help/fr_FR/addchapter.sce11
-rwxr-xr-xmodules/simulated_annealing/help/ja_JP/addchapter.sce11
-rwxr-xr-xmodules/simulated_annealing/help/pt_BR/addchapter.sce11
-rwxr-xr-xmodules/simulated_annealing/help/ru_RU/addchapter.sce11
-rwxr-xr-xmodules/simulated_annealing/license.txt9
-rwxr-xr-xmodules/simulated_annealing/locales/ca_ES.po46
-rwxr-xr-xmodules/simulated_annealing/locales/cs_CZ.po44
-rwxr-xr-xmodules/simulated_annealing/locales/de_DE.po46
-rwxr-xr-xmodules/simulated_annealing/locales/es_ES.po46
-rwxr-xr-xmodules/simulated_annealing/locales/fr_FR.po46
-rwxr-xr-xmodules/simulated_annealing/locales/it_IT.po46
-rwxr-xr-xmodules/simulated_annealing/locales/ja_JP.po52
-rwxr-xr-xmodules/simulated_annealing/locales/pl_PL.po46
-rwxr-xr-xmodules/simulated_annealing/locales/pt_BR.po46
-rwxr-xr-xmodules/simulated_annealing/locales/ru_RU.po46
-rwxr-xr-xmodules/simulated_annealing/locales/simulated_annealing.pot58
-rwxr-xr-xmodules/simulated_annealing/locales/uk_UA.po47
-rwxr-xr-xmodules/simulated_annealing/locales/zh_CN.po43
-rwxr-xr-xmodules/simulated_annealing/locales/zh_TW.po44
-rwxr-xr-xmodules/simulated_annealing/macros/accept_func_default.binbin0 -> 500 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/accept_func_default.sci12
-rwxr-xr-xmodules/simulated_annealing/macros/accept_func_vfsa.binbin0 -> 556 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/accept_func_vfsa.sci12
-rwxr-xr-xmodules/simulated_annealing/macros/buildmacros.bat1
-rwxr-xr-xmodules/simulated_annealing/macros/buildmacros.sce14
-rwxr-xr-xmodules/simulated_annealing/macros/cleanmacros.bat3
-rwxr-xr-xmodules/simulated_annealing/macros/compute_initial_temp.binbin0 -> 5904 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/compute_initial_temp.sci62
-rwxr-xr-xmodules/simulated_annealing/macros/libbin0 -> 624 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/names13
-rwxr-xr-xmodules/simulated_annealing/macros/neigh_func_csa.binbin0 -> 2588 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/neigh_func_csa.sci21
-rwxr-xr-xmodules/simulated_annealing/macros/neigh_func_default.binbin0 -> 3276 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/neigh_func_default.sci22
-rwxr-xr-xmodules/simulated_annealing/macros/neigh_func_fsa.binbin0 -> 2800 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/neigh_func_fsa.sci21
-rwxr-xr-xmodules/simulated_annealing/macros/neigh_func_vfsa.binbin0 -> 3780 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/neigh_func_vfsa.sci26
-rwxr-xr-xmodules/simulated_annealing/macros/optim_sa.binbin0 -> 12464 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/optim_sa.sci135
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_csa.binbin0 -> 576 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_csa.sci12
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_default.binbin0 -> 1144 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_default.sci19
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_fsa.binbin0 -> 464 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_fsa.sci12
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_huang.binbin0 -> 1124 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_huang.sci18
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_vfsa.binbin0 -> 1308 bytes
-rwxr-xr-xmodules/simulated_annealing/macros/temp_law_vfsa.sci19
-rwxr-xr-xmodules/simulated_annealing/simulated_annealing.iss38
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/accept_func_default.dia.ref10
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/accept_func_default.tst15
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/accept_func_vfsa.dia.ref10
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/accept_func_vfsa.tst15
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/compute_initial_temp.dia.ref14
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/compute_initial_temp.tst19
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/neigh_func_csa.dia.ref11
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/neigh_func_csa.tst17
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/neigh_func_default.dia.ref11
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/neigh_func_default.tst18
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/neigh_func_fsa.dia.ref11
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/neigh_func_fsa.tst18
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/neigh_func_vfsa.dia.ref11
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/neigh_func_vfsa.tst18
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/optim_sa.dia.ref119
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/optim_sa.tst124
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_csa.dia.ref10
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_csa.tst15
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_default.dia.ref10
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_default.tst15
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_fsa.dia.ref10
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_fsa.tst15
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_huang.dia.ref10
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_huang.tst15
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_vfsa.dia.ref10
-rwxr-xr-xmodules/simulated_annealing/tests/unit_tests/temp_law_vfsa.tst15
107 files changed, 6212 insertions, 0 deletions
diff --git a/modules/simulated_annealing/Makefile b/modules/simulated_annealing/Makefile
new file mode 100755
index 000000000..596f8a0cd
--- /dev/null
+++ b/modules/simulated_annealing/Makefile
@@ -0,0 +1,1015 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# modules/simulated_annealing/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+#
+
+##########
+### Makefile included stuff
+### Target, variable, suffixes which are supposed to be useful in every makefile.am
+##########
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/scilab
+pkgincludedir = $(includedir)/scilab
+pkglibdir = $(libdir)/scilab
+pkglibexecdir = $(libexecdir)/scilab
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs
+am__append_1 = java
+subdir = modules/simulated_annealing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \
+ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \
+ $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \
+ $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
+ $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
+ $(top_srcdir)/m4/intel_compiler.m4 \
+ $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
+ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \
+ $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \
+ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
+ $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
+ $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libsimulated_annealing_la_etcdir)" \
+ "$(DESTDIR)$(libsimulated_annealing_la_rootdir)"
+DATA = $(libsimulated_annealing_la_etc_DATA) \
+ $(libsimulated_annealing_la_root_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing aclocal-1.14
+ALL_LINGUAS = en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ
+ALL_LINGUAS_DOC = en_US fr_FR pt_BR ja_JP ru_RU
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+ANT = /usr/bin/ant
+ANTLR = /usr/share/java/antlr.jar
+AR = ar
+ARPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -larpack
+ASM3 = /usr/share/java/asm3-3.3.2.jar
+AUTOCONF = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoconf
+AUTOHEADER = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoheader
+AUTOMAKE = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing automake-1.14
+AVALON_FRAMEWORK = /home/shashank/scilab-master_5.5.2/thirdparty/avalon-framework.jar
+AWK = mawk
+BATIK = /home/shashank/scilab-master_5.5.2/thirdparty/batik-all-1.7.jar
+BLAS_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lblas
+CC = gcc
+CCACHE =
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKSTYLE =
+COBERTURA = /usr/share/java/cobertura.jar
+COMMONS_BEANUTILS =
+COMMONS_IO = /home/shashank/scilab-master_5.5.2/thirdparty/commons-io.jar
+COMMONS_LOGGING = /home/shashank/scilab-master_5.5.2/thirdparty/commons-logging.jar
+CPP = gcc -E
+CPPFLAGS =
+CURL_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+CURL_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/curl-config
+CURL_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lcurl -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lssl -lcrypto -lrt -lz
+CURL_VERSION = libcurl 7.19.7
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEMOTOOLS_ENABLE = yes
+DEPDIR = .deps
+DLLTOOL = false
+DOCBOOK_ROOT = /home/shashank/scilab-master_5.5.2/thirdparty/docbook/
+DOXYGEN_BIN =
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+ECJ = /home/shashank/scilab-master_5.5.2/thirdparty/ecj.jar
+EGREP = /bin/grep -E
+EXEEXT =
+F77 = gfortran
+FFLAGS = -g -O2
+FFTW3_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lfftw3
+FFTW_ENABLE = yes
+FGREP = /bin/grep -F
+FLEXDOCK = /home/shashank/scilab-master_5.5.2/thirdparty/flexdock-1.2.4.jar
+FLIBS = -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lpthread -ldl -lcurses -lgfortran -lm -lquadmath
+FOP = /home/shashank/scilab-master_5.5.2/thirdparty/fop.jar
+FREEHEP_GRAPHICS2D = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphics2d.jar
+FREEHEP_GRAPHICSIO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio.jar
+FREEHEP_GRAPHICSIO_EMF = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio-emf.jar
+FREEHEP_IO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-io.jar
+FREEHEP_UTIL = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-util.jar
+GENHTML =
+GETTEXT_MACRO_VERSION = 0.19
+GIWS_BIN =
+GLUEGEN2_RT = /home/shashank/scilab-master_5.5.2/thirdparty/gluegen2-rt.jar
+GMSGFMT = /usr/bin/msgfmt
+GMSGFMT_015 = /usr/bin/msgfmt
+GRAPHICS_ENABLE = yes
+GREP = /bin/grep
+GUI_ENABLE = yes
+HDF5_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+HDF5_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lhdf5 -lhdf5_hl
+HELP_ENABLE = yes
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+INTLLIBS =
+INTL_MACOSX_LIBS =
+JAR = /usr/lib/jvm/java-8-openjdk-amd64/bin/jar
+JAVA = /usr/lib/jvm/java-8-openjdk-amd64/bin/java
+JAVAC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
+JAVAC_DEBUG = off
+JAVADOC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc
+JAVAH = /usr/lib/jvm/java-8-openjdk-amd64/bin/javah
+JAVASCI_ENABLE = yes
+JAVA_ENABLE = yes
+JAVA_G = /usr/lib/jvm/java-8-openjdk-amd64/bin/java
+JAVA_HOME = /usr/lib/jvm/java-8-openjdk-amd64
+JAVA_JNI_INCLUDE = -I/usr/lib/jvm/java-8-openjdk-amd64/include -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux
+JAVA_JNI_LIBS = -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64 -ljava -lverify -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm
+JDB = /usr/lib/jvm/java-8-openjdk-amd64/bin/jdb
+JEUCLID_CORE = /home/shashank/scilab-master_5.5.2/thirdparty/jeuclid-core.jar
+JGRAPHX = /home/shashank/scilab-master_5.5.2/thirdparty/jgraphx.jar
+JHALL = /home/shashank/scilab-master_5.5.2/thirdparty/jhall.jar
+JLATEXMATH = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-1.0.3.jar
+JLATEXMATH_FOP = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-fop-1.0.3.jar
+JOGL2 = /home/shashank/scilab-master_5.5.2/thirdparty/jogl2.jar
+JROSETTA_API = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-API.jar
+JROSETTA_ENGINE = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-engine.jar
+JUNIT4 = /usr/share/java/junit4.jar
+LAPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -llapack
+LCOV =
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = -Wl,--no-as-needed
+LIBICONV = -liconv
+LIBINTL =
+LIBM = -lm
+LIBOBJS =
+LIBS = -lpthread -ldl -lcurses -lm
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO =
+LN_S = ln -s
+LOGGING_LEVEL = SEVERE
+LOOKS = /home/shashank/scilab-master_5.5.2/thirdparty/looks-2.1.1.jar
+LTLIBICONV = -liconv
+LTLIBINTL =
+LTLIBOBJS =
+MAINT = #
+MAKEINFO = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing makeinfo
+MANIFEST_TOOL = :
+MATIO_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+MATIO_ENABLE = yes
+MATIO_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lm -lz -lmatio -lhdf5
+MKDIR_P = /bin/mkdir -p
+MPI_ENABLE = no
+MSGCAT = /usr/bin/msgcat
+MSGFMT = /usr/bin/msgfmt
+MSGFMT_015 = /usr/bin/msgfmt
+MSGMERGE = /usr/bin/msgmerge
+NM = nm
+NMEDIT =
+OBJDUMP = objdump
+OBJEXT = o
+OCAMLC = ocamlc
+OCAMLDEP = ocamldep
+OCAMLLEX = ocamllex
+OCAMLOPT = ocamlopt
+OCAMLYACC = ocamlyacc
+OPENMPI_CC =
+OPENMPI_CFLAGS =
+OPENMPI_CXX =
+OPENMPI_CXXFLAGS =
+OPENMPI_LIBS =
+OPENMP_CFLAGS = -fopenmp
+OPENMP_CXXFLAGS = -fopenmp
+OPENMP_ENABLE = yes
+OPENMP_LIBS = -lgomp -lstdc++
+OTOOL =
+OTOOL64 =
+PACKAGE = scilab
+PACKAGE_BUGREPORT = http://bugzilla.scilab.org/
+PACKAGE_NAME = Scilab
+PACKAGE_STRING = Scilab 5
+PACKAGE_TARNAME = scilab
+PACKAGE_URL =
+PACKAGE_VERSION = 5
+PATH_SEPARATOR = :
+PCRE_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+PCRE_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/pcre-config
+PCRE_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lpcreposix -lpcre
+PCRE_VERSION = 8.35
+PKG_CONFIG = /usr/bin/pkg-config
+POSUB = po
+POW_LIB =
+PYTHON =
+RANLIB = ranlib
+RELOCATABLE = no
+RT_LIB = -lrt
+SAXON = /home/shashank/scilab-master_5.5.2/thirdparty/saxon9he.jar
+SCILAB_BINARY_VERSION = 5.5.2
+SCILAB_LIBRARY_VERSION = 5:5:2
+SCILAB_VERSION_MAINTENANCE = 2
+SCILAB_VERSION_MAJOR = 5
+SCILAB_VERSION_MINOR = 5
+SCIRENDERER = ${modules.dir}/scirenderer/${build.jar.dir}/scirenderer.jar
+SCIRENDERER_CP = $SCILAB/modules/scirenderer/jar/scirenderer.jar
+SCI_CFLAGS = -D_LARGEFILE64_SOURCE -DNDEBUG -m64 -fno-stack-protector
+SCI_CXXFLAGS = -DNDEBUG -fno-stack-protector
+SCI_FFLAGS = -DNDEBUG -m64 -fPIC
+SCI_LDFLAGS =
+SED = /bin/sed
+SET_MAKE =
+SET_RELOCATABLE =
+SHELL = /bin/bash
+SKINLF = /home/shashank/scilab-master_5.5.2/thirdparty/skinlf.jar
+SPLINT = no
+STRIP = strip
+SWIG_BIN =
+SWIG_JAVA =
+SWIG_RUNTIME_LIBS_DIR =
+SWIG_SCILAB =
+TCLTK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -ltk8.5 -L/home/shashank/scilab-master_5.5.2/usr/lib -ltcl8.5 -ldl
+TCL_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include
+TK_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include
+UMFPACK_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+UMFPACK_ENABLE = yes
+UMFPACK_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lumfpack -lamd
+USE_NLS = yes
+VERSION = 5
+WITH_OCAML =
+WITH_TKSCI = yes
+XCOS_ENABLE = yes
+XGETTEXT = /usr/bin/xgettext
+XGETTEXT_015 = /usr/bin/xgettext
+XGETTEXT_EXTRA_OPTIONS =
+XMKMF =
+XMLGRAPHICS_COMMONS = /home/shashank/scilab-master_5.5.2/thirdparty/xmlgraphics-commons-1.4.jar
+XML_APIS_EXT = /home/shashank/scilab-master_5.5.2/thirdparty/xml-apis-ext.jar
+XML_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/xml2-config
+XML_FLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include/libxml2
+XML_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lxml2 -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lz -lm -ldl
+XML_VERSION = 2.9.1
+X_CFLAGS =
+X_EXTRA_LIBS =
+X_LIBS =
+X_PRE_LIBS =
+abs_builddir = /home/shashank/scilab-master_5.5.2/modules/simulated_annealing
+abs_srcdir = /home/shashank/scilab-master_5.5.2/modules/simulated_annealing
+abs_top_builddir = /home/shashank/scilab-master_5.5.2
+abs_top_srcdir = /home/shashank/scilab-master_5.5.2
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN =
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+cxx_present = yes
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/shashank/scilab-master_5.5.2/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+
+#### Target ######
+modulename = simulated_annealing
+
+#### simulated_annealing : Conf files ####
+libsimulated_annealing_la_rootdir = $(mydatadir)
+libsimulated_annealing_la_root_DATA = license.txt
+
+#### simulated_annealing : init scripts ####
+libsimulated_annealing_la_etcdir = $(mydatadir)/etc
+libsimulated_annealing_la_etc_DATA = etc/simulated_annealing.quit etc/simulated_annealing.start
+
+# Where all the Scilab stuff is installed (macros, help, ...)
+mydatadir = $(pkgdatadir)/modules/$(modulename)
+
+# Set AM_* SCI detected settings
+AM_CPPFLAGS = $(SCI_CPPFLAGS)
+AM_CFLAGS = $(SCI_CFLAGS)
+AM_CXXFLAGS = $(SCI_CXXFLAGS)
+# append includes to AM_FFLAGS to manage fortran includes
+AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/
+
+# Tag shared libraries with the Scilab version
+AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION)
+
+# splint options
+SPLINT_OPTIONS = -weak -booltype BOOL
+
+########################### JAVA ######################################
+#### We are delegating java compilation to ant... Thanks to that
+#### the procedure will be the same with Microsoft Windows (C)
+#### and Linux/Unix
+#######################################################################
+TARGETS_ALL = $(am__append_1)
+
+################ MACROS ######################
+# Rule to build a macro
+# NOT USED AT THE MOMENT
+SUFFIXES = .sci
+
+########### INSTALL DOCUMENTATION ###################
+
+# Install documentation files into the right target
+# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
+# automake needs the html files to be present which is not the case when
+# we are building Scilab
+
+# Where it should be installed
+pkgdocdir = $(mydatadir)
+
+# What is the mask of the help source
+DOCMASKXML = *.xml
+
+# What is the mask of the MathML sources
+DOCMASKMML = *.mml
+
+########### INSTALL DATA ###################
+# Install macros, help & demos
+# Where it should be installed
+pkgmacrosdir = $(mydatadir)
+# Which directory we process
+MACRODIRS = macros/
+# Mask of the Scilab sources macros
+MACROMASK = *.sci
+# Mask of the Scilab executable sources macros
+MACROBUILDMASK = *.sce
+# Mask of the Scilab compiled macros
+MACROBINMASK = *.bin
+# List of the standard directory for tests
+TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java
+# Where the demos should be installed
+pkgdemosdir = $(mydatadir)
+# List of the standard directory for demos
+DEMOS_DIR = demos
+# List of the standard directory for examples
+EXAMPLES_DIR = examples
+# Where to export JAVA archives (.jar)
+JARDIR = jar/
+# JAR files mask
+JARMASK = *.jar
+# Chapter file
+HELP_CHAPTERDIR = help/
+HELP_CHAPTERFILE = addchapter.sce
+HELP_CHAPTERLANG = en_US fr_FR pt_BR
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .sci .bin
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/simulated_annealing/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/simulated_annealing/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/Makefile.incl.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-libsimulated_annealing_la_etcDATA: $(libsimulated_annealing_la_etc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsimulated_annealing_la_etc_DATA)'; test -n "$(libsimulated_annealing_la_etcdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsimulated_annealing_la_etcdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsimulated_annealing_la_etcdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsimulated_annealing_la_etcdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsimulated_annealing_la_etcdir)" || exit $$?; \
+ done
+
+uninstall-libsimulated_annealing_la_etcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsimulated_annealing_la_etc_DATA)'; test -n "$(libsimulated_annealing_la_etcdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsimulated_annealing_la_etcdir)'; $(am__uninstall_files_from_dir)
+install-libsimulated_annealing_la_rootDATA: $(libsimulated_annealing_la_root_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsimulated_annealing_la_root_DATA)'; test -n "$(libsimulated_annealing_la_rootdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsimulated_annealing_la_rootdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsimulated_annealing_la_rootdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsimulated_annealing_la_rootdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsimulated_annealing_la_rootdir)" || exit $$?; \
+ done
+
+uninstall-libsimulated_annealing_la_rootDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsimulated_annealing_la_root_DATA)'; test -n "$(libsimulated_annealing_la_rootdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsimulated_annealing_la_rootdir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(DATA) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(libsimulated_annealing_la_etcdir)" "$(DESTDIR)$(libsimulated_annealing_la_rootdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-local
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local \
+ install-libsimulated_annealing_la_etcDATA \
+ install-libsimulated_annealing_la_rootDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am: install-html-local
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libsimulated_annealing_la_etcDATA \
+ uninstall-libsimulated_annealing_la_rootDATA
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am all-local check check-am check-local clean \
+ clean-generic clean-libtool clean-local cscopelist-am ctags-am \
+ distclean distclean-generic distclean-libtool distclean-local \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-html-local install-info \
+ install-info-am install-libsimulated_annealing_la_etcDATA \
+ install-libsimulated_annealing_la_rootDATA install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am \
+ uninstall-libsimulated_annealing_la_etcDATA \
+ uninstall-libsimulated_annealing_la_rootDATA
+
+
+# This target enables tests for Scilab
+check-local: $(top_builddir)/scilab-bin test
+ if test -d $(mydatadir)/tests; then \
+ @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \
+ fi
+check-code:
+ if test -f build.xml; then \
+ $(ANT) checkstyle; \
+ fi
+ if test -x "$(SPLINT)"; then \
+ $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
+ fi
+java:
+# Some configurations needs to export JAVA_HOME in the current env
+ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT); \
+ fi
+
+clean-java:
+# Some configurations needs to export JAVA_HOME in the current env
+ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) clean; \
+ fi;
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+#swig: $(SWIG_WRAPPERS)
+# @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
+# SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
+# if test -n "$(SWIG_WRAPPERS)"; then \
+# for file in $(SWIG_WRAPPERS) ; do \
+# echo "Swig process of $$file (Java) ..."; \
+# $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
+# done; \
+# fi
+
+#swig-scilab: $(SWIG_SCILAB_WRAPPERS)
+# @SWIG_OUTDIR=src/swig/; \
+# if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \
+# for file in $(SWIG_SCILAB_WRAPPERS) ; do \
+# echo "Swig process of $$file (Scilab) ..."; \
+# $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \
+# done; \
+# fi
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+#giws: $(GIWS_WRAPPERS)
+# @GIWS_OUTPUTDIR=src/jni/; \
+# MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \
+# if test -n "$(GIWS_WRAPPERS)"; then \
+# for file in $(GIWS_WRAPPERS) ; do \
+# echo "GIWS process of $$file ..."; \
+# if test -z "$(GIWS_OPTIONS)"; then \
+# $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+# else \
+# echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \
+# $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+# fi \
+# done; \
+# fi
+
+#giws-exception:
+# @GIWS_OUTPUTDIR=src/jni/;\
+# echo "GIWS: Generation of exception class ..."; \
+# $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR
+
+macros:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been built"; \
+ else \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
+ fi)
+
+# Removes the macros
+clean-macros:
+# Removes macros (*.bin generated from .sci)
+ @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
+ rm -f $(builddir)/$$dir/$(MACROBINMASK); \
+ done
+
+test:
+# More tests could be added here
+ @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) test; \
+ fi
+
+all-local: $(TARGETS_ALL)
+
+.sci.bin:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been build"; \
+ else \
+ echo "Creating $@"; \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
+ fi )
+
+install-html-local:
+
+install-data-local-local:
+# Mainly for javasci
+ @if test -d $(srcdir)/javadoc; then \
+ cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \
+ fi
+# If the user wants the help sources to be installed
+ @echo "-------- Install of XML sources of help files --------"; \
+ for lang in $(ALL_LINGUAS); do \
+ if test -d $(srcdir)/help/$$lang; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
+ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
+ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
+ done ; \
+ fi; \
+ fi; \
+ done; \
+ @echo "-------- Install of MathML sources --------"; \
+ if test -d $(srcdir)/help/mml/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
+ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
+ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
+ done ; \
+ fi; \
+ fi
+install-data-local:
+# Install the tests
+ @echo "-------- Install tests (if any) --------"; \
+ for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the help chapter
+ @echo "-------- Install the help chapter (if any) --------"; \
+ for lang in $(HELP_CHAPTERLANG); do \
+ HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
+ if test -f $$HELPFILE; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ fi; \
+ done
+# Install the demos & examples
+ @echo "-------- Install demos & examples (if any) --------"; \
+ for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the macros
+ @echo "-------- Install macros (if any) --------"; \
+ for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ if test -d $(srcdir)/$$dir/; then \
+ FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
+ if test -n "$(MACROSSPECIALEXT)"; then \
+ specialExtDir=""; \
+ for specialExt in $(MACROSSPECIALEXT); do \
+ specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
+ done; \
+ FILELIST="$$FILELIST $$specialExtDir"; \
+ fi; \
+ for file in `ls -1 $$FILELIST 2>/dev/null`; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
+ done; \
+ fi; \
+ done
+# Install java files (.jar)
+ @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
+ echo "-------- Install jar files --------"; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
+ for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
+ done ; \
+ fi
+
+########### CLEAN ###################
+# Clean help (generated automatically by Scilab)
+# It used to clean the macro (clean-macros) but this was causing
+# make clean && make to fail Scilab startup
+clean-local: clean-java
+#clean-local:
+
+distclean-local:
+ rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
+
+.PHONY: macros java swig giws
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/simulated_annealing/Makefile.am b/modules/simulated_annealing/Makefile.am
new file mode 100755
index 000000000..149e47f66
--- /dev/null
+++ b/modules/simulated_annealing/Makefile.am
@@ -0,0 +1,21 @@
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+#### Target ######
+modulename=simulated_annealing
+
+#### simulated_annealing : Conf files ####
+libsimulated_annealing_la_rootdir = $(mydatadir)
+libsimulated_annealing_la_root_DATA = license.txt
+
+#### simulated_annealing : init scripts ####
+libsimulated_annealing_la_etcdir = $(mydatadir)/etc
+libsimulated_annealing_la_etc_DATA = etc/simulated_annealing.quit etc/simulated_annealing.start
+
+include $(top_srcdir)/Makefile.incl.am
diff --git a/modules/simulated_annealing/Makefile.in b/modules/simulated_annealing/Makefile.in
new file mode 100755
index 000000000..d62897668
--- /dev/null
+++ b/modules/simulated_annealing/Makefile.in
@@ -0,0 +1,1015 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+#
+
+##########
+### Makefile included stuff
+### Target, variable, suffixes which are supposed to be useful in every makefile.am
+##########
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs
+@NEED_JAVA_TRUE@am__append_1 = java
+subdir = modules/simulated_annealing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \
+ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \
+ $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \
+ $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
+ $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
+ $(top_srcdir)/m4/intel_compiler.m4 \
+ $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
+ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \
+ $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \
+ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
+ $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
+ $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libsimulated_annealing_la_etcdir)" \
+ "$(DESTDIR)$(libsimulated_annealing_la_rootdir)"
+DATA = $(libsimulated_annealing_la_etc_DATA) \
+ $(libsimulated_annealing_la_root_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+ALL_LINGUAS_DOC = @ALL_LINGUAS_DOC@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANT = @ANT@
+ANTLR = @ANTLR@
+AR = @AR@
+ARPACK_LIBS = @ARPACK_LIBS@
+ASM3 = @ASM3@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVALON_FRAMEWORK = @AVALON_FRAMEWORK@
+AWK = @AWK@
+BATIK = @BATIK@
+BLAS_LIBS = @BLAS_LIBS@
+CC = @CC@
+CCACHE = @CCACHE@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKSTYLE = @CHECKSTYLE@
+COBERTURA = @COBERTURA@
+COMMONS_BEANUTILS = @COMMONS_BEANUTILS@
+COMMONS_IO = @COMMONS_IO@
+COMMONS_LOGGING = @COMMONS_LOGGING@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_CONFIG = @CURL_CONFIG@
+CURL_LIBS = @CURL_LIBS@
+CURL_VERSION = @CURL_VERSION@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCBOOK_ROOT = @DOCBOOK_ROOT@
+DOXYGEN_BIN = @DOXYGEN_BIN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ECJ = @ECJ@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FFTW3_LIB = @FFTW3_LIB@
+FFTW_ENABLE = @FFTW_ENABLE@
+FGREP = @FGREP@
+FLEXDOCK = @FLEXDOCK@
+FLIBS = @FLIBS@
+FOP = @FOP@
+FREEHEP_GRAPHICS2D = @FREEHEP_GRAPHICS2D@
+FREEHEP_GRAPHICSIO = @FREEHEP_GRAPHICSIO@
+FREEHEP_GRAPHICSIO_EMF = @FREEHEP_GRAPHICSIO_EMF@
+FREEHEP_IO = @FREEHEP_IO@
+FREEHEP_UTIL = @FREEHEP_UTIL@
+GENHTML = @GENHTML@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GIWS_BIN = @GIWS_BIN@
+GLUEGEN2_RT = @GLUEGEN2_RT@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GRAPHICS_ENABLE = @GRAPHICS_ENABLE@
+GREP = @GREP@
+GUI_ENABLE = @GUI_ENABLE@
+HDF5_CFLAGS = @HDF5_CFLAGS@
+HDF5_LIBS = @HDF5_LIBS@
+HELP_ENABLE = @HELP_ENABLE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JAR = @JAR@
+JAVA = @JAVA@
+JAVAC = @JAVAC@
+JAVAC_DEBUG = @JAVAC_DEBUG@
+JAVADOC = @JAVADOC@
+JAVAH = @JAVAH@
+JAVASCI_ENABLE = @JAVASCI_ENABLE@
+JAVA_ENABLE = @JAVA_ENABLE@
+JAVA_G = @JAVA_G@
+JAVA_HOME = @JAVA_HOME@
+JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@
+JAVA_JNI_LIBS = @JAVA_JNI_LIBS@
+JDB = @JDB@
+JEUCLID_CORE = @JEUCLID_CORE@
+JGRAPHX = @JGRAPHX@
+JHALL = @JHALL@
+JLATEXMATH = @JLATEXMATH@
+JLATEXMATH_FOP = @JLATEXMATH_FOP@
+JOGL2 = @JOGL2@
+JROSETTA_API = @JROSETTA_API@
+JROSETTA_ENGINE = @JROSETTA_ENGINE@
+JUNIT4 = @JUNIT4@
+LAPACK_LIBS = @LAPACK_LIBS@
+LCOV = @LCOV@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOGGING_LEVEL = @LOGGING_LEVEL@
+LOOKS = @LOOKS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MATIO_CFLAGS = @MATIO_CFLAGS@
+MATIO_ENABLE = @MATIO_ENABLE@
+MATIO_LIBS = @MATIO_LIBS@
+MKDIR_P = @MKDIR_P@
+MPI_ENABLE = @MPI_ENABLE@
+MSGCAT = @MSGCAT@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OCAMLC = @OCAMLC@
+OCAMLDEP = @OCAMLDEP@
+OCAMLLEX = @OCAMLLEX@
+OCAMLOPT = @OCAMLOPT@
+OCAMLYACC = @OCAMLYACC@
+OPENMPI_CC = @OPENMPI_CC@
+OPENMPI_CFLAGS = @OPENMPI_CFLAGS@
+OPENMPI_CXX = @OPENMPI_CXX@
+OPENMPI_CXXFLAGS = @OPENMPI_CXXFLAGS@
+OPENMPI_LIBS = @OPENMPI_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_ENABLE = @OPENMP_ENABLE@
+OPENMP_LIBS = @OPENMP_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PCRE_CFLAGS = @PCRE_CFLAGS@
+PCRE_CONFIG = @PCRE_CONFIG@
+PCRE_LIBS = @PCRE_LIBS@
+PCRE_VERSION = @PCRE_VERSION@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+RANLIB = @RANLIB@
+RELOCATABLE = @RELOCATABLE@
+RT_LIB = @RT_LIB@
+SAXON = @SAXON@
+SCILAB_BINARY_VERSION = @SCILAB_BINARY_VERSION@
+SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@
+SCILAB_VERSION_MAINTENANCE = @SCILAB_VERSION_MAINTENANCE@
+SCILAB_VERSION_MAJOR = @SCILAB_VERSION_MAJOR@
+SCILAB_VERSION_MINOR = @SCILAB_VERSION_MINOR@
+SCIRENDERER = @SCIRENDERER@
+SCIRENDERER_CP = @SCIRENDERER_CP@
+SCI_CFLAGS = @SCI_CFLAGS@
+SCI_CXXFLAGS = @SCI_CXXFLAGS@
+SCI_FFLAGS = @SCI_FFLAGS@
+SCI_LDFLAGS = @SCI_LDFLAGS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SET_RELOCATABLE = @SET_RELOCATABLE@
+SHELL = @SHELL@
+SKINLF = @SKINLF@
+SPLINT = @SPLINT@
+STRIP = @STRIP@
+SWIG_BIN = @SWIG_BIN@
+SWIG_JAVA = @SWIG_JAVA@
+SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@
+SWIG_SCILAB = @SWIG_SCILAB@
+TCLTK_LIBS = @TCLTK_LIBS@
+TCL_INC_PATH = @TCL_INC_PATH@
+TK_INC_PATH = @TK_INC_PATH@
+UMFPACK_CFLAGS = @UMFPACK_CFLAGS@
+UMFPACK_ENABLE = @UMFPACK_ENABLE@
+UMFPACK_LIB = @UMFPACK_LIB@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WITH_OCAML = @WITH_OCAML@
+WITH_TKSCI = @WITH_TKSCI@
+XCOS_ENABLE = @XCOS_ENABLE@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@
+XML_APIS_EXT = @XML_APIS_EXT@
+XML_CONFIG = @XML_CONFIG@
+XML_FLAGS = @XML_FLAGS@
+XML_LIBS = @XML_LIBS@
+XML_VERSION = @XML_VERSION@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+cxx_present = @cxx_present@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#### Target ######
+modulename = simulated_annealing
+
+#### simulated_annealing : Conf files ####
+libsimulated_annealing_la_rootdir = $(mydatadir)
+libsimulated_annealing_la_root_DATA = license.txt
+
+#### simulated_annealing : init scripts ####
+libsimulated_annealing_la_etcdir = $(mydatadir)/etc
+libsimulated_annealing_la_etc_DATA = etc/simulated_annealing.quit etc/simulated_annealing.start
+
+# Where all the Scilab stuff is installed (macros, help, ...)
+mydatadir = $(pkgdatadir)/modules/$(modulename)
+
+# Set AM_* SCI detected settings
+AM_CPPFLAGS = $(SCI_CPPFLAGS)
+AM_CFLAGS = $(SCI_CFLAGS)
+AM_CXXFLAGS = $(SCI_CXXFLAGS)
+# append includes to AM_FFLAGS to manage fortran includes
+AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/
+
+# Tag shared libraries with the Scilab version
+AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION)
+
+# splint options
+SPLINT_OPTIONS = -weak -booltype BOOL
+
+########################### JAVA ######################################
+#### We are delegating java compilation to ant... Thanks to that
+#### the procedure will be the same with Microsoft Windows (C)
+#### and Linux/Unix
+#######################################################################
+TARGETS_ALL = $(am__append_1)
+
+################ MACROS ######################
+# Rule to build a macro
+# NOT USED AT THE MOMENT
+SUFFIXES = .sci
+
+########### INSTALL DOCUMENTATION ###################
+
+# Install documentation files into the right target
+# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
+# automake needs the html files to be present which is not the case when
+# we are building Scilab
+
+# Where it should be installed
+pkgdocdir = $(mydatadir)
+
+# What is the mask of the help source
+DOCMASKXML = *.xml
+
+# What is the mask of the MathML sources
+DOCMASKMML = *.mml
+
+########### INSTALL DATA ###################
+# Install macros, help & demos
+# Where it should be installed
+pkgmacrosdir = $(mydatadir)
+# Which directory we process
+MACRODIRS = macros/
+# Mask of the Scilab sources macros
+MACROMASK = *.sci
+# Mask of the Scilab executable sources macros
+MACROBUILDMASK = *.sce
+# Mask of the Scilab compiled macros
+MACROBINMASK = *.bin
+# List of the standard directory for tests
+TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java
+# Where the demos should be installed
+pkgdemosdir = $(mydatadir)
+# List of the standard directory for demos
+DEMOS_DIR = demos
+# List of the standard directory for examples
+EXAMPLES_DIR = examples
+# Where to export JAVA archives (.jar)
+JARDIR = jar/
+# JAR files mask
+JARMASK = *.jar
+# Chapter file
+HELP_CHAPTERDIR = help/
+HELP_CHAPTERFILE = addchapter.sce
+HELP_CHAPTERLANG = en_US fr_FR pt_BR
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .sci .bin
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/simulated_annealing/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/simulated_annealing/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/Makefile.incl.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-libsimulated_annealing_la_etcDATA: $(libsimulated_annealing_la_etc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsimulated_annealing_la_etc_DATA)'; test -n "$(libsimulated_annealing_la_etcdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsimulated_annealing_la_etcdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsimulated_annealing_la_etcdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsimulated_annealing_la_etcdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsimulated_annealing_la_etcdir)" || exit $$?; \
+ done
+
+uninstall-libsimulated_annealing_la_etcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsimulated_annealing_la_etc_DATA)'; test -n "$(libsimulated_annealing_la_etcdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsimulated_annealing_la_etcdir)'; $(am__uninstall_files_from_dir)
+install-libsimulated_annealing_la_rootDATA: $(libsimulated_annealing_la_root_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsimulated_annealing_la_root_DATA)'; test -n "$(libsimulated_annealing_la_rootdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsimulated_annealing_la_rootdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsimulated_annealing_la_rootdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsimulated_annealing_la_rootdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsimulated_annealing_la_rootdir)" || exit $$?; \
+ done
+
+uninstall-libsimulated_annealing_la_rootDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsimulated_annealing_la_root_DATA)'; test -n "$(libsimulated_annealing_la_rootdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsimulated_annealing_la_rootdir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(DATA) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(libsimulated_annealing_la_etcdir)" "$(DESTDIR)$(libsimulated_annealing_la_rootdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-local
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local \
+ install-libsimulated_annealing_la_etcDATA \
+ install-libsimulated_annealing_la_rootDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am: install-html-local
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libsimulated_annealing_la_etcDATA \
+ uninstall-libsimulated_annealing_la_rootDATA
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am all-local check check-am check-local clean \
+ clean-generic clean-libtool clean-local cscopelist-am ctags-am \
+ distclean distclean-generic distclean-libtool distclean-local \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-html-local install-info \
+ install-info-am install-libsimulated_annealing_la_etcDATA \
+ install-libsimulated_annealing_la_rootDATA install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am \
+ uninstall-libsimulated_annealing_la_etcDATA \
+ uninstall-libsimulated_annealing_la_rootDATA
+
+
+# This target enables tests for Scilab
+check-local: $(top_builddir)/scilab-bin test
+ if test -d $(mydatadir)/tests; then \
+ @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \
+ fi
+check-code:
+ if test -f build.xml; then \
+ $(ANT) checkstyle; \
+ fi
+ if test -x "$(SPLINT)"; then \
+ $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
+ fi
+@NEED_JAVA_TRUE@java:
+# Some configurations needs to export JAVA_HOME in the current env
+@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
+@NEED_JAVA_TRUE@ $(ANT); \
+@NEED_JAVA_TRUE@ fi
+
+@NEED_JAVA_TRUE@clean-java:
+# Some configurations needs to export JAVA_HOME in the current env
+@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
+@NEED_JAVA_TRUE@ $(ANT) clean; \
+@NEED_JAVA_TRUE@ fi;
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+@SWIG_TRUE@swig: $(SWIG_WRAPPERS)
+@SWIG_TRUE@ @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
+@SWIG_TRUE@ SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
+@SWIG_TRUE@ if test -n "$(SWIG_WRAPPERS)"; then \
+@SWIG_TRUE@ for file in $(SWIG_WRAPPERS) ; do \
+@SWIG_TRUE@ echo "Swig process of $$file (Java) ..."; \
+@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
+@SWIG_TRUE@ done; \
+@SWIG_TRUE@ fi
+
+@SWIG_TRUE@swig-scilab: $(SWIG_SCILAB_WRAPPERS)
+@SWIG_TRUE@ @SWIG_OUTDIR=src/swig/; \
+@SWIG_TRUE@ if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \
+@SWIG_TRUE@ for file in $(SWIG_SCILAB_WRAPPERS) ; do \
+@SWIG_TRUE@ echo "Swig process of $$file (Scilab) ..."; \
+@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \
+@SWIG_TRUE@ done; \
+@SWIG_TRUE@ fi
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+@GIWS_TRUE@giws: $(GIWS_WRAPPERS)
+@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/; \
+@GIWS_TRUE@ MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \
+@GIWS_TRUE@ if test -n "$(GIWS_WRAPPERS)"; then \
+@GIWS_TRUE@ for file in $(GIWS_WRAPPERS) ; do \
+@GIWS_TRUE@ echo "GIWS process of $$file ..."; \
+@GIWS_TRUE@ if test -z "$(GIWS_OPTIONS)"; then \
+@GIWS_TRUE@ $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+@GIWS_TRUE@ else \
+@GIWS_TRUE@ echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \
+@GIWS_TRUE@ $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+@GIWS_TRUE@ fi \
+@GIWS_TRUE@ done; \
+@GIWS_TRUE@ fi
+
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@ echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@ $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR
+
+macros:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been built"; \
+ else \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
+ fi)
+
+# Removes the macros
+clean-macros:
+# Removes macros (*.bin generated from .sci)
+ @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
+ rm -f $(builddir)/$$dir/$(MACROBINMASK); \
+ done
+
+test:
+# More tests could be added here
+ @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) test; \
+ fi
+
+all-local: $(TARGETS_ALL)
+
+.sci.bin:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been build"; \
+ else \
+ echo "Creating $@"; \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
+ fi )
+
+install-html-local:
+
+install-data-local-local:
+# Mainly for javasci
+ @if test -d $(srcdir)/javadoc; then \
+ cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \
+ fi
+# If the user wants the help sources to be installed
+@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of XML sources of help files --------"; \
+@INSTALL_HELP_XML_TRUE@ for lang in $(ALL_LINGUAS); do \
+@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/$$lang; then \
+@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
+@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
+@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
+@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
+@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
+@INSTALL_HELP_XML_TRUE@ done ; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ done; \
+@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of MathML sources --------"; \
+@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/mml/; then \
+@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
+@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
+@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
+@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
+@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
+@INSTALL_HELP_XML_TRUE@ done ; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ fi
+install-data-local:
+# Install the tests
+ @echo "-------- Install tests (if any) --------"; \
+ for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the help chapter
+ @echo "-------- Install the help chapter (if any) --------"; \
+ for lang in $(HELP_CHAPTERLANG); do \
+ HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
+ if test -f $$HELPFILE; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ fi; \
+ done
+# Install the demos & examples
+ @echo "-------- Install demos & examples (if any) --------"; \
+ for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the macros
+ @echo "-------- Install macros (if any) --------"; \
+ for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ if test -d $(srcdir)/$$dir/; then \
+ FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
+ if test -n "$(MACROSSPECIALEXT)"; then \
+ specialExtDir=""; \
+ for specialExt in $(MACROSSPECIALEXT); do \
+ specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
+ done; \
+ FILELIST="$$FILELIST $$specialExtDir"; \
+ fi; \
+ for file in `ls -1 $$FILELIST 2>/dev/null`; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
+ done; \
+ fi; \
+ done
+# Install java files (.jar)
+ @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
+ echo "-------- Install jar files --------"; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
+ for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
+ done ; \
+ fi
+
+########### CLEAN ###################
+# Clean help (generated automatically by Scilab)
+# It used to clean the macro (clean-macros) but this was causing
+# make clean && make to fail Scilab startup
+@NEED_JAVA_TRUE@clean-local: clean-java
+@NEED_JAVA_FALSE@clean-local:
+
+distclean-local:
+ rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
+
+.PHONY: macros java swig giws
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/simulated_annealing/demos/Ising/init_ising2d.sci b/modules/simulated_annealing/demos/Ising/init_ising2d.sci
new file mode 100755
index 000000000..cef3b0573
--- /dev/null
+++ b/modules/simulated_annealing/demos/Ising/init_ising2d.sci
@@ -0,0 +1,7 @@
+function Var = init_ising2d(Size, Proba)
+ if (~isdef("Proba","local")) then
+ Proba = 0.5;
+ end
+ Var = 2*(rand(Size,Size)<Proba)-1;
+endfunction
+
diff --git a/modules/simulated_annealing/demos/Ising/init_potts2d.sci b/modules/simulated_annealing/demos/Ising/init_potts2d.sci
new file mode 100755
index 000000000..57ae38f6d
--- /dev/null
+++ b/modules/simulated_annealing/demos/Ising/init_potts2d.sci
@@ -0,0 +1,19 @@
+function Var = init_potts2d(Size, Level, Proba)
+ if ~isdef("Level","local") then
+ Level = 2;
+ end
+ if ~isdef("Proba","local") then
+ Proba = 0.5;
+ end
+ Var = zeros(Size,Size);
+ for i=1:Size
+ for j=1:Size
+ Value = floor(rand(1,1)*Level);
+ if (rand(1,1)<Proba) then
+ Var(i,j) = -Value;
+ else
+ Var(i,j) = Value;
+ end
+ end
+ end
+endfunction
diff --git a/modules/simulated_annealing/demos/Ising/ising2d.sci b/modules/simulated_annealing/demos/Ising/ising2d.sci
new file mode 100755
index 000000000..8b170d6ca
--- /dev/null
+++ b/modules/simulated_annealing/demos/Ising/ising2d.sci
@@ -0,0 +1,88 @@
+function [E_Value, M_Value] = ising2d(Var, J, H, Magnet, Connect)
+
+ [nargout, nargin] = argn();
+
+ M_Value_defined = (nargout==2);
+
+ if (~isdef("Connect","local")) then
+ Connect = %F;
+ end
+
+ if (~isdef("Magnet","local")) then
+ Magnet = %F;
+ end
+
+ if (~isdef("H","local")) then
+ H = 1.0;
+ end
+
+ Value = 0;
+ //J = J/2;
+ Size = size(Var,1);
+ for i=2:Size-1
+ for j=2:Size-1
+ Value = Value + J*Var(i,j)*(Var(i-1,j) + Var(i+1,j) + Var(i,j-1) + Var(i,j+1));
+ end
+ end
+ if (~Connect) then
+ // First line
+ for j=2:Size-1
+ Value = Value + J*Var(1,j)*(Var(2,j) + Var(1,j-1) + Var(1,j+1));
+ end
+ // Last line
+ for j=2:Size-1
+ Value = Value + J*Var(Size,j)*(Var(Size-1,j) + Var(Size,j-1) + Var(Size,j+1));
+ end
+ // First column
+ for i=2:Size-1
+ Value = Value + J*Var(i,1)*(Var(i-1,1) + Var(i+1,1) + Var(i,2));
+ end
+ // Second column
+ for i=2:Size-1
+ Value = Value + J*Var(i,Size)*(Var(i-1,Size) + Var(i+1,Size) + Var(i,Size-1));
+ end
+ // First corner
+ Value = Value + J*Var(1,1)*(Var(2,1) + Var(1,2));
+ // Second corner
+ Value = Value + J*Var(Size,1)*(Var(Size-1,1) + Var(1,2));
+ // Third corner
+ Value = Value + J*Var(1,Size)*(Var(2,Size) + Var(1,Size-1));
+ // Fourth corner
+ Value = Value + J*Var(Size,Size)*(Var(Size-1,Size) + Var(Size,Size-1));
+ else
+ // First line
+ for j=2:Size-1
+ Value = Value + J*Var(1,j)*(Var(Size,j) + Var(2,j) + Var(1,j-1) + Var(1,j+1));
+ end
+ // Last line
+ for j=2:Size-1
+ Value = Value + J*Var(Size,j)*(Var(Size-1,j) + Var(1,j) + Var(Size,j-1) + Var(Size,j+1));
+ end
+ // First column
+ for i=2:Size-1
+ Value = Value + J*Var(i,1)*(Var(i-1,1) + Var(i+1,1) + Var(i,Size) + Var(i,2));
+ end
+ // Second column
+ for i=2:Size-1
+ Value = Value + J*Var(i,Size)*(Var(i-1,Size) + Var(i+1,Size) + Var(i,Size-1) + Var(i,1));
+ end
+ // First corner
+ Value = Value + J*Var(1,1)*(Var(Size,1) + Var(2,1) + Var(1,Size) + Var(1,2));
+ // Second corner
+ Value = Value + J*Var(Size,1)*(Var(Size-1,1) + Var(1,1) + Var(1,Size) + Var(1,2));
+ // Third corner
+ Value = Value + J*Var(1,Size)*(Var(Size,Size) + Var(2,Size) + Var(1,1) + Var(1,Size-1));
+ // Fourth corner
+ Value = Value + J*Var(Size,Size)*(Var(Size-1,Size) + Var(1,Size) + Var(Size,Size-1) + Var(Size,1));
+ end
+
+ E_Value = - Value;
+
+ if (Magnet) then
+ M_Value = - H * sum(Var);
+ if (M_Value_defined) then
+ E_Value = E_Value + M_Value;
+ end
+ end
+
+endfunction
diff --git a/modules/simulated_annealing/demos/Ising/plot_ising2d.sci b/modules/simulated_annealing/demos/Ising/plot_ising2d.sci
new file mode 100755
index 000000000..13e54d55e
--- /dev/null
+++ b/modules/simulated_annealing/demos/Ising/plot_ising2d.sci
@@ -0,0 +1,17 @@
+function plot_ising2d(Var)
+ drawlater;
+ a = gca();
+ Size = size(Var,1);
+ a.data_bounds = [0.5,0.5;Size+0.5,Size+0.5];
+ for i=1:Size
+ for j=1:Size
+ if (Var(i,j)==1) then
+ plot(i,j,"go");
+ else
+ plot(i,j,"r+");
+ end
+ end
+ end
+ xtitle("Ising 2D model");
+ drawnow;
+endfunction
diff --git a/modules/simulated_annealing/demos/Ising/plot_potts2d.sci b/modules/simulated_annealing/demos/Ising/plot_potts2d.sci
new file mode 100755
index 000000000..91c59cef0
--- /dev/null
+++ b/modules/simulated_annealing/demos/Ising/plot_potts2d.sci
@@ -0,0 +1,21 @@
+function plot_potts2d(Var, Level)
+ Size = size(Var,1);
+ drawlater;
+ f=gcf();
+ f.color_map = graycolormap(2*Level+1);
+ a = gca();
+ a.data_bounds = [0,0;Size+1,Size+1];
+ Z = zeros(Size*Size,3);
+ Index = 0;
+ for i=1:Size
+ for j=1:Size
+ Index = Index + 1;
+ Z(Index,1) = i;
+ Z(Index,2) = j;
+ Z(Index,3) = Var(i,j);
+ end
+ end
+ param3d1(Z(:,1),Z(:,2),list(Z(:,3),-9));
+ xtitle("Potts 2D model");
+ drawnow;
+endfunction
diff --git a/modules/simulated_annealing/demos/SAIsing2ddemo.sce b/modules/simulated_annealing/demos/SAIsing2ddemo.sce
new file mode 100755
index 000000000..35e2ac942
--- /dev/null
+++ b/modules/simulated_annealing/demos/SAIsing2ddemo.sce
@@ -0,0 +1,80 @@
+//////////////////////////////////////////////////////
+// example of use of the simulated annealing method //
+//////////////////////////////////////////////////////
+
+function demo_sa_2()
+
+ my_handle = scf(100001);
+ clf(my_handle,"reset");
+ demo_viewCode("SAIsing2ddemo.sce");
+ my_handle.info_message = _("Please wait ...");
+
+ lines(0);
+ old_funcprot = funcprot();
+ funcprot(0);
+
+ // Loading the test problem
+
+ path = get_absolute_file_path("SAIsing2ddemo.sce");
+
+ getd(path + "/Ising");
+
+ // Loading the neighborhood function for the ising problem
+
+ getd(path + "/.");
+
+ Proba_start = 0.8;
+ It_intern = 1000;
+ It_extern = 30;
+ It_Pre = 100;
+ Log = %T;
+ alpha = 0.9;
+
+ Ising_Dim = 10;
+ Ising_Proba = 0.3;
+ J = 1.1;
+ H = 0.7;
+ Magnet = "%T";
+ Connect = "%T";
+
+ // For the minimization case, everything must be at -1 or 1 in the optimal solution
+ deff("y=f(x)","y = ising2d(x,"+string(J)+","+string(H)+","+Magnet+","+Connect+")");
+ // For the maximization case, we must have a checker board solution (+1 -1 +1 -1 ....)
+ //deff("y=f(x)","y = - ising2d(x,"+string(J)+","+string(H)+","+Magnet+","+Connect+")");
+
+ x0 = init_ising2d(Ising_Dim, Ising_Proba);
+
+ /////////////////////////
+ // Simulated Annealing //
+ /////////////////////////
+
+ printf("\nSA: geometrical decrease temperature law\n");
+
+ sa_params = init_param();
+ sa_params = add_param(sa_params,"dimension",10);
+ sa_params = add_param(sa_params,"proba",0.05);
+ sa_params = add_param(sa_params,"neigh_func", neigh_func_ising2d); // Required because this operator is specific to the ising2d problem
+ sa_params = add_param(sa_params,"accept_func", accept_func_default); // Optional
+ sa_params = add_param(sa_params,"temp_law", temp_law_default); // Optional
+ sa_params = add_param(sa_params,"alpha",alpha); // For the temperature decreasing law
+
+ T0 = compute_initial_temp(x0, f, Proba_start, It_Pre, sa_params);
+
+ printf("Initial temperature T0 = %f\n", T0);
+
+ [x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, f, It_extern, It_intern, T0, Log, sa_params);
+
+ printf("optimal solution:\n"); disp(x_opt);
+ printf("value of the objective function = %f\n", f_opt);
+
+ if is_handle_valid(my_handle) then
+ plot_ising2d(x_opt);
+ my_handle.info_message = "";
+ end
+
+ funcprot(old_funcprot);
+
+endfunction
+
+demo_sa_2();
+clear demo_sa_2; \ No newline at end of file
diff --git a/modules/simulated_annealing/demos/SAdemo.sce b/modules/simulated_annealing/demos/SAdemo.sce
new file mode 100755
index 000000000..2012e1449
--- /dev/null
+++ b/modules/simulated_annealing/demos/SAdemo.sce
@@ -0,0 +1,272 @@
+//////////////////////////////////////////////////////
+// example of use of the simulated annealing method //
+//////////////////////////////////////////////////////
+
+function demo_sa_1()
+
+ my_handle = scf(100001);
+ clf(my_handle,"reset");
+ demo_viewCode("SAdemo.sce");
+ my_handle.info_message = _("Please wait ...");
+
+ lines(0);
+ old_funcprot = funcprot();
+ funcprot(0);
+
+ ////////////////////////
+ // Rastrigin function //
+ ////////////////////////
+
+ function Res = min_bd_rastrigin()
+ Res = [-1 -1]';
+ endfunction
+ function Res = max_bd_rastrigin()
+ Res = [1 1]';
+ endfunction
+ function Res = opti_rastrigin()
+ Res = [0 0]';
+ endfunction
+ function y = rastrigin(x)
+ y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
+ endfunction
+
+ func = "rastrigin";
+
+ Proba_start = 0.8;
+ It_intern = 1000;
+ It_extern = 30;
+ It_Pre = 100;
+ alpha = 0.9;
+
+ DoSA = %T;
+ DoFSA = %F;
+ DoVFSA = %F;
+ DoCSA = %F;
+ DoHuang = %F;
+
+ //////////////////////////////////////////
+
+ Min = eval("min_bd_"+func+"()");
+ Max = eval("max_bd_"+func+"()");
+ x0 = (Max - Min).*rand(size(Min,1),size(Min,2)) + Min;
+
+ deff("y=f(x)","y="+func+"(x)");
+
+ /////////////////////////
+ // Simulated Annealing //
+ /////////////////////////
+
+ if DoSA then
+ printf("\nSA: geometrical decrease temperature law\n");
+
+ sa_params = init_param();
+ sa_params = add_param(sa_params,"min_delta",-0.1*(Max-Min));
+ sa_params = add_param(sa_params,"max_delta", 0.1*(Max-Min));
+ sa_params = add_param(sa_params,"neigh_func", neigh_func_default); // Optional
+ sa_params = add_param(sa_params,"accept_func", accept_func_default); // Optional
+ sa_params = add_param(sa_params,"temp_law", temp_law_default); // Optional
+ sa_params = add_param(sa_params,"min_bound",Min);
+ sa_params = add_param(sa_params,"max_bound",Max);
+ sa_params = add_param(sa_params,"alpha",alpha); // for the decreasing temperature law
+
+ T0 = compute_initial_temp(x0, f, Proba_start, It_Pre, sa_params);
+ printf("Initial temperature T0 = %f\n", T0);
+
+ [x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, f, It_extern, It_intern, T0, Log = %T, sa_params);
+
+ printf("optimal solution:\n"); disp(x_opt);
+ printf("value of the objective function = %f\n", f_opt);
+
+ if is_handle_valid(my_handle) then
+ drawlater;
+ subplot(2,1,1);
+ xtitle("Geometrical annealing","Iteration","Mean / Variance");
+ t = 1:length(sa_mean_list);
+ plot(t,sa_mean_list,"r",t,sa_var_list,"g");
+ legend(["Mean","Variance"]);
+ subplot(2,1,2);
+ xtitle("Temperature evolution","Iteration","Temperature");
+ for i=1:length(t)-1
+ plot([t(i) t(i+1)], [temp_list(i) temp_list(i)],"k-");
+ end
+ drawnow;
+ my_handle.info_message = "";
+ end
+ end
+
+ /////////
+ // FSA //
+ /////////
+
+ if DoFSA then
+ printf("SA: the FSA algorithm\n");
+
+ sa_params = init_param();
+ sa_params = add_param(sa_params,"min_delta",-0.1*(Max-Min));
+ sa_params = add_param(sa_params,"max_delta", 0.1*(Max-Min));
+ sa_params = add_param(sa_params,"neigh_func", neigh_func_default); // Required for compute_initial_temp
+ sa_params = add_param(sa_params,"accept_func", accept_func_default); // Optional
+ sa_params = add_param(sa_params,"temp_law", temp_law_fsa); // Required to transform SA into FSA
+ sa_params = add_param(sa_params,"min_bound",Min);
+ sa_params = add_param(sa_params,"max_bound",Max);
+
+ T0 = compute_initial_temp(x0, f, Proba_start, It_Pre, sa_params);
+
+ sa_params = remove_param(sa_params,"neigh_func");
+ sa_params = add_param(sa_params,"neigh_func", neigh_func_fsa); // Required to transform SA into FSA
+
+ printf("Initial temperature T0 = %f\n", T0);
+
+ [x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, f, It_extern, It_intern, T0, Log = %T, sa_params);
+
+ printf("optimal solution:\n"); disp(x_opt);
+ printf("value of the objective function = %f\n", f_opt);
+
+ scf();
+ drawlater;
+ subplot(2,1,1);
+ xtitle("FSA","Iteration","Mean / Variance");
+ t = 1:length(sa_mean_list);
+ plot(t,sa_mean_list,"r",t,sa_var_list,"g");
+ legend(["Mean","Variance"]);
+ subplot(2,1,2);
+ xtitle("Temperature evolution","Iteration","Temperature");
+ for i=1:length(t)-1
+ plot([t(i) t(i+1)], [temp_list(i) temp_list(i)],"k-");
+ end
+ drawnow;
+ end
+
+ //////////
+ // VFSA //
+ //////////
+
+ if DoVFSA then
+ printf("SA: the VFSA algorithm\n");
+
+ sa_params = init_param();
+ sa_params = add_param(sa_params,"min_delta",-0.1*(Max-Min));
+ sa_params = add_param(sa_params,"max_delta", 0.1*(Max-Min));
+ sa_params = add_param(sa_params,"accept_func", accept_func_vfsa); // Required to transform SA into FSA
+ sa_params = add_param(sa_params,"neigh_func", neigh_func_default); // Required for compute_initial_temp
+ sa_params = add_param(sa_params,"temp_law", temp_law_vfsa); // Required to transform SA into FSA
+ sa_params = add_param(sa_params,"type_accept", "vfsa"); // Required to compute correctly the starting temperature for VFSA
+ sa_params = add_param(sa_params,"dimension", length(x0)); // Required to compute correctly the starting temperature for VFSA
+ sa_params = add_param(sa_params,"min_bound",Min);
+ sa_params = add_param(sa_params,"max_bound",Max);
+
+ T0 = compute_initial_temp(x0, f, Proba_start, It_Pre, sa_params);
+
+ sa_params = remove_param(sa_params,"neigh_func");
+ sa_params = add_param(sa_params,"neigh_func", neigh_func_vfsa); // Required to transform SA into VFSA
+ sa_params = remove_param(sa_params,"type_accept");
+ sa_params = add_param(sa_params,"type_accept", "sa"); // We go back to the classical method for computing the starting temperature
+
+ printf("Initial temperature T0 = %f\n", T0);
+
+ [x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, f, It_extern, It_intern, T0, Log = %T, sa_params);
+
+ printf("optimal solution:\n"); disp(x_opt);
+ printf("value of the objective function = %f\n", f_opt);
+
+ scf();
+ drawlater;
+ subplot(2,1,1);
+ xtitle("VFSA","Iteration","Mean / Variance");
+ t = 1:length(sa_mean_list);
+ plot(t,sa_mean_list,"r",t,sa_var_list,"g");
+ legend(["Mean","Variance"]);
+ subplot(2,1,2);
+ xtitle("Temperature evolution","Iteration","Temperature");
+ for i=1:length(t)-1
+ plot([t(i) t(i+1)], [temp_list(i) temp_list(i)],"k-");
+ end
+ drawnow;
+ end
+
+ /////////
+ // CSA //
+ /////////
+
+ if DoCSA then
+ printf("SA: the CSA algorithm\n");
+
+ sa_params = init_param();
+ sa_params = add_param(sa_params,"min_delta",-0.1*(Max-Min));
+ sa_params = add_param(sa_params,"max_delta", 0.1*(Max-Min));
+ sa_params = add_param(sa_params,"neigh_func", neigh_func_default); // Required for compute_initial_temp
+ sa_params = add_param(sa_params,"accept_func", accept_func_default); // Optional
+ sa_params = add_param(sa_params,"temp_law", temp_law_csa); // Required to transform SA into CSA
+ sa_params = add_param(sa_params,"min_bound",Min);
+ sa_params = add_param(sa_params,"max_bound",Max);
+
+ T0 = compute_initial_temp(x0, f, Proba_start, It_Pre, sa_params);
+
+ sa_params = remove_param(sa_params,"neigh_func");
+ sa_params = add_param(sa_params,"neigh_func", neigh_func_csa); // Required to transform SA into CSA
+
+ printf("Initial temperature T0 = %f\n", T0);
+
+ [x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, f, It_extern, It_intern, T0, Log = %T, sa_params);
+
+ printf("optimal solution:\n"); disp(x_opt);
+ printf("value of the objective function = %f\n", f_opt);
+
+ scf();
+ drawlater;
+ subplot(2,1,1);
+ xtitle("Classical simulated annealing","Iteration","Mean / Variance");
+ t = 1:length(sa_mean_list);
+ plot(t,sa_mean_list,"r",t,sa_var_list,"g");
+ legend(["Mean","Variance"]);
+ subplot(2,1,2);
+ xtitle("Temperature evolution","Iteration","Temperature");
+ for i=1:length(t)-1
+ plot([t(i) t(i+1)], [temp_list(i) temp_list(i)],"k-");
+ end
+ drawnow;
+ end
+
+ ///////////
+ // Huang //
+ ///////////
+
+ if DoHuang then
+ printf("SA: the Huang annealing\n");
+
+ sa_params = init_param();
+ sa_params = add_param(sa_params,"min_delta",-0.1*(Max-Min));
+ sa_params = add_param(sa_params,"max_delta", 0.1*(Max-Min));
+ sa_params = add_param(sa_params,"temp_law", temp_law_huang);
+ sa_params = add_param(sa_params,"min_bound",Min);
+ sa_params = add_param(sa_params,"max_bound",Max);
+
+ T0 = compute_initial_temp(x0, f, Proba_start, It_Pre, sa_params);
+ printf("Initial temperature T0 = %f\n", T0);
+
+ [x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, f, It_extern, It_intern, T0, Log = %T, sa_params);
+
+ printf("optimal solution:\n"); disp(x_opt);
+ printf("value of the objective function = %f\n", f_opt);
+
+ scf();
+ drawlater;
+ subplot(2,1,1);
+ xtitle("Huang annealing","Iteration","Mean / Variance");
+ t = 1:length(sa_mean_list);
+ plot(t,sa_mean_list,"r",t,sa_var_list,"g");
+ legend(["Mean","Variance"]);
+ subplot(2,1,2);
+ xtitle("Temperature evolution","Iteration","Temperature");
+ for i=1:length(t)-1
+ plot([t(i) t(i+1)], [temp_list(i) temp_list(i)],"k-");
+ end
+ drawnow;
+ end
+
+ funcprot(old_funcprot);
+
+endfunction
+
+demo_sa_1();
+clear demo_sa_1; \ No newline at end of file
diff --git a/modules/simulated_annealing/demos/neigh_func_ising2d.sci b/modules/simulated_annealing/demos/neigh_func_ising2d.sci
new file mode 100755
index 000000000..83c977c8f
--- /dev/null
+++ b/modules/simulated_annealing/demos/neigh_func_ising2d.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x_neigh = neigh_func_ising2d(x_current, T, param)
+ if ~isdef("param","local")
+ param = [];
+ end
+
+ Index_x = ceil(rand()*(size(x_current,1)-%eps)+%eps);
+ Index_y = ceil(rand()*(size(x_current,1)-%eps)+%eps);
+
+ x_neigh = x_current;
+ x_neigh(Index_x,Index_y) = x_neigh(Index_x,Index_y)*(-1);
+
+endfunction
+
diff --git a/modules/simulated_annealing/demos/simulated_annealing.dem.gateway.sce b/modules/simulated_annealing/demos/simulated_annealing.dem.gateway.sce
new file mode 100755
index 000000000..67caf4eef
--- /dev/null
+++ b/modules/simulated_annealing/demos/simulated_annealing.dem.gateway.sce
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - INRIA
+// Copyright (C) 2010 - DIGITEO - Yann COLLETTE
+//
+// This file is released under the 3-clause BSD license. See COPYING-BSD.
+
+subdemolist = [_("Simulated Annealing"), "SAdemo.sce"; ..
+_("Simulated Annealing and Ising problem"), "SAIsing2ddemo.sce"];
+
+subdemolist(:,2) = SCI + "/modules/simulated_annealing/demos/" + subdemolist(:,2)
diff --git a/modules/simulated_annealing/etc/simulated_annealing.quit b/modules/simulated_annealing/etc/simulated_annealing.quit
new file mode 100755
index 000000000..b64bbfc8d
--- /dev/null
+++ b/modules/simulated_annealing/etc/simulated_annealing.quit
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2007-2008 - INRIA
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// =============================================================================
diff --git a/modules/simulated_annealing/etc/simulated_annealing.start b/modules/simulated_annealing/etc/simulated_annealing.start
new file mode 100755
index 000000000..f23f73577
--- /dev/null
+++ b/modules/simulated_annealing/etc/simulated_annealing.start
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// Load functions libraries
+// =============================================================================
+load("SCI/modules/simulated_annealing/macros/lib");
+
diff --git a/modules/simulated_annealing/help/en_US/addchapter.sce b/modules/simulated_annealing/help/en_US/addchapter.sce
new file mode 100755
index 000000000..cc5aafc0c
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("Simulated Annealing",SCI+"/modules/simulated_annealing/help/en_US",%T);
+
diff --git a/modules/simulated_annealing/help/en_US/algorithms/CHAPTER b/modules/simulated_annealing/help/en_US/algorithms/CHAPTER
new file mode 100755
index 000000000..72bf6070b
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/algorithms/CHAPTER
@@ -0,0 +1,2 @@
+title = Algorithms
+
diff --git a/modules/simulated_annealing/help/en_US/algorithms/optim_sa.xml b/modules/simulated_annealing/help/en_US/algorithms/optim_sa.xml
new file mode 100755
index 000000000..fb572f2bb
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/algorithms/optim_sa.xml
@@ -0,0 +1,489 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ * Copyright (C) 2010 - Michael Baudin
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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="optim_sa" xml:lang="en">
+ <refnamediv>
+ <refname>optim_sa</refname>
+ <refpurpose>A Simulated Annealing optimization method</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>
+ x_best = optim_sa(x0,f,ItExt,ItInt,T0,Log,temp_law,param_temp_law,neigh_func,param_neigh_func)
+ [x_best,f_best] = optim_sa(..)
+ [x_best,f_best,mean_list] = optim_sa(..)
+ [x_best,f_best,mean_list,var_list] = optim_sa(..)
+ [x_best,f_best,mean_list,var_list,f_history] = optim_sa(..)
+ [x_best,f_best,mean_list,var_list,f_history,temp_list] = optim_sa(..)
+ [x_best,f_best,mean_list,var_list,f_history,temp_list,x_history] = optim_sa(..)
+ [x_best,f_best,mean_list,var_list,f_history,temp_list,x_history,iter] = optim_sa(..)
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>x0</term>
+ <listitem>
+ <para>the initial solution</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>f</term>
+ <listitem>
+ <para>
+ the objective function to be optimized (the prototype if
+ f(x))
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ItExt</term>
+ <listitem>
+ <para>the number of temperature decrease</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ItInt</term>
+ <listitem>
+ <para>the number of iterations during one temperature stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T0</term>
+ <listitem>
+ <para>
+ the initial temperature (see compute_initial_temp to compute
+ easily this temperature)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Log</term>
+ <listitem>
+ <para>
+ if %T, some information will be displayed during the run of
+ the simulated annealing
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>temp_law</term>
+ <listitem>
+ <para>
+ the temperature decrease law (see temp_law_default for an
+ example of such a function)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param_temp_law</term>
+ <listitem>
+ <para>
+ a structure (of any kind - it depends on the temperature law
+ used) which is transmitted as a parameter to temp_law
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>neigh_func</term>
+ <listitem>
+ <para>
+ a function which computes a neighbor of a given point (see
+ neigh_func_default for an example of such a function)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param_neigh_func</term>
+ <listitem>
+ <para>
+ a structure (of any kind like vector, list, it depends on the
+ neighborhood function used) which is transmitted as a parameter to
+ neigh_func
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>x_best</term>
+ <listitem>
+ <para>the best solution found so far</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>f_best</term>
+ <listitem>
+ <para>the objective function value corresponding to x_best</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>mean_list</term>
+ <listitem>
+ <para>
+ the mean of the objective function value for each temperature
+ stage. A vector of float (optional)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>var_list</term>
+ <listitem>
+ <para>
+ the variance of the objective function values for each
+ temperature stage. A vector of float (optional)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>f_history</term>
+ <listitem>
+ <para>
+ the computed objective function values for each iteration.
+ Each input of the list corresponds to a temperature stage. Each
+ input of the list is a vector of float which gathers all the
+ objective function values computed during the corresponding
+ temperature stage - (optional)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>temp_list</term>
+ <listitem>
+ <para>
+ the list of temperature computed for each temperature stage. A
+ vector of float (optional)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>x_history</term>
+ <listitem>
+ <para>
+ the parameter values computed for each iteration. Each input
+ of the list corresponds to a temperature stage. Each input of the
+ list is a vector of input variables which corresponds to all the
+ variables computed during the corresponding temperature stage -
+ (optional - can slow down a lot the execution of optim_sa)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>iter</term>
+ <listitem>
+ <para>
+ a double, the actual number of external iterations in the
+ algorithm (optional).
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>A Simulated Annealing optimization method.</para>
+ <para>
+ Simulated annealing (SA) is a generic probabilistic meta-algorithm for the global optimization
+ problem, namely locating a good approximation to the global optimum of a given function in a
+ large search space. It is often used when the search space is discrete (e.g., all tours that
+ visit a given set of cities).
+ </para>
+ <para>
+ The current solver can find the solution of an optimization problem without constraints or
+ with bound constraints. The bound constraints can be customized with the neighbour
+ function. This algorithm does not use the derivatives of the objective function.
+ </para>
+ <para>
+ The solver is made of Scilab macros, which enables a high-level programming model for
+ this optimization solver. The SA macros are based on the <literal>parameters</literal>
+ Scilab module for the management of the (many) optional parameters.
+ </para>
+ <para>
+ To use the SA algorithm, one should perform the following steps :
+ <itemizedlist><listitem>
+ configure the parameters with calls to <literal>init_param</literal>
+ and <literal>add_param</literal> especially the neighbor function, the
+ acceptance function, the temperature law,
+ </listitem>
+ <listitem>
+ compute an initial temperature with a call to <literal>compute_initial_temp</literal>,
+ </listitem>
+ <listitem>
+ find an optimum by using the <literal>optim_sa</literal> solver.
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ The algorithm is based on an iterative update of two points :
+ <itemizedlist><listitem>
+ the current point is updated by taking into account the neighbour and the acceptance
+ functions,
+ </listitem>
+ <listitem>
+ the best point is the point which achieved the minimum of the objective function over the
+ iterations.
+ </listitem>
+ </itemizedlist>
+ While the current point is used internally to explore the domain, only the best point is returned
+ by the function.
+ The algorithm is based on an external loop and an internal loop. In the external loop,
+ the temperature is updated according to the temperature function. In the internal loop, the
+ point is updated according to the neighbour function. A new point is accepted depending
+ on its associated function value or the value of the acceptance function, which value
+ depends on the current temperature and a uniform random number.
+ </para>
+ <para>
+ The acceptance of the new point depends on the output values produced
+ by the <literal>rand</literal> function. This implies that two consecutive
+ calls to the <literal>optim_sa</literal> will not produce the same result.
+ In order to always get exactly the same results, please initialize the random number
+ generator with a valid seed.
+ </para>
+ <para>
+ See the Demonstrations, in the "Optimization" section and "Simulated Annealing" subsection
+ for more examples.
+ </para>
+ </refsection>
+ <refsection>
+ <title>The objective function</title>
+ <para>
+ The objective function is expected to have the following header.
+ </para>
+ <programlisting role="no-scilab-exec"><![CDATA[
+function y = f ( x )
+ ]]></programlisting>
+ <para>
+ In the case where the objective function needs additional parameters,
+ the objective function can be defined as a list, where the first
+ argument is the cost function, and the second argument is the
+ additional parameter. See below for an example.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <para>
+ In the following example, we search the minimum of the
+ Rastriging function. This function has many local minimas, but only
+ one single global minimum located at x = (0,0), where the function value is
+ f(x) = -2. We use the simulated annealing algorithm with default settings
+ and the default neighbour function neigh_func_default.
+ </para>
+ <programlisting role="example"><![CDATA[
+function y = rastrigin(x)
+ y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
+endfunction
+
+x0 = [2 2];
+Proba_start = 0.7;
+It_Pre = 100;
+It_extern = 100;
+It_intern = 1000;
+x_test = neigh_func_default(x0);
+
+T0 = compute_initial_temp(x0, rastrigin, Proba_start, It_Pre);
+
+Log = %T;
+[x_opt, f_opt, sa_mean_list, sa_var_list] = optim_sa(x0, rastrigin, It_extern, It_intern, T0, Log);
+
+mprintf("optimal solution:\n"); disp(x_opt);
+mprintf("value of the objective function = %f\n", f_opt);
+
+t = 1:length(sa_mean_list);
+plot(t,sa_mean_list,"r",t,sa_var_list,"g");
+ ]]></programlisting>
+ <scilab:image>
+ function y = rastrigin(x)
+ y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
+ endfunction
+
+ x0 = [2 2];
+ Proba_start = 0.7;
+ It_Pre = 100;
+ It_extern = 100;
+ It_intern = 1000;
+ x_test = neigh_func_default(x0);
+
+ T0 = compute_initial_temp(x0, rastrigin, Proba_start, It_Pre);
+
+ Log = %f;
+ [x_opt, f_opt, sa_mean_list, sa_var_list] = optim_sa(x0, rastrigin, It_extern, It_intern, T0, Log);
+
+ t = 1:length(sa_mean_list);
+ plot(t,sa_mean_list,"r",t,sa_var_list,"g");
+ </scilab:image>
+ </refsection>
+ <refsection>
+ <title>Configuring a neighbour function</title>
+ <para>
+ In the following example, we customize the
+ neighbourhood function. In order to pass this function to the
+ <literal>optim_sa</literal> function, we setup a parameter where the
+ <literal>"neigh_func"</literal> key is associated with our particular neighbour function.
+ The neighbour function can be customized at will, provided that the
+ header of the function is the same. The particular implementation shown
+ below is the same, in spirit, as the <literal>neigh_func_default</literal>
+ function.
+ </para>
+ <programlisting role="example"><![CDATA[
+function f = quad ( x )
+ p = [4 3];
+ f = (x(1) - p(1))^2 + (x(2) - p(2))^2
+endfunction
+
+// We produce a neighbor by adding some noise to each component of a given vector
+function x_neigh = myneigh_func ( x_current, T , param)
+ nxrow = size(x_current,"r")
+ nxcol = size(x_current,"c")
+ sa_min_delta = -0.1*ones(nxrow,nxcol);
+ sa_max_delta = 0.1*ones(nxrow,nxcol);
+ x_neigh = x_current + (sa_max_delta - sa_min_delta).*rand(nxrow,nxcol) + sa_min_delta;
+endfunction
+
+x0 = [2 2];
+Proba_start = 0.7;
+It_Pre = 100;
+It_extern = 50;
+It_intern = 100;
+
+saparams = init_param();
+saparams = add_param(saparams,"neigh_func", myneigh_func);
+// or: saparams = add_param(saparams,"neigh_func", neigh_func_default);
+// or: saparams = add_param(saparams,"neigh_func", neigh_func_csa);
+// or: saparams = add_param(saparams,"neigh_func", neigh_func_fsa);
+// or: saparams = add_param(saparams,"neigh_func", neigh_func_vfsa);
+
+T0 = compute_initial_temp(x0, quad, Proba_start, It_Pre, saparams);
+Log = %f;
+// This should produce x_opt = [4 3]
+[x_opt, f_opt] = optim_sa(x0, quad, It_extern, It_intern, T0, Log, saparams)
+ ]]></programlisting>
+ </refsection>
+ <refsection>
+ <title>Passing extra parameters</title>
+ <para>
+ In the following example, we use an objective function which requires
+ an extra parameter <literal>p</literal>. This parameter is the second
+ input argument of the <literal>quadp</literal> function. In order to
+ pass this parameter to the objective function, we define the objective
+ function as <literal>list(quadp,p)</literal>. In this case,
+ the solver makes so that the calling sequence includes a second argument.
+ </para>
+ <programlisting role="example"><![CDATA[
+ function f = quadp ( x , p )
+ f = (x(1) - p(1))^2 + (x(2) - p(2))^2
+ endfunction
+
+ x0 = [-1 -1];
+ p = [4 3];
+ Proba_start = 0.7;
+ It_Pre = 100;
+ T0 = compute_initial_temp(x0, list(quadp,p) , Proba_start, It_Pre);
+ [x_opt, f_opt] = optim_sa(x0, list(quadp,p) , 10, 1000, T0, %f)
+ ]]></programlisting>
+ </refsection>
+ <refsection>
+ <title>Configuring an output function</title>
+ <para>
+ In the following example, we define an output function, which also
+ provide a stopping rule. We define the function <literal>outfun</literal>
+ which takes as input arguments the data of the algorithm at the current
+ iteration and returns the boolean <literal>stop</literal>. This function
+ prints a message into the console to inform the user about the
+ current state of the algorithm. It also computes the boolean <literal>stop</literal>,
+ depending on the value of the function.
+ The stop variable becomes true when the function value is near zero. In order to let <literal>optim_sa</literal>
+ know about our output function, we configure the <literal>"output_func"</literal>
+ key to our <literal>outfun</literal> function and call the solver.
+ Notice that the number of external iterations is <literal>%inf</literal>, so
+ that the external loop never stops.
+ This allows to check that the output function really allows to
+ stop the algorithm.
+ </para>
+ <programlisting role="example"><![CDATA[
+function f = quad ( x )
+ p = [4 3];
+ f = (x(1) - p(1))^2 + (x(2) - p(2))^2
+endfunction
+
+function stop = outfunc ( itExt , x_best , f_best , T , saparams )
+ [mythreshold,err] = get_param(saparams,"mythreshold",0);
+ mprintf ( "Iter = #%d, \t x_best=[%f %f], \t f_best = %e, \t T = %e\n", itExt , x_best(1),x_best(2) , f_best , T )
+ stop = ( abs(f_best) < mythreshold )
+endfunction
+
+x0 = [-1 -1];
+saparams = init_param();
+saparams = add_param(saparams,"output_func", outfunc );
+saparams = add_param(saparams,"mythreshold", 1.e-2 );
+
+rand("seed",0);
+
+T0 = compute_initial_temp(x0, quad , 0.7, 100, saparams);
+[x_best, f_best, mean_list, var_list, temp_list, f_history, x_history , It ] = optim_sa(x0, quad , %inf, 100, T0, %f, saparams);
+ ]]></programlisting>
+ <para>
+ The previous script produces the following output. Notice that the actual
+ output of the algorithm depends on the state of the random number generator <literal>rand</literal>:
+ if we had not initialize the seed of the uniform random number generator,
+ we would have produced a different result.
+ </para>
+ <programlisting role="no-scilab-exec">
+ Iter = #1, x_best=[-1.000000 -1.000000], f_best = 4.100000e+001, T = 1.453537e+000
+ Iter = #2, x_best=[-0.408041 -0.318262], f_best = 3.044169e+001, T = 1.308183e+000
+ Iter = #3, x_best=[-0.231406 -0.481078], f_best = 3.002270e+001, T = 1.177365e+000
+ Iter = #4, x_best=[0.661827 0.083743], f_best = 1.964796e+001, T = 1.059628e+000
+ Iter = #5, x_best=[0.931415 0.820681], f_best = 1.416565e+001, T = 9.536654e-001
+ Iter = #6, x_best=[1.849796 1.222178], f_best = 7.784028e+000, T = 8.582988e-001
+ Iter = #7, x_best=[2.539775 1.414591], f_best = 4.645780e+000, T = 7.724690e-001
+ Iter = #8, x_best=[3.206047 2.394497], f_best = 9.969957e-001, T = 6.952221e-001
+ Iter = #9, x_best=[3.164998 2.633170], f_best = 8.317924e-001, T = 6.256999e-001
+ Iter = #10, x_best=[3.164998 2.633170], f_best = 8.317924e-001, T = 5.631299e-001
+ Iter = #11, x_best=[3.164998 2.633170], f_best = 8.317924e-001, T = 5.068169e-001
+ Iter = #12, x_best=[3.961464 2.903763], f_best = 1.074654e-002, T = 4.561352e-001
+ Iter = #13, x_best=[3.961464 2.903763], f_best = 1.074654e-002, T = 4.105217e-001
+ Iter = #14, x_best=[3.961464 2.903763], f_best = 1.074654e-002, T = 3.694695e-001
+ Iter = #15, x_best=[3.931929 3.003181], f_best = 4.643767e-003, T = 3.325226e-001
+ </programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="compute_initial_temp">
+ compute_initial_temp
+ </link>
+ </member>
+ <member>
+ <link linkend="neigh_func_default">
+ neigh_func_default
+ </link>
+ </member>
+ <member>
+ <link linkend="temp_law_default">
+ temp_law_default
+ </link>
+ </member>
+ </simplelist>
+ </refsection>
+ <refsection>
+ <title>Bibliography</title>
+ <para>
+ "Simulated annealing : theory and applications", P.J.M. Laarhoven and E.H.L. Aarts, Mathematics and its applications, Dordrecht : D. Reidel, 1988
+ </para>
+ <para>
+ "Theoretical and computational aspects of simulated annealing", P.J.M. van Laarhoven, Amsterdam, Netherlands : Centrum voor Wiskunde en Informatica, 1988
+ </para>
+ <para>
+ "Genetic algorithms and simulated annealing", Lawrence Davis, London : Pitman Los Altos, Calif. Morgan Kaufmann Publishers, 1987
+ </para>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/CHAPTER b/modules/simulated_annealing/help/en_US/utilities/CHAPTER
new file mode 100755
index 000000000..1a24f493c
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/CHAPTER
@@ -0,0 +1,2 @@
+title = Utilities
+
diff --git a/modules/simulated_annealing/help/en_US/utilities/accept_func_default.xml b/modules/simulated_annealing/help/en_US/utilities/accept_func_default.xml
new file mode 100755
index 000000000..d5a952041
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/accept_func_default.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - DIGITEO - Michael Baudin
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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="accept_func_default" xml:lang="en">
+ <refnamediv>
+ <refname>accept_func_default</refname>
+ <refpurpose>The default Simulated Annealing acceptation function.</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>Level = accept_func_default(F_current, F_neigh, T)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>F_current</term>
+ <listitem>
+ <para>the current function value</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>F_neigh</term>
+ <listitem>
+ <para>the function value of the neighbour</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T</term>
+ <listitem>
+ <para>the current temperature</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Level </term>
+ <listitem>
+ <para>the level of acceptation, in the interval [0,1].</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>
+ The <literal>accept_func_default</literal> provides the default Simulated Annealing acceptation function.
+ </para>
+ <para>
+ If the level computed by the acceptation function is higher
+ than the generated uniform random number in the interval [0,1], then the neighbour is accepted.
+ </para>
+ <para>
+ The formula used in the implementation is the following.
+ </para>
+ <programlisting role="no-scilab-exec"><![CDATA[
+Level = exp(-(F_neigh - F_current)/max(T,%eps));
+ ]]></programlisting>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+level = accept_func_default(10,9,10);
+ ]]></programlisting>
+ </refsection>
+
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="accept_func_vfsa">
+ accept_func_vfsa
+ </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/accept_func_vfsa.xml b/modules/simulated_annealing/help/en_US/utilities/accept_func_vfsa.xml
new file mode 100755
index 000000000..8ae89b617
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/accept_func_vfsa.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - DIGITEO - Michael Baudin
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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="accept_func_vfsa" xml:lang="en">
+ <refnamediv>
+ <refname>accept_func_vfsa</refname>
+ <refpurpose>The Very Fast Simulated Annealing acceptation function.</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>Level = accept_func_vfsa(F_current, F_neigh, T)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>F_current</term>
+ <listitem>
+ <para>the current function value</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>F_neigh</term>
+ <listitem>
+ <para>the function value of the neighbour</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T</term>
+ <listitem>
+ <para>the current temperature</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Level </term>
+ <listitem>
+ <para>the level of acceptation, in the interval [0,1].</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>
+ The <literal>accept_func_vfsa</literal> provides the Very Fast Simulated Annealing acceptation function.
+ </para>
+ <para>
+ If the level computed by the acceptation function is higher
+ than the generated uniform random number in the interval [0,1], then the neighbour is accepted.
+ </para>
+ <para>
+ The formula used in the implementation is the following.
+ </para>
+ <programlisting role="no-scilab-exec"><![CDATA[
+Level = 1 / (1 + exp(-(F_current - F_neigh)/max(T,%eps)));
+ ]]></programlisting>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+level = accept_func_vfsa(10, 9, 10)
+ ]]></programlisting>
+ </refsection>
+
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="accept_func_default">
+ accept_func_default
+ </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/compute_initial_temp.xml b/modules/simulated_annealing/help/en_US/utilities/compute_initial_temp.xml
new file mode 100755
index 000000000..90b0b8d8c
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/compute_initial_temp.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ * Copyright (C) 2010 - DIGITEO - Michael Baudin
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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="compute_initial_temp" xml:lang="en">
+ <refnamediv>
+ <refname>compute_initial_temp</refname>
+ <refpurpose>
+ A SA function which allows to compute the initial temperature
+ of the simulated annealing
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>T_init = compute_initial_temp(x0,f,proba_init, ItMX [, param] )</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>x0</term>
+ <listitem>
+ <para>the starting point</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>f</term>
+ <listitem>
+ <para>
+ the objective function which will be send to the simulated
+ annealing for optimization
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>proba_init</term>
+ <listitem>
+ <para>
+ the initial probability of accepting a bad solution (usually
+ around 0.7)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ItMX</term>
+ <listitem>
+ <para>
+ the number of iterations of random walk (usually around
+ 100)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>optional, a data structure managed with the parameters module.</para>
+ <para>
+ The <literal>optim_sa</literal> function is sensitive to the following fields.
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term>"neigh_func"</term>
+ <listitem>
+ <para>
+ a function which computes a neighbor of a given point.
+ The default neighbourhood function is <literal>neigh_func_default</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>"type_accept"</term>
+ <listitem>
+ <para>
+ the type of acceptation function.
+ If the type is equal to "sa", then the initial temperature
+ is computed from <literal>T_init = - f_sum ./ log(proba_init)</literal>.
+ If the type is equal to "vfsa", it is computed
+ from <literal>T_init = abs(f_sum / log(1/proba_init - 1))</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T_init</term>
+ <listitem>
+ <para>
+ The initial temperature corresponding to the given probability
+ of accepting a bad solution
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>
+ This function computes an initial temperature given an initial
+ probability of accepting a bad solution. This computation is based on
+ some iterations of random walk.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+deff('y=f(x)','y=sum(x.^2)');
+
+x0 = [2 2];
+Proba_start = 0.7;
+It_Pre = 100;
+x_test = neigh_func_default(x0);
+
+saparams = init_param();
+saparams = add_param(saparams,'neigh_func', neigh_func_default);
+
+T0 = compute_initial_temp(x0, f, Proba_start, It_Pre, saparams);
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ <member>
+ <link linkend="neigh_func_default">
+ neigh_func_default
+ </link>
+ </member>
+ <member>
+ <link linkend="temp_law_default">
+ temp_law_default
+ </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/neigh_func_csa.xml b/modules/simulated_annealing/help/en_US/utilities/neigh_func_csa.xml
new file mode 100755
index 000000000..cc75fbfeb
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/neigh_func_csa.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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="neigh_func_csa" xml:lang="en">
+ <refnamediv>
+ <refname>neigh_func_csa</refname>
+ <refpurpose>The classical neighborhood relationship for the simulated
+ annealing
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>x_neigh = neigh_func_csa(x_current,T,param)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>x_current</term>
+ <listitem>
+ <para>the point for which we want to compute a neighbor</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T</term>
+ <listitem>
+ <para>the current temperature</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>a vector with the same size than x_current. A normalization
+ vector which allows to distort the shape of the neighborhood. This
+ parameter allows to take into account the differences of interval of
+ variation between variables. By default, this parameter is set to a
+ vector of ones.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>x_neigh</term>
+ <listitem>
+ <para>the computed neighbor</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <itemizedlist>
+ <listitem>
+ <para>This function implements the classical neighborhood relationship
+ for the simulated annealing. The neighbors distribution is a gaussian
+ distribution which is more and more peaked as the temperature
+ decrease.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+x_current = 1;
+
+x_neigh = neigh_func_csa(x_current,10,[])
+ ]]></programlisting>
+ </refsection>
+
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="neigh_func_default"> neigh_func_default
+ </link>
+ </member>
+ <member>
+ <link linkend="temp_law_huang"> temp_law_huang </link>
+ </member>
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/neigh_func_default.xml b/modules/simulated_annealing/help/en_US/utilities/neigh_func_default.xml
new file mode 100755
index 000000000..572b99d11
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/neigh_func_default.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ * Copyright (C) 2010 - DIGITEO - Michael Baudin
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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="neigh_func_default" xml:lang="en">
+ <refnamediv>
+ <refname>neigh_func_default</refname>
+ <refpurpose>A SA function which computes a neighbor of a given
+ point
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>
+ x_neigh = neigh_func_default(x_current,T)
+ x_neigh = neigh_func_default(x_current,T,param)
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>x_current</term>
+ <listitem>
+ <para>the point for which we want to compute a neighbor</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T</term>
+ <listitem>
+ <para>the current temperature. This parameter is ignored but is
+ there to make all the neighbour function consistent.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>a two columns vector. The first column correspond to the
+ negative amplitude of variation and the second column corresponds to
+ the positive amplitude of variation of the neighborhood. By default,
+ the first column is a column of -0.1 and the second column is a
+ column of 0.1.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>x_neigh</term>
+ <listitem>
+ <para>the computed neighbor</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>This function computes a neighbor of a given point. For example,
+ for a continuous vector, a neighbor will be produced by adding some
+ noise to each component of the vector. For a binary string, a neighbor
+ will be produced by changing one bit from 0 to 1 or from 1 to
+ 0.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+function y = rastrigin(x)
+ y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
+endfunction
+
+x0 = [2 2];
+Proba_start = 0.7;
+It_Pre = 100;
+It_extern = 100;
+It_intern = 1000;
+x_test = neigh_func_default(x0,%nan);
+
+saparams = init_param();
+saparams = add_param(saparams,'neigh_func', neigh_func_default);
+
+T0 = compute_initial_temp(x0, rastrigin, Proba_start, It_Pre, saparams);
+Log = %T;
+[x_opt, f_opt, sa_mean_list, sa_var_list] = optim_sa(x0, rastrigin, It_extern, It_intern, T0, Log,saparams);
+
+mprintf('optimal solution:\n'); disp(x_opt);
+mprintf('value of the objective function = %f\n', f_opt);
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ <member>
+ <link linkend="compute_initial_temp"> compute_initial_temp
+ </link>
+ </member>
+ <member>
+ <link linkend="temp_law_default"> temp_law_default
+ </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/neigh_func_fsa.xml b/modules/simulated_annealing/help/en_US/utilities/neigh_func_fsa.xml
new file mode 100755
index 000000000..b3e4fb344
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/neigh_func_fsa.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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="neigh_func_fsa" xml:lang="en">
+ <refnamediv>
+ <refname>neigh_func_fsa</refname>
+ <refpurpose>The Fast Simulated Annealing neighborhood
+ relationship
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>x_neigh = neigh_func_fsa(x_current,T,param)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>x_current</term>
+ <listitem>
+ <para>the point for which we want to compute a neighbor</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T</term>
+ <listitem>
+ <para>the current temperature</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>a vector with the same size than x_current. A normalization
+ vector which allows to distort the shape of the neighborhood. This
+ parameter allows to take into account the differences of interval of
+ variation between variables. By default, this parameter is set to a
+ vector of ones.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>x_neigh</term>
+ <listitem>
+ <para>the computed neighbor</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <itemizedlist>
+ <listitem>
+ <para>This function computes the FSA neighborhood of a given point.
+ The corresponding distribution is a Cauchy distribution which is more
+ and more peaked as the temperature decrease.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+x_current = 1;
+
+x_neigh = neigh_func_fsa(x_current,10,[])
+ ]]></programlisting>
+ </refsection>
+
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ <member>
+ <link linkend="temp_law_fsa"> temp_law_fsa </link>
+ </member>
+ <member>
+ <link linkend="neigh_func_default"> neigh_func_default
+ </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/neigh_func_vfsa.xml b/modules/simulated_annealing/help/en_US/utilities/neigh_func_vfsa.xml
new file mode 100755
index 000000000..d700b97e2
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/neigh_func_vfsa.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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="neigh_func_vfsa" xml:lang="en">
+ <refnamediv>
+ <refname>neigh_func_vfsa</refname>
+ <refpurpose>The Very Fast Simulated Annealing neighborhood
+ relationship
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>x_neigh = neigh_func_vfsa(x_current,T,param)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>x_current</term>
+ <listitem>
+ <para>the point for which we want to compute a neighbor</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T</term>
+ <listitem>
+ <para>the current temperature</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>a ones column vector. The column correspond to the amplitude
+ of variation of the neighborhood. By default, the column is a column
+ of 0.1.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>x_neigh</term>
+ <listitem>
+ <para>the computed neighbor</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <itemizedlist>
+ <listitem>
+ <para>This function implements the Very Fast Simulated Annealing
+ relationship. This distribution is more and more peaked as the
+ temperature decrease.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+x_current = 1;
+
+x_neigh = neigh_func_vfsa(x_current,10,[])
+ ]]></programlisting>
+ </refsection>
+
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ <member>
+ <link linkend="neigh_func_vfsa"> neigh_func_vfsa
+ </link>
+ </member>
+ <member>
+ <link linkend="temp_law_huang"> temp_law_huang </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/temp_law_csa.xml b/modules/simulated_annealing/help/en_US/utilities/temp_law_csa.xml
new file mode 100755
index 000000000..2f559742d
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/temp_law_csa.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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_csa" xml:lang="en">
+ <refnamediv>
+ <refname>temp_law_csa</refname>
+ <refpurpose>The classical temperature decrease law</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>T_out = temp_law_csa(T_in,step_mean,step_var,temp_stage,n,param)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>T_in</term>
+ <listitem>
+ <para>the temperature at the current stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_mean</term>
+ <listitem>
+ <para>the mean value of the objective function computed during the
+ current stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_var</term>
+ <listitem>
+ <para>the variance value of the objective function computed during
+ the current stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>temp_stage</term>
+ <listitem>
+ <para>the index of the current temperature stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>n</term>
+ <listitem>
+ <para>the dimension of the decision variable (the x in f(x))</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>not used for this temperature law</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T_out</term>
+ <listitem>
+ <para>the temperature for the temperature stage to come</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <itemizedlist>
+ <listitem>
+ <para>This function implements the classical annealing temperature
+ schedule (the one for which the convergence of the simulated annealing
+ has been proven).
+ </para>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+function y = rastrigin(x)
+ y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
+endfunction
+
+x0 = [-1, -1];
+Proba_start = 0.8;
+It_intern = 1000;
+It_extern = 30;
+It_Pre = 100;
+
+mprintf('SA: the CSA algorithm\n');
+
+T0 = compute_initial_temp(x0, rastrigin, Proba_start, It_Pre, neigh_func_default);
+mprintf('Initial temperatore T0 = %f\n', T0);
+
+[x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, rastrigin, It_extern, It_intern, T0, Log = %T, temp_law_csa, neigh_func_csa);
+
+mprintf('optimal solution:\n'); disp(x_opt);
+mprintf('value of the objective function = %f\n', f_opt);
+
+scf();
+subplot(2,1,1);
+xtitle('Classical simulated annealing','Iteration','Mean / Variance');
+t = 1:length(sa_mean_list);
+plot(t,sa_mean_list,'r',t,sa_var_list,'g');
+legend(['Mean','Variance']);
+subplot(2,1,2);
+xtitle('Temperature evolution','Iteration','Temperature');
+plot(t,temp_list,'k-');
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ <member>
+ <link linkend="temp_law_huang"> temp_law_huang </link>
+ </member>
+ <member>
+ <link linkend="neigh_func_default"> neigh_func_default
+ </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/temp_law_default.xml b/modules/simulated_annealing/help/en_US/utilities/temp_law_default.xml
new file mode 100755
index 000000000..69f3e7b2d
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/temp_law_default.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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_default" xml:lang="en">
+ <refnamediv>
+ <refname>temp_law_default</refname>
+ <refpurpose>A SA function which computed the temperature of the next
+ temperature stage
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>T_next = temp_law_default(T,step_mean,step_var,temp_stage,n,param)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>T</term>
+ <listitem>
+ <para>the temperature applied during the last temperature
+ stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_mean</term>
+ <listitem>
+ <para>the mean of the objective function values computed during the
+ last temperature stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_var</term>
+ <listitem>
+ <para>the variance of the obejective function values computed during
+ the last temperature stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>temp_stage</term>
+ <listitem>
+ <para>the index of the current temperature stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>n</term>
+ <listitem>
+ <para>the dimension of the decision variable (the x in f(x))</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>a float between 0 and 1. Corresponds to the decrease in
+ temperature of the geometric law (0.9 by default)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T_next</term>
+ <listitem>
+ <para>the new temperature to be applied for the next temperature
+ stage
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <itemizedlist>
+ <listitem>
+ <para>A SA function which computed the temperature of the next
+ temperature stage
+ </para>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+// This function implements the simple geometric temperature law
+function T = temp_law_default(T, step_mean, step_var)
+ _alpha = 0.9;
+ T = _alpha*T;
+endfunction
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ <member>
+ <link linkend="compute_initial_temp"> compute_initial_temp
+ </link>
+ </member>
+ <member>
+ <link linkend="neigh_func_default"> neigh_func_default
+ </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/temp_law_fsa.xml b/modules/simulated_annealing/help/en_US/utilities/temp_law_fsa.xml
new file mode 100755
index 000000000..f6c478ad3
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/temp_law_fsa.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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_fsa" xml:lang="en">
+ <refnamediv>
+ <refname>temp_law_fsa</refname>
+ <refpurpose>The Szu and Hartley Fast simulated annealing</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>T_out = temp_law_fsa(T_in,step_mean,step_var,temp_stage,n,param)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>T_in</term>
+ <listitem>
+ <para>the temperature at the current stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_mean</term>
+ <listitem>
+ <para>the mean value of the objective function computed during the
+ current stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_var</term>
+ <listitem>
+ <para>the variance value of the objective function computed during
+ the current stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>temp_stage</term>
+ <listitem>
+ <para>the index of the current temperature stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>n</term>
+ <listitem>
+ <para>the dimension of the decision variable (the x in f(x))</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>not used for this temperature law</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T_out</term>
+ <listitem>
+ <para>the temperature for the temperature stage to come</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <itemizedlist>
+ <listitem>
+ <para>This function implements the Fast simulated annealing of Szu and
+ Hartley.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+function y = rastrigin(x)
+ y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
+endfunction
+
+x0 = [-1, -1];
+Proba_start = 0.8;
+It_intern = 1000;
+It_extern = 30;
+It_Pre = 100;
+
+mprintf('SA: the FSA algorithm\n');
+
+T0 = compute_initial_temp(x0, rastrigin, Proba_start, It_Pre, neigh_func_default);
+mprintf('Initial temperatore T0 = %f\n', T0);
+
+[x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, rastrigin, It_extern, It_intern, T0, Log = %T, temp_law_fsa, neigh_func_fsa);
+
+mprintf('optimal solution:\n'); disp(x_opt);
+mprintf('value of the objective function = %f\n', f_opt);
+
+scf();
+subplot(2,1,1);
+xtitle('Fast simulated annealing','Iteration','Mean / Variance');
+t = 1:length(sa_mean_list);
+plot(t,sa_mean_list,'r',t,sa_var_list,'g');
+legend(['Mean','Variance']);
+subplot(2,1,2);
+xtitle('Temperature evolution','Iteration','Temperature');
+plot(t,temp_list,'k-');
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ <member>
+ <link linkend="temp_law_huang"> temp_law_huang </link>
+ </member>
+ <member>
+ <link linkend="neigh_func_default"> neigh_func_default
+ </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/temp_law_huang.xml b/modules/simulated_annealing/help/en_US/utilities/temp_law_huang.xml
new file mode 100755
index 000000000..f386d23f0
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/temp_law_huang.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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_huang" xml:lang="en">
+ <refnamediv>
+ <refname>temp_law_huang</refname>
+ <refpurpose>The Huang temperature decrease law for the simulated
+ annealing
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>T_out = temp_law_huang(T_in,step_mean,step_var,temp_stage,n,param)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>T_in</term>
+ <listitem>
+ <para>the temperature at the current stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_mean</term>
+ <listitem>
+ <para>the mean value of the objective function computed during the
+ current stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_var</term>
+ <listitem>
+ <para>the variance value of the objective function computed during
+ the current stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>temp_stage</term>
+ <listitem>
+ <para>the index of the current temperature stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>n</term>
+ <listitem>
+ <para>the dimension of the decision variable (the x in f(x))</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>a float corresponding to the lambda parameter of the Huang
+ temperature decrease law (0.01 by default)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T_out</term>
+ <listitem>
+ <para>the temperature for the temperature stage to come</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <itemizedlist>
+ <listitem>
+ <para>This function implements the Huang temperature decrease law for
+ the simulated annealing.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+function y = rastrigin(x)
+ y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
+endfunction
+
+x0 = [-1, -1];
+Proba_start = 0.8;
+It_intern = 1000;
+It_extern = 30;
+It_Pre = 100;
+
+mprintf('SA: the Huang temperature decrease law\n');
+
+T0 = compute_initial_temp(x0, rastrigin, Proba_start, It_Pre, neigh_func_default);
+mprintf('Initial temperatore T0 = %f\n', T0);
+
+[x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, rastrigin, It_extern, It_intern, T0, Log = %T, temp_law_huang, neigh_func_default);
+
+mprintf('optimal solution:\n'); disp(x_opt);
+mprintf('value of the objective function = %f\n', f_opt);
+
+scf();
+subplot(2,1,1);
+xtitle('Huang simulated annealing','Iteration','Mean / Variance');
+t = 1:length(sa_mean_list);
+plot(t,sa_mean_list,'r',t,sa_var_list,'g');
+legend(['Mean','Variance']);
+subplot(2,1,2);
+xtitle('Temperature evolution','Iteration','Temperature');
+plot(t,temp_list,'k-');
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ <member>
+ <link linkend="temp_law_csa"> temp_law_csa </link>
+ </member>
+ <member>
+ <link linkend="neigh_func_csa"> neigh_func_csa </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/en_US/utilities/temp_law_vfsa.xml b/modules/simulated_annealing/help/en_US/utilities/temp_law_vfsa.xml
new file mode 100755
index 000000000..43daa542a
--- /dev/null
+++ b/modules/simulated_annealing/help/en_US/utilities/temp_law_vfsa.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+ * Copyright (C) 2010 - DIGITEO - Michael Baudin
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<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">
+ <refnamediv>
+ <refname>temp_law_vfsa</refname>
+ <refpurpose>This function implements the Very Fast Simulated Annealing
+ from L. Ingber
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>T_out = temp_law_vfsa(T_in,step_mean,step_var,temp_stage,n, param)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>T_in</term>
+ <listitem>
+ <para>the temperature at the current stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_mean</term>
+ <listitem>
+ <para>the mean value of the objective function computed during the
+ current stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>step_var</term>
+ <listitem>
+ <para>the variance value of the objective function computed during
+ the current stage
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>temp_stage</term>
+ <listitem>
+ <para>the index of the current temperature stage</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>n</term>
+ <listitem>
+ <para>the dimension of the decision variable (the x in f(x))</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>param</term>
+ <listitem>
+ <para>a float: the 'c' parameter of the VFSA method (0.01 by
+ default)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>T_out</term>
+ <listitem>
+ <para>the temperature for the temperature stage to come</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>This function implements the Very Fast Simulated Annealing from
+ L. Ingber.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+function y = rastrigin(x)
+ y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
+endfunction
+
+x0 = [-1, -1];
+Proba_start = 0.8;
+It_intern = 1000;
+It_extern = 30;
+It_Pre = 100;
+
+mprintf('SA: the VFSA algorithm\n');
+
+T0 = compute_initial_temp(x0, rastrigin, Proba_start, It_Pre, neigh_func_default);
+mprintf('Initial temperatore T0 = %f\n', T0);
+
+Log = %T;
+[x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, rastrigin, It_extern, It_intern, T0, Log);
+
+mprintf('optimal solution:\n'); disp(x_opt);
+mprintf('value of the objective function = %f\n', f_opt);
+
+scf();
+subplot(2,1,1);
+xtitle('VFSA simulated annealing','Iteration','Mean / Variance');
+t = 1:length(sa_mean_list);
+plot(t,sa_mean_list,'r',t,sa_var_list,'g');
+legend(['Mean','Variance']);
+subplot(2,1,2);
+xtitle('Temperature evolution','Iteration','Temperature');
+plot(t,temp_list,'k-');
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="optim_sa"> optim_sa </link>
+ </member>
+ <member>
+ <link linkend="neigh_func_vfsa"> neigh_func_vfsa
+ </link>
+ </member>
+ <member>
+ <link linkend="temp_law_huang"> temp_law_huang </link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/simulated_annealing/help/fr_FR/addchapter.sce b/modules/simulated_annealing/help/fr_FR/addchapter.sce
new file mode 100755
index 000000000..4082c65c1
--- /dev/null
+++ b/modules/simulated_annealing/help/fr_FR/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("Simulated Annealing",SCI+"/modules/simulated_annealing/help/fr_FR",%T);
+
diff --git a/modules/simulated_annealing/help/ja_JP/addchapter.sce b/modules/simulated_annealing/help/ja_JP/addchapter.sce
new file mode 100755
index 000000000..f956980db
--- /dev/null
+++ b/modules/simulated_annealing/help/ja_JP/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("Simulated Annealing",SCI+"/modules/simulated_annealing/help/ja_JP",%T);
+
diff --git a/modules/simulated_annealing/help/pt_BR/addchapter.sce b/modules/simulated_annealing/help/pt_BR/addchapter.sce
new file mode 100755
index 000000000..21e07bf6f
--- /dev/null
+++ b/modules/simulated_annealing/help/pt_BR/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("Arrefecimento Simulado",SCI+"/modules/simulated_annealing/help/pt_BR",%T);
+
diff --git a/modules/simulated_annealing/help/ru_RU/addchapter.sce b/modules/simulated_annealing/help/ru_RU/addchapter.sce
new file mode 100755
index 000000000..3deb772a4
--- /dev/null
+++ b/modules/simulated_annealing/help/ru_RU/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("Simulated Annealing",SCI+"/modules/simulated_annealing/help/ru_RU",%T);
+
diff --git a/modules/simulated_annealing/license.txt b/modules/simulated_annealing/license.txt
new file mode 100755
index 000000000..da3e0b896
--- /dev/null
+++ b/modules/simulated_annealing/license.txt
@@ -0,0 +1,9 @@
+Copyright:
+Copyright (c) 2008 - Yann Collette
+
+License:
+This module must be used under the terms of the CeCILL.
+This module file is licensed as described in the file COPYING, which
+you should have received as part of this distribution. The terms
+are also available at
+http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
diff --git a/modules/simulated_annealing/locales/ca_ES.po b/modules/simulated_annealing/locales/ca_ES.po
new file mode 100755
index 000000000..e468474f0
--- /dev/null
+++ b/modules/simulated_annealing/locales/ca_ES.po
@@ -0,0 +1,46 @@
+# Catalan translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-04-19 17:58+0000\n"
+"Last-Translator: Marc Coll Carrillo <Unknown>\n"
+"Language-Team: Catalan <ca@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: ca\n"
+
+msgid "Please wait ..."
+msgstr "Espereu, si us plau..."
+
+msgid "Simulated Annealing"
+msgstr "Annealing simulada"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "Problema d'Annealing i Ising simulat"
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: El cit_f és obligatori"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: error - Tipus d'acceptació errònia"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: El sa_f és obligatori"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: Pas de la temperatura %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f "
+"f_best = %f\n"
diff --git a/modules/simulated_annealing/locales/cs_CZ.po b/modules/simulated_annealing/locales/cs_CZ.po
new file mode 100755
index 000000000..898aafaac
--- /dev/null
+++ b/modules/simulated_annealing/locales/cs_CZ.po
@@ -0,0 +1,44 @@
+# Czech translation for scilab
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-09-02 15:19+0000\n"
+"Last-Translator: davidcl <Unknown>\n"
+"Language-Team: Czech <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+
+msgid "Please wait ..."
+msgstr "Čekejte prosím ..."
+
+msgid "Simulated Annealing"
+msgstr "Simulované Žíhámí"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "Simulované Žíhání a Isingův problém"
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: cit_f je povinné"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: chyba - špatný typ přístupu"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: sa_f je povinné"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: Teplota krok %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = %f\n"
diff --git a/modules/simulated_annealing/locales/de_DE.po b/modules/simulated_annealing/locales/de_DE.po
new file mode 100755
index 000000000..5cf62db4f
--- /dev/null
+++ b/modules/simulated_annealing/locales/de_DE.po
@@ -0,0 +1,46 @@
+# German translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-09-10 20:27+0000\n"
+"Last-Translator: cmdrhenner <cmdrhenner@gmail.com>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: de\n"
+
+msgid "Please wait ..."
+msgstr "Bitte warten ..."
+
+msgid "Simulated Annealing"
+msgstr "Simuliertes Glühen"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr ""
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: cit_f ist verpflichtend"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: Fehler - falscher akzeptierter Typ"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: sa_f ist verpflichtend"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: Temperatur Stufe %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
diff --git a/modules/simulated_annealing/locales/es_ES.po b/modules/simulated_annealing/locales/es_ES.po
new file mode 100755
index 000000000..b89326b62
--- /dev/null
+++ b/modules/simulated_annealing/locales/es_ES.po
@@ -0,0 +1,46 @@
+# Spanish translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2010-12-03 15:00+0000\n"
+"Last-Translator: Fido <Unknown>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: es\n"
+
+msgid "Please wait ..."
+msgstr "Por favor, espere ..."
+
+msgid "Simulated Annealing"
+msgstr "Recocido Simulado"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr ""
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: cit_f es obligatorio"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: error - tipo de aceptación incorrecta"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: sa_f es obligatorio"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: Paso de temperatura %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best "
+"= %f\n"
diff --git a/modules/simulated_annealing/locales/fr_FR.po b/modules/simulated_annealing/locales/fr_FR.po
new file mode 100755
index 000000000..0fe3a26aa
--- /dev/null
+++ b/modules/simulated_annealing/locales/fr_FR.po
@@ -0,0 +1,46 @@
+# French translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-09-02 08:22+0000\n"
+"Last-Translator: Scilab.team <Unknown>\n"
+"Language-Team: French <fr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: fr\n"
+
+msgid "Please wait ..."
+msgstr "Veuillez patienter..."
+
+msgid "Simulated Annealing"
+msgstr "Recuit simulé"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "Recuit simulé et modèle de Ising"
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s : cit_f est obligatoire"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s : Erreur - Type d'acceptation erroné"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa : sa_f est obligatoire"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s : Pas de température %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best "
+"= %f\n"
diff --git a/modules/simulated_annealing/locales/it_IT.po b/modules/simulated_annealing/locales/it_IT.po
new file mode 100755
index 000000000..b7ba2f634
--- /dev/null
+++ b/modules/simulated_annealing/locales/it_IT.po
@@ -0,0 +1,46 @@
+# Italian translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-09-02 08:23+0000\n"
+"Last-Translator: Carml <mighty.carml@gmail.com>\n"
+"Language-Team: Italian <it@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: it\n"
+
+msgid "Please wait ..."
+msgstr "Attendere ..."
+
+msgid "Simulated Annealing"
+msgstr "Ricottura simulata"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "Ricottura simulata e problema di Ising"
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: cit_f è obbligatorio"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: errore - tipo sbagliato in accept"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: sa_f è obbligatorio"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: Grado della temperatura %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f "
+"f_best = %f\n"
diff --git a/modules/simulated_annealing/locales/ja_JP.po b/modules/simulated_annealing/locales/ja_JP.po
new file mode 100755
index 000000000..81f1b0b52
--- /dev/null
+++ b/modules/simulated_annealing/locales/ja_JP.po
@@ -0,0 +1,52 @@
+# Japanese translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-09-02 08:21+0000\n"
+"Last-Translator: Scilab.team <Unknown>\n"
+"Language-Team: Japanese <z-saito@guitar.ocn.ne.jp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"X-Poedit-Country: Japan\n"
+"Language: ja\n"
+"X-Poedit-Language: Japanese\n"
+
+msgid "Please wait ..."
+msgstr "お待ちください ..."
+
+msgid "Simulated Annealing"
+msgstr "焼きなまし法"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "焼きなましおよび凍結問題"
+
+# File: macros/compute_initial_temp.sci, line: 20
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: cit_f は必須です"
+
+#
+# File: macros/compute_initial_temp.sci, line: 60
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s:エラー - 不正な型を受け付けました"
+
+#
+# File: macros/optim_sa.sci, line: 57
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: sa_f は必須です"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: 温度の増分 %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = %f\n"
diff --git a/modules/simulated_annealing/locales/pl_PL.po b/modules/simulated_annealing/locales/pl_PL.po
new file mode 100755
index 000000000..3b373cdc1
--- /dev/null
+++ b/modules/simulated_annealing/locales/pl_PL.po
@@ -0,0 +1,46 @@
+# Polish translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-10-20 14:10+0000\n"
+"Last-Translator: Grzegorz Szostek <Unknown>\n"
+"Language-Team: Polish <pl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: pl\n"
+
+msgid "Please wait ..."
+msgstr "Proszę czekać ..."
+
+msgid "Simulated Annealing"
+msgstr "Symulowane wyżarzanie"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr ""
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: cit_f jest obowiązkowy"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: błąd - zły typ akceptacji"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: sa_f jest obowiązkowy"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: Krok temperatury %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
diff --git a/modules/simulated_annealing/locales/pt_BR.po b/modules/simulated_annealing/locales/pt_BR.po
new file mode 100755
index 000000000..525b0524c
--- /dev/null
+++ b/modules/simulated_annealing/locales/pt_BR.po
@@ -0,0 +1,46 @@
+# Brazilian Portuguese translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-02-07 13:05+0000\n"
+"Last-Translator: RodolfoRG <rodolforg@gmail.com>\n"
+"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: pt_BR\n"
+
+msgid "Please wait ..."
+msgstr "Por favor, aguarde..."
+
+msgid "Simulated Annealing"
+msgstr "Arrefecimento simulado"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "Arrefecimento simulado e o problema de Ising"
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: cit_f é obrigatório"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: erro - tipo errado de aceitação"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: sa_f é obrigatório"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: Passo de temperatura %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f "
+"f_best = %f\n"
diff --git a/modules/simulated_annealing/locales/ru_RU.po b/modules/simulated_annealing/locales/ru_RU.po
new file mode 100755
index 000000000..e89a2ec28
--- /dev/null
+++ b/modules/simulated_annealing/locales/ru_RU.po
@@ -0,0 +1,46 @@
+# Russian translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2010-12-26 10:39+0000\n"
+"Last-Translator: kkirill <Unknown>\n"
+"Language-Team: Russian <ru@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: ru\n"
+
+msgid "Please wait ..."
+msgstr "Пожалуйста, подождите..."
+
+msgid "Simulated Annealing"
+msgstr "Имитационный отжиг"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "Имитационный отжиг и модель Изинга"
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: cit_f является обязательным"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: ошибка - неверный принимаемый тип"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: sa_f является обязательным"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: Шаг температуры %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
diff --git a/modules/simulated_annealing/locales/simulated_annealing.pot b/modules/simulated_annealing/locales/simulated_annealing.pot
new file mode 100755
index 000000000..b2a3757bf
--- /dev/null
+++ b/modules/simulated_annealing/locales/simulated_annealing.pot
@@ -0,0 +1,58 @@
+# Localization of the module simulated_annealing-macros
+# Please see in SCI/tools/localization for localization management
+# Copyright (C) 2007-2008 - INRIA
+# Copyright (C) 2008-2011 - DIGITEO
+# Copyright (C) 2012-2014 - Scilab-Enterprises
+# This file is distributed under the same license as the Scilab package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"Last-Translator: Vincent COUVERT <vincent.couvert@scilab-enterprises.com>\n"
+"Language-Team: Scilab Localization <localization@lists.scilab.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Revision-Date: 2015-03-27 13:54+0100\n"
+
+# File: demos/SAIsing2ddemo.sce, line: 10
+# File: demos/SAdemo.sce, line: 10
+msgid "Please wait ..."
+msgstr ""
+
+#
+# File: demos/simulated_annealing.dem.gateway.sce, line: 7
+msgid "Simulated Annealing"
+msgstr ""
+
+#
+# File: demos/simulated_annealing.dem.gateway.sce, line: 8
+msgid "Simulated Annealing and Ising problem"
+msgstr ""
+
+#
+# File: macros/compute_initial_temp.sci, line: 20
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr ""
+
+#
+# File: macros/compute_initial_temp.sci, line: 60
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr ""
+
+#
+# File: macros/optim_sa.sci, line: 59
+msgid "optim_sa: sa_f is mandatory"
+msgstr ""
+
+#
+# File: macros/optim_sa.sci, line: 128
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
diff --git a/modules/simulated_annealing/locales/uk_UA.po b/modules/simulated_annealing/locales/uk_UA.po
new file mode 100755
index 000000000..b96082be0
--- /dev/null
+++ b/modules/simulated_annealing/locales/uk_UA.po
@@ -0,0 +1,47 @@
+# Ukrainian translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+#
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+# Yuri Chornoivan <yurchor@gmail.com>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2010-12-03 16:36+0000\n"
+"Last-Translator: Yuri Chornoivan <yurchor@gmail.com>\n"
+"Language-Team: Ukrainian <translation@linux.org.ua>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: uk\n"
+
+msgid "Please wait ..."
+msgstr "Будь ласка, зачекайте…"
+
+msgid "Simulated Annealing"
+msgstr "Моделювання відпалювання"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "Моделювання задачі відпалювання та Ізінґа"
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: параметр cit_f є обов’язковим"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: помилковий тип прийняття помилкового рішення"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: параметр sa_f є обов’язковим"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr ""
+"%s: крок за температурою %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f "
+"f_best = %f\n"
diff --git a/modules/simulated_annealing/locales/zh_CN.po b/modules/simulated_annealing/locales/zh_CN.po
new file mode 100755
index 000000000..141517f0d
--- /dev/null
+++ b/modules/simulated_annealing/locales/zh_CN.po
@@ -0,0 +1,43 @@
+# Chinese (Simplified) translation for scilab
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-03-04 08:41+0000\n"
+"Last-Translator: Wesh <Unknown>\n"
+"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+
+msgid "Please wait ..."
+msgstr "请等待..."
+
+msgid "Simulated Annealing"
+msgstr "模拟退火"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "模拟退火和伊辛问题"
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s:cit_f是强制性的"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s:错误 - 接受类型错误"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa:sa_f是强制性的"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr "%s:温度步长 %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = %f\n"
diff --git a/modules/simulated_annealing/locales/zh_TW.po b/modules/simulated_annealing/locales/zh_TW.po
new file mode 100755
index 000000000..0c464a22a
--- /dev/null
+++ b/modules/simulated_annealing/locales/zh_TW.po
@@ -0,0 +1,44 @@
+# Chinese (Traditional) translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-05-23 04:03+0000\n"
+"Last-Translator: MouetteYang <Unknown>\n"
+"Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: \n"
+
+msgid "Please wait ..."
+msgstr "請稍待......"
+
+msgid "Simulated Annealing"
+msgstr "模擬鍛鍊中"
+
+msgid "Simulated Annealing and Ising problem"
+msgstr "模擬退火與Ising problem"
+
+#, c-format
+msgid "%s: cit_f is mandatory"
+msgstr "%s: cit_f 是強制性的"
+
+#, c-format
+msgid "%s: error - wrong accept type"
+msgstr "%s: 錯誤 - 接受型態錯誤"
+
+msgid "optim_sa: sa_f is mandatory"
+msgstr "optim_sa: sa_f 是強制性的"
+
+#, c-format
+msgid ""
+"%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = "
+"%f\n"
+msgstr "%s: 溫度步級 %d /%d - T = %f, E9f(T)) = %f var(f(T)) = %f f_best = %f\n"
diff --git a/modules/simulated_annealing/macros/accept_func_default.bin b/modules/simulated_annealing/macros/accept_func_default.bin
new file mode 100755
index 000000000..d656bafb6
--- /dev/null
+++ b/modules/simulated_annealing/macros/accept_func_default.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/accept_func_default.sci b/modules/simulated_annealing/macros/accept_func_default.sci
new file mode 100755
index 000000000..6a262b5a7
--- /dev/null
+++ b/modules/simulated_annealing/macros/accept_func_default.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function Level = accept_func_default(F_current, F_neigh, T)
+ Level = exp(-(F_neigh - F_current)/max(T,%eps));
+endfunction
diff --git a/modules/simulated_annealing/macros/accept_func_vfsa.bin b/modules/simulated_annealing/macros/accept_func_vfsa.bin
new file mode 100755
index 000000000..387c36a59
--- /dev/null
+++ b/modules/simulated_annealing/macros/accept_func_vfsa.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/accept_func_vfsa.sci b/modules/simulated_annealing/macros/accept_func_vfsa.sci
new file mode 100755
index 000000000..c43110544
--- /dev/null
+++ b/modules/simulated_annealing/macros/accept_func_vfsa.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function Level = accept_func_vfsa(F_current, F_neigh, T)
+ Level = 1 / (1 + exp(-(F_current - F_neigh)/max(T,%eps)));
+endfunction
diff --git a/modules/simulated_annealing/macros/buildmacros.bat b/modules/simulated_annealing/macros/buildmacros.bat
new file mode 100755
index 000000000..c4e35ec40
--- /dev/null
+++ b/modules/simulated_annealing/macros/buildmacros.bat
@@ -0,0 +1 @@
+@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit; \ No newline at end of file
diff --git a/modules/simulated_annealing/macros/buildmacros.sce b/modules/simulated_annealing/macros/buildmacros.sce
new file mode 100755
index 000000000..fde92fe47
--- /dev/null
+++ b/modules/simulated_annealing/macros/buildmacros.sce
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+if (isdef("genlib") == %f) then
+ exec(SCI+"/modules/functions/scripts/buildmacros/loadgenlib.sce");
+end
+
+genlib("simulated_annealinglib","SCI/modules/simulated_annealing/macros",%f,%t);
diff --git a/modules/simulated_annealing/macros/cleanmacros.bat b/modules/simulated_annealing/macros/cleanmacros.bat
new file mode 100755
index 000000000..5079dfd71
--- /dev/null
+++ b/modules/simulated_annealing/macros/cleanmacros.bat
@@ -0,0 +1,3 @@
+@del *.bin 2>NUL
+@del lib 2>NUL
+@del names 2>NUL \ No newline at end of file
diff --git a/modules/simulated_annealing/macros/compute_initial_temp.bin b/modules/simulated_annealing/macros/compute_initial_temp.bin
new file mode 100755
index 000000000..3e6064fba
--- /dev/null
+++ b/modules/simulated_annealing/macros/compute_initial_temp.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/compute_initial_temp.sci b/modules/simulated_annealing/macros/compute_initial_temp.sci
new file mode 100755
index 000000000..73cf7192f
--- /dev/null
+++ b/modules/simulated_annealing/macros/compute_initial_temp.sci
@@ -0,0 +1,62 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function T_init = compute_initial_temp(x0, cit_f, proba_init, ItMX, param)
+
+ if (~isdef("param","local")) then
+ param = [];
+ end
+
+ [neigh_func,err] = get_param(param,"neigh_func",neigh_func_default);
+ [type_accept,err] = get_param(param,"type_accept","sa");
+
+ if ~isdef("cit_f","local") then
+ error(sprintf(gettext("%s: cit_f is mandatory"),"compute_initial_temp"));
+ else
+ if typeof(cit_f)=="list" then
+ deff("y=_cit_f(x)","y=cit_f(1)(x, cit_f(2:$))");
+ else
+ deff("y=_cit_f(x)","y=cit_f(x)");
+ end
+ end
+
+ f_list = [];
+ x_current = x0;
+ f_current = _cit_f(x_current);
+ f_list = [f_list f_current];
+
+ for i=1:ItMX
+ x_current = neigh_func(x_current, 0, param);
+ f_current = _cit_f(x_current);
+ f_list = [f_list f_current];
+ end
+
+ NbInc = 0;
+ f_sum = 0;
+
+ for i=2:size(f_list,2)
+ if (f_list(i-1)<f_list(i)) then
+ NbInc = NbInc + 1;
+ f_sum = f_sum + (f_list(i)-f_list(i-1));
+ end
+ end
+
+ if (NbInc>0) then
+ f_sum = f_sum / NbInc;
+ end
+
+ if type_accept=="sa" then
+ // proba_init = exp(-delta_f/T_init) -> -delta_f / log(proba_init) = T_init
+ T_init = - f_sum ./ log(proba_init);
+ elseif type_accept=="vfsa" then
+ T_init = abs(f_sum / log(1/proba_init - 1));
+ else
+ error(sprintf(gettext("%s: error - wrong accept type"),"compute_initial_temp"));
+ end
+endfunction
diff --git a/modules/simulated_annealing/macros/lib b/modules/simulated_annealing/macros/lib
new file mode 100755
index 000000000..dd6729d38
--- /dev/null
+++ b/modules/simulated_annealing/macros/lib
Binary files differ
diff --git a/modules/simulated_annealing/macros/names b/modules/simulated_annealing/macros/names
new file mode 100755
index 000000000..08f7187c7
--- /dev/null
+++ b/modules/simulated_annealing/macros/names
@@ -0,0 +1,13 @@
+accept_func_default
+accept_func_vfsa
+compute_initial_temp
+neigh_func_csa
+neigh_func_default
+neigh_func_fsa
+neigh_func_vfsa
+optim_sa
+temp_law_csa
+temp_law_default
+temp_law_fsa
+temp_law_huang
+temp_law_vfsa
diff --git a/modules/simulated_annealing/macros/neigh_func_csa.bin b/modules/simulated_annealing/macros/neigh_func_csa.bin
new file mode 100755
index 000000000..f716efb73
--- /dev/null
+++ b/modules/simulated_annealing/macros/neigh_func_csa.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/neigh_func_csa.sci b/modules/simulated_annealing/macros/neigh_func_csa.sci
new file mode 100755
index 000000000..d1205e008
--- /dev/null
+++ b/modules/simulated_annealing/macros/neigh_func_csa.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x_neigh = neigh_func_csa(x_current, T, param)
+ if ~isdef("param","local") then
+ param = [];
+ end
+
+ [Sigma,err] = get_param(param,"sigma",ones(size(x_current,1), size(x_current,2)));
+ [Min,err] = get_param(param,"min_bound",-%inf*ones(size(x_current,1),size(x_current,2)));
+ [Max,err] = get_param(param,"max_bound",%inf*ones(size(x_current,1),size(x_current,2)));
+
+ x_neigh = x_current + Sigma.*sqrt(2)*T*grand(1,1,"nor",0,1);
+ x_neigh = max(min(x_neigh, Max),Min);
+endfunction
diff --git a/modules/simulated_annealing/macros/neigh_func_default.bin b/modules/simulated_annealing/macros/neigh_func_default.bin
new file mode 100755
index 000000000..637cea254
--- /dev/null
+++ b/modules/simulated_annealing/macros/neigh_func_default.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/neigh_func_default.sci b/modules/simulated_annealing/macros/neigh_func_default.sci
new file mode 100755
index 000000000..f22bc14a8
--- /dev/null
+++ b/modules/simulated_annealing/macros/neigh_func_default.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x_neigh = neigh_func_default(x_current, T, param)
+ if ~isdef("param","local") then
+ param = [];
+ end
+
+ [sa_min_delta,err] = get_param(param,"min_delta",-0.1*ones(size(x_current,1),size(x_current,2)));
+ [sa_max_delta,err] = get_param(param,"max_delta",0.1*ones(size(x_current,1),size(x_current,2)));
+ [Min,err] = get_param(param,"min_bound",-%inf*ones(size(x_current,1),size(x_current,2)));
+ [Max,err] = get_param(param,"max_bound",%inf*ones(size(x_current,1),size(x_current,2)));
+
+ x_neigh = x_current + (sa_max_delta - sa_min_delta).*grand(size(x_current,1),size(x_current,2),"def") + sa_min_delta;
+ x_neigh = max(min(x_neigh, Max),Min);
+endfunction
diff --git a/modules/simulated_annealing/macros/neigh_func_fsa.bin b/modules/simulated_annealing/macros/neigh_func_fsa.bin
new file mode 100755
index 000000000..775dd92f9
--- /dev/null
+++ b/modules/simulated_annealing/macros/neigh_func_fsa.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/neigh_func_fsa.sci b/modules/simulated_annealing/macros/neigh_func_fsa.sci
new file mode 100755
index 000000000..99bdd8bfc
--- /dev/null
+++ b/modules/simulated_annealing/macros/neigh_func_fsa.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x_neigh = neigh_func_fsa(x_current, T, param)
+ if ~isdef("param","local") then
+ param = [];
+ end
+
+ [Sigma,err] = get_param(param,"sigma",ones(size(x_current,1),size(x_current,2)));
+ [Min,err] = get_param(param,"min_bound",-%inf*ones(size(x_current,1),size(x_current,2)));
+ [Max,err] = get_param(param,"max_bound",%inf*ones(size(x_current,1),size(x_current,2)));
+
+ x_neigh = x_current + T*Sigma.*tan(%pi*(grand(size(x_current,1),size(x_current,2),"def") - 0.5));
+ x_neigh = max(min(x_neigh, Max),Min);
+endfunction
diff --git a/modules/simulated_annealing/macros/neigh_func_vfsa.bin b/modules/simulated_annealing/macros/neigh_func_vfsa.bin
new file mode 100755
index 000000000..c25053461
--- /dev/null
+++ b/modules/simulated_annealing/macros/neigh_func_vfsa.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/neigh_func_vfsa.sci b/modules/simulated_annealing/macros/neigh_func_vfsa.sci
new file mode 100755
index 000000000..78fcf4875
--- /dev/null
+++ b/modules/simulated_annealing/macros/neigh_func_vfsa.sci
@@ -0,0 +1,26 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x_neigh = neigh_func_vfsa(x_current, T, param)
+ if ~isdef("param","local") then
+ param = [];
+ end
+
+ [Delta,err] = get_param(param,"delta",0.1*ones(size(x_current,1), size(x_current,2)));
+ [Min,err] = get_param(param,"min_bound",-%inf*ones(size(x_current,1),size(x_current,2)));
+ [Max,err] = get_param(param,"max_bound",%inf*ones(size(x_current,1),size(x_current,2)));
+
+ y = zeros(size(x_current,1), size(x_current,2));
+ for i=1:length(y)
+ a = grand(1,1,"def");
+ y(i) = sign(a-0.5)*T*((1+1/T)^abs(2*a-1)-1);
+ x_neigh(i) = x_current(i) + y(i)*Delta(i);
+ end
+ x_neigh = max(min(x_neigh, Max),Min);
+endfunction
diff --git a/modules/simulated_annealing/macros/optim_sa.bin b/modules/simulated_annealing/macros/optim_sa.bin
new file mode 100755
index 000000000..992d8263d
--- /dev/null
+++ b/modules/simulated_annealing/macros/optim_sa.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/optim_sa.sci b/modules/simulated_annealing/macros/optim_sa.sci
new file mode 100755
index 000000000..5f1fe6378
--- /dev/null
+++ b/modules/simulated_annealing/macros/optim_sa.sci
@@ -0,0 +1,135 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+// Copyright (C) 2010 - DIGITEO - Michael Baudin
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [x_best, f_best, mean_list, var_list, temp_list, f_history, x_history , iter ] = optim_sa(x0, sa_f, ItExt, ItInt, T0, Log, param)
+ // Simulated annealing
+ // x0 : initial solution
+ // f : objective function
+ // ItExt : number of temperature decrease
+ // ItInt : number of iterations during one temperature step
+ // T0 : initial temperature
+ // Log : print some message during the run of the optimization
+ // param : a parameter list. this list contains the neighobrhood ('neigh_func') and some parameters related to this neighborhood functions (see the
+ // related function to list the available parameters)
+
+ [nargout, nargin] = argn();
+
+ if ~isdef("param","local") then
+ param = [];
+ end
+
+ [temp_law,err] = get_param(param,"temp_law",temp_law_default);
+ [neigh_func,err] = get_param(param,"neigh_func",neigh_func_default);
+ [accept_func,err] = get_param(param,"accept_func",accept_func_default);
+ [output_func,err] = get_param(param,"output_func",[]);
+
+ if (~isdef("Log","local")) then
+ Log = %F;
+ end
+
+ if (nargout>=6) then
+ f_history_defined = %T;
+ f_history = list();
+ else
+ f_history_defined = %F;
+ end
+
+ if (nargout>=5) then
+ temp_list_defined = %T;
+ temp_list = [];
+ else
+ temp_list_defined = %F;
+ end
+
+ if (nargout>=7) then
+ x_history_defined = %T;
+ x_history = list();
+ else
+ x_history_defined = %F;
+ end
+
+ if ~isdef("sa_f","local") then
+ error(gettext("optim_sa: sa_f is mandatory"));
+ else
+ if typeof(sa_f)=="list" then
+ deff("y=_sa_f(x)","y=sa_f(1)(x, sa_f(2:$))");
+ else
+ deff("y=_sa_f(x)","y=sa_f(x)");
+ end
+ end
+
+ T = T0;
+
+ // Some variables needed to record the behavior of the SA
+ var_list = [];
+ mean_list = [];
+ temp_list = [];
+
+ x_current = x0;
+ f_current = _sa_f(x_current);
+
+ x_best = x_current;
+ f_best = f_current;
+
+ for iter=1:ItExt
+ if ( output_func <> [] ) then
+ stop = output_func ( iter , x_best , f_best , T , saparams );
+ if (stop) then
+ break
+ end
+ end
+
+ f_list = [];
+ x_list = list();
+ for j=1:ItInt
+ x_neigh = neigh_func(x_current,T,param);
+ f_neigh = _sa_f(x_neigh);
+ if ((f_neigh<=f_current)|(accept_func(f_current,f_neigh,T)>grand(1,1,"def"))) then
+ x_current = x_neigh;
+ f_current = f_neigh;
+ end
+
+ f_list = [f_list f_current];
+
+ if (f_best>f_current) then
+ x_best = x_current;
+ f_best = f_current;
+ end
+
+ if (x_history_defined) then
+ x_list($+1) = x_current;
+ end
+ end
+
+ if (temp_list_defined) then
+ temp_list = [temp_list T];
+ end
+ if (x_history_defined) then
+ x_history($+1) = x_list;
+ end
+ if (f_history_defined) then
+ f_history($+1) = f_list;
+ end
+
+ // Computation of step_mean and step_var
+ step_mean = mean(f_list);
+ step_var = stdev(f_list);
+ mean_list = [mean_list step_mean];
+ var_list = [var_list step_var];
+
+ if (Log) then
+ printf(gettext("%s: Temperature step %d / %d - T = %f, E(f(T)) = %f var(f(T)) = %f f_best = %f\n"), "optim_sa", iter, ItExt, T, step_mean, step_var, f_best);
+ end
+
+ T = temp_law(T, step_mean, step_var, iter, max(size(x_current)), param);
+ end
+endfunction
+
+
diff --git a/modules/simulated_annealing/macros/temp_law_csa.bin b/modules/simulated_annealing/macros/temp_law_csa.bin
new file mode 100755
index 000000000..9e07f5240
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_csa.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/temp_law_csa.sci b/modules/simulated_annealing/macros/temp_law_csa.sci
new file mode 100755
index 000000000..d4a76b18d
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_csa.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function T = temp_law_csa(T, step_mean, step_var, temp_stage, n,param)
+ T = T * log(1+temp_stage)/log(2+temp_stage);
+endfunction
diff --git a/modules/simulated_annealing/macros/temp_law_default.bin b/modules/simulated_annealing/macros/temp_law_default.bin
new file mode 100755
index 000000000..83c4280a5
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_default.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/temp_law_default.sci b/modules/simulated_annealing/macros/temp_law_default.sci
new file mode 100755
index 000000000..fd5640abc
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_default.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function T = temp_law_default(T, step_mean, step_var, temp_stage, n,param)
+ if (~isdef("param","local")) then
+ param = []; // First create the empty var param
+ end
+
+ [Beta,err] = get_param(param,"beta",0);
+ [_alpha,err] = get_param(param,"alpha",0.9);
+
+ T = _alpha*T;
+endfunction
diff --git a/modules/simulated_annealing/macros/temp_law_fsa.bin b/modules/simulated_annealing/macros/temp_law_fsa.bin
new file mode 100755
index 000000000..afa61fcca
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_fsa.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/temp_law_fsa.sci b/modules/simulated_annealing/macros/temp_law_fsa.sci
new file mode 100755
index 000000000..c9232eb7a
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_fsa.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function T = temp_law_fsa(T, step_mean, step_var, temp_stage, n, param)
+ T = T * (1+n)/(2+n);
+endfunction
diff --git a/modules/simulated_annealing/macros/temp_law_huang.bin b/modules/simulated_annealing/macros/temp_law_huang.bin
new file mode 100755
index 000000000..fe934d353
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_huang.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/temp_law_huang.sci b/modules/simulated_annealing/macros/temp_law_huang.sci
new file mode 100755
index 000000000..764f9c2e4
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_huang.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function T = temp_law_huang(T, step_mean, step_var, temp_stage, n,param)
+ if (~isdef("param","local")) then
+ param = []; // First create the empty param var
+ end
+
+ [lambda,err] = get_param(param,"lambda",0.01);
+
+ T = T * exp(-lambda*T/step_var);
+endfunction
diff --git a/modules/simulated_annealing/macros/temp_law_vfsa.bin b/modules/simulated_annealing/macros/temp_law_vfsa.bin
new file mode 100755
index 000000000..92c84b196
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_vfsa.bin
Binary files differ
diff --git a/modules/simulated_annealing/macros/temp_law_vfsa.sci b/modules/simulated_annealing/macros/temp_law_vfsa.sci
new file mode 100755
index 000000000..1392cb37e
--- /dev/null
+++ b/modules/simulated_annealing/macros/temp_law_vfsa.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function T = temp_law_vfsa(T, step_mean, step_var, temp_stage, n, param)
+ if (~isdef("param","local")) then
+ param = []; // First create the empty param var
+ end
+
+ [c,err] = get_param(param,"c",0.01);
+ [dimension,err] = get_param(param,"dimension",3);
+
+ T = T * (n/(n+1))^(1/dimension);
+endfunction
diff --git a/modules/simulated_annealing/simulated_annealing.iss b/modules/simulated_annealing/simulated_annealing.iss
new file mode 100755
index 000000000..9fd05ed25
--- /dev/null
+++ b/modules/simulated_annealing/simulated_annealing.iss
@@ -0,0 +1,38 @@
+;
+; Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+; Copyright (C) INRIA - Allan CORNET
+; Copyright (C) DIGITEO - 2010 - Allan CORNET
+;
+; This file must be used under the terms of the CeCILL.
+; This source file is licensed as described in the file COPYING, which
+; you should have received as part of this distribution. The terms
+; are also available at
+; http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+;
+;--------------------------------------------------------------------------------------------------------------
+; Inno Setup Script (5.3 and more) for Scilab (UNICODE version required)
+;
+;--------------------------------------------------------------------------------------------------------------
+; simulated_annealing module
+;--------------------------------------------------------------------------------------------------------------
+;
+#define SIMANNEALING "simulated_annealing"
+;
+Source: modules\{#SIMANNEALING}\license.txt; DestDir: {app}\modules\{#SIMANNEALING}; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#SIMANNEALING}\etc\{#SIMANNEALING}.quit; DestDir: {app}\modules\{#SIMANNEALING}\etc; Components: {#COMPN_SCILAB}
+Source: modules\{#SIMANNEALING}\etc\{#SIMANNEALING}.start; DestDir: {app}\modules\{#SIMANNEALING}\etc; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#SIMANNEALING}\demos\*.*; DestDir: {app}\modules\{#SIMANNEALING}\demos; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#SIMANNEALING}\macros\lib; DestDir: {app}\modules\{#SIMANNEALING}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+Source: modules\{#SIMANNEALING}\macros\names; DestDir: {app}\modules\{#SIMANNEALING}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+Source: modules\{#SIMANNEALING}\macros\*.bin; DestDir: {app}\modules\{#SIMANNEALING}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+Source: modules\{#SIMANNEALING}\macros\*.sci; DestDir: {app}\modules\{#SIMANNEALING}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+Source: modules\{#SIMANNEALING}\macros\buildmacros.sce; DestDir: {app}\modules\{#SIMANNEALING}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+Source: modules\{#SIMANNEALING}\macros\buildmacros.bat; DestDir: {app}\modules\{#SIMANNEALING}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+Source: modules\{#SIMANNEALING}\macros\cleanmacros.bat; DestDir: {app}\modules\{#SIMANNEALING}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#SIMANNEALING}\tests\*.*; DestDir: {app}\modules\{#SIMANNEALING}\tests; Flags: recursesubdirs; Components: {#COMPN_SCILAB} and {#COMPN_TESTS}
+;
+;--------------------------------------------------------------------------------------------------------------
diff --git a/modules/simulated_annealing/tests/unit_tests/accept_func_default.dia.ref b/modules/simulated_annealing/tests/unit_tests/accept_func_default.dia.ref
new file mode 100755
index 000000000..e7e5b561f
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/accept_func_default.dia.ref
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+Level = accept_func_default(10,9,10);
+if norm(Level - exp(-(9 - 10)/10))>1e-3 then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/accept_func_default.tst b/modules/simulated_annealing/tests/unit_tests/accept_func_default.tst
new file mode 100755
index 000000000..0d6b987ec
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/accept_func_default.tst
@@ -0,0 +1,15 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+Level = accept_func_default(10,9,10);
+
+if norm(Level - exp(-(9 - 10)/10))>1e-3 then pause,end
diff --git a/modules/simulated_annealing/tests/unit_tests/accept_func_vfsa.dia.ref b/modules/simulated_annealing/tests/unit_tests/accept_func_vfsa.dia.ref
new file mode 100755
index 000000000..218d90e37
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/accept_func_vfsa.dia.ref
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+Level = accept_func_vfsa(10,9,10);
+if norm(Level - 1 / (1 + exp(-(10 - 9)/10)))> 1e-3 then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/accept_func_vfsa.tst b/modules/simulated_annealing/tests/unit_tests/accept_func_vfsa.tst
new file mode 100755
index 000000000..8b876f928
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/accept_func_vfsa.tst
@@ -0,0 +1,15 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+Level = accept_func_vfsa(10,9,10);
+
+if norm(Level - 1 / (1 + exp(-(10 - 9)/10)))> 1e-3 then pause,end
diff --git a/modules/simulated_annealing/tests/unit_tests/compute_initial_temp.dia.ref b/modules/simulated_annealing/tests/unit_tests/compute_initial_temp.dia.ref
new file mode 100755
index 000000000..c000ad09a
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/compute_initial_temp.dia.ref
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+// <-- JVM_NOT_MANDATORY -->
+deff('y=test_func(x)','y=x^2');
+x0 = 10;
+T_init = compute_initial_temp(x0, test_func, 0.8, 1000, []);
+assert_checktrue(T_init <> %nan);
+assert_checktrue(abs(T_init) <> %inf);
diff --git a/modules/simulated_annealing/tests/unit_tests/compute_initial_temp.tst b/modules/simulated_annealing/tests/unit_tests/compute_initial_temp.tst
new file mode 100755
index 000000000..84c7c8ae2
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/compute_initial_temp.tst
@@ -0,0 +1,19 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+deff('y=test_func(x)','y=x^2');
+
+x0 = 10;
+
+T_init = compute_initial_temp(x0, test_func, 0.8, 1000, []);
+assert_checktrue(T_init <> %nan);
+assert_checktrue(abs(T_init) <> %inf);
diff --git a/modules/simulated_annealing/tests/unit_tests/neigh_func_csa.dia.ref b/modules/simulated_annealing/tests/unit_tests/neigh_func_csa.dia.ref
new file mode 100755
index 000000000..63286d606
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/neigh_func_csa.dia.ref
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+x_current = 1;
+x_neigh = neigh_func_csa(x_current,10,[]);
+if (x_neigh==%nan) | (abs(x_neigh)==%inf) then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/neigh_func_csa.tst b/modules/simulated_annealing/tests/unit_tests/neigh_func_csa.tst
new file mode 100755
index 000000000..92b625f37
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/neigh_func_csa.tst
@@ -0,0 +1,17 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+x_current = 1;
+
+x_neigh = neigh_func_csa(x_current,10,[]);
+
+if (x_neigh==%nan) | (abs(x_neigh)==%inf) then pause,end
diff --git a/modules/simulated_annealing/tests/unit_tests/neigh_func_default.dia.ref b/modules/simulated_annealing/tests/unit_tests/neigh_func_default.dia.ref
new file mode 100755
index 000000000..5918fca94
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/neigh_func_default.dia.ref
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+x_current = 1;
+x_neigh = neigh_func_default(x_current,10,[]);
+if (x_neigh==%nan) | (abs(x_neigh)==%inf) then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/neigh_func_default.tst b/modules/simulated_annealing/tests/unit_tests/neigh_func_default.tst
new file mode 100755
index 000000000..1d43c4b03
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/neigh_func_default.tst
@@ -0,0 +1,18 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+x_current = 1;
+
+x_neigh = neigh_func_default(x_current,10,[]);
+
+if (x_neigh==%nan) | (abs(x_neigh)==%inf) then pause,end
+
diff --git a/modules/simulated_annealing/tests/unit_tests/neigh_func_fsa.dia.ref b/modules/simulated_annealing/tests/unit_tests/neigh_func_fsa.dia.ref
new file mode 100755
index 000000000..927c299de
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/neigh_func_fsa.dia.ref
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+x_current = 1;
+x_neigh = neigh_func_fsa(x_current,10,[]);
+if (x_neigh==%nan) | (abs(x_neigh)==%inf) then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/neigh_func_fsa.tst b/modules/simulated_annealing/tests/unit_tests/neigh_func_fsa.tst
new file mode 100755
index 000000000..5206e0449
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/neigh_func_fsa.tst
@@ -0,0 +1,18 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+x_current = 1;
+
+x_neigh = neigh_func_fsa(x_current,10,[]);
+
+if (x_neigh==%nan) | (abs(x_neigh)==%inf) then pause,end
+
diff --git a/modules/simulated_annealing/tests/unit_tests/neigh_func_vfsa.dia.ref b/modules/simulated_annealing/tests/unit_tests/neigh_func_vfsa.dia.ref
new file mode 100755
index 000000000..a44cbbc36
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/neigh_func_vfsa.dia.ref
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+x_current = 1;
+x_neigh = neigh_func_vfsa(x_current,10,[]);
+if (x_neigh==%nan) | (abs(x_neigh)==%inf) then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/neigh_func_vfsa.tst b/modules/simulated_annealing/tests/unit_tests/neigh_func_vfsa.tst
new file mode 100755
index 000000000..8e27cccc3
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/neigh_func_vfsa.tst
@@ -0,0 +1,18 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+x_current = 1;
+
+x_neigh = neigh_func_vfsa(x_current,10,[]);
+
+if (x_neigh==%nan) | (abs(x_neigh)==%inf) then pause,end
+
diff --git a/modules/simulated_annealing/tests/unit_tests/optim_sa.dia.ref b/modules/simulated_annealing/tests/unit_tests/optim_sa.dia.ref
new file mode 100755
index 000000000..1a2813fed
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/optim_sa.dia.ref
@@ -0,0 +1,119 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+// <-- CLI SHELL MODE -->
+// <-- ENGLISH IMPOSED -->
+// Test that we can run with default values for parameters
+function y=test_func(x)
+ y=x^2
+endfunction
+rand("seed",0);
+x0 = 10;
+ItExt = 30;
+ItInt = 50;
+Log = %f;
+ItMX = 100;
+T_init = compute_initial_temp(x0, test_func, 0.8, ItMX);
+[x_best, f_best, mean_list, var_list, temp_list, f_history, x_history,iter] = optim_sa(x0, test_func, ItExt, ItInt, T_init, Log);
+assert_checkalmostequal ( x_best , 0.0 , [] , 1.e-1 );
+assert_checkalmostequal ( f_best , 0.0 , [] , 1.e-1 );
+assert_checkequal ( size(mean_list) , [1 ItExt] );
+assert_checkequal ( size(var_list) , [1 ItExt] );
+assert_checkequal ( size(temp_list) , [1 ItExt] );
+assert_checkequal ( size(f_history) , ItExt );
+assert_checkequal ( size(x_history) , ItExt );
+assert_checkequal ( iter>0 , %t );
+///////////////////////////////////////////
+// Test that we can configure our own neighbour function
+function f = quad ( x )
+ p = [4 3];
+ f = (x(1) - p(1))^2 + (x(2) - p(2))^2
+endfunction
+// We produce a neighbor by adding some noise to each component of a given vector
+function x_neigh = myneigh_func ( x_current, T , param)
+ nxrow = size(x_current,"r")
+ nxcol = size(x_current,"c")
+ sa_min_delta = -0.1*ones(nxrow,nxcol);
+ sa_max_delta = 0.1*ones(nxrow,nxcol);
+ x_neigh = x_current + (sa_max_delta - sa_min_delta).*rand(nxrow,nxcol) + sa_min_delta;
+endfunction
+rand("seed",0);
+x0 = [2 2];
+Proba_start = 0.7;
+It_Pre = 100;
+It_extern = 50;
+It_intern = 50;
+saparams = init_param();
+saparams = add_param(saparams,"neigh_func", myneigh_func);
+T0 = compute_initial_temp(x0, quad, Proba_start, It_Pre, saparams);
+Log = %f;
+[x_opt, f_opt] = optim_sa(x0, quad, It_extern, It_intern, T0, Log,saparams);
+assert_checkalmostequal ( x_opt , [4 3] , 1.e-1 );
+assert_checkalmostequal ( f_opt , 0 , [] , 1.e-1 );
+///////////////////////////////////////////
+// Test that an additional parameter can be passed to the cost function
+function f = quadp ( x , p )
+ f = (x(1) - p(1))^2 + (x(2) - p(2))^2
+endfunction
+rand("seed",0);
+x0 = [-1 -1];
+p = [4 3];
+T0 = compute_initial_temp(x0, list(quadp,p) , Proba_start, It_Pre);
+[x_opt, f_opt] = optim_sa(x0, list(quadp,p) , 30, 30, T0, %f);
+assert_checkalmostequal ( x_opt , [4 3] , 1.e-1 );
+assert_checkalmostequal ( f_opt , 0 , [] , 1.e-1 );
+///////////////////////////////////////////
+// Test with a plot function, which serves also as a stop function.
+function f = quad ( x )
+ p = [4 3];
+ f = (x(1) - p(1))^2 + (x(2) - p(2))^2
+endfunction
+// See that the stop variable becomes true when the function value is near zero.
+// The threshold is rather loose.
+function stop = outfunc ( itExt , x_best , f_best , T , saparams )
+ [mythreshold,err] = get_param(saparams,"mythreshold",0);
+ v = format()
+ format("e",10)
+ sxbest = string(x_best)
+ mprintf ( "Iter = #%-4d, \t x_best=[%12s %12s], f_best = %12s, T = %12s\n", itExt , sxbest(1), sxbest(2) , string(f_best) , string(T) )
+ if ( v(1) == 0 ) then
+ format("e",v(2))
+ else
+ format("v",v(2))
+ end
+ stop = ( abs(f_best) < mythreshold )
+endfunction
+rand("seed",0);
+x0 = [-1 -1];
+saparams = init_param();
+saparams = add_param(saparams,"output_func", outfunc );
+saparams = add_param(saparams,"mythreshold", 1.e-1 );
+T0 = compute_initial_temp(x0, quad , 0.7, 100, saparams);
+// Notice that the number of external iterations is %inf, so
+// that the external loop never stops.
+// This allows to check that the output function really allows to
+// stop the algorithm.
+[x_best, f_best, mean_list, var_list, temp_list, f_history, x_history , iter ] = optim_sa(x0, quad , 1e6, 100, T0, %f, saparams);
+Iter = #1 , x_best=[ -1.000D+00 -1.000D+00], f_best = 4.100D+01, T = 1.608D+00
+Iter = #2 , x_best=[ 1.078D-01 1.127D-01], f_best = 2.349D+01, T = 1.447D+00
+Iter = #3 , x_best=[ 6.984D-01 4.624D-01], f_best = 1.734D+01, T = 1.302D+00
+Iter = #4 , x_best=[ 8.860D-01 8.590D-01], f_best = 1.428D+01, T = 1.172D+00
+Iter = #5 , x_best=[ 1.012D+00 1.526D+00], f_best = 1.110D+01, T = 1.055D+00
+Iter = #6 , x_best=[ 2.233D+00 1.673D+00], f_best = 4.883D+00, T = 9.493D-01
+Iter = #7 , x_best=[ 2.884D+00 2.775D+00], f_best = 1.295D+00, T = 8.543D-01
+Iter = #8 , x_best=[ 3.356D+00 2.657D+00], f_best = 5.322D-01, T = 7.689D-01
+Iter = #9 , x_best=[ 3.356D+00 2.657D+00], f_best = 5.322D-01, T = 6.920D-01
+Iter = #10 , x_best=[ 3.356D+00 2.657D+00], f_best = 5.322D-01, T = 6.228D-01
+Iter = #11 , x_best=[ 3.985D+00 2.319D+00], f_best = 4.644D-01, T = 5.605D-01
+Iter = #12 , x_best=[ 4.048D+00 2.653D+00], f_best = 1.230D-01, T = 5.045D-01
+Iter = #13 , x_best=[ 4.048D+00 2.653D+00], f_best = 1.230D-01, T = 4.540D-01
+Iter = #14 , x_best=[ 3.942D+00 2.813D+00], f_best = 3.844D-02, T = 4.086D-01
+assert_checkalmostequal ( x_best , [4 3] , 1.e-1 );
+assert_checkalmostequal ( f_best , 0 , [] , 1.e-1 );
+assert_checkequal ( iter > 0 , %t );
diff --git a/modules/simulated_annealing/tests/unit_tests/optim_sa.tst b/modules/simulated_annealing/tests/unit_tests/optim_sa.tst
new file mode 100755
index 000000000..3517c9869
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/optim_sa.tst
@@ -0,0 +1,124 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- CLI SHELL MODE -->
+// <-- ENGLISH IMPOSED -->
+
+// Test that we can run with default values for parameters
+function y=test_func(x)
+ y=x^2
+endfunction
+
+rand("seed",0);
+x0 = 10;
+ItExt = 30;
+ItInt = 50;
+Log = %f;
+ItMX = 100;
+T_init = compute_initial_temp(x0, test_func, 0.8, ItMX);
+[x_best, f_best, mean_list, var_list, temp_list, f_history, x_history,iter] = optim_sa(x0, test_func, ItExt, ItInt, T_init, Log);
+
+assert_checkalmostequal ( x_best , 0.0 , [] , 1.e-1 );
+assert_checkalmostequal ( f_best , 0.0 , [] , 1.e-1 );
+assert_checkequal ( size(mean_list) , [1 ItExt] );
+assert_checkequal ( size(var_list) , [1 ItExt] );
+assert_checkequal ( size(temp_list) , [1 ItExt] );
+assert_checkequal ( size(f_history) , ItExt );
+assert_checkequal ( size(x_history) , ItExt );
+assert_checkequal ( iter>0 , %t );
+
+///////////////////////////////////////////
+// Test that we can configure our own neighbour function
+function f = quad ( x )
+ p = [4 3];
+ f = (x(1) - p(1))^2 + (x(2) - p(2))^2
+endfunction
+
+// We produce a neighbor by adding some noise to each component of a given vector
+function x_neigh = myneigh_func ( x_current, T , param)
+ nxrow = size(x_current,"r")
+ nxcol = size(x_current,"c")
+ sa_min_delta = -0.1*ones(nxrow,nxcol);
+ sa_max_delta = 0.1*ones(nxrow,nxcol);
+ x_neigh = x_current + (sa_max_delta - sa_min_delta).*rand(nxrow,nxcol) + sa_min_delta;
+endfunction
+
+rand("seed",0);
+x0 = [2 2];
+Proba_start = 0.7;
+It_Pre = 100;
+It_extern = 50;
+It_intern = 50;
+
+saparams = init_param();
+saparams = add_param(saparams,"neigh_func", myneigh_func);
+
+T0 = compute_initial_temp(x0, quad, Proba_start, It_Pre, saparams);
+Log = %f;
+[x_opt, f_opt] = optim_sa(x0, quad, It_extern, It_intern, T0, Log,saparams);
+assert_checkalmostequal ( x_opt , [4 3] , 1.e-1 );
+assert_checkalmostequal ( f_opt , 0 , [] , 1.e-1 );
+
+///////////////////////////////////////////
+// Test that an additional parameter can be passed to the cost function
+
+function f = quadp ( x , p )
+ f = (x(1) - p(1))^2 + (x(2) - p(2))^2
+endfunction
+
+rand("seed",0);
+x0 = [-1 -1];
+p = [4 3];
+T0 = compute_initial_temp(x0, list(quadp,p) , Proba_start, It_Pre);
+[x_opt, f_opt] = optim_sa(x0, list(quadp,p) , 30, 30, T0, %f);
+assert_checkalmostequal ( x_opt , [4 3] , 1.e-1 );
+assert_checkalmostequal ( f_opt , 0 , [] , 1.e-1 );
+
+///////////////////////////////////////////
+// Test with a plot function, which serves also as a stop function.
+
+function f = quad ( x )
+ p = [4 3];
+ f = (x(1) - p(1))^2 + (x(2) - p(2))^2
+endfunction
+
+// See that the stop variable becomes true when the function value is near zero.
+// The threshold is rather loose.
+function stop = outfunc ( itExt , x_best , f_best , T , saparams )
+ [mythreshold,err] = get_param(saparams,"mythreshold",0);
+ v = format()
+ format("e",10)
+ sxbest = string(x_best)
+ mprintf ( "Iter = #%-4d, \t x_best=[%12s %12s], f_best = %12s, T = %12s\n", itExt , sxbest(1), sxbest(2) , string(f_best) , string(T) )
+ if ( v(1) == 0 ) then
+ format("e",v(2))
+ else
+ format("v",v(2))
+ end
+ stop = ( abs(f_best) < mythreshold )
+endfunction
+
+rand("seed",0);
+x0 = [-1 -1];
+saparams = init_param();
+saparams = add_param(saparams,"output_func", outfunc );
+saparams = add_param(saparams,"mythreshold", 1.e-1 );
+
+T0 = compute_initial_temp(x0, quad , 0.7, 100, saparams);
+// Notice that the number of external iterations is %inf, so
+// that the external loop never stops.
+// This allows to check that the output function really allows to
+// stop the algorithm.
+[x_best, f_best, mean_list, var_list, temp_list, f_history, x_history , iter ] = optim_sa(x0, quad , 1e6, 100, T0, %f, saparams);
+assert_checkalmostequal ( x_best , [4 3] , 1.e-1 );
+assert_checkalmostequal ( f_best , 0 , [] , 1.e-1 );
+assert_checkequal ( iter > 0 , %t );
+
+
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_csa.dia.ref b/modules/simulated_annealing/tests/unit_tests/temp_law_csa.dia.ref
new file mode 100755
index 000000000..3646bed4a
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_csa.dia.ref
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+T = temp_law_csa(10, 9, 8, 7, 6, []);
+if norm(T - 10 * log(1+7)/log(2+7)) > 1e-3 then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_csa.tst b/modules/simulated_annealing/tests/unit_tests/temp_law_csa.tst
new file mode 100755
index 000000000..9cbf0d220
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_csa.tst
@@ -0,0 +1,15 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+T = temp_law_csa(10, 9, 8, 7, 6, []);
+
+if norm(T - 10 * log(1+7)/log(2+7)) > 1e-3 then pause,end
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_default.dia.ref b/modules/simulated_annealing/tests/unit_tests/temp_law_default.dia.ref
new file mode 100755
index 000000000..cc405071c
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_default.dia.ref
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+T = temp_law_default(10, 9, 8, 7, 6, []);
+if norm(T - 0.9*10) > 1e-3 then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_default.tst b/modules/simulated_annealing/tests/unit_tests/temp_law_default.tst
new file mode 100755
index 000000000..f775d78e0
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_default.tst
@@ -0,0 +1,15 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+T = temp_law_default(10, 9, 8, 7, 6, []);
+
+if norm(T - 0.9*10) > 1e-3 then pause,end
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_fsa.dia.ref b/modules/simulated_annealing/tests/unit_tests/temp_law_fsa.dia.ref
new file mode 100755
index 000000000..782cb4ed0
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_fsa.dia.ref
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+T = temp_law_fsa(10, 9, 8, 7, 6, []);
+if norm(T - 10 * (1+6)/(2+6)) > 1e-3 then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_fsa.tst b/modules/simulated_annealing/tests/unit_tests/temp_law_fsa.tst
new file mode 100755
index 000000000..0f3f35e9c
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_fsa.tst
@@ -0,0 +1,15 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+T = temp_law_fsa(10, 9, 8, 7, 6, []);
+
+if norm(T - 10 * (1+6)/(2+6)) > 1e-3 then pause,end
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_huang.dia.ref b/modules/simulated_annealing/tests/unit_tests/temp_law_huang.dia.ref
new file mode 100755
index 000000000..20ff98f24
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_huang.dia.ref
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+T = temp_law_huang(10, 9, 8, 7, 6, []);
+if norm(T - 10 * exp(-0.01*10/8)) > 1e-3 then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_huang.tst b/modules/simulated_annealing/tests/unit_tests/temp_law_huang.tst
new file mode 100755
index 000000000..f153eefef
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_huang.tst
@@ -0,0 +1,15 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+T = temp_law_huang(10, 9, 8, 7, 6, []);
+
+if norm(T - 10 * exp(-0.01*10/8)) > 1e-3 then pause, end
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_vfsa.dia.ref b/modules/simulated_annealing/tests/unit_tests/temp_law_vfsa.dia.ref
new file mode 100755
index 000000000..b2252c42a
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_vfsa.dia.ref
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+T = temp_law_vfsa(10, 9, 8, 7, 6, []);
+if norm(T - 10 * (6/(6+1))^(1/3)) > 1e-3 then bugmes();quit;end
diff --git a/modules/simulated_annealing/tests/unit_tests/temp_law_vfsa.tst b/modules/simulated_annealing/tests/unit_tests/temp_law_vfsa.tst
new file mode 100755
index 000000000..9e370561e
--- /dev/null
+++ b/modules/simulated_annealing/tests/unit_tests/temp_law_vfsa.tst
@@ -0,0 +1,15 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - Yann COLLETTE <yann.collette@renault.com>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- JVM_NOT_MANDATORY -->
+
+T = temp_law_vfsa(10, 9, 8, 7, 6, []);
+
+if norm(T - 10 * (6/(6+1))^(1/3)) > 1e-3 then pause,end