@@ -508,14 +508,18 @@ struct ReactionSystem{V <: NetworkProperties} <:
508
508
"""
509
509
discrete_events:: Vector{MT.SymbolicDiscreteCallback}
510
510
"""
511
+ Metadata for the system, to be used by downstream packages.
512
+ """
513
+ metadata:: Any
514
+ """
511
515
complete: if a model `sys` is complete, then `sys.x` no longer performs namespacing.
512
516
"""
513
517
complete:: Bool
514
518
515
519
# inner constructor is considered private and may change between non-breaking releases.
516
520
function ReactionSystem (eqs, rxs, iv, sivs, states, spcs, ps, var_to_name, observed,
517
521
name, systems, defaults, connection_type, nps, cls, cevs, devs,
518
- complete:: Bool = false ; checks:: Bool = true )
522
+ metadata = nothing , complete:: Bool = false ; checks:: Bool = true )
519
523
520
524
# unit checks are for ODEs and Reactions only currently
521
525
nonrx_eqs = Equation[eq for eq in eqs if eq isa Equation]
@@ -534,7 +538,7 @@ struct ReactionSystem{V <: NetworkProperties} <:
534
538
535
539
rs = new {typeof(nps)} (eqs, rxs, iv, sivs, states, spcs, ps, var_to_name, observed,
536
540
name, systems, defaults, connection_type, nps, cls, cevs,
537
- devs, complete)
541
+ devs, metadata, complete)
538
542
checks && validate (rs)
539
543
rs
540
544
end
0 commit comments