Skip to content

Commit

Permalink
Merge pull request #98 from SciML/pl/exlicit_init_assignments
Browse files Browse the repository at this point in the history
support kwargs[:defaults] in the ReactionSystem constructor
  • Loading branch information
paulflang authored Dec 2, 2022
2 parents cf275f9 + a3a147c commit 6c53920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SBMLToolkit"
uuid = "86080e66-c8ac-44c2-a1a0-9adaadfe4a4e"
authors = ["paulflang", "anandijain"]
version = "0.1.17"
version = "0.1.18"

[deps]
Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83"
Expand Down
4 changes: 4 additions & 0 deletions src/systems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ function Catalyst.ReactionSystem(model::SBML.Model; kwargs...) # Todo: requires
Dict(Catalyst.DEFAULT_IV.val => 0)))
push!(raterules_subs, rhs ~ o.lhs)
end
if haskey(kwargs, :defaults)
defs = ModelingToolkit._merge(defs, kwargs[:defaults])
kwargs = filter(x -> !isequal(first(x), :defaults), kwargs)
end
constraints_sys = ODESystem(vcat(algrules, raterules_subs, obsrules_rearranged),
IV; name = gensym(:CONSTRAINTS),
continuous_events = get_events(model))
Expand Down

0 comments on commit 6c53920

Please sign in to comment.