Closed isaacsas closed 8 months ago
Talking about epidemiological modeling, it could be also nice to take into account the possibility of having some ways to specify compartments. Say we have a simple SIR model, with I = {I_1,I_2,...,I_n}, instead of writing all the reactions "by hand" (which in this case is doable), there could be the possibility to let the user specify all the "type" of reactions that he wants, which rates etc and then call the @reaction_network macro with this information to build the network.
I am currently working on a proof of concept using catalyst for this, maybe I can provide some code in the near future to help brainstorming. As discussed with isaacsas on slack, this could be related to "spatial" information of the network.
Some modalities to consider:
S_i -> S_j
where i
and j
denote different nodes / mesh cells / compartments. These are usually restricted to i
and j
that are neighbors.
b. Non-spatial reactions that are replicated at each node, i.e. A_i + B_i <-> C_i
, A_i <-> B_i
, 0 <-> A_i
, etc, at all nodes, i
. Here we should support isotropic rates and varying rates that depend on i
.
c. Spatial interactions A_i + B_j <-> C_k
for different nodes, i
, j
, k
. An important point here is that such reactions might be desired for sites that are not nearest neighbors in the spatial transition sense (a. above). i.e. we either want a separate graph for neighbors for these types of reactions, or to allow non-neighbor interactions.Would it make sense to allow an arbitrary number of graphs to be in the input, and then reactions could use "neighbours" through any select graph?
In the case of a system where one has reactions using neighbours and neighbours neighbours, there's one graph associated with each type. That way one could avoid having to handle various weird connection schemes, and leave it to the users to come up with a way of producing the appropriate graphs for their desired type? (possibly adding a helper method for producing common graphs, like neighbours neighbours, from a given one)
Never really doing much spatial stuff and not to sure about this stuff, but just throwing it out there.
(Simple) spatial models are currently possible. I have also created an issue for gathering future steps for improving spatial implementations at: https://github.com/SciML/Catalyst.jl/issues/726. Would it make sense to close this and gather future spatial discussions there?
Stuff from here is now intergrated to https://github.com/SciML/Catalyst.jl/issues/726
Issues to consider
A_i + B_j -> C_k + D_l
and such.