Open kkakosim opened 3 months ago
Thanks for reporting this.
The issue here is that to track species PEtab.jl uses states(simpsys)
which here returns (T(t))[2]...
which due to its format is hard to track (for ODESystem
we are used to states such as u1
, u2
, u3
..., I actually never thought about PDE:s when developing PEtab.jl, but it makes sense that we can support it :)
Good news is that this can be worked around by internally renaming (T(t))[2]...
to something like T(t)__2..
(or similar) and then all the internal tracking should work just fine.
I am on a conference this week, but can hopefully look at this next week.
Doing that wouldn't be a great idea for large models as it would remove compiler optimizations in MTK v9 and JuliaSimCompiler.
The renaming would not actually be for the ODESystem
, rather it would only be internally for the building the observational and initial value functions so the sys
would be unchanged, which should not affect optimizations in MTK v9?
I don't get your statement, though the observed function generation does have some array optimizations.
What I am meaning is that PEtab.jl itself builds based on PEtabObservable
an observation function, so for that to work internally I would have to rename (never exposed to the user). But I guess in general is that with PDE:s the observable is probably likely some sum of all states?
But I guess in general is that with PDE:s the observable is probably likely some sum of all states?
It's generally an array variable. But if you are calling using the SII functions then it should canonicalize to just one vector. I don't see a SymbolicIndexingInterface.jl dep here at all so I'm very skeptical that what you have setup is generally correct.
I think (but could very well be wrong) the reason this is not based on SII is that it still awaits MTKv9 to be fully ready. Since we are still updating Catalyst to work with MTKv9, and this partially works on Catalyst models, I guess Sebastian's plan is to wait with updating PEtab to MTKv9 until after Catalyst have done so.
Exactly, we do not used SII as we are still waiting on Catalyst for updating to MTKv9 (as Catalyst is core component of SBMLImporter.jl used for PEtab.jl). Taken together, along with MTKv9 update I can make PEtab.jl more compatible with MethodOfLines generated models.
What is the proper way to utilize PEtab with other packages that use array variables?
at a Discourse Discussion @ChrisRackauckas highlighted that PEtab may not support
ODESystem
generated byModellingToolkit
which contains array variables.The discussed MWE, also provided herein, breaks with the below error when executing
p0 = generate_startguesses(petab_problem, 1)
.