Catalyst.jl
Catalyst.jl copied to clipboard
For conservation law parameters, add to their meta data that they are conservation law parameters
Seems useful. Current example:
julia> rs = @reaction_network begin
(k1,k2), X1 <--> X2
end;
julia> osys = convert(ODESystem, rs; remove_conserved = true);
julia> parameters(osys)[end].metadata
Base.ImmutableDict{DataType, Any} with 3 entries:
MTKVariableTypeCtx => PARAMETER
VariableSource => (:parameters, :Γ)
ArrayShapeCtx => (1:1,)
We have conservationlaw_constants to get them.
That said, attaching metadata to them is probably a good approach to propagate their meaning through to downstream system types and allow users to extract them from such systems.
This would be where to inject the metadata I think:
https://github.com/SciML/Catalyst.jl/blob/fc13104034b74f720276d615318f079ec22925f7/src/networkapi.jl#L1225
Yeah, I had some application in SI where you get lists of possible identifiable functions (find_identifiable_functions). Here it would be good to simply loop through the output and see whether any components are conservation law constants.
now works on master