help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to keep lsode from returning to toplevel at errors?


From: Olaf Till
Subject: How to keep lsode from returning to toplevel at errors?
Date: Thu, 17 Nov 2005 09:57:52 +0100
User-agent: Mutt/1.5.9i

Hello,

I am rather new to octave.

Problem: My optimization routine calls lsode many times with a
differential equation whose parameters are changed from call to
call. In some of these calls (with "stiff" and the default option
values) lsode hangs. Setting a suitable "initial step width" prevents
lsode from hanging, but this suitable value is different from call to
call (with different parameters for the differential equation) and I
can not predict it.

How I try to solve it: If the value for "minimal step width" is set
from the default 0 to some (small) non-zero value, lsode will return
an error in the cases in which it before that had just hung. This
should provide the possibility to loop through a set of "initial step
width" values until a suitable one is found.

However, since lsode returns an error in these cases instead of just
setting istate to an error value, control is returned to top level,
not to my script. Here is the error message:

 LSODE--  AT T (=R1) AND STEP SIZE H (=R2), THE    
       CORRECTOR CONVERGENCE FAILED REPEATEDLY     
       OR WITH ABS(H) = HMIN   
      In above,  R1 =  0.8688561900806E-01   R2 =  0.1000000000000E-09
error: invalid vector index = 58
error: evaluating argument list element number 2
error: evaluating for command near line 143, column 1
error: called from ......

My question: Could someone point me to a place in the source where I
could hack lsode for me not to return a real error message in this
case (or just in any case)? I got a bit lost in the code. Or possibly
someone has a better solution?



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]