YSet

Purpose

Representation of a convex set using YALMIP constraints.

Syntax

S = YSet(vars, constraints)
S = YSet(vars, constraints, options)

Description

The class YSet represents convex sets described by YALMIP constraints. Because YALMIP offers very broad specification of convex sets, the class YSet is useful when applying methods of the ConvexSet class that are not available in YALMIP. However, it is not intended with this class to replace basic functionalities for YALMIP objects. For reference how to use YALMIP objects, refer to YALMIP help. Only convex sets are accepted. Convexity is checked internally by YALMIP.

Input Arguments

vars

Symbolic variables used in the description of the constraints. The dimension of the variables must much the dimension used in the constraint set. Vector and matrix variables are accepted, multidimensional matrices are not allowed.

Class: sdpvar

constraints

Constraint set given as lmi object. The constraints must build a convex set, otherwise the argument is not accepted. The convexity is checked internally by YALMIP.

Class: lmi

options

YALMIP options defined by sdpsettings. You can specify the solver here, verbosity, the tolerances, etc. By default, these options are idependent of MPT settings. YALMIP chooses the solver based on its internal preferences and depending on the type of the constraint set. For more details, type help sdpsettings.

Class: struct

Output Arguments

S

YSet object representing a convex set.

Class: YSet

Example(s)

Example 1

Create a set that looks like a pizza cut. Define 2D vector x.
 x = sdpvar(2,1);
 Create constraints in YALMIP. 
 F = [-x(1)+x(2)<=0;  -x(1)-x(2)>=0; x'*x<=1]; 
 Construct the set 
 S = YSet(x,F) 
YALMIP set in dimension 2.
Functions : none
Plot the set
 S.plot 
Plotting...
27 of 40

../../../../../../fig/mpt/modules/geometry/sets/@YSet/yset_img_1.png

Example 2

Create a set described by linear matrix inequalities ../../../../../../fig/mpt/modules/geometry/sets/@YSet/yset1.png, ../../../../../../fig/mpt/modules/geometry/sets/@YSet/yset2.png. Firstly, define the unknow symmetric matrix P and a matrix A.
 P = sdpvar(2), A = randn(2); 
Linear matrix variable 2x2 (symmetric, real, 3 variables)
Secondly, set the inequalities in YALMIP.
 constraints = [P>=0; A'*P + P*A <= eye(2)] 
+++++++++++++++++++++++++++++++++++++++++++++++++
|   ID|      Constraint|                    Type|
+++++++++++++++++++++++++++++++++++++++++++++++++
|   #1|   Numeric value|   Matrix inequality 2x2|
|   #2|   Numeric value|   Matrix inequality 2x2|
+++++++++++++++++++++++++++++++++++++++++++++++++
Construct the set S out of this constraint description.
 S = YSet(P(:),constraints) 
YALMIP set in dimension 4.
Functions : none

See Also

convexset, polyhedron


© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch

© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch