Skip to content

Commit c066a95

Browse files
fix: only add observed equations to u0map for time-independent or initialization systems
1 parent d742fad commit c066a95

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
@@ -816,7 +816,9 @@ function process_SciMLProblem(
816816
op, missing_unknowns, missing_pars = build_operating_point!(sys,
817817
u0map, pmap, defs, cmap, dvs, ps)
818818

819-
add_observed_equations!(u0map, obs)
819+
if !is_time_dependent(sys) || is_initializesystem(sys)
820+
add_observed_equations!(u0map, obs)
821+
end
820822
if u0_constructor === identity && u0Type <: StaticArray
821823
u0_constructor = vals -> SymbolicUtils.Code.create_array(
822824
u0Type, eltype(vals), Val(1), Val(length(vals)), vals...)

0 commit comments

Comments
 (0)