《运筹学实验报告线性规划问题建模与求解.docx》由会员分享,可在线阅读,更多相关《运筹学实验报告线性规划问题建模与求解.docx(9页珍藏版)》请在课桌文档上搜索。
1、运筹学一实验报告系(部)专业班级姓名学号实验基地(实验室)实验项目线性规划问题建模与求解实验日期实验成绩_指导教师第一部分:实验目的1)了解线性规划问题建模思路,并能够根据实际问题进行建模。2)学会利用EXCEL与Lingo两种软件进行线性规划问题的求解。习题:某农场I、II、In等耕地的面积分别为IOoa机2、300加小和200万小,计划种植水稻、大豆和玉米,要求三种作物的最低收获量分别为190000依、130000口和350000依。I、II、III等耕地种植三种作物的单产如表所示。若三种作物的售价分别为水稻1.20元4g,大豆1.50元/依,玉米0.80元见g。那么,(1)如何制订种植计
2、划,才能使总产量最大?(2)如何制订种植计划,才能使总产值最大?表不同等级耕地种植不同作物的单产(单位:必/加/)I等耕地II等耕地III等耕地水稻11OOO95009OOO大豆8OOO68006OOO玉米14OOO12OOO10OOO第二部分:实验内容小结(心得及体会)实验过程与结果:利用EXCEL求解(/)如何制订种植计划,才能使总产量最大?一、建立模型设X)表示为i种作物在j等耕地种植的面积(i=l表示水稻,i=2表示大豆,i=3表示玉米;j=l表示I等耕地,j=2表示11等耕地,j=3表示Hl等耕地)。Z表示总产量。maxZ=IlOOOX11+9500Xp+90Xf,+8000X,+6
3、800X+6000X2,+14000X+12000Xv+1OOOOX33XjXJX产。xi2x22x32=300x.3+x23+x33=200S.t.11OOOX11+9500X12+9000X,3=1900008000X,+6800X”+6000X”=13000014000X31+12000Xv+lOOOOX33=350000Xij=0(i=l,2,3;j=l,2,3)K3U:XA=B3S8S2-C3SCS2*D3SDS2-E3SES2+F3SFS2-G3SGS2-H3SHS2*I3SS2J3SJS2决策变急约束1Xll xl2 X13IlOOO950090001000OOlO0 11000
4、095 000080000006800006000 0)3132-目标正数140001200010000Q,!右端1000101003001020140000 1200000130000I(XXX)03500初求解弁JSXas目玩|$K$Isl81:最大值(M)。最小值(NC)目忘值:M通过更改可变单元假SB$2:5J$2S最守约电但)SB$2:$J$2=0$K$4:$K$6=$L$7:$L$9更改9t(D)S三三()*S三L)口便无融兖非比KQQ雌孵方法:(D里纯送性规划yJSlS(P)求*8方法力光滑非法性疑划求策间照挣GRG非线性引孥,力帆胧求第间畸推单纯锄期2划引孳,并为三洸港规把姆司
5、筋弃演化引擎,超勤(三)I5R)I关闭(Q)0021,11111C21.666671003001572222gS1109500908068600014000120100L6892222.2221右第10000100110101001030030000101001200200110009500900000000190000190000000806860000130(XX)13000000014000120100006572222222350000DEFGHIxl3x21x22x23x31x32x33=B3*$BS2.C3$C$2*D3-$D$2-E3$E$2-F3$F$2-G3.$G$2-H3*
6、$H$273$I$2J3.SJ$2受函123456策标束京京京束束决目约约约约约约23456789三、实验分析从表中可以看出,水稻只在In等耕地上种植21.1hm2;大豆只在11I等耕地上种植21.7hm2;玉米在I等耕地种植100hm2,II等耕地种植300hm2,III等耕地种植157.2hm2O可以获得最大总产量6892222kg。(2)如何制订种植计划,才能使总产值最大?一、建立模型设X表示为i种作物在j等耕地种植的面积(i=l表示水稻,i=2表示大豆,i=3表示玉米;j=l表示I等耕地,j=2表示II等耕地,j=3表示III等耕地)。z表示总产值。maxz=(11000X+9500X
7、,+9000X,)*1.2+(8000X1+6800X+6000X”)*1.5+(14000X31+l2000Xn+10000X3)*0.8r.x21x31=1x12x22x32=3XJX23+X33=200s.t.=190000K4123456789108000X,+6800X,+6000X”=13000014000X31+12000Xp+10000X33=350000X=0(i=l,2,3;j=l,2,3)IJJ、人=B43B2*C4C3C2*D4O3O2E4E3E2F4*F3F2G4G3G2*H4H3H2*143*i2J4J3)2决策变量售价目标语数约束1ABn-12110CDEFGHI
8、xl2xl3x21X22x23Rlx32一1212151515080895009(XX)800068600014(XX)120001001008目标的数100000右端11003001100950090006000008000680060000000000001400012000I(KX)O00=B5SBS2*CSSCS2*D5SDS2*E5SES2F5SFS2*G5SGS2*H5SHS2*I5SS2*)5S)S2XllX121.21.2110009500IlOOOO009500009000000800681900130000350000x3132x330.80.808目标函数14000120
9、00100000ol0I右逑10IlooOl100300xl3x21x22231.2151.51.5900080006800600000000600000014000120100000190000130000350000S三三6:CD|$K$4IBBi(&!)oa(N0目标m通3改可变单元SB$2:$J$2蜀SB$23J$2=01KS5KS7V=SLS5LS7$8:$10SLSftiLSIO*w三便无妁荣交量为非负效的透择茨18方法:Sfl5(2)为光湖反性规划到三E三SGRG非域性不颦.为E性猊我刻S问题理维炎雄在规划引挈.并加洸清规a求解殡斑择演化引宓*j(ii)I碎(三)-IBCDEFG
10、IH_J_JKXllX12xl3x2lx22x23x3lx32x3358.7530020016250025001.21.2121.51.51.50.80.80.8目标函数Il(X)O950090008000680060001400012000100(X)6830500I0018C0001000I00I00I030000I00I00I200Il(XX)O95009000000000llll2500000800068006000000130000000000140001200010000350000A=B4*B3*B2+C4C3(右迭1003002001900001300350000W逢12345
11、6策价标束束束束束束决等目约约约约约约12345678910三、实验分析从表中可以看出,水稻在I等耕地种植58.75hn,11等耕地种植300h,III等耕地种植200hm2;大豆只在In等耕地上种植16.25hm2;玉米只在I等耕地上种植25ho可以获得最大总产值6830500元。利用lingo软件求解(/)如何制订种植计划,才能使总产量最大?文件内容如下:max11000x11+9500x12+9000x13+8000x21+6800x22+6000x23+14000x31+12000x32+10000x33STxll+x21+x31=10012+x22+x32=300xl3+x23+x3
12、3=1900008000x21+6800x22+6000x23=13000014000x31+12000x32+10000x33=350000然后进行求解运行,可以得如下结果:Globaloptimalsolutionfound.6892222.0.0000005Objectivevalue:Infeasibilities:Totalsolveriterations:VariableValueReducedCostXll0.0000001777.778X120.0000001444.444X1321.111110.000000X210.000000666.6667X220.000000666.
13、6667X2321.666670.000000X31100.00000.000000X32300.00000.000000X33157.22220.000000RowSlackorSurplusDualPrice16892222.1.00000020.00000014000.0030.00000012000.0040.00000010000.0050.000000-0.111111160.000000-0.666666776222222.0.000000(2)如何制订种植计划,才能使总产值最大?编辑程序文件,文件内容如下:max13200x11+11400x12+10800x13+12000x
14、21+10200x22+9000x23+11200x31+9600x32+8000x33STxll+x21+x31=100xl2+x22+x32=300xl3+x23+x33=1900008000x21+6800x22+6000x23=13000014000x31+12000x32+10000x33=350000求解运行,可以得如下结果:Globaloptimalsolutionfound.6830500.0.0000005Objectivevalue:Infeasibilities:Totalsolveriterations:VariableValueReduced CostXll58.75
15、0000.000000X12300.00000.000000X13200.00000.000000X2116.250000.000000X220.000000180.0000X230.000000900.0000X3125.000000.000000X320.00000085.71429X330.0000001371.429RowSlackorSurplusDualPrice16830500.1.00000020.00000013200.0030.00000011400.0040.00000010800.0055106250.0.00000060.000000-0.150000070.000000-0.1428571第三部分:指导教师评语实验报告成绩:指导教师(签字):