Skip to content

Symbolic indexing doesn't work when plotting ensemble summary #3491

@TorkelE

Description

@TorkelE

Giving integer indexes does work, but generally shouldn't work in MTK?

using Catalyst
repressilator = @reaction_network begin
    hillr(Z,v,K,n), ∅ --> X
    hillr(X,v,K,n), ∅ --> Y
    hillr(Y,v,K,n), ∅ --> Z
    d, (X, Y, Z) -->end

u0 = [:X => 45.0, :Y => 20.0, :Z => 20.0]
tend = 200.0
ps = [:v => 10.0, :K => 20.0, :n => 3, :d => 0.1]
sprob = SDEProblem(repressilator, u0, tend, ps)

using StochasticDiffEq, Plots
eprob = EnsembleProblem(sprob)
sol = solve(eprob, ImplicitEM(); trajectories = 200)
esummary = EnsembleAnalysis.EnsembleSummary(sol_intrinsic, 0.0:1.0:200.0)

plot(esummary; idxs = 1) # OK
plot(esummary; idxs = repressilator.X) # Error: `ERROR: ArgumentError: invalid index: X(t) of type SymbolicUtils.BasicSymbolic{Real}`.
plot(esummary; idxs = [repressilator.X]) # Error: `ERROR: ArgumentError: invalid index: X(t) of type SymbolicUtils.BasicSymbolic{Real}`.

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