Skip to content

Commit 679ecdd

Browse files
authored
Improve comments on bridge final touch logic
Clarify comments regarding bridge insertion and final touch requirements.
1 parent 7d7392e commit 679ecdd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Bridges/bridge_optimizer.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,8 +1968,10 @@ function add_bridged_constraint(b, BridgeType, f, s)
19681968
# To make this happen, we remember how many bridges are already in the
19691969
# vector, and then we insert the bridge into the vector. This is an O(N)
19701970
# operation in the number of new bridges, but it's a pretty rare edge-case,
1971-
# and the number of new bridges should be small. (And in most common bridges
1972-
# that need final touch, like the ToMILP bridges, N=0.)
1971+
# and the number of new bridges should be small. (And most of the time, N=0,
1972+
# because most bridges that need final touch don't add any bridges that
1973+
# themselves need final touch. Good examples are the ToMILP bridges that
1974+
# need variable bounds.)
19731975
n_final_touch = length(map.needs_final_touch)
19741976
bridge = Constraint.bridge_constraint(BridgeType, recursive_model(b), f, s)
19751977
if MOI.Bridges.needs_final_touch(bridge)

0 commit comments

Comments
 (0)