-
-
Notifications
You must be signed in to change notification settings - Fork 232
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Probably raised already, but I though this one had been solved so figured I'd reraise it (to be honest, it is genuinely hard to keep track of what is and is not broken right now).
using Catalyst, Test
t = default_t()
@parameters k1 k2
@species X1(t) X2(t)
rxs = [
Reaction(k1, [X1], [X2]),
Reaction(k2, [X2], [X1])
]
@named rs = ReactionSystem(rxs, t)
osys = convert(ODESystem, complete(rs); remove_conserved = true, remove_conserved_warn = false)
osys = complete(osys)
@unpack Γ = osys
# Creates an `ODEProblem`.
u0 = [X1 => 1.0, X2 => 2.0]
ps = [k1 => 0.1, k2 => 0.2]
oprob = ODEProblem(osys, u0, (0.0, 1.0), ps)
# Check `ODEProblem` content.
@test oprob[X1] == 1.0
@test oprob[X2] == 2.0 # outputs `-1.0`
@test oprob.ps[k1] == 0.1
@test oprob.ps[k2] == 0.2
@test oprob.ps[Γ[1]] == 3.0 # Outputs `0.0`
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working