diff --git a/src/reactionsystem_conversions.jl b/src/reactionsystem_conversions.jl index 9705d61773..f63735a3f5 100644 --- a/src/reactionsystem_conversions.jl +++ b/src/reactionsystem_conversions.jl @@ -336,7 +336,7 @@ function classify_vrjs(rs, physcales) empty!(rxvars) (rx.rate isa Symbolic) && get_variables!(rxvars, rx.rate) @inbounds for rxvar in rxvars - if isequal(rxvar, get_iv(rs)) + if isequal(rxvar, get_iv(rs)) || (!MT.isparameter(rxvar) && !isspecies(rxvar)) isvrjvec[i] = true havevrjs = true break @@ -401,7 +401,7 @@ function assemble_jumps(rs; combinatoric_ratelaws = true, physical_scales = noth end end end - vcat(meqs, ceqs, veqs) + reduce(vcat, (meqs, ceqs, veqs); init = Any[]) end ### Equation Coupling ### diff --git a/test/reactionsystem_core/reactionsystem.jl b/test/reactionsystem_core/reactionsystem.jl index 3acdf008e3..18ac4d361f 100644 --- a/test/reactionsystem_core/reactionsystem.jl +++ b/test/reactionsystem_core/reactionsystem.jl @@ -1021,4 +1021,18 @@ let jprob = JumpProblem(jinput; rng) sol = solve(jprob) @test sol(10.0; idxs = :A) > 0 -end \ No newline at end of file + + rn = @reaction_network begin + @parameters λ + k*V, 0 --> A + @equations D(V) ~ λ*V + @continuous_events begin + [V ~ 2.0] => [V ~ V/2, A ~ rand()*A] + end + end + jinput = JumpInputs(rn, [:A => 0, :V => 1.0], (0.0, 10.0), [:k => 1.0, :λ => .2]) + @test jinput.prob isa ODEProblem + jprob = JumpProblem(jinput; rng) + sol = solve(jprob, Tsit5()) + +end