Closed DanSJohnson closed 1 year ago
The matrix is not specified in H-rep format, in which case cddlib's behaviour is undefined. For your code, a quick fix is:
poly.rep_type = cdd.RepType.INEQUALITY
right after you create poly
.
With this fix:
>>> print(poly.get_generators())
V-representation
begin
5 4 real
1 5.587155425E-01 5.587155425E-01 0
1 5.587155425E-01 -5.587155425E-01 0
1 -5.587155425E-01 -5.587155425E-01 0
1 -5.587155425E-01 5.587155425E-01 0
0 0 0 1
end
>>> print(poly.get_inequalities())
H-representation
begin
5 4 real
0 0 0 1
5.587155425E-01 0 -1 0
5.587155425E-01 0 1 0
5.587155425E-01 -1 0 0
5.587155425E-01 1 0 0
end
Thank you so much!
Hi everyone,
I'm encountering strange behaviour with pycddlib, I run the following code where I define a matrix in H-rep format:
And the result is:
Concerningly,
poly.get_generators()
is returning something in H-representation, and the H-representation returned (by bothget_generators()
andget_inequalities()
) seems to be very different from the H-representation I first passed in. I don't understand why this is, am I doing something wrong?I am using pycddlib version 2.1.6 installed via pip, my python version is 3.6.9 and my OS is Ubuntu 18.04.05 LTS.
I would be very grateful for any assistance!