Skip to content

Commit 8467fd9

Browse files
committed
- Fix minor bug in MassActionJump creation for when no substrates present.
1 parent b475d63 commit 8467fd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/reaction/reactionsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ function assemble_jumps(rs)
135135
elseif rx.only_use_rate || any([isequal(state,r_op) for state in rs.states, r_op in getfield.(get_variables(rx.rate),:op)])
136136
push!(eqs,ConstantRateJump(rl,affect))
137137
else
138-
reactant_stoch = Pair.(var2op.(getfield.(rx.substrates,:op)),rx.substoich)
139-
net_stoch = isempty(rx.substoich) ? [0 => 1] : map(p -> Pair(var2op(p[1]),p[2]),rx.netstoich)
138+
reactant_stoch = isempty(rx.substoich) ? [0 => 1] : Pair.(var2op.(getfield.(rx.substrates,:op)),rx.substoich)
139+
net_stoch = map(p -> Pair(var2op(p[1]),p[2]),rx.netstoich)
140140
push!(eqs,MassActionJump(rx.rate, reactant_stoch, net_stoch))
141141
end
142142
end

0 commit comments

Comments
 (0)