bugGNU Octave - Bugs: bug #49846, ode45 initial call to event...

 
 

bug #49846: ode45 initial call to event function uses wrong time value

Submitted by:  None
Submitted on:  Thu 15 Dec 2016 06:14:30 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: BP MinakerOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.0
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 26 Dec 2016 04:37:05 PM UTC, comment #5:

@Carlo: See bug #49919. If the solver stops immediately, it lists the event time as tfinal rather than tinit which is incorrect. I fixed that with the cset in comment #3.

Rik <rik5>
Project Administrator
Fri 16 Dec 2016 06:23:57 AM UTC, comment #4:

Hi,

I cannot seem to find any description of this in Matlab docs.

Could you please also provide an example of how this works in Matlab and what the current implementation was doing wrong?

We can then use the example as a test in the octave ode solvers ...

Carlo de Falco <cdf>
Project Member
Thu 15 Dec 2016 11:25:09 PM UTC, comment #3:

I checked in a change on stable to use the start time, rather than the end time, to initialize the Event function (http://hg.savannah.gnu.org/hgweb/octave/rev/544dac72d414).

Rik <rik5>
Project Administrator
Thu 15 Dec 2016 10:06:04 PM UTC, comment #2:

Well, I didn't know where it was actually calling from, but yes, I think that would be more appropriate, and would be compatible with Matlab.

Anonymous
Thu 15 Dec 2016 09:54:23 PM UTC, comment #1:

To be clear, are you talking about the function scripts/ode/private/integrate_adaptive.m?

I see the following in that m-file:

Is the suggestion to change tspan(end) to tspan(1)?

Rik <rik5>
Project Administrator
Thu 15 Dec 2016 06:14:30 AM UTC, original submission:

If ode45 is used with an optional event function to check for stopping conditions, the very first call to the event function, before the solution process actually gets underway, is called with the end time of the solution interval rather than the start time. I'm pretty sure that this is not the intended behaviour. It can lead to incorrect event function value and early stopping of solver.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cdf (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 26 Dec 2016 04:37:05 PM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Fri 16 Dec 2016 06:24:28 AM UTCcdfItem GroupRegression=>Incorrect Result
      StatusFixed=>Need Info
      Open/ClosedClosed=>Open
    Thu 15 Dec 2016 11:25:09 PM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
      Releasedev=>4.2.0
    Thu 15 Dec 2016 09:54:23 PM UTCrik5StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1