Missing Mathematical features in Scilab
Michaël Baudin
Abstract
In this document, we detail (a subset of the) missing mathematical features in Scilab. Emphasis is on missing macro-features and not on detailed specifications which are managed by Scilab Enhancement Proposals (SEPs). For each mathematical problem, we analyse the following points :
- what features are to provide ?
- what are general references to the mathematical features to include ?
- why it fits in Scilab scope ?
- is there existing library to connect to Scilab ?
- is there a Scilab toolbox providing the feature ?
- does Matlab provide an equivalent feature ?
Contents
We try in this document to focus of macro-features and not on the implementation details (low level specifications). Macro features are associated to classes of mathematical problems which cannot be solved with current Scilab tools. Micro features are associated to existing features which have practical or theoretical limitations.
Let's give an example of this by analyzing shortly the optimization features. The "optim" optimization primitive does not allow to enable/disable parameters while the optimizing and this really is a missing feature, but we call it a micro-feature. By comparison, the fact that nonlinear constraints cannot be taken into account is a missing macro-feature.
Detailed feature requests should be written as Scilab Enhancement Proposals.
When a library is suggested for connection, one should pay attention to at least the following points :
- license : is the license authorizes the inclusion in Scilab ?
- language : is the language compatible with Scilab ?
- mathematical algorithms : is the algorithm efficient, robust, fast, up-to-date ?
- documentation : is the library correctly documented with respect to Scilab requirements ?
- tests : is the library tested ?
These features may be classified in the following mathematical domains, which are detailed in next sections :
- Optimization
- Statistics
- Design of Experiments
- Sensitivity analysis
- Geometry (meshes)
- Partial Differential Equations
Optimization
This is a list of missing optimization features in Scilab. Theses features are not available in current Scilab toolboxes.
- Non-linear objective with non linear constraints
- Random-based search for an initial guess
- OO model for management of optimization parameters
References
- Non-linear objective with non linear constraints : "Numerical Optimization", Nocedal, Wright, Springer, chapters 15, 16, 17, 18
Multi-objective optimization : http://en.wikipedia.org/wiki/Multiobjective_optimization
Why it fits in Scilab scope
Optimization features are allready part of current Scilab features and several Scilab toolboxes.
Suggested library to connect
"OPT++ is a library of nonlinear optimization algorithms written in C++. The motivation for this package is to build an environment for the rapid prototyping and development of new optimization algorithms. In particular, the focus is on robust and efficient algorithms for problems in which the function and constraint evaluations require the execution of an expensive computer simulation. Currently, OPT++ includes the classic Newton methods, a nonlinear interior-point method, parallel direct search, generating set search, a trust region - parallel direct search hybrid, and a wrapper to NPSOL. Between these methods, a wide range of problems can be solved, e.g. with or without constraints, with or without analytic gradients, simulation based, etc. OPT++ 2.4 is now available on a variety of platforms under the GNU Lesser General Public License" Opt++ is developed at CSMR Department Projects at Sandia National Labs in California by Patty Hough, Juan Meza, Ricardo Oliva, Pam Williams.
http://csmr.ca.sandia.gov/projects/opt++/
Coin-OR (more specifically CLP and CBC) is a linear programming library can do mixed integer programming, supports sparse matrixes and was before 2004 a commercial product from IBM (OSL). This library was competing (and is still competing) with CPLEX. Interface to CLP is the subject of SEP #6 by Yann Collette :
http://viewvc.scilab.org/bin/cgi/viewvc.cgi/trunk/SEP/SEP_6_clp.odt
ConMinis a fortran routine written by G. Vanderplaats at NASA for Nastran.ConMinis behind every optimization performed with Nastran. This optimization method allows to perform constrained optimization and is based on the feasible directions method (no problem with a Hessian matrix, only vectors are stored). A first toolbox has been written to interface this method to Scilab.http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1086
Modelization
This is a list of missing features in Scilab:
- non linear modelling: neural networks, Kriging, statistical modeling;
- linear modelling: LASSO for example;
References
Why it fits in Scilab scope
Non linear models are used in almost all scientific disciplines like systems control, optimization, simulation, etc ...
Suggested library to connect
- FANN (Fast Artificial Neural Network);
- SNNS (Stuttgart Neural Network System);
- LOLIMOT (LOcal LInear MOdel Tree);
- DACE (A Kriging toolbox);
- MARS and PolyMARS (modelization based on piecewise linear models);
- CART (Classification And Regression Tree);
Statistics
Statistics are partially covered by current Scilab features, but some tools are still missing :
- Monte-Carlo simulation with random or quasi-random (Sobol) method,
- bootstrap method to compute the sensitivity of one statistic measure against the data,
References
Monte-Carlo methods : http://en.wikipedia.org/wiki/Monte_Carlo_method
Bootstrap method : http://en.wikipedia.org/wiki/Bootstrapping_(statistics)
Why it fits in Scilab scope
Scilab allready include several statistical services.
Design of Experiments
Design of experiments are a method to approximate the behavior of a system with polynomials.
DOE are completely uncovered by current Scilab features. To include it into Scilab, the following features should be added :
- management of integer uplets (combinations),
- management of several classes of polynomials : order 1, order 2, reduced order 2,
- management of several classes of DOEs : full factorial, centered composite.
Matlab currently provides the following DOE features :
- Full factorial
- Fractional factorial
- Response surface (central composite and Box-Behnken)
- D-optimal
- Latin hypercube
Suggested libraries to connect to Scilab
Lolimot is a project developed by Yann Collette for the management of DOEs in Scilab. It is available with LGPL license : The scilab package is dedicated to design of experiments for:
- polynomials model (Full factorial, D optimal, etc ...);
- non linear models (Latin Hypercube Sampling, etc ...).
http://lolimot.sourceforge.net/
Why it fits in Scilab scope
DOEs would particularly fit in the Scilab environment because of the following reasons :
- polynomials are already existing as a Scilab type,
- the computation of the coefficients of the polynomials are based on linear algebra algorithms which already exist in Scilab,
- once the polynomials are computed, the user may display them with current graphic features,
- the polynomials may be used as building blocks for an optimization problem (these is a very powerful applications of DOEs)
Sensitivity analysis
Sensitivity analysis engines are tools which are commonly used by engineers who optimize simulated systems. But most of the time, this is done manually because of time limitations and because sensitivity analysis tools are not commonly available.
Scilab may provide a sensitivity analysis engine, probably as a toolbox which could expose the following features :
- management of the input parameters ranges and names,
- management of the output parameters names,
- management of the number of experiments to do for each parameter,
- run of the experiments with a user-defined callback,
- management of the output results : max, min,
- sensitivity computations for each result,
- import of data as a formatted ascii file (such as csv or tab-separated file),
- export of data as a ascii file or Excell sheet.
This feature would particularly fit into current Scilab system for the following reasons :
- management of csv, xml and Excel data files are already implemented in Scilab,
- the user will easily define his own Scilab script modeling the system and Scilab provides a clear management of input/output arguments to functions,
- Scilab callbacks are commonly used in current primitives (such as optim for example),
- sensitivity analysis is a pre-processing step before optimization : before attempting to optimize the system, the user may want to do a sensitivity analysis to define parameters ranges, extrapolate system behaviour to save computational time, manually approximate the optimum to give an initial guess to the optimization method,
- sensitivity analysis is a post-processing step after optimization : after the optimization has been processed, the user will be able to analysis the local behaviour of the system, to check the optimality of the parameter and the satisfactions of constraints,
- after doing the sensitivity analysis, the user may want to use Scilab graphical tools to represent the data,
- user may use Scilab computational facilities to compute derivatives of the model, second derivatives,
- user may approach the model with DOE and optimize it,
- the sensitivity analysis is less sensitive to system smoothness : after an optimization has been performed with poor results, the sensitivity analysis may produce accurate explanations,
- etc...
Geometry
Scilab does not provide geometry tools. Geometry is involved in many scientific problems, such as, ..., such as everywhere.
Features
The following is a list of subset of features which may be available as a toolbox.
- definition of basic shapes such as lines, vectors, triangles, circles, squares, etc...
- basic manipulations of shapes such as translations, rotations, linear and non linear deformations,
- boolean operations such as intersections, unions, etc...
- management of structured and unstructured meshes,
- generation of meshes based on Voronoi diagrams, Delaunay triangulations,
- local refinements / unrefinement of meshes,
- quality assessment of meshes,
- nesting of meshes,
- ets...
Suggested libraries to connect to Scilab
That work may be done by providing a connection to existing geometry libraries, such as the open source project CGAL : http://www.cgal.org/ The CGLAB toolbox is available at : http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=323
Why it fits in Scilab scope
Such a feature would particularly fit into Scilab for the following reasons :
- Scilab currently provided an access to Open GL so the graphical management of complex meshes would be possible,
- Scilab aims at providing a simulation environment, which is not possible in all cases where meshes are implied, such as resolution of PDEs in CFD, shape optimization, etc...
Partial Differential Equations
PDEs appears in the following mathematical fields :
- conservation laws,
- finite volumes,
- finite elements.
There is currently no Scilab component to solve PDEs. Introducing PDEs solvers may require the following softare components :
- 1/2/3D meshes (no current Scilab feature),
- linear algebra (allready available in Scilab),
- PDE solvers.
Why it fits in Scilab scope
No idea, really ?
Suggested library to connect
Summary :
FreeFem : may be included in Scilab (LGPL)
- Clawpack : may not be included in Scilab (~research-only license), but may be provided as a Scilab toolbox
FreeFem is a Finite Element library in C++ under LGPL : http://www.freefem.org/ff++/index.htm
FreeFemis developped at Laboratoire Jacques-Louis Lions by highly recognized experts Olivier Pironneau, Frédéric Hecht, Antoine Le Hyaric.FreeFemis about to be released with a support for 3d problems (the 3.0beta can be downloaded at http://www.freefem.org/ff++/ftp/). FreeFem is available as a Scilab toolbox :http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=149
The toolbooxSciFreefemby Frederic Hecht (modified by Yann Collette) is available :http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=883
CLAWPACK is a software package designed to compute numerical solutions to hyperbolic partial differential equations using a wave propagation approach. It is developed by Randall J. LeVeque, Jan Olav Langseth, Marsha Berger, David McQueen, Donna Calhoun, Peter Blossey, Sorin Mitran. License is "research and instructional use only." http://www.amath.washington.edu/~claw/ The new version of clawpack 5 (under development beta) is licenced under GPLv3+ http://kingkong.amath.washington.edu/claw/www/claw50beta.html
