Hi there, I’m trying to port some code over to use Catalyst.
using Catalyst, Symbolics
rs = @reaction_network begin
1, 2A --> B
2, B + C --> 0
end
v = Catalyst.oderatelaw.(reactions(rs))
u0 = [1,1,1]
Now if i want to substitute u0
into v
:
substitute(convert.(Num, v), Dict(species(rs) .=> u0))
This works, but the convert
in there feels clunky. Is this what’s going on under the hood or is there a nicer way of doing it?
Many thanks!