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
463 stars 78 forks source link

cleanup DSL generated expression for readability #1024

Closed isaacsas closed 2 months ago

isaacsas commented 3 months ago

This introduces a bunch of intermediate variables to store inputs to make_ReactionSystem_internal, with the goal of making the generated expression easier to read when debugging. It also makes the creation of t the first thing in the generated code, which should be a first step to allowing time-dependent parameters (something MTK is working on better supporting).

TorkelE commented 3 months ago

Looks good.

Ideally I'd prefer to not do any non-required changes to the DSL file until after https://github.com/SciML/Catalyst.jl/pull/985 is merged (I've already had to do one messy merge thing to get that one back functioning with master). The removing Catalyst. things might work with a simple merge, but not sure about the other changes. If you thing there won't be any problems then feel free to merge, but otherwise I wouldn't might waiting until https://github.com/SciML/Catalyst.jl/pull/985 (with neither of these being very urgent)