Skip to content

Commit

Permalink
Merge pull request #443 from isaacsas/obs_in_convert
Browse files Browse the repository at this point in the history
forward observed when converting systems
  • Loading branch information
isaacsas committed Nov 8, 2021
2 parents 9190fb3 + f0c8c6f commit 92f2b62
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/reactionsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,8 @@ function Base.convert(::Type{<:ODESystem}, rs::ReactionSystem;
include_zero_odes=include_zero_odes)
eqs,sts,ps = addconstraints!(eqs, fullrs)
ODESystem(eqs, get_iv(fullrs), sts, ps; name=name, defaults=get_defaults(fullrs),
checks=checks, kwargs...)
observed=get_observed(fullrs), checks=checks,
kwargs...)
end

"""
Expand All @@ -632,7 +633,8 @@ function Base.convert(::Type{<:NonlinearSystem}, rs::ReactionSystem;
error_if_constraint_odes(NonlinearSystem, fullrs)
eqs,sts,ps = addconstraints!(eqs, fullrs)
NonlinearSystem(eqs, sts, ps; name=name, defaults=get_defaults(fullrs),
checks = checks, kwargs...)
observed=get_observed(fullrs), checks = checks,
kwargs...)
end

"""
Expand Down Expand Up @@ -682,6 +684,7 @@ function Base.convert(::Type{<:SDESystem}, rs::ReactionSystem;
(noise_scaling===nothing) ? get_ps(flatrs) : union(get_ps(flatrs), toparam(noise_scaling));
name=name,
defaults=get_defaults(flatrs),
observed=get_observed(flatrs),
checks = checks,
kwargs...)
end
Expand All @@ -707,7 +710,8 @@ function Base.convert(::Type{<:JumpSystem},rs::ReactionSystem;

eqs = assemble_jumps(flatrs; combinatoric_ratelaws=combinatoric_ratelaws)
JumpSystem(eqs, get_iv(flatrs), get_states(flatrs), get_ps(flatrs); name=name,
defaults=get_defaults(flatrs), checks = checks, kwargs...)
defaults=get_defaults(flatrs), observed=get_observed(flatrs),
checks = checks, kwargs...)
end


Expand Down

0 comments on commit 92f2b62

Please sign in to comment.