Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed May 28, 2024
1 parent 08713fa commit 909eee9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/test_complex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function test_complex_hermitian_constraint()
@constraint(model, c, H in HermitianPSDCone())
@test constraint_object(c).func == [x[1, 1], x[1, 2], x[2, 2], 0.0]
@test function_string(MIME("text/plain"), constraint_object(c)) ==
"[x[1,1] x[1,2];\n x[1,2] x[2,2]]"
"[x[1,1] x[1,2]\n x[1,2] x[2,2]]"
return
end

Expand All @@ -266,11 +266,11 @@ function test_complex_hermitian_inequality_constraint()
@constraint(model, c, H >= 0, HermitianPSDCone())
@test constraint_object(c).func == [x[1, 1], x[1, 2], x[2, 2], 0.0]
@test function_string(MIME("text/plain"), constraint_object(c)) ==
"[x[1,1] x[1,2];\n x[1,2] x[2,2]]"
"[x[1,1] x[1,2]\n x[1,2] x[2,2]]"
@constraint(model, c2, 0 <= H, HermitianPSDCone())
@test constraint_object(c2).func == [x[1, 1], x[1, 2], x[2, 2], 0.0]
@test function_string(MIME("text/plain"), constraint_object(c2)) ==
"[x[1,1] x[1,2];\n x[1,2] x[2,2]]"
"[x[1,1] x[1,2]\n x[1,2] x[2,2]]"
return
end

Expand Down
6 changes: 3 additions & 3 deletions test/test_print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,10 @@ Max a - b + 2 a1 - 10 x
Subject to
con : a + b - 10 c + c1 - 2 x $le 1
a*b $le 2
[a b;
[a b
b x] $inset $(PSDCone())
[a, b, c] $inset $(MOI.PositiveSemidefiniteConeTriangle(2))
[a b;
[a b
c x] $inset $(PSDCone())
[a, b, c, x] $inset $(MOI.PositiveSemidefiniteConeSquare(2))
soc : [-a + 1, u[1], u[2], u[3]] $inset $(MOI.SecondOrderCone(4))
Expand Down Expand Up @@ -873,7 +873,7 @@ function test_print_hermitian_psd_cone()
H = Hermitian([x[1] 1im; -1im x[2]])
c = @constraint(model, H in HermitianPSDCone())
@test sprint(io -> show(io, MIME("text/plain"), c)) ==
"[x[1] im;\n -im x[2]] $in_sym $(HermitianPSDCone())"
"[x[1] im\n -im x[2]] $in_sym $(HermitianPSDCone())"
@test sprint(io -> show(io, MIME("text/latex"), c)) ==
"\$\$ \\begin{bmatrix}\nx_{1} & im\\\\\n-im & x_{2}\\\\\n\\end{bmatrix} \\in \\text{$(HermitianPSDCone())} \$\$"
return
Expand Down

0 comments on commit 909eee9

Please sign in to comment.