-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Currently, the model that a bridge optimizer gives to an bridge to stored the constraints created by the bridge is the bridge optimizer itself.
Indeed, for LazyBridgeOptimizer
it is needed as the constraints created by the bridge may may need to bridged themselves if the initial constraint need to be bridged by several bridges.
However, for SingleBridgeOptimizer
, it is not needed and we should give the inner model. Indeed, currently, if a bridge support bridging the constraints it creates, it gives a StackOverflow
. This was experienced by @lkapelevich for PolyJuMP.ZeroPolynomialInAlgebraicSetBridge
: the constraint it creates should be handled by PolyJuMP.ZeroPolynomialBridge
which is in the inner SingleBridgeOptimizer
but since it can also be bridged by the bridge of the current SingleBridgeOptimizer
, it gets stuck at this level and gives a StackOverflow
Another example is Chordal decomposition. @chriscoey suggested to create a bridge for this but as this bridge transforms PSD constraints to PSD constraints, the bridge also supports bridging the constraints it creates.
I would suggest defining bridged_model
in the AbstractBridgeOptimizer
interface.
Then for LazyBridgeOptimizer
, it returns the bridge optimizer itself but for the SingleBridgeOptimizer
, it returns the inner model.