Polyhedron 创建多面体
定义多面体
P = {x | H*[x;-1] <= 0} cap {x | He*[x;-1] = 0}
或
P = {V’lam | lam >= 0, sum(lam) = 1} + {R’gam | gam >= 0}
多面体类型
H-representation
用有限个超平面和半空间定义多面体
形式:Ax <= b; Aeqx = beq
V-represention
用有限个点(凸集的顶点)和射线(代表方向)定义多面体
形式:extreme points(vertices) V and rays R
函数
P = Polyhedron(varargin)
标准的调用形式
参数 | 含义 |
---|---|
H | 不等式描述(必须是全维度的) { x | H * [ x ; - 1 ] < = 0 } |
He | 仿射集{ x | He * [ x ; - 1 ] = 0 } |
V | 定义集合conv ( V )的点 |
R | 定义集合锥( R )的射线 |
irredundantVRep | [假]如果真,则给定的V - Rep是无冗余的 |
irredundantHRep | [假 ]如果为真,则假设给定的H - Rep是无冗余的 |
lb | 下界 |
ub | 上界 |
P | 多面体(输出) |
复制构造函数
参数 | 含义 |
---|---|
Pin | 输入:复制的多面体,class=‘Polyhedron’ |
p | 输出:已复制的多面体,class=‘Polyhedron’ |
顶点形式多面体(Vrep polyhedra)
参数 | 含义 |
---|---|
V | 多面体的顶点(row-wise) |
p | 多面体(输出) |
不等式形式多面体(Hrep polyhedra)
参数 | 含义 |
---|---|
A | 约束的规范(row-wise) |
b | 约束的偏移(row-wise) |
p | 多面体(输出) |
由YALMIP多面体转换而来
参数 | 含义 |
---|---|
F | Yalmip约束 |
vars | F中涉及的所有变量 |
p | 多面体(输出) |
测试函数
H-representation
P = Polyhedron(‘A’, A, ‘b’, b, ‘lb’,lb,‘ub’,ub,‘Ae’, Ae, ‘be’, be)
P = Polyhedron(‘A’, A, ‘b’, b, ‘lb’,lb,‘ub’,ub)
P = Polyhedron(‘lb’,lb,‘ub’,ub,‘Ae’, Ae, ‘be’, be)
P = Polyhedron(‘Ae’, Ae, ‘be’, be)
或者H = [A,b],He = [Ae,be]
P = Polyhedron(‘H’,H, ‘lb’,lb,‘ub’,ub)
P = Polyhedron(‘H’, H, ‘He’, He, ‘lb’,lb,‘ub’,ub)
注意:不等式A*x <= b必需有上下界约束。
% Hrep polyhedra
P1 = Polyhedron('A',[-1,0.5,2;-3,-1.5,0.2;0.4,-1.8,-1],'b',[2;3;1],'lb',[-1;-1;-1],'ub',[1;1;2]