Skip to content

Commit 86e2467

Browse files
authored
Merge pull request #99 from JuliaPolyhedra/bl/lpsolver
Remove lpsolver
2 parents 3716b6f + 00566d4 commit 86e2467

File tree

7 files changed

+13
-16
lines changed

7 files changed

+13
-16
lines changed

test/board.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ function boardtest(lib::Lib) where Lib<:PolyhedraLibrary
4848
bcut = [cutb; b]
4949
inecut = hrep(Acut, bcut)
5050
polycut = polyhedron(inecut, lib)
51-
@test !isempty(polycut, Polyhedra.solver(polycut, lpsolver...))
51+
@test !isempty(polycut)
5252
#(isredundant, certificate) = isredundantinequality(polycut, 1)
5353
#@test !isredundant
5454
#@test certificate == target
55-
@test !isredundant(polycut, first(eachindex(halfspaces(polycut))), solver=Polyhedra.solver(polycut, lpsolver...))
55+
@test !isredundant(polycut, first(eachindex(halfspaces(polycut))))
5656
# @test IntSet() == gethredundantindices(polycut) # TODO reactivate it when I figure out why it makes LRS tests fail
5757
#(issredundant, scertificate) = isstronglyredundantinequality(polycut, 1)
5858
#@test !issredundant

test/docexample.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ function doctest(lib::PolyhedraLibrary)
44
V = [1//2 1//2; 0 1; 0 0]
55
hr = hrep(A, b)
66
p = polyhedron(hr, lib)
7-
solver = Polyhedra.solver(p, lpsolver...)
8-
@test issubset(p, HalfSpace([1, -1], 0), solver)
9-
@test !(issubset(p, HalfSpace([1, 1], 0), solver))
10-
@test !(issubset(p, HyperPlane([-1, 0], 0), solver))
7+
@test p HalfSpace([1, -1], 0)
8+
@test !(p HalfSpace([1, 1], 0))
9+
@test !(p HyperPlane([-1, 0], 0))
1110
inequality_fulltest(p, A, b, IntSet())
1211
generator_fulltest(p, V)
1312
@test hrepiscomputed(p)

test/permutahedron.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function permutahedrontest(lib::Lib) where Lib<:PolyhedraLibrary
55
V = [2 3 1; 1 3 2; 3 1 2; 3 2 1; 2 1 3; 1 2 3]
66
ine = hrep(A, b, linset)
77
poly = polyhedron(ine, lib)
8-
@test !isempty(poly, Polyhedra.solver(poly, lpsolver...))
8+
@test !isempty(poly)
99
inequality_fulltest(poly, A, b, linset)
1010
generator_fulltest(poly, V, Array{Int}(0, 3))
1111

test/runtests.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ using StaticArrays
99
include("utils.jl")
1010

1111
include("solvers.jl")
12-
lpsolver = tuple() # TODO remove in v0.3.2
1312

1413
include("elements.jl")
1514
include("comp.jl")

test/simplex.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ function simplextest(lib::PolyhedraLibrary)
22
hsim = HalfSpace([-1, 0], 0) HalfSpace([0, -1], 0) HyperPlane([1, 1], 1)
33
vsim = convexhull([0, 1], [1, 0])
44
poly1 = polyhedron(hsim, lib)
5-
@test !isempty(poly1, Polyhedra.solver(poly1, lpsolver...))
6-
center, radius = chebyshevcenter(poly1, Polyhedra.solver(poly1, lpsolver...))
5+
@test !isempty(poly1)
6+
center, radius = chebyshevcenter(poly1)
77
@test center [1/2, 1/2]
88
@test radius 1/2
99
@test dim(poly1) == 1 # FIXME doing dim earlier makes chebyshevcenter fail
@@ -56,7 +56,7 @@ function simplextest(lib::PolyhedraLibrary)
5656
# x_1 cannot be 2
5757
hempty = hsim HyperPlane([1, 0], 2)
5858
poly = polyhedron(hempty, lib)
59-
@test isempty(poly, Polyhedra.solver(poly, lpsolver...))
59+
@test isempty(poly)
6060

6161
# We now add the vertex (0, 0)
6262
ext0 = convexhull([0, 0])

test/solvers.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ if lp_solver === nothing
4646
scs && (lp_solver = SCS.SCSSolver(eps=1e-6,verbose=0))
4747
@assert lp_solver !== nothing
4848
end
49-
lpsolver = tuple(lp_solver) # TODO remove in v0.3.2

test/sparse.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ function sparsetest(lib::PolyhedraLibrary)
1818
[0, -1, 1])
1919
p = polyhedron(h, lib)
2020
@test !vrepiscomputed(p)
21-
@test (p, HalfSpace([3, 2, 0], 2), lpsolver...)
21+
@test p HalfSpace([3, 2, 0], 2)
2222
@test !vrepiscomputed(p)
23-
@test !(p, HalfSpace([3, 2, 0], 1), lpsolver...)
23+
@test !(p HalfSpace([3, 2, 0], 1))
2424
@test !vrepiscomputed(p)
2525
inequality_fulltest(p, h)
2626
generator_fulltest(p, v)
@@ -30,9 +30,9 @@ function sparsetest(lib::PolyhedraLibrary)
3030
# If lib supported sparse, hvectortype(q) should be sparse hence hvectortype(p) should also be sparse
3131
@test Polyhedra.hvectortype(typeof(p)) == Polyhedra.hvectortype(typeof(q))
3232
@test !vrepiscomputed(q)
33-
@test (q, HalfSpace([2, -3], 0), lpsolver...) # This also checks that the solver was ot dropped during fixandeliminate
33+
@test q HalfSpace([2, -3], 0) # This also checks that the solver was ot dropped during fixandeliminate
3434
@test !vrepiscomputed(q)
35-
@test !(q, HalfSpace([2, -3], -1), lpsolver...)
35+
@test !(q HalfSpace([2, -3], -1))
3636
@test !vrepiscomputed(q)
3737
hfix = HalfSpace([ 2, 0], -1)
3838
HalfSpace([ 0, -3], 1)

0 commit comments

Comments
 (0)