Skip to content

remake issues #3410

@TorkelE

Description

@TorkelE

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

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions