-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarification on Behavior of intersect and & Operations in the Polytope Package #94
Comments
adding to the above abstract question, I enclose the best example to test & and intersect functions.
In R2, there are 5 polytopes
With these regions, I am trying to find a common region where R1 and R2 intersect, in other sense trying to find solution space, through two methods. Method: 1
This gives two polytopes as a result, shown in Fig.1 printing them gives
Method 2I wrote a function
in case1, I get a region that contains two polytopes and both are identical
The visualization, Fig2 in case2 i get a result similar to Method 1. Also, the A and b matrices of the polytope are the same as in Method 1. Why does the position of R1 and R2 affect the final result? Method 3 (using & directly):I know & can be used to do the intersection process., I did as
This results in
This is the same as in Fig 2. The trial So the intersect and & operations behave very differently. The operation R.intersect(P) does not give any warning or message about the position of the input argument. So the explanation about & and intersect would be handy and will help me to understand their implementation. Thank you Best regards |
Dear Developers and Users,
I have noticed different behaviors between the
intersect
and&
operations when applied to apc.Region
and a pc.Polytope. Let’s say R is apc.Region
contains 11 polytopes, and P is a pc.Polytope.When I call
R & P
, it yields some incorrect solutions. However, when I use the expression[Ri.intersect(P) for Ri in R]
, I obtain the solutions I expect.Could you clarify the difference between
R & P
and[Ri.intersect(P) for Ri in R]
in terms of how they are implemented in the Polytope package? Understanding this distinction would greatly enhance my comprehension of the package's code structure and implementation style.Any suggestions and clarifications would be greatly appreciated.
Thank you!
Best regards
Muthu Vallinayagam
Research, Institute of Experimental Physics
TU Freiberg
Germany
The text was updated successfully, but these errors were encountered: