Skip to content

Padding variable with LRSLib.generatorproducer #33

@matbesancon

Description

@matbesancon

How to reproduce:

0 <= x1, x2 <= 1
x1 + x2 <= 1.5
x1 == x2

This yields the following polyhedron:

julia> poly = Polyhedra.polyhedron(m, LRSLib.Library())
Polyhedron LRSLib.Polyhedron:
1-element iterator of Polyhedra.HyperPlane{Rational{BigInt},Array{Rational{BigInt},1}}:
 HyperPlane(Rational{BigInt}[1//1, -1//1], 0//1),
5-element iterator of Polyhedra.HalfSpace{Rational{BigInt},Array{Rational{BigInt},1}}:
 HalfSpace(Rational{BigInt}[-1//1, 0//1], 0//1)
 HalfSpace(Rational{BigInt}[0//1, -1//1], 0//1)
 HalfSpace(Rational{BigInt}[1//1, 0//1], 1//1)
 HalfSpace(Rational{BigInt}[0//1, 1//1], 1//1)
 HalfSpace(Rational{BigInt}[1//1, 1//1], 3//2)

The vrep is all good:

julia> Polyhedra.vrep(poly)
V-representation Polyhedra.LiftedVRepresentation{Rational{BigInt},Array{Rational{BigInt},2}}:
2-element iterator of Array{Rational{BigInt},1}:
 Rational{BigInt}[3//4, 3//4]
 Rational{BigInt}[0//1, 0//1]

But the generator produces the following:

julia> chan = LRSLib.generatorproducer(hrep);

julia> collect(chan)
2-element Array{Any,1}:
 Rational{BigInt}[1//1, 3//4, 3//4]
 Rational{BigInt}[1//1, 0//1, 0//1]

It always adds an additional coordinate to the vertices, at the first position. Should this be documented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions