epirecipes / sir-julia

Various implementations of the classical SIR model in Julia
MIT License
196 stars 39 forks source link

Remove concrete_solve #6

Closed ChrisRackauckas closed 4 years ago

ChrisRackauckas commented 4 years ago

Seeing the popularity of this approach, I took the time in the last few days to finish the final steps of integrating AD directly into solve, so now you don't have to do anything to make solve work with downstream libraries that utilize AD.

ChrisRackauckas commented 4 years ago

This requires DiffEqBase v6.36

sdwfrost commented 4 years ago

Dear Chris, thanks! I was wondering how to convey the difference between solve and concrete solve. Is there a way to check whether AD has been tried/successful in the resulting output?

ChrisRackauckas commented 4 years ago

If you get numbers out then it's successful. I've now set it up so that AD is stable by default and will error if you do something it doesn't have a derivative for. To numerically check what kind of accuracy to expect, I'd just try two different methods, like Zygote.gradient and ForwardDiff.gradient, in order to see the difference, or two different sensealg choices.

This page explains all the details: https://docs.sciml.ai/latest/analysis/sensitivity/