You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Function barrier to iterate over bridges of the same type in an efficient way.
function_final_touch(bridges, model)
for bridge in bridges
MOI.Bridges.final_touch(bridge, model)
end
return
end
function MOI.Bridges.final_touch(map::Map, model::MOI.ModelLike)
for bridges invalues(map.needs_final_touch)
_final_touch(bridges, model)
end
return
end
In that case, we might not call final_touch on that bridge.
The text was updated successfully, but these errors were encountered:
blegat
changed the title
Ddding need_final_touch bridges in final_touch
Ddding a bridge that needs final_touch bridges in the final_touch of another bridge
Aug 12, 2022
blegat
changed the title
Ddding a bridge that needs final_touch bridges in the final_touch of another bridge
Adding a bridge that needs final_touch bridges in the final_touch of another bridge
Aug 12, 2022
So we nearly had an example of this with #2316. I started to add SOSToMILP but then the IndicatorToSOS bridge would enable Indicator to MILP, except that IndicatorToSOS does not add variable bounds, so it would error.
To fix, we'd need a final_touch in IndicatorToSOS to update the final bounds on the slack variable, and then the usual final touch in SOSToMILP. So we'd have to touch IndicatorToSOS before touching SOSToMILP.
This will require a DAG of final_touch rather than the Set that we currently use, but it might be sufficient to just use a vector ordered by creation date?
If a bridge adds a constraint that needs a bridge that
need_final_touch
then it will modify theneeds_final_touch
being iterated overMathOptInterface.jl/src/Bridges/Constraint/map.jl
Lines 321 to 334 in 95a73a0
In that case, we might not call
final_touch
on that bridge.The text was updated successfully, but these errors were encountered: