Open mvnayagam opened 1 month ago
You wrote "unexpected numbers". Do you know what the return value of extreme()
should be? In particular, do you know whether there is a finite bounding box?
thank you Herr @slivingston for your comment. yes, I know what it should be. The dimension is 4. The aexs range from 0 to 0.5. the bounding box should range up to only 0.18 and 0.12 at maximum., along the 3rd and 4th directions. But I see this is inf.
I am happy to share more info if you need it in any case
thank you
Best regards Muthu Vallinayagam Research, Institute of Experimental Physics TU Freiberg Germany
The polytope given above is unbounded. For unbounded polyhedra, a vertex representation does not exist, hence extreme
would not give a reasonable result since we only compute extreme points (but not extreme rays).
If you expect it to have a bounding box with dimensions at most 0.18, 0.12 along the 3rd and 4th direction, you might want to double check how you specify your polytopic constraints.
As a simple counterexample, you can consider the following point: x = [0.3343 0.3115 20.0000 19.9476]' is inside the polytope (satisfies Ax<=b for the given A and b) but is not within the bounding box you are expecting.
That is the problem I am facing in my program. I try to solve polytope for different orders, let us say order l = 1, 2, 3, 4 .... for each l there are 2*l**m polytope are generated, where m is the dimension of space. In the present case, it is 4.
The polytope
a=np.array([ [-1.0 , -0. ,-0. , -0.], [ 0. , 1. , 0. , 0. ], [ 0.5, -0.5 , 0.5, -0.5], [ 0.5, -0.5 ,-0.5, 0.5],
[ 0.5, 0.5, 0.5, -0.5], [-0. , -0. ,-1. , -0. ] ])
b=np.array([-0.33333, 0.3125 , 0.05724, -0.01478, 0.3566 , -0.16667])
is the solution space after taking orders l = 1, 2, 3 into the calculation. The intersection operation is used to find the solution space. I opened another discussion #94 , regarding the intersection operation. The above polytope is made using &. still, I have to debug where the problem arises from
finally, I can use _pc.boundingbox to get the bound box and say polytope is bounded or open. does polytope provide any other option to cross-check whether a given polytope is bounded or not? like _polytope.isvalid?
Best regards Muthu Vallinayagam Research, Institute of Experimental Physics TU Freiberg Germany
Dear Developers and users,
recently I have been facing an issue with using the polytope package. I have A and b matrixes,
and create a polytope 'p' as
For this polytope, I get some unwanted numbers when I calculate extreme points as
This gives
The polytope seems to be exploding along some directions ( so the values along the 3rd and 4th columns of pc.extreme(p) are 3.31721e+13 ). If I redo the calculation, sometimes the
pc.extreme
returnsIn my view pc.extreme(p) contains unwanted or unexpected numbers. 1) Has anyone faced such an issue with the polytope package? 2) How to be sure that the polytope is correct or valid?
because doing
returns
But the
returns
some weird things are happening with this polytope p or polytope package. Any leads or suggestions are highly appreciated
Thank you for your time on this question
Best regards Muthu Vallinayagam Research, Institute of Experimental Physics TU Freiberg Germany