Catalyst.jl
Catalyst.jl copied to clipboard
Enabling creation of bundled reactions (using vector variables/parameters)
Imagine if we have a vector-valued species:
using Catalyst
t = default_t()
@species X[1:100]
where each degrades at the same rate d, it would be neat to declare this as a single reaction:
@parameters d
rxs = Reaction(d, X, [])
If we could somehow represent this as a single reaction, without unfolding it into 100 different one, we might utilise the new JuliaSimCompiler to gain a lot of efficiency.
This concept is quite similar to the limited reaction bundling we already do in the DSL (although these are unfolded into multiple reactions):
rn = @reaction_network begin
p, 0 --> X1
k1, X1 --> X2
k2, X2 --> X3
d, (X1, X2, X3) --> 0 # The three degradation reaction bundles into a single line
end
At some point, it might be possible to create a general bundled reaction structure and use it under these circumstances.
I am not sure what the status of JuliaSimCompiler is though. If we wish to hook into it, we should probably want until that is fully settled.