-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Ready for Review] - Constant-complexity NRM implementation #455
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
-
Can you please explain what is the difference between this SSA and
DirectCRDirect
(same Sanft 2015 paper is cited there) and alsoDirectCR
(the binning strategy looks similar)? Thank you. -
It would be helpful if you reported the relative performance on the new SSA on one or two problems, e.g. from tests, compared to other SSAs in the library. If it's much slower (>2x) than similar binning SSAs like
DirectCR
, we will need to look into it more. -
Also, I left some more specific comments about the code.
Hi Vasily, the main difference with DirectCR is that the priority table in this method stores next reaction times rather than reaction rates, and this implementation doesn't handle spatial jumps like DirectCRDirect. But admittedly I am a little confused about the citation for DirectCRDirect being the Sanft/Othmer paper -- they do discuss a spatial generalization of CCNRM, but it does not seem equivalent to DirectCRDirect (since it involves storing reaction times instead of rates). Performance-wise this is definitely a WIP (will convert it to a draft). Like you say it is slower and allocates much more memory than DirectCR or NRM (which is why I currently have the allocations test commented out, since it fails), but am submitting it in this state to hopefully get some feedback on how to improve this aspect, cc @isaacsas. Working on rewriting the methods for the PriorityTimeTable to allocate less. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to @inbounds
hot loops with indexing when this is ready to merge.
Co-authored-by: Sam Isaacson <[email protected]>
Co-authored-by: Sam Isaacson <[email protected]>
Co-authored-by: Sam Isaacson <[email protected]>
Co-authored-by: Sam Isaacson <[email protected]>
Co-authored-by: Sam Isaacson <[email protected]>
Please revert the format commits. They are changing lots of other stuff and there is apparently a bug in JuliaFormatter anyways that is causing formats to break semantics. |
@vyudu is this all done / updated now? |
Should be after these tests run. |
An implementation of the method in Sanft/Othmer.