From 019eec123f4965454b72b5aa2e4debc2836978f8 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Wed, 3 Mar 2021 15:27:55 +1300 Subject: [PATCH 1/3] Update quad_to_soc.jl --- src/Bridges/Constraint/quad_to_soc.jl | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/Bridges/Constraint/quad_to_soc.jl b/src/Bridges/Constraint/quad_to_soc.jl index d89b329002..e207db6977 100644 --- a/src/Bridges/Constraint/quad_to_soc.jl +++ b/src/Bridges/Constraint/quad_to_soc.jl @@ -78,18 +78,15 @@ function bridge_constraint( sparse(F.L), F.p catch err if err isa PosDefException - error( - "The optimizer supports second-order cone constraints and", - " not quadratic constraints but you entered a quadratic", - " constraint of type: `$(typeof(func))`-in-`$(typeof(set))`.", - " A bridge attempted to transform the quadratic constraint", - " to a second order cone constraint but the constraint is", - " not strongly convex, i.e., the symmetric matrix of", - " quadratic coefficients is not positive definite. Convex", - " constraints that are not strongly convex, i.e. the matrix is", - " positive semidefinite but not positive definite, are not", - " supported yet.", - ) + error(""" + Unable to transfor a quadratic constraint into a second-order cone + because the quadratic constraint is not strongly convex. + + Convex constraints that are not strongly convex (i.e., the matrix is + positive semidefinite but not positive definite) are not supported + yet. + + Note that a quadratic equality constraint is non-convex.""") else rethrow(err) end From 06876cc9611b3cacccbd852cbad79041668fafe0 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Wed, 3 Mar 2021 15:29:13 +1300 Subject: [PATCH 2/3] Update quad_to_soc.jl --- src/Bridges/Constraint/quad_to_soc.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bridges/Constraint/quad_to_soc.jl b/src/Bridges/Constraint/quad_to_soc.jl index e207db6977..7a204029cf 100644 --- a/src/Bridges/Constraint/quad_to_soc.jl +++ b/src/Bridges/Constraint/quad_to_soc.jl @@ -79,7 +79,7 @@ function bridge_constraint( catch err if err isa PosDefException error(""" - Unable to transfor a quadratic constraint into a second-order cone + Unable to transform a quadratic constraint into a second-order cone because the quadratic constraint is not strongly convex. Convex constraints that are not strongly convex (i.e., the matrix is From 29b9ba1a85853a30c702634089d14068edf0734b Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Thu, 4 Mar 2021 06:27:25 +1300 Subject: [PATCH 3/3] Update quad_to_soc.jl --- src/Bridges/Constraint/quad_to_soc.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bridges/Constraint/quad_to_soc.jl b/src/Bridges/Constraint/quad_to_soc.jl index 7a204029cf..979d58b1d8 100644 --- a/src/Bridges/Constraint/quad_to_soc.jl +++ b/src/Bridges/Constraint/quad_to_soc.jl @@ -80,7 +80,7 @@ function bridge_constraint( if err isa PosDefException error(""" Unable to transform a quadratic constraint into a second-order cone - because the quadratic constraint is not strongly convex. + constraint because the quadratic constraint is not strongly convex. Convex constraints that are not strongly convex (i.e., the matrix is positive semidefinite but not positive definite) are not supported