Skip to content

Commit 7df0532

Browse files
committed
Fix the reducibility condition
1 parent 19d2333 commit 7df0532

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/structural_transformation/partial_state_selection.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,10 @@ function dummy_derivative_graph!(structure::SystemStructure, var_eq_matching, ja
278278
end
279279
x = diff_to_var[x]
280280
x === nothing && break
281-
isempty(𝑑neighbors(graph, x)) && continue
281+
# We deliberately do not check `isempty(𝑑neighbors(graph, x))`
282+
# because when `D(x)` appears in the alias graph, and `x`
283+
# doesn't appear in any equations nor in the alias graph, `D(x)`
284+
# is not reducible. Consider the system `D(x) ~ 0`.
282285
if !haskey(ag, x)
283286
isred = false
284287
end

0 commit comments

Comments
 (0)