From daad7bdb6b5919a6401380c56d2e919406d08fcf Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Mon, 9 Dec 2024 11:21:04 +1300 Subject: [PATCH] Update src/Bridges/Constraint/bridges/ExponentialConeToScalarNonlinearFunctionBridge.jl --- .../bridges/ExponentialConeToScalarNonlinearFunctionBridge.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Bridges/Constraint/bridges/ExponentialConeToScalarNonlinearFunctionBridge.jl b/src/Bridges/Constraint/bridges/ExponentialConeToScalarNonlinearFunctionBridge.jl index c986884bb5..045f4e2aa1 100644 --- a/src/Bridges/Constraint/bridges/ExponentialConeToScalarNonlinearFunctionBridge.jl +++ b/src/Bridges/Constraint/bridges/ExponentialConeToScalarNonlinearFunctionBridge.jl @@ -53,6 +53,8 @@ function bridge_constraint( Any[MOI.ScalarNonlinearFunction(:*, Any[y, g_exp_x_div_y]), z], ) ci = MOI.add_constraint(model, g, MOI.LessThan(zero(T))) + # We add this as a constraint to avoid conflicting with existing variable + # bounds, of which there can be at most one of. ci_y = MOI.add_constraint(model, one(T) * y, MOI.GreaterThan(zero(T))) return ExponentialConeToScalarNonlinearFunctionBridge{T,F}(f, ci, ci_y) end