SciML / Catalyst.jl

Chemical reaction network and systems biology interface for scientific machine learning (SciML). High performance, GPU-parallelized, and O(1) solvers in open source software.
https://docs.sciml.ai/Catalyst/stable/
Other
460 stars 77 forks source link

alias elimination #413

Closed isaacsas closed 2 months ago

isaacsas commented 3 years ago

Ideally we would have a way to eliminate algebraic coupling constraints so users could define couplings like

sys1.A ~ sys2.B

and we can then eliminate one of those species from a combined system (making it an observable). Obviously this can be done on generated ODEs already via structural_simplify, but having this for composed ReactionSystems would be super useful too in building composed models.

isaacsas commented 3 years ago

With https://github.com/SciML/Catalyst.jl/pull/423, we have flattening of systems and can start to think about this. I think it makes sense to look at in two-steps:

  1. Support simple equations like sys1.A ~ sys2.B as mentioned above. This should hopefully be relatively straightforward since it is just going through, identifying such equations in the constraints of a flattened system, and then making appropriate substitutions.
  2. Supporting reduction for more general linear constraints. This would enable elimination of conservation laws, but seems more complicated. See also https://github.com/SciML/Catalyst.jl/pull/340.
isaacsas commented 2 months ago

Continue any discussion in the newer issue on adding connections.