@wds15: This is great, and very much in line with what I had in mind for the “mixed solver”.
I put together a prototype, based on a simplified Friberg-Karlsson model (PK: one compartment with absorption from the gut, PD: feedback mechanism), and observed a twofold speedup. See attached files: these aren’t minimal working examples yet. The forcing function is the solution to the one compartment model, which I had in Torsten’s C++ library and I exposed to Stan for this test.
I want to try it out with a two compartment forcing function (i.e a more sophisticated forcing function).
Why do you pass the parameters for the forcing function in x_r? Shouldn’t you use parameters, if the forcing function depends on parameters?
fOneCpt_mixed.stan (5.3 KB)
fOneCpt.stan (4.6 KB)