Skip to content

Commit a248973

Browse files
authored
Update bridge_optimizer.jl
1 parent 7e3c6b3 commit a248973

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Bridges/bridge_optimizer.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,13 +1757,19 @@ function MOI.get(
17571757
end
17581758
end
17591759

1760-
function _get_variable_if_equivalent(b, x)
1760+
function _get_variable_if_equivalent(
1761+
b::AbstractBridgeOptimizer,
1762+
x::VariableIndex,
1763+
)
17611764
return _get_variable_if_equivalent(bridged_variable_function(b, x), x)
17621765
end
17631766

1764-
_get_variable_if_equivalent(b, ::Nothing) = nothing
1767+
_get_variable_if_equivalent(::AbstractBridgeOptimizer, ::Nothing) = nothing
17651768

1766-
function _get_variable_if_equivalent(f::MOI.ScalarAffineFunction, x)
1769+
function _get_variable_if_equivalent(
1770+
f::MOI.ScalarAffineFunction,
1771+
x::MOI.VariableIndex,
1772+
)
17671773
if length(f.terms) == 1
17681774
term = only(f.terms)
17691775
if isone(term.coefficient)

0 commit comments

Comments
 (0)