Skip to content

Commit efe77a9

Browse files
committed
Update
1 parent 3661f0e commit efe77a9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ext/MathOptInterfaceCliqueTreesExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ function MOI.Utilities.compute_sparse_sqrt(
2222
LinearAlgebra.RowMaximum(),
2323
)
2424
U = SparseArrays.sparse(G.U) * G.P
25-
# Verify the factorization reconstructs Q. This catches indefinite
26-
# matrices where the diagonal is all zeros (e.g., [0 -1; -1 0]).
25+
# Verify the factorization reconstructs Q. We don't have something like
26+
# LinearAlgebra.issuccess(G)
2727
if !isapprox(Q, U' * U; atol = 1e-10)
2828
return nothing
2929
end

src/Bridges/Constraint/bridges/QuadtoSOCBridge.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ function compute_sparse_sqrt(Q, ::F, ::S) where {F,S}
100100
if (ret = MOI.Utilities.compute_sparse_sqrt(Q)) !== nothing
101101
return ret
102102
elseif !MOI.Utilities.is_defined(MOI.Utilities.LDLFactorizationsExt())
103-
msg =_error_msg(MOI.Utilities.LDLFactorizationsExt())
103+
msg = _error_msg(MOI.Utilities.LDLFactorizationsExt())
104104
return throw(MOI.AddConstraintNotAllowed{F,S}(msg))
105105
elseif !MOI.Utilities.is_defined(MOI.Utilities.CliqueTreesExt())
106-
msg =_error_msg(MOI.Utilities.CliqueTreesExt())
106+
msg = _error_msg(MOI.Utilities.CliqueTreesExt())
107107
return throw(MOI.AddConstraintNotAllowed{F,S}(msg))
108108
end
109109
msg = """

test/Bridges/Constraint/test_QuadtoSOCBridge.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ function test_clique_trees_early_zero_pivot()
480480
x = MOI.add_variables(model, 3)
481481
# (x[1] + x[2])^2 + x[3]^2 = x[1]^2 + 2*x[1]*x[2] + x[2]^2 + x[3]^2
482482
# Q = [1 1 0; 1 1 0; 0 0 1]
483-
f = 0.5 * x[1] * x[1] + 1.0 * x[1] * x[2] + 0.5 * x[2] * x[2] + 0.5 * x[3] * x[3]
483+
f = sum(0.5 * x[i] * x[i] for i in 1:3) + 1.0 * x[1] * x[2]
484484
c = MOI.add_constraint(model, f, MOI.LessThan(1.0))
485485
F, S = MOI.VectorAffineFunction{Float64}, MOI.RotatedSecondOrderCone
486486
ci = only(MOI.get(inner, MOI.ListOfConstraintIndices{F,S}()))

0 commit comments

Comments
 (0)