Sets

Geometry.Sets History

Hide minor edits - Show changes to markup

August 05, 2013, at 11:43 AM by Martin Herceg -
Changed lines 88-89 from:

P.hasHRep() P.hasVRep()

to:

P.hasHRep P.hasVRep

August 05, 2013, at 11:40 AM by Martin Herceg -
Changed line 86 from:

If the Polyhedron object exists, but it is not known which representation it has, it can be figured out using the following properties:

to:

If the Polyhedron object exists, but it is not known which representation it has, it can be figured out using the following methods:

Changed lines 88-89 from:

P.hasHRep P.hasVRep

to:

P.hasHRep() P.hasVRep()

Changed lines 100-101 from:

P.minHRep P.minVRep

to:

P.minHRep() P.minVRep()

Changed line 112 from:

P.minHRep;

to:

P.minHRep();

July 31, 2013, at 08:05 AM by Martin Herceg -
Changed line 1 from:

Objects for represeting convex sets

to:

Construction and properties of basic sets

July 31, 2013, at 08:03 AM by Martin Herceg -
Changed line 142 from:

which requires two arguments: the symbolic variables and the constraint set.

to:

which requires two arguments: the symbolic variables and the constraint set. Optionally, one can provide a third argument that corresponds to yalmip option settings (e.g. to specify a particular solver).

