JuliaPolyhedra / Polyhedra.jl

Polyhedral Computation Interface
Other
172 stars 27 forks source link

How to check the dimension names before eliminating some dimensions of a polyhedron? #337

Closed WuSiren closed 6 months ago

WuSiren commented 6 months ago
using Polyhedra
using JuMP
using CDDLib

poly = Model()
@variable(poly, -1 <= x <= 1)
@variable(poly, -2 <= y <= 2)
P = polyhedron(poly, CDDLib.Library(:exact))
P_y = eliminate(P, [1])

How can I make sure the index [1] is corresponding to dimension x? Do they always follow the order that they are created in?

blegat commented 6 months ago

See the discussion in https://github.com/JuliaPolyhedra/Polyhedra.jl/issues/166

WuSiren commented 6 months ago

Thanks!