[scilab-Users] Scilab crashes with the use of neldermead function

Michaël Baudin michael.baudin at scilab.org
Mon Mar 1 11:38:35 CET 2010


Hi Carlos,
We can take more easily care of your bug if you add your comments
to the bug tracker:
http://bugzilla.scilab.org/show_bug.cgi?id=6681
There is a bug there, it is both in your script and in ode, which is
to robust enough against wrong input arguments.
There is no bug in neldermead in this particular case.

Best regards,

Michaël

Carlos Eduardo Celia de Lima a écrit :
> Samuel,
>
> Thanks for your reply.
>
> If I understood you correctly, I did the change as you suggested but 
> it still crashes. You were right, my function u(t) returned a vector, 
> and I picked the correct value inside the other function.
> Now, my function u(t) returns the exact value for u(t), a scalar. 
> I can simulate all the functions normally with no error, but whenever 
> I try to optimize it with nelder_mead, Sci-lab crashes. Unfortunately, 
> it's too fast for me to see the error message. Is there a log file 
> that I can check?
> Since the file is pretty small, I attached the file. 
>
> Thank you. 
> Carlos
>
> On Thu, Feb 25, 2010 at 12:59 PM, Samuel Gougeon 
> <Samuel.Gougeon at univ-lemans.fr <mailto:Samuel.Gougeon at univ-lemans.fr>> 
> wrote:
>
>
>     Carlos Eduardo Celia de Lima <carlosedlima at gmail.com
>     <mailto:carlosedlima at gmail.com>> a écrit :
>
>
>         Hi,
>
>         I am trying to run an optimization using Scilab but it crashes
>         when I
>         execute it.
>
>
>     Hello Carlos,
>     Just having a look at your script and embedded function definitions,
>     some questions arise, that may be of concern for the crash:
>     * In function xdot=f(t,x,u), you are using z=u(t)
>      while latter in the script, you define function ut=u(t,alpha).
>      I guess that z=u(t) adresses the u passed as an input
>      parameter of f(), and not the function u(). But this is not obvious,
>      and there may be a confusion.
>     * Same thing inside function ut=u(t,alpha) : with
>      u(1)=alpha(1);  // line 55)
>      u((c*i)+1)=alpha(i+1); // line 57
>      While both lines could be interpreted as recursive calls to the
>      _function_ u() only by a not enough clever parser (since u() is here
>      Left Hand Side argument), the next case on line 63 in stranger:
>      u(i+1)=u(i)+
>     (((time0(i+1)-time0(i))/(time0(w+2)-time0(i)))*(u(w+2)-u(i)));
>      where u(i) and u(w+2) may be understood as recursive calls to the
>     function u().
>      Finally, line 66:
>      ut=u'; // Whether the parser understands u as the function, then
>     transposing
>      a function could be an issue for it.
>
>     I don't know if the confusion between both u() as a function and
>     as a vector
>     is the issue. Nevertheless, it could be worthwhile to rename one
>     of both,
>     and then try again.
>
>     HTH
>     Samuel
>
>


-- 
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





More information about the users mailing list