资源预览内容
第1页 / 共28页
第2页 / 共28页
第3页 / 共28页
第4页 / 共28页
第5页 / 共28页
第6页 / 共28页
第7页 / 共28页
第8页 / 共28页
第9页 / 共28页
第10页 / 共28页
亲,该文档总共28页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
线性规划问题的求解方法u利用MATLAB软件中的linprog命令求解; u利用LINGO软件求解; u自编MATLAB程序求解。Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.一、利用MATLAB软件中的linprog 命令求解1.求解线性规划问题2.求解线性规划问题格式为:x=linprog(f,A,b)x,fval=linprog(f,A,b)格式为:x=linprog(f,A,b,Aeq,beq)x,fval=linprog(f,A,b,Aeq,beq)注:x,b不要求非负Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.3.求解线性规划问题格式为:x=linprog(f,A,b,Aeq,beq,LB,UB)x,fval=linprog(f,A,b,Aeq,beq,LB,UB)注:这里x、b不要求非负Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.例3.1例3.2Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.例3.3例3.5Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.例3.6Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.P75 T2(5)P75 T2(6)Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.P75 T2(10)Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.二、利用LINGO软件求解例1 max=3*x1+2*x2; x1+2*x2=56;7*x+20*y=70;1. max或min后面跟着等号; 2. 不区分大小写字母,变量必须以字母开头; 3. 模型中已经假设所有的变量非负; 4. 变量可以放在约束条件的右边,数字可在左边; 5. 每个语句都以分号“ ;”结尾; 6. 以感叹号“ !”开始的是说明语句。Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.例3 max=8*x+5*y+4*z; x+y+z=9; 8*x+5*y+4*z=45; x=1; y=5; z=5; gin(x); gin(y); gin(z);例4 model: max=5*x1+7*x2; x1+x2=20; 3*x1+7*x2=80; endEvaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.例5 model: max=3*x1+2*x2; 2*x1+3*x2=14; 2*x1+x29; gin(x1); gin(x2); end例6 model: max=x1+x2; 3*x1+2*x2+x3=10; 2*x2+x4=5; gin(x1); gin(x2); endEvaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.例7 !线性规划运输问题p169例子; model:sets: supply/1.5/:gy; demond/1.6/:xq; link(supply,demond):c,x;endsetsdata:c=30 28 3 10 25 18 27 4 11 2 17 9 5 12 1 22 8 16 13 21 19 15 23 7 20 14 29 26 6 24;gy=10 15 25 40 10; xq=9 17 22 33 14 5;enddataobj min=sum(link:c*x);for(supply(i):supply_con sum(demond(j):x(i,j)=gy(i););for(demond(j):demond_con sum(supply(i):x(i,j)=xq(j);); endEvaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.model: !线性规划运输问题p169例子;sets:supply/1.5/:gy;demond/1.6/:xq;link(supply,demond):c,x;endsetsdata:c=30 28 3 10 25 18 27 4 11 2 17 9 5 12 1 22 8 16 13 21 19 15 23 7 20 14 29 26 6 24;gy=10 15 25 40 10;xq=9 17 22 33 14 5;enddataobj min=sum(link:c*x);for(supply(i):supply_con sum(demond(j):x(i,j)=gy(i);for(demond(j):demond_con sum(supply(i):x(i,j)=xq(j); endEvaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.三、自编MATLAB程序求解dan0求解特殊线性规划问题dan0-bland用bland法则求解特殊线性规划问题dan0-improve 用改进的单纯形法求解线性规划问题danm用大M法求解线性规划问题dan2用两阶段法求解线性规划问题Evaluation only.Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.u特殊的线性规划问题要求输入的数据(第一张单纯形表,典式)3101004401010351
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号