Skip to content

Commit 3c02998

Browse files
shashiYingboMa
andcommitted
fix test/dep_graphs.jl
Co-authored-by: "Yingbo Ma" <[email protected]>
1 parent 1b957eb commit 3c02998

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/systems/jumps/jumpsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ function get_variables!(dep, jump::Union{ConstantRateJump,VariableRateJump}, var
289289
end
290290

291291
function get_variables!(dep, jump::MassActionJump, variables)
292-
sr = jump.scaled_rates
292+
sr = value(jump.scaled_rates)
293293
(sr isa Symbolic) && get_variables!(dep, sr, variables)
294294
for varasop in jump.reactant_stoch
295295
any(isequal(varasop[1]), variables) && push!(dep, varasop[1])

src/systems/reaction/reactionsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ Notes:
260260
function jumpratelaw(rx; rxvars=get_variables(rx.rate), combinatoric_ratelaw=true)
261261
@unpack rate, substrates, substoich, only_use_rate = rx
262262
rl = rate
263-
rl = substitute(rl, Dict(rxvars .=> var2op.(rxvars)))
263+
#rl = substitute(rl, Dict(rxvars .=> var2op.(rxvars)))
264264
if !only_use_rate
265265
coef = one(eltype(substoich))
266266
for (i,stoich) in enumerate(substoich)
267-
s = var2op(substrates[i])
267+
s = substrates[i]
268268
rl *= s
269269
isone(stoich) && continue
270270
for i in one(stoich):(stoich-one(stoich))

test/dep_graphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ eqs = [0 ~ σ*(y-x),
100100
ns = NonlinearSystem(eqs, [x,y,z],[σ,ρ,β])
101101
deps = equation_dependencies(ns)
102102
eq_sdeps = [[x,y],[y],[y,z]]
103-
@test all(i -> isequal(Set(deps[i]),Set(convert.(Variable,eq_sdeps[i]))), 1:length(deps))
103+
@test all(i -> isequal(Set(deps[i]),Set(value.(eq_sdeps[i]))), 1:length(deps))

0 commit comments

Comments
 (0)