Skip to content

Commit 4c6e061

Browse files
Only use the observed for simplification in MTKParameters construction
You don't need it in the p itself, just wanted to use it for simplification, so don't loop over the whole thing. This fixes SciML/MethodOfLines.jl#397
1 parent 72044e4 commit 4c6e061

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/parameter_buffer.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ function MTKParameters(
4343
end
4444
defs = merge(defs, u0)
4545
defs = merge(Dict(eq.lhs => eq.rhs for eq in observed(sys)), defs)
46-
p = merge(defs, p)
46+
bigdefs = merge(defs, p)
4747
p = merge(Dict(unwrap(k) => v for (k, v) in p),
4848
Dict(default_toterm(unwrap(k)) => v for (k, v) in p))
49-
p = Dict(unwrap(k) => fixpoint_sub(v, p) for (k, v) in p)
49+
p = Dict(unwrap(k) => fixpoint_sub(v, bigdefs) for (k, v) in p)
5050
for (sym, _) in p
5151
if iscall(sym) && operation(sym) === getindex &&
5252
first(arguments(sym)) in all_ps

0 commit comments

Comments
 (0)