<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
<br>
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.<br>
<br>
In order to find an example, please look, in Scilab v5.2.2, in the
demonstrations:<br>
<br>
? > Scilab Demonstrations > Optimization and simulation >
neldermead Box B<br>
<br>
This example is based on the problem B from the Box' paper. It is a
problem with 2 bounded parameters (see in attachment). <br>
<br>
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:<br>
<br>
function [ f , index ] = myquad ( x , index )<br>
f = x(1)^2 + x(2)^2<br>
endfunction<br>
rand("seed" , 0)<br>
x0 = [1.2 1.9].';<br>
nm = nmplot_new ();<br>
nm = nmplot_configure(nm,"-numberofvariables",2);<br>
nm = nmplot_configure(nm,"-function",myquad);<br>
nm = nmplot_configure(nm,"-x0",x0);<br>
nm = nmplot_configure(nm,"-method","box");<br>
nm = nmplot_configure(nm,"-boundsmin",[1 1]);<br>
nm = nmplot_configure(nm,"-boundsmax",[2 2]);<br>
nm = nmplot_search(nm);<br>
xcomp = nmplot_get(nm,"-xopt") // Should be [1 1]<br>
fcomp = nmplot_get(nm,"-fopt") // Should be 2<br>
nm = nmplot_destroy(nm);<br>
<br>
This example is not provided in the help of neldermead (see bug
#7164): I will fix this in the next release.<br>
<br>
Best regards,<br>
<br>
Michaël<br>
<br>
PS<br>
<a href="http://bugzilla.scilab.org/show_bug.cgi?id=7164">http://bugzilla.scilab.org/show_bug.cgi?id=7164</a><br>
<br>
Le 30/11/2010 11:58, Carrico, Paul a écrit :
<blockquote
cite="mid:55A12CBC06A8C9459DCE0BBEF8122FDC0498AFDD@exchsrv.AUXITROL1"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.6001.18975">
<div><font face="Arial" size="2"><span class="251084310-30112010">
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB">Dear all,</span><span style="" lang="EN-GB"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="" lang="EN-GB"><font size="3"><font face="Times
New Roman"> <o:p></o:p></font></font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB">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.</span><span style="" lang="EN-GB"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="" lang="EN-GB"><font size="3"><font face="Times
New Roman"> <o:p></o:p></font></font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB">I'm currently working in linking a FEA code
with Scilab to fit parameters from tests (see attached
fig<span class="251084310-30112010"> - in red the steps
realized in Scilab </span>) :</span><span style=""
lang="EN-GB"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB">- On a single parameter I used with success
the <strong><u><span style="font-family: Arial;">fminsearch</span></u></strong>
function (based on the simplex theory),</span><span
style="" lang="EN-GB"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB">- with 2 parameters, the calculated ran ...
nevertheless the final result is physically non
applicable (need to bracket one of the values for
examples)</span><span style="" lang="EN-GB"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="" lang="EN-GB"><font size="3"><font face="Times
New Roman"> <o:p></o:p></font></font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB">Does somebody be experienced on such item ?
what is the best Scilab function ? Some advices in
reading ?</span><span style="" lang="EN-GB"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="" lang="EN-GB"><font size="3"><font face="Times
New Roman"> <o:p></o:p></font></font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB">Thanks in advance</span><span style=""
lang="EN-GB"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="" lang="EN-GB"><font size="3"><font face="Times
New Roman"> <o:p></o:p></font></font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB">Regards</span><span style="" lang="EN-GB"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="" lang="EN-GB"><font size="3"><font face="Times
New Roman"> <o:p></o:p></font></font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB">Paul</span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-family: Arial; font-size: 10pt;"
lang="EN-GB"></span> </p>
</span></font></div>
<div> </div>
<div><img alt="" src="cid:part1.00030500.01050105@scilab.org"
align="baseline" border="0" hspace="0"></div>
<div> </div>
<pre>--------------------------------------------------------------------------------
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.
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Michaël Baudin
Ingénieur de développement
<a class="moz-txt-link-abbreviated" href="mailto:michael.baudin@scilab.org">michael.baudin@scilab.org</a>
-------------------------
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
</pre>
</body>
</html>