MomentClosure.jl icon indicating copy to clipboard operation
MomentClosure.jl copied to clipboard

Support Catalyst named parameter/initial state vectors

Open kaandocal opened this issue 9 months ago • 2 comments

Parameters in ModelingToolkit can be passed as (name, value) pairs or dictionaries. Example:

rn = @reaction_network begin
    s, 0 -> A
    d, A -> 0
end

dprob = DiscreteProblem(rn, [ :A => 5 ], (0, 10.), [ :s => 10, :d => 1])

This seems to work via ModelingToolkit.varmap_to_vars and should probably be added to MomentClosure

kaandocal avatar May 06 '24 03:05 kaandocal

Note that with MTK9, and hence Catalyst 14, using named mappings is a requirement as under the hood parameter and species orders can now change.

isaacsas avatar Jul 15 '24 11:07 isaacsas

And a different parameter object is now generated for use in solvers: https://docs.sciml.ai/ModelingToolkit/stable/basics/FAQ/#Why-are-my-parameters-some-obscure-object?

(wrong link initially)

isaacsas avatar Jul 15 '24 13:07 isaacsas