Skip to content

Can no longer simulate coupled ReactionSystem ODESystem #3409

@TorkelE

Description

@TorkelE

Probably something that has been changed in how stuff should be declared, but this now errors.

@parameters p d a b
@species X(t)
@variables A(t)
eqs = [
    Reaction(p, nothing, [X]),
    Reaction(d, [X], nothing),
    a*A^2 ~ X + b
]
@named coupled_rs = ReactionSystem(eqs, t)
coupled_rs = complete(coupled_rs)
osys = structural_simplify(convert(ODESystem, coupled_rs))

u0 = [X => 0.1, A => 10.0]
tspan = (0.0, 1000.0)
ps = [p => 1.0, d => 0.5, a => 2.0, b => 16.0]

oprob = ODEProblem(osys, u0, tspan, ps) # ┌ Warning: Initialization system is overdetermined.
osol = solve(oprob, Rosenbrock23()) # retcode: InitialFailure
osol.u[end]  [2.0, 3.0] # false


oprob = ODEProblem(osys, [X => 0.1], tspan, ps) # ERROR: Initial condition underdefined. Some are missing from the variable map.

Metadata

Metadata

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