《整数线性规划》word版

《整数线性规划》word版

ID:25588049

大小:97.00 KB

页数:10页

时间:2018-11-21

《整数线性规划》word版_第1页
《整数线性规划》word版_第2页
《整数线性规划》word版_第3页
《整数线性规划》word版_第4页
《整数线性规划》word版_第5页
资源描述:

《《整数线性规划》word版》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、第三章整数线性规划本章,我们介绍三种解决整数线性规划问题的软件:第一种:MATLAB中的optimizationtoolbox中的若干程序;第二种:LINDO软件;第二种:LINGO软件.1.MATLAB程序说明程序名:intprogram,L01p_e,L01p_ie,transdetobi,biprogramintprogram是利用分支定界法解决整数规划问题,是全部的整数规划问题;L01p_e是利用枚举法解决0-1规划问题,变量要求全部为0或者1;L01p_ie是利用隐枚举法解决0-1规划问题,变量

2、要求全部为0或者1;Transdetobi是枚举法和隐枚举法中利用到的将十进制数转化为二进制数的函数;Biprogram是MATLAB6.5以上版本中有的求解0-1规划的函数的程序.intprogram执行实例1:在命令窗口的程序执行过程和结果如下:>>c=[-20,-10];%将最大转化为最小;>>a=[5,4;2,5];>>b=[24;13];>>[x,f]=intprogram(c,a,b,[0;0],[inf;inf],[],0,0.0001)%c,a,b之后[0;0]isthevalueoflo

3、wbound;[inf;inf]isthevalueofupbound;[]istheinitialization;0isthenumberoftheequationconstraints;0.0001istheconciserate.x=4.00001.0000f=-90intprogram执行实例2:书中例题3.3.1在命令窗口的程序执行过程和结果如下:>>c=[-1,-1];>>a=[-4,2;4,2;0,-2];>>b=[-1;11;-1];>>[x,f]=intprogram(c,a,b,[0;

4、0],[inf;inf],[],0,0.0001)x=2211f=-3L01p_e和L01p_ie执行实例:在命令窗口的程序执行过程和结果如下:>>c=[3,-2,5];%将最大转化为最小;>>a=[1,2,-1;1,4,1;1,1,0;0,4,1];>>b=[2;4;3;6];>>x1=L01p_e(c,a,b);x2=L01p_ie(c,a,b);%x1表示利用枚举法解决0-1规划问题,x2表示用隐%枚举法解决问题,结果是一样的>>x1x1=010>>x2x2=010biprogram执行实例:在命令

5、窗口的程序执行过程和结果如下:theprogramiswiththebinarylinearprogrammingPleaseinputtheconstraintsnumberoftheprogrammingm=4m=4Pleaseinputthevariantnumberoftheprogrammingn=4n=4Pleaseinputcostarrayoftheobjectivefunctionc(n)_T=[-9,-5,-6,-4]'c=-9-5-6-4Pleaseinputthecoefficie

6、ntmatrixoftheconstraintsA(m,n)=[6,3,5,2;0,0,1,1;-1,0,1,0;0,-1,0,1]A=63520011-10100-101Pleaseinputtheresourcearrayoftheprogramb(m)_T=[9,1,0,0]'b=9100Optimizationterminatedsuccessfully.x=1100程序的相关知识:Solvebinaryintegerprogrammingproblemsoftheformwheref,b,and

7、beqarevectors,AandAeqarematrices,andthesolutionxisrequiredtobeabinaryintegervector--thatis,itsentriescanonlytakeonthevalues0or1.语法如下:x=bintprog(f)x=bintprog(f,A,b)x=bintprog(f,A,b,Aeq,beq)x=bintprog(f,A,b,Aeq,beq,x0)x=bintprog(f,A,b,Aeq,beq,x0,options)[x,

8、fval]=bintprog(...)[x,fval,exitflag]=bintprog(...)[x,fval,exitflag,output]=bintprog(...)解释:x=bintprog(f)solvesthebinaryintegerprogrammingproblemx=bintprog(f,A,b)solvesthebinaryintegerprogrammingproblemx=bintprog(f,A

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。