Skip to content

Commit 377506f

Browse files
committed
Fix typo in alias elimination
1 parent 2f88927 commit 377506f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/systems/alias_elimination.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function alias_eliminate_graph!(graph, var_to_diff, mm_orig::SparseMatrixCLIL)
258258
end
259259

260260
# kind of like the backward substitution
261-
lss!(ei::Integer) = locally_structure_simplify!((@view mm[ei, :]), pivots[ei], ag, diff_to_var[pivots[ei]] == 0)
261+
lss!(ei::Integer) = locally_structure_simplify!((@view mm[ei, :]), pivots[ei], ag, isnothing(diff_to_var[pivots[ei]]))
262262

263263
# Step 2.1: Go backwards, collecting eliminated variables and substituting
264264
# alias as we go.

test/reduction.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ reduced_eqs = [
4949
test_equal.(equations(lorenz1_aliased), reduced_eqs)
5050
@test isempty(setdiff(states(lorenz1_aliased), [x, y, z]))
5151
test_equal.(observed(lorenz1_aliased), [
52+
u ~ 0
5253
z ~ x - y
53-
u ~ -0.0
5454
a ~ -z
5555
])
5656

0 commit comments

Comments
 (0)