diff --git a/src/dsl.jl b/src/dsl.jl index 7f5e2d6125..484c4e7457 100644 --- a/src/dsl.jl +++ b/src/dsl.jl @@ -380,23 +380,28 @@ function make_reaction_system(ex::Expr; name = :(gensym(:ReactionSystem))) end quote - $ps $ivexpr + $ps $vars $sps $observed_vars $comps $diffexpr + sivs_vec = $sivs + rx_eq_vec = $rxexprs + vars = setdiff(union($spssym, $varssym, $compssym), $obs_syms) + obseqs = $observed_eqs + cevents = $continuous_events_expr + devents = $discrete_events_expr + Catalyst.remake_ReactionSystem_internal( Catalyst.make_ReactionSystem_internal( - $rxexprs, $tiv, setdiff(union($spssym, $varssym, $compssym), $obs_syms), - $pssym; name = $name, spatial_ivs = $sivs, observed = $observed_eqs, - continuous_events = $continuous_events_expr, - discrete_events = $discrete_events_expr, + rx_eq_vec, $tiv, vars, $pssym; + name = $name, spatial_ivs = sivs_vec, observed = obseqs, + continuous_events = cevents, discrete_events = devents, combinatoric_ratelaws = $combinatoric_ratelaws); - default_reaction_metadata = $default_reaction_metadata - ) + default_reaction_metadata = $default_reaction_metadata) end end