[scilab-Users] optimization : general question

Michaël Baudin michael.baudin at scilab.org
Tue Nov 30 14:00:27 CET 2010


Hi,

There is no way to apply bounds to the parameters from the fminsearch 
function. This is because the algorithm was mainly designed for 
unconstrained optimization. Nevertheless, it is possible to apply them 
with the lower level component that the fminsearch function uses, the 
neldermead component. This is possible by projecting the parameters on 
the bounds. This makes the simple degenerate on the bounds and, if not 
far away from the optimum, let the simplex converge on the optimum.

In order to find an example, please look, in Scilab v5.2.2, in the 
demonstrations:

? > Scilab Demonstrations > Optimization and simulation > neldermead Box B

This example is based on the problem B from the Box' paper. It is a 
problem with 2 bounded parameters (see in attachment).

In Scilab v5.3, I added some other examples. This includes a simple 
problem with bounds and  Rosenbrock's post office problem, an 
optimization with 3 parameters and linear constraints (see in 
attachement). The simplest problem is the following:

   function [ f , index ] = myquad ( x , index )
     f = x(1)^2 + x(2)^2
   endfunction
   rand("seed" , 0)
   x0 = [1.2 1.9].';
   nm = nmplot_new ();
   nm = nmplot_configure(nm,"-numberofvariables",2);
   nm = nmplot_configure(nm,"-function",myquad);
   nm = nmplot_configure(nm,"-x0",x0);
   nm = nmplot_configure(nm,"-method","box");
   nm = nmplot_configure(nm,"-boundsmin",[1 1]);
   nm = nmplot_configure(nm,"-boundsmax",[2 2]);
   nm = nmplot_search(nm);
   xcomp = nmplot_get(nm,"-xopt") // Should be [1 1]
   fcomp = nmplot_get(nm,"-fopt") // Should be 2
   nm = nmplot_destroy(nm);

This example is not provided in the help of neldermead (see bug #7164): 
I will fix this in the next release.

Best regards,

Michaël

PS
http://bugzilla.scilab.org/show_bug.cgi?id=7164

Le 30/11/2010 11:58, Carrico, Paul a écrit :
>
> Dear all,
>
> The purpose of this mail is to benefit from user feedback of Scilab 
> community ... even if my experience on optimization item is currently 
> rather limited, this study will significantly increase my own expertise.
>
> I'm currently working in linking a FEA code with Scilab to fit 
> parameters from tests (see attached fig- in red the steps realized in 
> Scilab ) :
>
> - On a single parameter I used with success the *_fminsearch_* 
> function (based on the simplex theory),
>
> - with 2 parameters, the calculated ran ... nevertheless the final 
> result is physically non applicable (need to bracket one of the values 
> for examples)
>
> Does somebody be experienced on such item ? what is the best Scilab 
> function ? Some advices in reading ?
>
> Thanks in advance
>
> Regards
>
> Paul
>
> --------------------------------------------------------------------------------
>
>
> Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.
>
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.
>
>


-- 
Michaël Baudin
Ingénieur de développement
michael.baudin at scilab.org
-------------------------
Consortium Scilab - Digiteo
Domaine de Voluceau - Rocquencourt
B.P. 105 - 78153 Le Chesnay Cedex
Tel. : 01 39 63 56 87 - Fax : 01 39 63 55 94


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20101130/73e9bbae/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 68092 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20101130/73e9bbae/attachment.jpe>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: neldermead_boxproblemB.sce
URL: <https://lists.scilab.org/pipermail/users/attachments/20101130/73e9bbae/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: neldermead_rosenbrock.sce
URL: <https://lists.scilab.org/pipermail/users/attachments/20101130/73e9bbae/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: neldermead_boxbounds.sce
URL: <https://lists.scilab.org/pipermail/users/attachments/20101130/73e9bbae/attachment-0002.ksh>


More information about the users mailing list