You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem also happens when Catalyst is not used, e.g. this also give a similar error
beginusing JumpProcesses
# here we order S = 1, I = 2, and R = 3# substrate stoichiometry:
substoich = [[1=>1, 2=>1], # 1*S + 1*I
[2=>1]] # 1*I# net change by each jump type
netstoich = [[1=>-1, 2=>1], # S -> S-1, I -> I+1
[2=>-1, 3=>1]] # I -> I-1, R -> R+1# rate constants for each jump
p = (0.1/1000, 0.01)
# p[1] is rate for S+I --> 2I, p[2] for I --> R
pidxs = [1, 2]
maj =MassActionJump(substoich, netstoich; param_idxs = pidxs)
u₀ = [999, 1, 0] #[S(0),I(0),R(0)]
tspan = (0, 250)
dprob =DiscreteProblem(u₀, tspan, p)
# use the Direct method to simulate
jprob =JumpProblem(dprob, Direct(), maj)
# solve as a pure jump process, i.e. using SSAStepper
sol =solve(jprob, SSAStepper())
end
This works fine with e.g. ODEs:
rn =@reaction_networkbegin
(p,d), 0<--> X
end
u0 = [:X=>1.0]
tspan = (0, 10)
p = [:p=>1.0, :d=>0.1]
oprob =ODEProblem(rn, u0, tspan, p)
sol =solve(oprob, Tsit5())
The text was updated successfully, but these errors were encountered:
Simple example:
If I change to
tspan = (0, 10)
:I instead get an error:
The problem also happens when Catalyst is not used, e.g. this also give a similar error
This works fine with e.g. ODEs:
The text was updated successfully, but these errors were encountered: