@@ -508,14 +508,20 @@ struct ReactionSystem{V <: NetworkProperties} <:
508508 """
509509 discrete_events:: Vector{MT.SymbolicDiscreteCallback}
510510 """
511+ Metadata for the system, to be used by downstream packages. Currently have no known usage,
512+ however, is present in other ModelingToolkit systems, and hence added here in case it might
513+ be needed in the future.
514+ """
515+ metadata:: Any
516+ """
511517 complete: if a model `sys` is complete, then `sys.x` no longer performs namespacing.
512518 """
513519 complete:: Bool
514520
515521 # inner constructor is considered private and may change between non-breaking releases.
516522 function ReactionSystem (eqs, rxs, iv, sivs, states, spcs, ps, var_to_name, observed,
517523 name, systems, defaults, connection_type, nps, cls, cevs, devs,
518- complete:: Bool = false ; checks:: Bool = true )
524+ metadata = nothing , complete:: Bool = false ; checks:: Bool = true )
519525
520526 # unit checks are for ODEs and Reactions only currently
521527 nonrx_eqs = Equation[eq for eq in eqs if eq isa Equation]
@@ -534,7 +540,7 @@ struct ReactionSystem{V <: NetworkProperties} <:
534540
535541 rs = new {typeof(nps)} (eqs, rxs, iv, sivs, states, spcs, ps, var_to_name, observed,
536542 name, systems, defaults, connection_type, nps, cls, cevs,
537- devs, complete)
543+ devs, metadata, complete)
538544 checks && validate (rs)
539545 rs
540546 end
0 commit comments