Skip to content

Commit 6dc3586

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

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

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

0 commit comments

Comments
 (0)