July 30, 2013, at 04:24 PM by Martin Herceg -
Changed line 159 from:
 constraints = [A*X + X*A' <= eye(3) ];
to:
 constraints = [A*X + X*A' <= -eye(3) ];
July 30, 2013, at 04:22 PM by Martin Herceg -
Changed lines 142-184 from:

which requires two arguments: the symbolic variables and the constraint set.

to:

which requires two arguments: the symbolic variables and the constraint set.

To construct a polyhedral set in YALMIP can be achieved by providing the corresponding data. For instance, to create a H-representation can be achieved as

(:source lang=MATLAB -getcode:)
 x = sdpvar(2,1);
 A = [ -0.37,  0.81; 0.79,  0.12;  0.57,  0.41; -0.98,  0.75];
 b = [1; 2.3; 1.4; 2.8]
 constraints = [A*x <= b ];
 Y = YSet(x, constraints)

Note that the variables must be provided in as a vector. For instance, to model a set given by linear matrix inequality A*X + X*A' <= -I can be done as follows

(:source lang=MATLAB -getcode:)
 X = sdpvar(3);
 A = randn(3);
 constraints = [A*X + X*A' <= eye(3) ];
 Y = YSet(X(:), constraints)

The input data for the YSet object can be retrieved by referring the appropriate properties

(:source lang=MATLAB -getcode:)
 Y.vars
 Y.constraints

Similarly as with the Polyhedron object, two properties are inherited from the ConvexSet class. In particular, the dimension of the set can be invoked using

(:source lang=MATLAB -getcode:)
 Y.Dim

and the user data stored with the set can be found under

(:source lang=MATLAB -getcode:)
 Y.Data 

property. The Data property can be modified after the object has been created.

YALMIP allows creation of various sets, including cones that can be imported to MPT

(:source lang=MATLAB -getcode:)
x = sdpvar(2,1);
F = [cone(x(1),x(2)),  -1<= x <= 5];
Y = YSet(x, F)
July 30, 2013, at 02:49 PM by Martin Herceg -
Changed lines 17-22 from:

The ConvexSet object cannot be constructed directly, it is higher level object for sharing common properties in convex sets. The above properties are accessible in the objects derived from this class, such as Polyhedron and YSet.

to:

The ConvexSet object cannot be constructed directly, it is higher level object for sharing common properties in convex sets. The properties are accessible in the objects derived from this class, such as Polyhedron and YSet.

Changed lines 133-142 from:

The YSet object is an MPT interface to import convex sets described with the help of YALMIP .

to:

The YSet object is an MPT interface to import convex sets described with the help of YALMIP. To construct the YSet object one needs to define the symbolic variables for representing the sets and consequently to create appropriate constraint sets using YALMIP. Consider an interval of the form -1 <= x <= 1 . In YALMIP this interval can be modeled as follows:

(:source lang=MATLAB -getcode:)
 x = sdpvar(1);
 interval = [ -1 <= x <= 1 ];

which is better described in "Constraints" part of Yalmip Wiki. After creating the constraint set, the YSet object can be constructed as follows

(:source lang=MATLAB -getcode:)
 Y = YSet(x, interval);

which requires two arguments: the symbolic variables and the constraint set.

July 30, 2013, at 02:31 PM by Martin Herceg -
Added line 10:
Added lines 21-22:
Added lines 129-130:
Added lines 133-136:

The YSet object is an MPT interface to import convex sets described with the help of YALMIP .

July 30, 2013, at 02:18 PM by Martin Herceg -
Changed line 10 from:
to:

Changed line 20 from:
to:

Added line 126:

July 30, 2013, at 02:16 PM by Martin Herceg -
Changed lines 4-6 from:
to:
Changed line 126 from:

The YSet object - representation of convex sets

to:

The YSet object - representation of general convex sets

July 30, 2013, at 02:11 PM by Martin Herceg -
Changed line 82 from:

The polyhedron is in minimal (irredundant) H-representation, if the are no redundant inequalities/equalities describing the set. As an example, consider the polyhedron build by two intervals -1 <= x <= 1, -2 <= x <= 2 . Obviously, the first interval is completely contained in the second interval, so it is considered as redundant. To query if the minimal representation of the polyhedron has been computed, one can use the following properties

to:

The polyhedron is in minimal (irredundant) H-representation, if the are no redundant inequalities/equalities describing the set. To query if the minimal representation of the polyhedron has been computed, one can use the following properties

Changed lines 87-88 from:

that apply either for H- or V-representation.

to:

that apply either for H- or V-representation. To compute the minimal H- or V-representation, one can employ the methods

(:source lang=MATLAB -getcode:)
P.minHRep
P.minVRep

As an example, consider the polyhedron build by two intervals -1 <= x <= 1, -2 <= x <= 2 . The first interval is completely contained in the second interval and to describe the set only the first interval is sufficient. We can check this by constructing the polyhedron from the inequality description

(:source lang=MATLAB -getcode:)
A = [-1; 1; -1; 1]; b = [1; 1; 2; 2];
P = Polyhedron('A', A, 'b', b);
P.irredundantHRep

One can see in the output that the minimal representation of the polyhedron has not been computed yet. Computing the minimal representation for the above example gives only the first interval which can be checked by calling

(:source lang=MATLAB -getcode:)
P.minHRep;
P.irredundantHRep
P.H

To quickly construct Polyhedron objects, one can resort to fast syntax that comprises only of inequalies or vertices. The fast syntax for inequality description is given as

(:source lang=MATLAB -getcode:)
A = [-1, 2, 0; -0.1, -3.1, 1.8]; b = [5.5; 3.8];
P = Polyhedron(A, b);

and for vertex description

(:source lang=MATLAB -getcode:)
V = [0, 1, -2; -1, 0.5 -4; 1, -1, 0.8; -4, -5, -0.9]; 
P = Polyhedron(V);
July 30, 2013, at 01:41 PM by Martin Herceg -
Deleted line 4:
Added lines 74-87:

If the Polyhedron object exists, but it is not known which representation it has, it can be figured out using the following properties:

(:source lang=MATLAB -getcode:)
P.hasHRep
P.hasVRep

The output is a logical variable that indicates in which form is the polyhedron stored.

The polyhedron is in minimal (irredundant) H-representation, if the are no redundant inequalities/equalities describing the set. As an example, consider the polyhedron build by two intervals -1 <= x <= 1, -2 <= x <= 2 . Obviously, the first interval is completely contained in the second interval, so it is considered as redundant. To query if the minimal representation of the polyhedron has been computed, one can use the following properties

(:source lang=MATLAB -getcode:)
P.irredundantHRep
P.irredundantVRep

that apply either for H- or V-representation.

July 30, 2013, at 12:57 PM by Martin Herceg -
Changed line 3 from:

High-level ConvexSet object

to:

High-level ConvexSet object

Deleted lines 8-15:

which returns the following result

Properties for class ConvexSet:

    Dim
    Data
Changed lines 11-14 from:

The object for representation of polyhedra - Polyhedron

to:

The Polyhedron object - representation of polyhedra

Changed lines 76-79 from:

Fast construction

The object for representation of convex sets - YSet

to:

The YSet object - representation of convex sets

July 30, 2013, at 12:54 PM by Martin Herceg -
Changed line 43 from:

The V-representation of the polyhedron can be constructed by providing a set of vertices and rays. Vertices are accepted in a matrix form stored row-wise (each row of a matrix corresponds to a vertex):

to:

The data can be extracted in a more compact form - using the properties H and He. The H property collects the matrices for inequality description H = [A, b] and the He property collects the matrices of equality description He = [Ae, be] :

Changed lines 45-47 from:

V = [-1.0 -0.8; -2.9 1.4; 0.3 -0.7]; R = [-0.5, 1.9]; P = Polyhedron('V', V, 'R', R);

to:

P.H P.He

Changed line 49 from:

The data can be retrieved from the corresponding fields V and R:

to:

The V-representation of the polyhedron can be constructed by providing a set of vertices and rays. Vertices are accepted in a matrix form stored row-wise (each row of a matrix corresponds to a vertex):

Changed lines 51-52 from:

P.V P.R

to:

V = [-1.0 -0.8; -2.9 1.4; 0.3 -0.7]; R = [-0.5, 1.9]; P = Polyhedron('V', V, 'R', R);

Changed line 56 from:

The dimension of the polyhedral set is available in Dim property that is inherited from the higher level ConvexSet object

to:

The data can be retrieved from the corresponding fields V and R:

Changed lines 58-59 from:

P.Dim

to:

P.V P.R

Changed line 62 from:

The user can store arbitrary data with the Polyhedron object with the help of Data property that is inherited from from ConvexSet object. As an example, consider that you want to store additional data that generated the V-representation. One possibility is to create a structure with the user data, e.g.

to:

The dimension of the polyhedral set is available in Dim property that is inherited from the higher level ConvexSet object

Added lines 64-68:

P.Dim @]

The user can store arbitrary data with the Polyhedron object with the help of Data property that is inherited from from ConvexSet object. As an example, consider that you want to store additional data that generated the V-representation. One possibility is to create a structure with the user data, e.g. (:source lang=MATLAB -getcode:) [@

Added line 81:

Fast construction

July 30, 2013, at 12:42 PM by Martin Herceg -
Added lines 54-72:

@]

The dimension of the polyhedral set is available in Dim property that is inherited from the higher level ConvexSet object

(:source lang=MATLAB -getcode:)
P.Dim

The user can store arbitrary data with the Polyhedron object with the help of Data property that is inherited from from ConvexSet object. As an example, consider that you want to store additional data that generated the V-representation. One possibility is to create a structure with the user data, e.g.

(:source lang=MATLAB -getcode:)
data.name = 'filename01.dat';
data.size = 5;
V = [1, -2; -1, 2; 3, 3];
P = Polyhedron('V', V, 'Data', data);

The user provided data are accessible in Data property and can be modified after construction of the object: (:source lang=MATLAB -getcode:) [@ P.Data P.Data.size = 6;

July 30, 2013, at 11:55 AM by Martin Herceg -
Changed line 20 from:

The Polyhedron object represents a polyhedron given as the intersection of inequalities and equalities (referred to as H-representation)

to:

The Polyhedron object represents a polyhedron given as the intersection of inequalities and equalities (referred to as H-representation)

Changed line 23 from:

or as the convex combination of vertices and rays (referred to as V-representation)

to:

or as the convex combination of vertices and rays (referred to as V-representation)

Changed line 35 from:

The data are stored as they are provided, no automatic scaling or conversion is performed. The stored data can be retrieved in the appropriate fields A, b, Ae, be

to:

The data are stored as they are provided, no automatic scaling or conversion is performed unless a given operation is performed on the polyhedron. The stored data can be retrieved in the appropriate fields A, b, Ae, be

Added lines 41-53:

@]

The V-representation of the polyhedron can be constructed by providing a set of vertices and rays. Vertices are accepted in a matrix form stored row-wise (each row of a matrix corresponds to a vertex):

(:source lang=MATLAB -getcode:)
V = [-1.0  -0.8;  -2.9  1.4;  0.3  -0.7];
R = [-0.5, 1.9];
P = Polyhedron('V', V, 'R', R);

The data can be retrieved from the corresponding fields V and R: (:source lang=MATLAB -getcode:) [@ P.V P.R

July 30, 2013, at 11:45 AM by Martin Herceg -
Changed line 20 from:

The Polyhedron object represents a polyhedron given as the intersection of inequalities and equalities

to:

The Polyhedron object represents a polyhedron given as the intersection of inequalities and equalities (referred to as H-representation)

Changed line 23 from:

or as the convex combination of vertices and rays

to:

or as the convex combination of vertices and rays (referred to as V-representation)

Added lines 25-43:

Both representations of polyhedra can be easily constructed in MPT3 providing the corresponding data. For instance, to construct the H-representation it suffices to provide the inequality and equality description in matrix form:

(:source lang=MATLAB -getcode:)
A = [2.7694   -1.3499;    3.0349    0.7254;   -0.0631    0.7147];
b = [0.5675;    1.6870;    3.6629];
Ae = [0.1246, -1.012];
be = 2.45;
P = Polyhedron('A', A, 'b', b, 'Ae', Ae, 'be', be);

The data are stored as they are provided, no automatic scaling or conversion is performed. The stored data can be retrieved in the appropriate fields A, b, Ae, be

(:source lang=MATLAB -getcode:)
P.A
P.b
P.Ae
P.be
July 30, 2013, at 11:26 AM by Martin Herceg -
Changed lines 21-22 from:
to:
Changed line 24 from:
to:
July 30, 2013, at 11:19 AM by Martin Herceg -
Changed lines 17-20 from:

The ConvexSet object cannot be constructed directly, it is higher level object for sharing common properties in convex sets. The above properties are accessible in the objects derived from this class, such as YSet and Polyhedron.

The object for representation of convex sets - YSet

to:

The ConvexSet object cannot be constructed directly, it is higher level object for sharing common properties in convex sets. The above properties are accessible in the objects derived from this class, such as Polyhedron and YSet.

Changed lines 20-25 from:
to:

The Polyhedron object represents a polyhedron given as the intersection of inequalities and equalities

or as the convex combination of vertices and rays

The object for representation of convex sets - YSet

July 30, 2013, at 10:26 AM by 129.132.29.86 -
Changed lines 21-24 from:

The object for representation of polyhedra - Polyhedron

to:

The object for representation of polyhedra - Polyhedron

Back to Computational Geometry overview.

July 30, 2013, at 10:24 AM by 129.132.29.86 -
Changed lines 3-4 from:

In MPT3 there are new classes of objects to represent convex sets that are derived from a common ConvexSet object. The ConvexSet object contains the information on the dimension of the set and it can store arbitrary user data. The dimension is available under Dim property and the user date can be stored in Data property:

to:

High-level ConvexSet object

In MPT3 there are new classes of objects to represent convex sets that are derived from a common ConvexSet object. The ConvexSet object contains the information on the dimension of the set and it can store arbitrary user data. The dimension is available under Dim property and the user data can be stored in Data property. These properties are visible when typing

(:source lang=MATLAB -getcode:)
properties('ConvexSet')

which returns the following result

Properties for class ConvexSet:

    Dim
    Data

The ConvexSet object cannot be constructed directly, it is higher level object for sharing common properties in convex sets. The above properties are accessible in the objects derived from this class, such as YSet and Polyhedron.

The object for representation of convex sets - YSet

The object for representation of polyhedra - Polyhedron

July 30, 2013, at 10:08 AM by 129.132.29.86 -
Added lines 1-4:

Objects for represeting convex sets

In MPT3 there are new classes of objects to represent convex sets that are derived from a common ConvexSet object. The ConvexSet object contains the information on the dimension of the set and it can store arbitrary user data. The dimension is available under Dim property and the user date can be stored in Data property: