Skip to content

Commit 7ebeb78

Browse files
fix: populate observed into u0map for time-independent systems
1 parent 25339a6 commit 7ebeb78

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/systems/problem_utils.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,9 @@ function process_SciMLProblem(
735735
cmap, cs = get_cmap(sys)
736736
kwargs = NamedTuple(kwargs)
737737

738+
739+
is_time_dependent(sys) || add_observed!(sys, u0map)
740+
738741
op, missing_unknowns, missing_pars = build_operating_point(
739742
u0map, pmap, defs, cmap, dvs, ps)
740743
substitute_extra_variables!(sys, u0map)
@@ -756,7 +759,7 @@ function process_SciMLProblem(
756759
op[iv] = t
757760
end
758761

759-
add_observed!(sys, op)
762+
is_time_dependent(sys) && add_observed!(sys, op)
760763
add_parameter_dependencies!(sys, op)
761764

762765
if warn_cyclic_dependency

0 commit comments

Comments
 (0)