Skip to content

Commit b475d63

Browse files
committed
- MassActionJump not used when only_use_rate=true.
1 parent 207f637 commit b475d63

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/systems/reaction/reactionsystem.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,11 @@ function assemble_jumps(rs)
131131
push!(affect,var2op(spec) ~ var2op(spec) + stoich)
132132
end
133133
if any(isequal.(var2op(rs.iv),get_variables(rx.rate)))
134-
println("Var Jump")
135134
push!(eqs,VariableRateJump(rl,affect))
136-
elseif any([isequal(state,r_op) for state in rs.states, r_op in getfield.(get_variables(rx.rate),:op)])
137-
println("Const")
135+
elseif rx.only_use_rate || any([isequal(state,r_op) for state in rs.states, r_op in getfield.(get_variables(rx.rate),:op)])
138136
push!(eqs,ConstantRateJump(rl,affect))
139137
else
140138
reactant_stoch = Pair.(var2op.(getfield.(rx.substrates,:op)),rx.substoich)
141-
println("MA Jump")
142139
net_stoch = isempty(rx.substoich) ? [0 => 1] : map(p -> Pair(var2op(p[1]),p[2]),rx.netstoich)
143140
push!(eqs,MassActionJump(rx.rate, reactant_stoch, net_stoch))
144141
end

0 commit comments

Comments
 (0)