 [Contents] [TitleIndex] [WordIndex]

# New Scientific Features in 2008

## Introduction

The goal of this page is to summarize the new or scientific features of Scilab and its environment during the year 2008.

Other Scilab events during 2008 :

In summary, the following is a list of new or updated scientific modules during the year 2008 :

• UMFPACK in Scilab v5.0
• Genetic Algorithms in Scilab v5.0
• Simulated annealing in Scilab v5.0
• Metanet updated in Scilab v5.0
• FFTW in Scilab v5.0

## UMFPACK in Scilab v5.0

The UMFPACK module provides direct algorithms (as opposed to iterative algorithms) for the management of sparse matrices. It is made of two main components :

• an interface to the UMFPACK library, which provides direct algorithms to compute sparse LU decompositions and resolutions,
• an interface to the TAUCS library, which provides direct algorithms to compute sparse Cholesky decompositions and resolutions.

This module was introduced into Scilab v5.0 thanks to the work of Bruno Pincon.

The following is a list of the functions provided in the umfpack module.

• umf_lufact - LU factorisation of a sparse matrix
• umf_lusolve - Solve a linear sparse system given the LU factors
• umf_luinfo - Get information on LU factors
• umf_luget - Retrieve LU factors at the Scilab level
• taucs_chfac - Cholesky factorisation of a sparse Symmetric Positive Definite (s.p.d.) matrix
• taucs_chsolve - Solve a linear sparse (s.p.d.) system given the Cholesky factors
• taucs_chinfo - Get information on Cholesky factors
• taucs_chget - Retrieve the Cholesky factorization at the Scilab level
• res_with_prec - Computes the residual r = Ax-b with precision
• cond2sp - Computes an approximation of the 2-norm condition number of a s.p.d. sparse matrix
• condestsp - Estimate the condition number of a sparse matrix
• PlotSparse - Plot the pattern of non nul elements of a sparse matrix

This module was first described in the "Changes" file for Scilab v5.0 :

## Genetic Algorithms in Scilab v5.0

Genetic algorithms are search algorithms based on the mechanics on natural selection and natural genetics. Genetic algorithms have been introduced in Scilab v5 thanks to a work by Yann Collette. The solver is made of Scilab macros, which enables a high-level programming model for this optimization solver. The problems solved by the current genetic algorithms in Scilab are the following :

•  minimization of a cost function with bound constraints,
•  multi-objective non linear minimization with bound constraints.

The GA macros are based on the "parameters" Scilab module for the management of the (many) optional parameters.

The following is a list of the functions provided by the Genetic Algorithms module.

• optim_ga — A flexible genetic algorithm
• optim_moga — multi-objective genetic algorithm
• optim_nsga — A multi-objective Niched Sharing Genetic Algorithm
• optim_nsga2 — A multi-objective Niched Sharing Genetic Algorithm version 2

The previous solvers are making use of the following support functions, which allow to configure the behaviour of the algorithm.

• coding_ga_binary — A function which performs conversion between binary and continuous representation
• coding_ga_identity — A "no-operation" conversion function
• crossover_ga_binary — A crossover function for binary code
• crossover_ga_default — A crossover function for continuous variable functions
• init_ga_default — A function a initialize a population
• mutation_ga_binary — A function which performs binary mutation
• mutation_ga_default — A continuous variable mutation function
• pareto_filter — A function which extracts non dominated solution from a set
• selection_ga_elitist — An 'elitist' selection function
• selection_ga_random — A function which performs a random selection of individuals

More details on this module are available in the chapter 5 or "Optimization in Scilab", Michael Baudin, Vincent Couvert and Serge Steer, 2010, which is available at :

or on the Scilab Forge :

This module was first described in the "Changes" file for Scilab v5.0 :

## Simulated annealing in Scilab v5.0

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). Genetic algorithms have been introduced in Scilab v5 thanks to the work by Yann Collette.

The current Simulated Annealing solver aims at nding the solution of bound constrained optimization problems with one objective function.

The solver is made of Scilab macros, which enables a high-level programming model for this optimization solver. The GA macros are based on the "parameters"Scilab module for the management of the (many) optional parameters.

The main function provided by the Simulated Annealing module is the following.

• optim_sa — A Simulated Annealing optimization method

The previous function makes use of the following functions which allow to configure the behaviour of the solver.

• accept_func_default — The default Simulated Annealing acceptation function.
• accept_func_vfsa — The Very Fast Simulated Annealing acceptation function.
• compute_initial_temp — A SA function which allows to compute the initial temperature of the simulated annealing
• neigh_func_csa — The classical neighborhood relationship for the simulated annealing
• neigh_func_default — A SA function which computes a neighbor of a given point
• neigh_func_fsa — The Fast Simulated Annealing neghborhood relationship
• neigh_func_vfsa — The Very Fast Simulated Annealing neighborhood relationship
• temp_law_csa — The classical temperature decrease law
• temp_law_default — A SA function which computed the temperature of the next temperature stage
• temp_law_fsa — The Szu and Hartley Fast simulated annealing
• temp_law_huang — The Huang temperature decrease law for the simulated annealing
• temp_law_vfsa — This function implements the Very Fast Simulated Annealing from L. Ingber

More details on this module are available in the chapter 6 or "Optimization in Scilab", Michael Baudin, Vincent Couvert and Serge Steer, 2010, which is available at :

or on the Scilab Forge :

This module was first described in the "Changes" file for Scilab v5.0 :

## Metanet updated in Scilab v5.0

Data structures have been reorganized and made more flexible (user can define and handle its own data fields for nodes and edges) New functions:

• hilite_edges - highlights a set of edges
• unhilite_edges - unhighlights a set of edges
• hilite_nodes - highlights a set of nodes
• unhilite_nodes - unhighlights a set of nodes
• add_edge_data - associates new data fields to the edges data structure of a graph
• add_node_data - associates new data fields to the nodes data structure of a graph
• arc_length
• nodedatafields - returns the vector of node data fields names
• set_edges_id
• set_nodes_id
• show_arcs - highlights a set of arcs
• show_edges - highlights a set of edges
• update_graph - converts an old graph data structure to the current one

These informations were extracted from :

This module has been updated and packaged under ATOMS the 29th of July 2010 :

The sources are managed on the Scilab Forge :

In order to install this module, use the following statement :

`atomsInstall("metanet")`

The following figure was produced with the mesh2d function, which performs a triangulation of n points in the plane. ## FFTW in Scilab v5.0

FFTW (Fastest Fourier Transform in the West) features added in Scilab.

"FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST)."

The FFTW package was developed at MIT by Matteo Frigo and Steven G. Johnson.

One of the most interesting features of FFTW is its speed. Indeed, FFTW supports SSE/SSE2/3dNow! CPU instruction sets, which improve its speed. See the benchmarks at: http://www.fftw.org/benchfft/

The features included in Scilab are the following:

• fftw : fast fourier transform that use fftw library
• fftw_flags : set computation method of fast fourier transform of the fftw function
• fftw_forget_wisdom : reset fftw wisdom
• get_fftw_wisdom : return fftw wisdom
• set_fftw_wisdom : set fftw wisdom
• disposefftwlibrary : free fttw library