Skip to content

Commit 0a075a9

Browse files
fix: populate observed into u0map for time-independent systems
1 parent db42f5d commit 0a075a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/systems/problem_utils.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,8 @@ function process_SciMLProblem(
742742
cmap, cs = get_cmap(sys)
743743
kwargs = NamedTuple(kwargs)
744744

745+
is_time_dependent(sys) || add_observed!(sys, u0map)
746+
745747
op, missing_unknowns, missing_pars = build_operating_point(
746748
u0map, pmap, defs, cmap, dvs, ps)
747749
substitute_extra_variables!(sys, u0map)
@@ -763,7 +765,7 @@ function process_SciMLProblem(
763765
op[iv] = t
764766
end
765767

766-
add_observed!(sys, op)
768+
is_time_dependent(sys) && add_observed!(sys, op)
767769
add_parameter_dependencies!(sys, op)
768770

769771
if warn_cyclic_dependency

0 commit comments

Comments
 (0)