PolyUnion
Purpose
Represents a union of polyhedra in the same dimension
Syntax
PU = PolyUnion(P)
PU = PolyUnion('Set',P,'Domain',D,'Convex',true,'Overlaps',false,...)
Description
The PolyUnion object represent collection of polyhedra in the same dimension. The
only restriction to construct the PolyUnion object is that the sets have a
common dimension. The union thus can contain bounded, unbounded, and lower-dimensional
polyhedra. Empty sets are removed from at the time of construction of PolyUnion
object.
You can associate various properties with the PolyUnion object:
- Domain of the union can be set via the Domain property. If not provided,
the domain will be equal to the underlying set of the union.
- To mark the union as convex, you can set the Convex property true or false.
If you specify that the union is convex, the remaining algorithms will rely on this information which will can
speed up the computations significantly.
- To mark that there are overlaps in the union, you can set the Overlaps property as true
or false. If the union contains non-overlapping polyhedra, the union forms a partition.
- To mark that the union is connected in the union, you can set the Connected property as true
or false. If the union is convex, if implies that the union is also connected.
- To mark that the union comprises only of bounded polyhedra, you can set the Bounded property as true
or false.
- To mark that the union contains only full-dimensional polyhedra, you can set the FullDim property as true
or false.
By specifying any of the above properties you promise that these properties are automatically satisfied by the provided set, otherwise
unexpected results may occur. These properties can be accessed via PU.Internal field.
You can associate functions to any of the set via addFunction method of the
ConvexSet class. Function handles and all properties of the sets can be
accessed via PolyUnion.Set property based on the index.
For a list of available methods type "methods('PolyUnion')".
Input Arguments
P |
Non-empty polyhedra in the same dimension.
Class: Polyhedron
|
Domain |
Specifies domains of the union.
Class: Polyhedron
|
Convex |
Set this property to true if you are sure that the union of the polyhedra is convex.
Class: logical Allowed values:
|
Overlaps |
Set this property to false if you are sure that the union of the polyhedra is non-overlapping.
Class: logical Allowed values:
|
Connected |
Set this property to true if you are sure that the union of the polyhedra is connected.
If the union is convex, then this property is automatically set as true.
Class: logical Allowed values:
|
Bounded |
Set this property to true if you are sure that all the polyhedra in the union are bounded.
Class: logical Allowed values:
|
FullDim |
Set this property to true if you are sure that all the polyhedra in the union are full-dimensional.
Class: logical Allowed values:
|
Output Arguments
PU |
Object of the PolyUnion class.
Class: PolyUnion
|
Example(s)
Example
1
Construt the convex and non-overlapping union of two polyhedra in 2D. Define the polyhedra P(1) = Polyhedron('lb',[-1;0],'ub',[0;1]);
P(2) = Polyhedron('lb',[0;0],'ub',[1;1]);
Assign linear functions to these sets P(1).addFunction(AffFunction(eye(2),[1;0]),'f');
P(2).addFunction(AffFunction(-eye(2),[1;0]),'f');
Create the union and set convexity and overlaps properties because these are known. U = PolyUnion('Set',P,'Convex',true,'Overlaps',false);
Plot the polyhedra U.plot

We can plot also functions over the union U.fplot

Example
2
Create three random polyhedra and merge them to PolyUnion object. P(1) = ExamplePoly.randVrep;
P(2) = ExamplePoly.randVrep;
P(3) = ExamplePoly.randVrep;
We don't know any of the particular properties of the union, we can call the short syntax: U = PolyUnion(P)
PolyUnion in the dimension 2 with 3 polyhedra.
Functions : none
Plot the sets U.plot

We can access the sets via U.Set property and add eventually function handles to each set. U.Set(1).addFunction(AffFunction(eye(2)),'g');
U.Set(2).addFunction(AffFunction(2*eye(2)),'g');
U.Set(3).addFunction(AffFunction(3*eye(2)),'g');
Plot the function over the sets U.fplot

See Also
polyhedron, union
◀ |
isconnected |
|
convexhull |
▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch