Skip to content

Commit be8bd84

Browse files
fixup! fix: support non-markovian index providers in updated_u0_p
1 parent 005c6bf commit be8bd84

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/remake.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,8 @@ function _updated_u0_p_symmap(prob, u0, ::Val{true}, p, ::Val{false}, t0)
908908
# FIXME: need to provide `u` since the observed function expects it.
909909
# This is sort of an implicit dependency on MTK. The values of `u` won't actually be
910910
# used, since any state symbols in the expression were substituted out earlier.
911-
temp_state = ProblemState(; u = state_values(prob), p = p, t = t0, h = is_markovian(prob) ? nothing : get_history_function(prob))
911+
temp_state = ProblemState(; u = state_values(prob), p = p, t = t0,
912+
h = is_markovian(prob) ? nothing : get_history_function(prob))
912913
for (k, v) in u0
913914
u0[k] = symbolic_type(v) === NotSymbolic() ? v : getsym(prob, v)(temp_state)
914915
end
@@ -932,7 +933,8 @@ function _updated_u0_p_symmap(prob, u0, ::Val{false}, p, ::Val{true}, t0)
932933
# FIXME: need to provide `p` since the observed function expects an `MTKParameters`
933934
# this is sort of an implicit dependency on MTK. The values of `p` won't actually be
934935
# used, since any parameter symbols in the expression were substituted out earlier.
935-
temp_state = ProblemState(; u = u0, p = parameter_values(prob), t = t0, h = is_markovian(prob) ? nothing : get_history_function(prob))
936+
temp_state = ProblemState(; u = u0, p = parameter_values(prob), t = t0,
937+
h = is_markovian(prob) ? nothing : get_history_function(prob))
936938
for (k, v) in p
937939
p[k] = symbolic_type(v) === NotSymbolic() ? v : getsym(prob, v)(temp_state)
938940
end

0 commit comments

Comments
 (0)