SciML / JumpProcesses.jl

Build and simulate jump equations like Gillespie simulations and jump diffusions with constant and state-dependent rates and mix with differential equations and scientific machine learning (SciML)
https://docs.sciml.ai/JumpProcesses/stable/
Other
135 stars 35 forks source link

DirectCR-RSSA #346

Open Vilin97 opened 10 months ago

Vilin97 commented 10 months ago

A new spatial SSA called DirectCRRSSA uses RSSA-style sampling to sample the site+jump. It is about 20% faster than DirectCRDirect, at least on the problem in the test/spatial/ABC.jl (5 sites in a line, 3 species, 2 reactions).

using BenchmarkTools
@btime solve(jump_problems[1], SSAStepper()) # NSM with a `CartesianGrid`, 52ms
@btime solve(jump_problems[2], SSAStepper()) # NSM with a `Graph`, 49ms
@btime solve(jump_problems[3], SSAStepper()) # DirectCRDirect with  a `CartesianGrid`, 51ms
@btime solve(jump_problems[4], SSAStepper()) # DirectCRRSSA with a `CartesianGrid`, 42ms
github-actions[bot] commented 10 months ago

Pull Request Test Coverage Report for Build 6141985002


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/spatial/bracketing.jl 35 38 92.11%
src/spatial/rssacrdirect.jl 105 111 94.59%
<!-- Total: 172 181 95.03% -->
Files with Coverage Reduction New Missed Lines %
src/aggregators/prioritytable.jl 1 86.86%
src/extended_jump_array.jl 1 80.52%
src/coupling.jl 2 78.18%
src/spatial/spatial_massaction_jump.jl 3 85.45%
src/spatial/directcrdirect.jl 5 87.65%
<!-- Total: 12 -->
Totals Coverage Status
Change from base Build 6133295964: -0.1%
Covered Lines: 2419
Relevant Lines: 2695

💛 - Coveralls
coveralls commented 10 months ago

Pull Request Test Coverage Report for Build 6180696485


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/spatial/bracketing.jl 23 24 95.83%
src/spatial/directcrrssa.jl 106 111 95.5%
<!-- Total: 155 161 96.27% -->
Totals Coverage Status
Change from base Build 6167199515: 0.3%
Covered Lines: 2423
Relevant Lines: 2687

💛 - Coveralls