Skip to content

Benchmarks for DDEs #3

Closed
Closed

Description

@ChrisRackauckas

We should start getting some benchmarks together for DDEs. There probably aren't many good ones with analytical solutions, so the appxsol stuff will have to be used on the simplest examples. Show the difference between constrained and unconstrained, the the difference that order makes in DDEs. Also see the difference between the OwrenZen optimized interpolant methods and the classic optimized RK methods to see if it really makes a difference.

@devmotion do you have any model equations to consider?

Activity

  1. devmotion commented on Aug 8, 2017

    @devmotion
    Member

    In my master thesis I'm mostly working with the model (and some variants of it) in https://link.springer.com/article/10.1007%2Fs00216-014-8063-6. However, it contains a bunch of parameters, only one variable with delay, one variable that tends to oscillate betweeen positive and negative values although mathematically it has to be positive all the time, and some variables that have to be positive in the original model to ensure a real solution (there are some arbitrary real exponents). So I guess this might not be the best suited model for benchmarks ;)

    However, in http://www.radford.edu/%7Ethompson/RP/dklag6.pdf which you posted in the issue about generic state-dependent delay handling the authors benchmark different versions of their program with three different models. The first two of them are state-dependent delay models (so not suited yet), but the third example, especially the integral-free version on p. 327, could be used. They had to run their program twice since after a certain time point D the equations change from an ODE to a DDE system but with DelayDiffEq we can compute the solution in one run.

  2. ChrisRackauckas commented on Aug 8, 2017

    @ChrisRackauckas
    MemberAuthor

    although mathematically it has to be positive all the time

    Is this a numerical issue?

    So I guess this might not be the best suited model for benchmarks ;)

    That sounds like a perfect benchmark. ROBER and VanDerPol became popular ODE benchmarks precisely because they could make a lot of stiff solvers fail. If this is such an equation, then it would nice to have a reference version as a benchmark and be able to track how well we do, and find out what we can do to improve it, or at least what kinds of options are required to handle it well.

  3. devmotion commented on Aug 8, 2017

    @devmotion
    Member

    Is this a numerical issue?

    Maybe to some part, but I already could improve the results by setting element-wise absolute tolerances (the variables are on quite different scales). However, only with the additional effort of restricting the solution to positive values, as discussed in SciML/DiffEqCallbacks.jl#12, I could obtain quite good results.

    If this is such an equation, then it would nice to have a reference version as a benchmark and be able to track how well we do, and find out what we can do to improve it, or at least what kinds of options are required to handle it well.

    I will reevaluate how well it performs since we changed the algorithm meanwhile, so the plots shown in SciML/DiffEqCallbacks.jl#12 have changed probably.

  4. devmotion commented on Aug 8, 2017

    @devmotion
    Member

    I just did some plots (without any benchmarking regarding time or memory) of the critical variable in my system. It is very small compared to the other four variables, so without element-wise absolut tolerances and without any other options I usually do not get a satisfying solution:

    BS3
    figure_1_bs3

    Tsit5
    figure_1_tsit5

    DP5
    figure_1_dp5

    DP8
    figure_1_dp8

    RK4
    figure_1_rk4

    OwrenZen3
    figure_1_owrenzen3

    OwrenZen4
    figure_1_owrenzen4

    OwrenZen5
    figure_1_owrenzen

    But wow, I'm impressed by the OwrenZen5 result 👍

  5. ChrisRackauckas commented on Aug 8, 2017

    @ChrisRackauckas
    MemberAuthor

    But wow, I'm impressed by the OwrenZen5 result

    Yes, it controls the interpolation error the best. We should probably update the docs and suggest it as the Owren methods as the defaults for delay equations. Also try RK4 with its residual error estimator.

  6. devmotion commented on Aug 8, 2017

    @devmotion
    Member

    And then I repeated these calculation with element-wise absolute tolerances. This improves all results (well, except of OwrenZen5) but still most of them still show some tiny oscillations.

    BS3
    figure_1_bs3_autoabs

    Tsit5
    figure_1_tsit5_autoabs

    DP5
    figure_1_dp5_autoabs

    DP8
    figure_1_dp8_autoabs

    RK4
    figure_1_rk4_autoabs

    OwrenZen3
    figure_1_owrenzen3_autoabs

    OwrenZen4
    figure_1_owrenzen4_autoabs

    OwrenZen5
    figure_1_owrenzen5_autoabs

    At first glance, all OwrenZen methods and RK4 outperform the other algorithms here.

  7. ChrisRackauckas commented on Aug 8, 2017

    @ChrisRackauckas
    MemberAuthor

    This is with no callback or isoutofdomain?

  8. devmotion commented on Aug 8, 2017

    @devmotion
    Member

    Yes, exactly. With the callback I could get similar results for DP8 as for the OwrenZen methods shown above, but some of the other methods still showed these tiny fluctuations.

  9. ChrisRackauckas commented on Aug 8, 2017

    @ChrisRackauckas
    MemberAuthor

    Part of it with Tsit5 could be numerical issues with the interpolant. It's not using Horner's rule yet.

    SciML/OrdinaryDiffEq.jl#130

  10. devmotion commented on Aug 8, 2017

    @devmotion
    Member

    I added RK4 to the plots above. With element-wise absolute tolerances it gives also a satisfying result.

  11. ChrisRackauckas commented on Aug 27, 2017

    @ChrisRackauckas
    MemberAuthor

    Can we make this into a notebook?

  12. devmotion commented on Aug 27, 2017

    @devmotion
    Member

    I'll transfer it to a notebook 👍 Which solver would you suggest for computing reference solutions?

    In the references you posted I also discovered some other equations for benchmarking, so probably we can add some other notebooks as well.

  13. ChrisRackauckas commented on Aug 27, 2017

    @ChrisRackauckas
    MemberAuthor

    Which solver would you suggest for computing reference solutions?

    Well, with lazy interpolants working Vern9 at very low tolerances should be very accurate. But I think for this one the plots are a very good indicator of qualitative behavior in favor of the OwrenZen methods which should be showcased somewhere.

  14. ChrisRackauckas commented on Sep 10, 2017

    @ChrisRackauckas
    MemberAuthor

    Cool. Future issues on this will be more specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions