Skip to content

Commit 20206b6

Browse files
committed
Merge branch 'fix-ismassaction' into fix-reactionsys-to-nonlinsys
2 parents 3267ca7 + 89d92ad commit 20206b6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/systems/reaction/reactionsystem.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@ function assemble_diffusion(rs, noise_scaling; combinatoric_ratelaws=true)
235235
eqs
236236
end
237237

238-
# Calculate the Jump rate law (like ODE, but uses X instead of X(t).
239-
# The former generates a "MethodError: objects of type Int64 are not callable" when trying to solve the problem.
240238
"""
241239
jumpratelaw(rx; rxvars=get_variables(rx.rate), combinatoric_ratelaw=true)
242240
@@ -301,7 +299,7 @@ explicitly on the independent variable (usually time).
301299
- Optional: `stateset`, set of states which if the rxvars are within mean rx is non-mass action.
302300
"""
303301
function ismassaction(rx, rs; rxvars = get_variables(rx.rate),
304-
haveivdep,
302+
haveivdep = any(var -> isequal(rs.iv,var), rxvars),
305303
stateset = Set(states(rs)))
306304
# if no dependencies must be zero order
307305
(length(rxvars)==0) && return true

0 commit comments

Comments
 (0)