Comments (4)
Hi Muthu. I am not sure what you mean by "combine". Is this a mathematical operation like union, convex hull, minkovski sum? In our package, "+" is used for polytope unions and in general union of two polytopes is no more a polytope (i.e., polytopes are not closed under union operation). Therefore, union operation generally returns a region.
from polytope.
Hi necozay,
Thank you for your comment. by the word combine I meant to form a new closed polytope by the union of two polytopes.
assume a region with many polytopes (all are convex) and some of them intersect with each other. so I can reduce the length of the region [ i.e. reducing the number of polytopes within the region] as follows
- find the polytopes which are intersecting
- make a single polytope from above intersecting polytopes
- replace intersecting polytopes with the single polytope from Step 2
now the region should have less number of polytopes.
In my project, the reduction of the length of the region helps to make a solid conclusion about the possible solution space for the given problem
your further suggestions would be greatly appreciated
Thank you
Best regards,
Muthu Vallinayagam
Researcher, Inst. of Experimental physics
TU Freiberg, Germany
from polytope.
A similar functionality exists inside union. You can try: r = pc.union(p1, p2, True)
instead of the + operator.
Please see: #82 (comment) for more details.
from polytope.
thank you for your comments. I have already seen the referred discussion. But still, I have an issue with this method.
let me explain what I do. I have a Region containing three polytopes as shown in the following plot.
the red polytope is in contact with two other polytopes. So in our problem, we define these three polytopes as possible solutions. In the end, we want to combine them and create a single polytope. The H representation of these polytopes are
0 Single polytope ( blue polytope )
[[ 0.57735 0.57735 0.57735] | [[ 0.27189]
[-0.57735 0.57735 -0.57735] | [-0.11722]
[ 0.57735 -0.57735 -0.57735] x <= [ 0.01637]
[-0.57735 -0.57735 -0.57735] | [-0.26141]
[ 0. 1. 0. ] | [ 0.125 ]
[-0.57735 -0.57735 0.57735]]| [-0.15292]]
1 Single polytope ( red polytope )
[[ 0.57735 0.57735 0.57735] | [[ 0.27466]
[ 0.57735 -0.57735 0.57735] | [ 0.12755]
[ 1. 0. 0. ] | [ 0.25 ]
[ 0.57735 -0.57735 -0.57735] | [ 0.01637]
[-0.57735 0.57735 0.57735] x <= [-0.00429]
[-0.57735 0.57735 -0.57735] | [-0.11707]
[-0. -1. -0. ] | [-0.125 ]
[-0.57735 -0.57735 0.57735] | [-0.15292]
[ 0.57735 0.57735 -0.57735]]| [ 0.16319]]
2 Single polytope ( green polytope )
[[-0.57735 0.57735 0.57735] | [[-0.01401]
[ 0.57735 -0.57735 -0.57735] | [ 0.01637]
[ 0.57735 0.57735 0.57735] x <= [ 0.27958]
[-0.57735 -0.57735 0.57735] | [-0.16113]
[-1. -0. -0. ] | [-0.25 ]
[ 0.57735 0.57735 -0.57735]] | [ 0.16319]]
I tried to combine the first two polytops as >r = pc.union(p1, p2, True).
I expected that "r" would be a single polytope. but it is a Region again, the screen shot of execution is here.
just curious to know why the union is not able to combine given polytopes and return Region.
thank you
from polytope.
Related Issues (20)
- cvxopt 1.2.0 bug HOT 5
- support Python 3.7 HOT 4
- create regression test for bug fix of PR #56
- release `polytope == 0.2.2` HOT 1
- Error message says "Cannot plot polytopes of dimension larger than 2", but can't plot dimension 1 aswell HOT 2
- Zero Volume for 14D polytope HOT 8
- remove support for Python 2.7, 3.5, 3.6 HOT 7
- support Python 3.10
- With large scales `reduce` can remove non-redundant hyperplanes HOT 2
- `.project` can return redundant hyperplanes despite `minrep == True` HOT 1
- Plotting polytopes on same plot/ adding "_get_patch" as an import option
- How to use cvxopt to find intersection between polytope HOT 4
- polytope volume changing on each trial HOT 2
- Polytope.reduce and removal of possibly overlapping polytopes HOT 3
- Updated release on PyPI? HOT 4
- Rmove or delete particular polytope from a region HOT 1
- MIB2 cannot clear 01637 error HOT 3
- minkovski sum of polytopes HOT 5
- Usefull future feature
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polytope.