Closed
Description
Bug?/feature? detected when looking into the error in #50
Consider the polyhedron defined by
@variable(m, x[1:3] ≥ 1)
@constraints(m, begin
x[1] == 2
x[2] ≤ 2
end)
Obtain a V-representation by LRSLib.jl
:
using LRSLib
M = Rational{BigInt}[
-1 1 0 0
-1 0 1 0
-1 0 0 1
2 -1 0 0
2 0 -1 0
]
d = 3
m = 4
linearity = BitSet(m)
P, Q = LRSLib.initmatrix(M, linearity, true)
hr1 = LRSLib.HMatrix(d, P, Q)
convert(LRSLib.VMatrix, hr1)
Output:
V-representation LRSLib.VMatrix:
2-element iterator of Vector{Rational{BigInt}}:
Rational{BigInt}[2, 2, 1]
Rational{BigInt}[2, 1, 1],
1-element iterator of Polyhedra.Ray{Rational{BigInt}, Vector{Rational{BigInt}}}:
Ray(Rational{BigInt}[0, 0, 1])
Then change the order in which the constraints are lined up, by letting the last one (x[2] ≤ 2
) show up in the first row:
M = Rational{BigInt}[
2 0 -1 0
-1 1 0 0
-1 0 1 0
-1 0 0 1
2 -1 0 0
]
d = 3
m = 5
linearity = BitSet(m)
P, Q = LRSLib.initmatrix(M, linearity, true)
hr2 = LRSLib.HMatrix(d, P, Q)
convert(LRSLib.VMatrix, hr2)
Output:
V-representation LRSLib.VMatrix:
2-element iterator of Vector{Rational{BigInt}}:
Rational{BigInt}[2, 1, 1]
Rational{BigInt}[2, 2, 1],
2-element iterator of Polyhedra.Ray{Rational{BigInt}, Vector{Rational{BigInt}}}:
Ray(Rational{BigInt}[0, 0, 1])
Ray(Rational{BigInt}[0, 0, 1])
The same ray is repeated twice...
Metadata
Metadata
Assignees
Labels
No labels