|
231 | 231 | jtoj = eqeq_dependencies(jdeps, vdeps).fadjlist
|
232 | 232 | @test jtoj == [[1, 2, 4], [1, 2, 4], [1, 2, 3, 4], [1, 2, 3, 4]]
|
233 | 233 | end
|
| 234 | + |
| 235 | +# Create JumpProblems for systems without parameters |
| 236 | +# Issue#2559 |
| 237 | +@parameters k |
| 238 | +@variables X(t) |
| 239 | +rate = k |
| 240 | +affect = [X ~ X - 1] |
| 241 | + |
| 242 | +crj = ConstantRateJump(1.0, [X ~ X - 1]) |
| 243 | +js1 = complete(JumpSystem([crj], t, [X], [k]; name = :js1)) |
| 244 | +js2 = complete(JumpSystem([crj], t, [X], []; name = :js2)) |
| 245 | + |
| 246 | +maj = MassActionJump(1.0, [X => 1], [X => -1]) |
| 247 | +js3 = complete(JumpSystem([maj], t, [X], [k]; name = :js2)) |
| 248 | +js4 = complete(JumpSystem([maj], t, [X], []; name = :js3)) |
| 249 | + |
| 250 | +u0 = [X => 10] |
| 251 | +tspan = (0.0, 1.0) |
| 252 | +ps = [k => 1.0] |
| 253 | + |
| 254 | +dp1 = DiscreteProblem(js1, u0, tspan, ps) |
| 255 | +dp2 = DiscreteProblem(js2, u0, tspan) |
| 256 | +dp3 = DiscreteProblem(js3, u0, tspan, ps) |
| 257 | +dp4 = DiscreteProblem(js4, u0, tspan) |
| 258 | + |
| 259 | +jp1 = JumpProblem(js1, dp1, Direct()) |
| 260 | +jp2 = JumpProblem(js2, dp2, Direct()) |
| 261 | +jp3 = JumpProblem(js3, dp3, Direct()) |
| 262 | +jp4 = JumpProblem(js4, dp4, Direct()) |
0 commit comments