Closed Vilin97 closed 1 month ago
We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report. To ensure accuracy in future PRs, please see these guidelines. A quick fix for this PR: rebase it; your next report should be accurate.
Totals | |
---|---|
Change from base Build 6269620671: | -1.1% |
Covered Lines: | 2070 |
Relevant Lines: | 2332 |
Perfect is always the enemy of good for this kind of thing. I can tell you that 90% of users just use Gillespie's method if we document Direct
as Gillespie's method. Even the simplest defaulting scheme can be merged and do better than the vast majority of users, so the details can always evolve but I think the biggest thing is to just get something with the right broad strokes and also update all of the tutorials to not hardcode a method. The latter is BTW very important, because there's still people who use DiffEq who just throw Tsit5 everywhere instead of using the default, and you really want to stop that habit via tutorials otherwise people will overuse Gillespie.
@Vilin97 will merge when I get tests passing.
@TorkelE expanded this a bit to allow not needing to pass SSAStepper
too, i.e. with this PR this should now work
jprob = JumpProblem(rn, dprob)
sol = solve(jprob)
@TorkelE actually MTK and Catalyst need appropriate dispatches for JumpProblem to make this work, so not quite there yet for being usable in Catalyst.
@ChrisRackauckas if you could give a quick look to ensure I haven't added a dispatch better handled elsewhere (or shadowing one elsewhere) that would be helpful.
@Vilin97 thanks for your work on this and sorry for the long long delay!
Thank you for cleaning up and adding a default solver too. Now we need to update the docs, right?
Yes, the docs need updates in places now. Using the defaults in the most introductory places, but explaining how to select solvers and such as they currently do in more advanced places.
If
JumpProblem(prob, jumps)
is called, an SSA is selected via the function below. The assumption is thatDirect
is fastest for a small network, whileRSSACR
is fastest for other networks. IfRSSACR
cannot be used because no species-to-jumps graph is given, thenDirectCR
is used instead.