Skip to content

Commit

Permalink
Fix the reducibility condition
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Oct 19, 2022
1 parent 19d2333 commit 7df0532
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/structural_transformation/partial_state_selection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ function dummy_derivative_graph!(structure::SystemStructure, var_eq_matching, ja
end
x = diff_to_var[x]
x === nothing && break
isempty(𝑑neighbors(graph, x)) && continue
# We deliberately do not check `isempty(𝑑neighbors(graph, x))`
# because when `D(x)` appears in the alias graph, and `x`
# doesn't appear in any equations nor in the alias graph, `D(x)`
# is not reducible. Consider the system `D(x) ~ 0`.
if !haskey(ag, x)
isred = false
end
Expand Down

0 comments on commit 7df0532

Please sign in to comment.