Open schillic opened 3 years ago
@schillic did you ever identify what the issue was here? I am also running into this assertion error when running the double description algorithm.
Nope, sorry.
IIRC, I tried debugging it and it didn't seem to be a bug, the problem is just very ill-conditioned but I might be confusing with another issue
I reduced the input a bit (unfortunately still 8-dimensional).
vP = [zeros(8)];
vQ = [ zeros(8),
[0.2697646549, 0.582602434, 0.044249395, 0.3243733749, 0.279717666, 0.040712222, 0.423054165, 0.00203898],
[0.2697646549, 0.582602434, 0.044249395, 0, 0, 0, 0, 0.00203898],
[0.3608261278, 0.679524167, 0.136746907, 0.402633628, 0.35212651, 0.098545864, 0.486760072, 0.02214126],
[0.3608261278, 0.679524167, 0.136746907, 0, 0, 0, 0, 0.02214126],
[0.378795447, 0.7586303128, 0.110599867, 0.43901788, 0.377833245, 0.0820484389, 0.549691624, 0.017745282],
[0.378795447, 0.7586303128, 0.110599867, 0, 0, 0, 0, 0.017745282],
[0.35699186847, 0.7349374913, 0.08851175424, 0.42014699571, 0.3600990024, 0.06804164876, 0.53443130217, 0.0138162307],
[0.35699186847, 0.7349374913, 0.08851175424, 0, 0, 0, 0, 0.0138162307],
[0.35660931758, 0.7345462469, 0.08812122743, 0.419822561067, 0.35980781258, 0.06780390511, 0.534163892267, 0.0137028111] ];
Interestingly, if I change the order of the vertices, the problem does not occur. (For instance, move the zeros(8)
further down in vQ
.)
The error is in this method:
which is called from here:
(Side note: The parameter β
is not used in that method.)
Looking at typical values of value1
and value2
, value1
is always negative and value2
is always positive - except when this assertion fails, then value1
is small but positive. For the above example I get:
h.a = [-1.0, -0.2697646549, -0.582602434, -0.044249395, -0.3243733749, -0.279717666, -0.040712222, -0.423054165, -0.00203898]
el1 = r1 = Ray([0.0, 29.090432340937888, -12.242070824013831, -16.36861456149422, 78.48690222274764, 20.316388217194387, -57.27032575277269, -68.10076386587039, 4.409582784205131])
(value1, value2) = (1.4249591747880763e-8, 0.00424417718061143)
So the problem is that value1 = h.a · el1 = 1.4249591747880763e-8
. h.a
is the negative second vertex of vQ
plus a leading -1.0
. I do not know where el1
comes from. Both these vectors look pretty normal to me, so numerical errors should not be the cause (except maybe further down the stack when el1
is computed - this I do not know).
The following example is a reduced version (I removed dimensions and vertices until the error vanishes) of a more complex input.
Tested with Julia v1.6.1 and