Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Catalyst named parameter/initial state vectors #60

Open
kaandocal opened this issue May 6, 2024 · 2 comments
Open

Support Catalyst named parameter/initial state vectors #60

kaandocal opened this issue May 6, 2024 · 2 comments

Comments

@kaandocal
Copy link
Contributor

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

@isaacsas
Copy link

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
Copy link

isaacsas commented Jul 15, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants