-
-
Notifications
You must be signed in to change notification settings - Fork 232
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When you run jump simulations the type of the values are now Float64
(even if initialised with Int64
). These are integer-valued simulations, and should have integer values.
using ModelingToolkit, JumpProcesses
@parameters p d
@variables X(t)
rate1 = p
rate2 = X*d
affect1 = [X ~ X + 1]
affect2 = [X ~ X - 1]
j1 = ConstantRateJump(rate1, affect1)
j2 = ConstantRateJump(rate2, affect2)
# Works.
@mtkbuild js = JumpSystem([j1, j2], t, [X], [p,d])
dprob = DiscreteProblem(js, [X => 15], (0.0, 10.), [p => 2.0, d => 0.5])
jprob = JumpProblem(js, dprob, Direct())
sol = solve(jprob, SSAStepper())
sol[X] # Returns `Vector{Float64}`.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working