-
-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
Is it possible to change the rates of mass-action jumps through callbacks? (see also this discourse thread)
I.e., how to make the following work
rn2 = @reaction_network begin
a, 0 --> X
end a
prob2_jump = JumpProblem(rn2, DiscreteProblem(rn2, [0], (0.0, 10.0), [1.0]), Direct())
_cond(u,t,integ) = u[1] > 5
_affect!(integ) = integ.p[1] = 0.0
_cb = DiscreteCallback(_cond, _affect!)
solve(prob2_jump, SSAStepper(), callback=_cb)such that the rate is adjusted when X passes the threshold. Certainly this version of _affect! is too naive.
Metadata
Metadata
Assignees
Labels
No labels