导航

  • Global optimization
  • nonconvex quadratic programming
  • nonconvex polynomial programming
  • general nonconvex programming
  • nonconvex semidefinite programming
  • References

Global optimization

内置求解器BMIBNB可以求出全局最优解,并且在规模较小的问题上表现出很好的鲁棒性,但是求解速度较慢.

nonconvex quadratic programming

第一个例子具有一个concave quadratic constraint,在分支定界中,出现三种不同优化问题:Upper bounds 使用bmibnb.uppersolverLower bounds使用bmibnb.lowersolverbound tightening使用bmibnb.lpsolver.

clear all;
x1 = sdpvar(1, 1);
x2 = sdpvar(1, 1);
x3 = sdpvar(1, 1);
p = -2*x1+x2-x3;% 设置约束
F = [x1*(4*x1-4*x2+4*x3-20)+x2*(2*x2-2*x3+9)+x3*(2*x3-13)+24>=0,4-(x1+x2+x3)>=0,6-(3*x2+x3)>=0,x1>=0,2-x1>=0,x2>=0,x3>=0,3-x3>=0];ops = sdpsettings('solver', 'bmibnb');optimize(F, p, ops)

第二个例子是一个nonconvex quadratic programming

clear all
x1 = sdpvar(1,1);
x2 = sdpvar(1,1);
x3 = sdpvar(1,1);
x4 = sdpvar(1,1);
x5 = sdpvar(1,1);
x6 = sdpvar(1,1);
p = -25*(x1-2)^2-(x2-2)^2-(x3-1)^2-(x4-4)^2-(x5-1)^2-(x6-4)^2;
F = [(x3-3)^2+x4>=4,(x5-3)^2+x6>=4,x1-3*x2<=2, -x1+x2<=2,x1-3*x2<=2, x1+x2>=2,6>=x1+x2>=2,1<=x3<=5, 0<=x4<=6, 1<=x5<=5, 0<=x6<=10, x1>=0,x2>=0];options = sdpsettings('solver','bmibnb');
optimize(F,p,options)

发现当前目标值为-313,而下界值为-310,需要缩小目标值之间的gap.

The hard part is often not finding good solutions, but proving their optimality.

options=sdpsettings('solver', 'bmibnb', 'bmibnb.relgaptol', 1e-4);
optimize(F, p, options)

nonconvex polynomial programming

多项式规划(polynomial programs)一般会转为双线性规划(bilinear programs)

sdpvar x y
F = [x^3+y^5<=5, y>=0];
ops = sdpsettings('verbose', 1, 'solver', 'bmibnb');
optimize(F, -x, ops)

general nonconvex programming

sdpvar x y
p = sin(1+y*x)^2+cos(y*x);
optimize([-1 <= [x y] <= 1],p,sdpsettings('solver','bmibnb'));

nonconvex semidefinite programming

The following problem is BMI, bilinear matrix inequality problem.

yalmip('clear')
x = sdpvar(1,1);
y = sdpvar(1,1);
t = sdpvar(1,1);
A0 = [-10 -0.5 -2;-0.5 4.5 0;-2 0 0];
A1 = [9 0.5 0;0.5 0 -3 ; 0 -3 -1];
A2 = [-1.8 -0.1 -0.4;-0.1 1.2 -1;-0.4 -1 0];
K12 = [0 0 2;0 -5.5 3;2 3 0];
F = [x>=-0.5, x<=2, y>=-3, y<=7];
F = [F, A0+x*A1+y*A2+x*y*K12-t*eye(3)<=0];
options = sdpsettings('solver','bmibnb');
optimize(F,t,options);

Starting from release R20200930, the default behavior to attack BMIs in BMIBNB is by employing a cutting plane strategy for the upper bound generation.

第二个BMI问题要求求解一个Linear Qudratic Control问题(LQ,线性二次型问题),需要找到约束条件下的状态反馈矩阵(find a state-feedback matrix with bounded elements).

For the global code to work, global lower and upper and bound on all complicating variables (involved in nonlinear terms) must be supplied, either explicitly or implicitly in the linear constraints.

本例中,变量K\mathbf{K}K在原问题中是受约束的条件,但是P\mathbf{P}P需要手动设置约束

