Skip to content

Commit be90a95

Browse files
Vaibhavdixit02YingboMa
authored andcommitted
Pass on relational_op in ineq substitution
1 parent 9c2a287 commit be90a95

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/utils.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,12 @@ end
846846
# Symbolics needs to call unwrap on the substitution rules, but most of the time
847847
# we don't want to do that in MTK.
848848
const Eq = Union{Equation, Inequality}
849-
function fast_substitute(eq::T, subs) where {T <: Eq}
850-
T(fast_substitute(eq.lhs, subs), fast_substitute(eq.rhs, subs))
849+
function fast_substitute(eq::Inequality, subs)
850+
Inequality(fast_substitute(eq.lhs, subs), fast_substitute(eq.rhs, subs),
851+
eq.relational_op)
852+
end
853+
function fast_substitute(eq::Equation, subs)
854+
Equation(fast_substitute(eq.lhs, subs), fast_substitute(eq.rhs, subs))
851855
end
852856
function fast_substitute(eq::T, subs::Pair) where {T <: Eq}
853857
T(fast_substitute(eq.lhs, subs), fast_substitute(eq.rhs, subs))

0 commit comments

Comments
 (0)