Skip to content

Commit b16a989

Browse files
committed
remove crashing SSAs in tests
1 parent 1727b3b commit b16a989

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/systems/jumps/jumpsystem.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,14 @@ function DiffEqJump.JumpProblem(js::JumpSystem, prob, aggregator; kwargs...)
121121
majs = MassActionJump[assemble_maj(js, j, statetoid, parammap) for j in eqs.x[1]]
122122
crjs = ConstantRateJump[assemble_crj(js, j, statetoid) for j in eqs.x[2]]
123123
vrjs = VariableRateJump[assemble_vrj(js, j, statetoid) for j in eqs.x[3]]
124-
((prob isa DiscreteProblem) && !isempty(vrjs)) && error("Use continuous problems such as an ODEProblem or a SDEProblem with VariableRateJumps")
125-
124+
((prob isa DiscreteProblem) && !isempty(vrjs)) && error("Use continuous problems such as an ODEProblem or a SDEProblem with VariableRateJumps")
126125
jset = JumpSet(Tuple(vrjs), Tuple(crjs), nothing, isempty(majs) ? nothing : majs)
127126

128127
if needs_vartojumps_map(aggregator) || needs_depgraph(aggregator)
129128
jdeps = asgraph(js)
130129
vdeps = variable_dependencies(js)
131130
vtoj = jdeps.badjlist
132131
jtov = vdeps.badjlist
133-
134132
jtoj = needs_depgraph(aggregator) ? eqeq_dependencies(jdeps, vdeps).fadjlist : nothing
135133
else
136134
vtoj = nothing; jtov = nothing; jtoj = nothing

test/jumpsystem.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,9 @@ m3 = getmean(jprob,Nsims)
120120

121121
# maj jump test with dep graphs
122122
js3b = JumpSystem([maj1,maj2], t, [S,I,R], [β,γ])
123-
jprobb = JumpProblem(js3b, dprob, RSSA())
124-
#m4 = getmean(jprobb,Nsims)
125-
#@test abs(m-m4)/m < .01
126-
127-
jprobc = JumpProblem(js3b, dprob, DirectCR())
128-
#m5 = getmean(jprobc,Nsims)
129-
#@test abs(m-m5)/m < .01
123+
jprobb = JumpProblem(js3b, dprob, NRM())
124+
m4 = getmean(jprobb,Nsims)
125+
@test abs(m-m4)/m < .01
130126

131127
# mass action jump tests for other reaction types (zero order, decay)
132128
maj1 = MassActionJump(2.0, [0 => 1], [S => 1])

0 commit comments

Comments
 (0)