%% LQR
yalmip('clear')
A = [-1 2; -3 -4];
B = [1; 1];
P = sdpvar(2, 2);
K = sdpvar(1, 2);
F = [P>=0, (A+B*K)'*P+P*(A+B*K) <= -eye(2)-K'*K];
F = [F, -0.1<=K<=0.1];
ops = sdpsettings('solver', 'bmibnb');
optimize(F, trace(P), ops)

注意到BMIBNB给出了无界变量的警告,容易推测出P\mathbf{P}P的对角元素为非负,但是没有对元素上界进行限制,所以求解器无法推测出关于非对角元素的限制,由于缺少限制条件,BMIBNB可能无法收敛.

Notice that we have some degree-of-freedom in how we model this problem. The Lyapunov function which is nonlinear in KKK and PPP can be paritally linearized by applying a Schur Complement.

F = [P>=0, [-eye(2) - ((A+B*K)'*P+P*(A+B*K)) K';K 1] >= 0];
F = [F, K<=0.1, K>=-0.1]; %加入限制条件
ops = sdpsettings('solver','bmibnb');
optimize(F,trace(P),ops)

求解一个衰减速率最大化问题,该BMI问题的求解效率就会变得很低

%%
yalmip('clear');
A = [-1 2;-3 -4];
t = sdpvar(1,1);
P = sdpvar(2,2);
F = [P>=eye(2), A'*P+P*A <= -2*t*P];
F = [F, t >= 0];
ops = sdpsettings('solver','bmibnb');
optimize(F,-t,ops)

For this particular problem, the reason is easy to find. The original BMI is homogeneous, and to guarantee a somewhat reasonable solution, we artificially added the constraint P⪰IP\succeq IP⪰I instead of P≻0P\succ 0P≻0.

%%
F = [P>=0, trace(P)==1, A'*P+P*A <= -2*t*P];
F = [F,  t >= 0];
optimize(F,-t,ops)

For this problem, we can easily find more interesting cutting planes. The decay-rate BMI together with the constant trace implies trace(ATP+PA)≤−2ttrace(A^TP+PA)\leq -2ttrace(ATP+PA)≤−2t. Adding this redundant cut leads to a finite lower bound.

%%
F = [P>=0, trace(P)==1, A'*P+P*A <= -2*t*P];
F = [F,  t >= 0];
F = [F, trace(A'*P+P*A)<=-2*t]; % add cut plane
optimize(F,-t,ops);

A Schur complement on the decay-rate BMI gives us yet another linear SDP cut which improves the node relaxation even more.

%%
F = [P>=0,A'*P+P*A <= -2*t*P, t >= 0];
F = [F, trace(P)==1];
F = [F, trace(A'*P+P*A)<=-2*t];
F = [F, [-A'*P-P*A P*t;P*t P*t/2] >= 0]; % Schur complement
optimize(F,-t,ops);

有效的cut与效率问题

By adding valid cuts, the relaxations are possibly tighter, leading to better bounds. A problem however is that we add additional burden to the local nonlinear solver used for the upper bounds.The additional cuts are redundant for the local solver, and most likely detoriate the performance. To avoid this, cuts can be explicitly specified by using the command cut.

F = [P>=0,A'*P+P*A <= -2*t*P,100 >= t >= 0];
F = [F, trace(P)==1];
F = [F, trace(A'*P+P*A)<=-2*t];
F = [F, cut([-A'*P-P*A P*t;P*t P*t/2]>=0)]; % cut指令显式指定
optimize(F,-t,options);

References

Global optimization

【OR】YALMIP 全局最优化相关推荐

  1. matlab yalmip 例程,YALMIP工具箱使用范例.pdf

    YALMIP工具箱使用范例 YALMIP工具箱简介 东北大学数学系 王琪 wangqimath@126.com YALMIP工具箱简介 • 基于符号运算工具箱编写 • 一种定义和求解高级优化问题的模化 ...

  2. 路径调度问题(CVRP)后续之如何在MATLAB中安装YALMIP及CPLEX包

    订阅博主专栏的用户可私信博主获取安装包,不用额外再付费下载安装包. 安装包下载地址:https://download.csdn.net/download/wenyusuran/14954633 一.M ...

  3. MATLAB实战系列(十四)-如何通过YALMIP和CPLEX求解小规模(CVRP)路径调度问题(附MATLAB代码)

    前言 有约束条件的车辆路径问题(CVRP),可以看作是TSP(Traveling Salesman Problem,旅行商问题)的拓展.由于TSP已经被证明是NP难问题,所以CVRP也是NP难问题. ...

  4. MATLAB实战系列(二)- 如何使用YALMIP检验数学模型的正确性?

    参加数学建模竞赛的小伙伴们,为了能让大家在比赛的第一个步骤不出错,即在模型建立这个步骤不出错,因此,今天准备讲一讲如何检验自己构建的数学模型是否合理. 本次推文分为三部分: 1)YALMIP工具箱的安 ...

  5. matlab中调用cplex 以及使用 Yalmip 工具箱

    matlab中调用cplex 以及使用 Yalmip 工具箱_天天向上的专栏-CSDN博客_matlab调用cplex CPLEX 在matlab中实现的一个例子-RCPSP_starry0001的博 ...

  6. 互联网IP路由的逐跳全局最优化原则-Dijkstra算法证明

    把周末写了一半的东西继续补齐了,实现了完美的一天. 我们知道的一个事实就是IP地址实在太多了,根本就不可能统一的管理起来,无论从数据平面还 是从控制/管理平面上说都是这样.所以,IP协议被设计出来就是 ...

  7. matlab yalmip安装教程,如何在matlab路径中安装yalmip Matlab R2014a添加yalmip图文教程

    yalmip是什么?可以说,yalmip是一位"集大成者",它不仅自己包含基本的线性规划求解算法,比如linprog(线性规划).bintprog(二值线性规划).bnb(分支界定 ...

  8. matlab的yalmip为什么这么慢,Yalmip问题请教

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 我的电脑是win7 64位,matlab 2014a,yalmip是2015.9版本. 遇到如下问题: clc,clear x=intvar(4,4); ...

  9. python游走代码_介绍一个全局最优化的方法:随机游走算法(Random Walk)

    1. 关于全局最优化求解 全局最优化是一个非常复杂的问题,目前还没有一个通用的办法可以对任意复杂函数求解全局最优值.上一篇文章讲解了一个求解局部极小值的方法--梯度下降法.这种方法对于求解精度不高的情 ...

  10. matlab 整数规划工具箱,Matlab中的YALMIP工具箱 混合整数规划

    YALMIP工具箱 混合整数规划 定义变量: sqdvar()实型 intvar()整型 binvar()0-1型 设定目标函数 : f=目标函数 设定限定条件: F=set(限定条件) 多个限定条件 ...

最新文章

  1. 第六篇:并发-粒度锁
  2. 前端见微知著JavaScript基础篇:你所不知道的apply, call 和 bind
  3. signature=3ba70fa0be2ca50c615373e5495718b1,翻译文化观与翻译改写
  4. Java数据校验(Bean Validation / JSR303)
  5. 音视频技术开发周刊(第131期)
  6. 关于visual studio类视图和资源视图不显示类和资源的问题
  7. 通过Java 8中的Applicative Builder组合多个异步结果
  8. Phonegap在ios7上系统状态栏的问题解决
  9. NOIP2012复赛 普及组 第一题
  10. PocketSphinx语音识别系统声学模型的训练与使用
  11. 经典神经网络 | Faster R-CNN论文解析
  12. 开源框架_跨平台开源框架对比介绍
  13. python实战1.1——根据1.0做词云图
  14. 算法知识点——(2)模型评估
  15. dedecms 使用php语法,DedeCms(织梦)模版制作教程及标记语法详解
  16. 历史库存sap_SAP历史库存MB5B的详解
  17. lstm 预测诗歌_预测诗歌运动
  18. Android Paint 色彩一些偏知识
  19. 苹果Mac电脑中如何将键盘当作鼠标使用?
  20. 涛涛打保龄球 【map】篝火晚会(两道题)

热门文章

  1. textbox wpf 居中_C# + WPF: TextBox中的光标定位问题
  2. 马斯克称已将大脑上传到云端【系统或已开源】
  3. msdtc.exe是微软分布式传输协调程序。该进程调用系统Microsoft Personal Web Server和Microsoft SQL Server。该服务用于管理多个服务
  4. 计算机硬盘图标不见了,电脑硬盘图标不见了怎么办
  5. csol永恒python怎样施展技能_Python3 基础语法
  6. 从Cadence发展史中,看EDA的一段江湖故事
  7. 【信号处理】采样定理的深入浅出
  8. 2016版excel_在抱怨加班之前,先看看你有没有熟练使用这13个Excel大神技巧?
  9. 《The Django Book》笔记(未完结)
  10. 红帽认证系统管理员 ― RHCSA