Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add differentiation tests #139

Merged
merged 2 commits into from
Jul 30, 2019
Merged

Add differentiation tests #139

merged 2 commits into from
Jul 30, 2019

Conversation

devmotion
Copy link
Member

I added tests similar to the ones in https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl/blob/master/test/interface/ad_tests.jl. Unfortunately they show that AD doesn't work (as suspected in #133).

function test(p)
prob = DDEProblem(f, [p[5]], h, eltype(p).((0.0, 20.0)), copy(p);
constant_lags = [p[2]])
sol = solve(prob, MethodOfSteps(Tsit5()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have to set the tolerance really low to test the difference here, since finite difference is really sensitive.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah OK. However, I guess it does not matter at the moment - the values are off by multiple orders of magnitude, and even the signs do not match.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's bad haha

@devmotion
Copy link
Member Author

Tests on AppVeyor took too long to run, but the differentiation tests passed successfully.

@devmotion devmotion merged commit a2b2fff into master Jul 30, 2019
@devmotion devmotion deleted the diff branch July 30, 2019 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants