Jamesflynn1 / pyRBM

A Python framework to build and simulate stochastic rules-based models.
GNU General Public License v3.0
3 stars 0 forks source link

[SOLVER] Hu-Kang-Othmer (HKO) (exact optimised Gillespie) #14

Closed Jamesflynn1 closed 2 months ago

Jamesflynn1 commented 2 months ago

Provide the solver name Hu-Kang-Othmer (HKO) Direct method (a modified Gillespie solver).

Link a paper or provide a reference for the described solver https://www-users.cse.umn.edu/~othmer/papers/Hu:2013:SAR.pdf

Describe a usecase of the solver This solver is mathematically equivalent to the Gillespie solver but reduces the time complexity of the rule selection search from O(rs) to O(r+s) at the cost of maintaining a dictionary of per rule propensities (in addition to the "subrule" propensities already stored).

Describe alternatives/tradeoffs you've considered (optional) The TKO algorithm permits many different hierarchies of layering the propensities, allowing search time and update time to be traded off as desired - we fixed a root - rule - subrule hierarchy which fits well into the existing index set and rule paradigm of the framework.

Gibson Bruck method works similarly to the HKO method. https://pubs.acs.org/doi/abs/10.1021/jp993732q

Describe changes to pyRBM core code that might be required to implement (optional) Changes to the base solver class to generalise the propensity update code further.

Additional context (optional) NOTE: currently not an exact implementation, doesn't follow the algorithm exactly but simpler, will look to see whether the implementation is equivalent to the paper.