《运筹学实验报告(共23页).doc》由会员分享,可在线阅读,更多相关《运筹学实验报告(共23页).doc(23页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、精选优质文档-倾情为你奉上一、投资计划问题某地区在今后3年内有4种投资机会,第一种是在3年内每年年初投资,年底可获利润20%,并可将本金收回。第二种是在第一年年初投资,第二年年底可获利50%,并可将本金收回,但该项投资金额不超过2百万元。第三种是在第二年年初投资,第三年年底收回本金,并获利60%,但该项投资金额不超过1.5百万元。第四种是在第三年年初投资,第三年年底收回本金,并可获利40%,但该项投资金额不超过1百万元。现在该地区准备了3百万元资金,如何制定投资方案,使到第三年年末本利的和最大?解:解:设x1,x2,x3,x4依次表示从一种投资方案到第四种投资方案的投资额输入模型:max=x1
2、*1.2+x2*1.5+(x1+x3)*1.2+x4*1.6+(x1+x3+x5)*1.2+x6*1.4;x1+x2+x3+x4+x5+x5+x6=3;x22;x41.5;x60.23;0.1*x1+0.1*x3+0.15*x4+0.2*x5+0.05*x60.15;0.1*x1+0.05*x4+0.1*x60.35;0.25*x1+0.3*x2+0.3*x3+0.2*x4+0.4*x5+0.17*x6=required(j);end结果如下:Global optimal solution found. Objective value: 36.00000 Total solver iterat
3、ions: 11 Variable Value Reduced Cost REQUIRED( X1) 15.00000 0. REQUIRED( X2) 24.00000 0. REQUIRED( X3) 25.00000 0. REQUIRED( X4) 19.00000 0. REQUIRED( X5) 31.00000 0. REQUIRED( X6) 28.00000 0. REQUIRED( X7) 28.00000 0. START( X1) 3. 0. START( X2) 5. 0. START( X3) 12.00000 0. START( X4) 0. 0. START(
4、X5) 11.00000 0. START( X6) 0. 0. START( X7) 5. 0. Row Slack or Surplus Dual Price 1 36.00000 -1. 2 4. 0. 3 0. -0. 4 0. -0. 5 6. 0. 6 0. -0. 7 0. 0. 8 0. -0.五、计算如下运输问题:销地单位运费产地B1B2B3B4B5B6B7B8产量A16267425960A24953858255A35219743351A47673927143A52395726541A65522814352需求量3537223241324338解:x1,x2,x3,x4,x5
5、,x6是6个产地,y1,y2,y3,y4,y5,y6,y7,y8是8个销地输入模型:sets:need/x1,x2,x3,x4,x5,x6/:re;coul/y1,y2,y3,y4,y5,y6,y7,y8/:requ;link(need,coul):cost,num;endsetsdata:cost=6 2 6 7 4 2 5 94 9 5 3 8 5 8 25 2 1 9 7 4 3 37 6 7 3 9 2 7 1 2 3 9 5 7 2 6 55 5 2 2 8 1 4 3;re=60 55 51 43 41 52; requ=35 37 22 32 41 32 43 38;enddat
6、amin=sum(link:cost*num);for(need(i):sum(coul(j):num(i,j)=requ(j);end结果如下:Global optimal solution found. Objective value: 664.0000 Total solver iterations: 25 Variable Value Reduced Cost RE( X1) 60.00000 0. RE( X2) 55.00000 0. RE( X3) 51.00000 0. RE( X4) 43.00000 0. RE( X5) 41.00000 0. RE( X6) 52.000
7、00 0. REQU( Y1) 35.00000 0. REQU( Y2) 37.00000 0. REQU( Y3) 22.00000 0. REQU( Y4) 32.00000 0. REQU( Y5) 41.00000 0. REQU( Y6) 32.00000 0. REQU( Y7) 43.00000 0. REQU( Y8) 38.00000 0. COST( X1, Y1) 6. 0. COST( X1, Y2) 2. 0. COST( X1, Y3) 6. 0. COST( X1, Y4) 7. 0. COST( X1, Y5) 4. 0. COST( X1, Y6) 2. 0
8、. COST( X1, Y7) 5. 0. COST( X1, Y8) 9. 0. COST( X2, Y1) 4. 0. COST( X2, Y2) 9. 0. COST( X2, Y3) 5. 0. COST( X2, Y4) 3. 0. COST( X2, Y5) 8. 0. COST( X2, Y6) 5. 0. COST( X2, Y7) 8. 0. COST( X2, Y8) 2. 0. COST( X3, Y1) 5. 0. COST( X3, Y2) 2. 0. COST( X3, Y3) 1. 0. COST( X3, Y4) 9. 0. COST( X3, Y5) 7. 0
9、. COST( X3, Y6) 4. 0. COST( X3, Y7) 3. 0. COST( X3, Y8) 3. 0. COST( X4, Y1) 7. 0. COST( X4, Y2) 6. 0. COST( X4, Y3) 7. 0. COST( X4, Y4) 3. 0. COST( X4, Y5) 9. 0. COST( X4, Y6) 2. 0. COST( X4, Y7) 7. 0. COST( X4, Y8) 1. 0. COST( X5, Y1) 2. 0. COST( X5, Y2) 3. 0. COST( X5, Y3) 9. 0. COST( X5, Y4) 5. 0
10、. COST( X5, Y5) 7. 0. COST( X5, Y6) 2. 0. COST( X5, Y7) 6. 0. COST( X5, Y8) 5. 0. COST( X6, Y1) 5. 0. COST( X6, Y2) 5. 0. COST( X6, Y3) 2. 0. COST( X6, Y4) 2. 0. COST( X6, Y5) 8. 0. COST( X6, Y6) 1. 0. COST( X6, Y7) 4. 0. COST( X6, Y8) 3. 0. NUM( X1, Y1) 0. 5. NUM( X1, Y2) 19.00000 0. NUM( X1, Y3) 0
11、. 5. NUM( X1, Y4) 0. 7. NUM( X1, Y5) 41.00000 0. NUM( X1, Y6) 0. 2. NUM( X1, Y7) 0. 2. NUM( X1, Y8) 0. 10.00000 NUM( X2, Y1) 1. 0. NUM( X2, Y2) 0. 4. NUM( X2, Y3) 0. 1. NUM( X2, Y4) 32.00000 0. NUM( X2, Y5) 0. 1. NUM( X2, Y6) 0. 2. NUM( X2, Y7) 0. 2. NUM( X2, Y8) 0. 0. NUM( X3, Y1) 0. 4. NUM( X3, Y2
12、) 11.00000 0. NUM( X3, Y3) 0. 0. NUM( X3, Y4) 0. 9. NUM( X3, Y5) 0. 3. NUM( X3, Y6) 0. 4. NUM( X3, Y7) 40.00000 0. NUM( X3, Y8) 0. 4. NUM( X4, Y1) 0. 4. NUM( X4, Y2) 0. 2. NUM( X4, Y3) 0. 4. NUM( X4, Y4) 0. 1. NUM( X4, Y5) 0. 3. NUM( X4, Y6) 5. 0. NUM( X4, Y7) 0. 2. NUM( X4, Y8) 38.00000 0. NUM( X5,
13、 Y1) 34.00000 0. NUM( X5, Y2) 7. 0. NUM( X5, Y3) 0. 7. NUM( X5, Y4) 0. 4. NUM( X5, Y5) 0. 2. NUM( X5, Y6) 0. 1. NUM( X5, Y7) 0. 2. NUM( X5, Y8) 0. 5. NUM( X6, Y1) 0. 3. NUM( X6, Y2) 0. 2. NUM( X6, Y3) 22.00000 0. NUM( X6, Y4) 0. 1. NUM( X6, Y5) 0. 3. NUM( X6, Y6) 27.00000 0. NUM( X6, Y7) 3. 0. NUM( X6, Y8) 0. 3. Row Slack or Surplus Dual Price 1 664.0000 -1. 2 0. 3. 3 22.00000 0. 4 0. 3. 5 0. 1. 6 0. 2. 7 0. 2. 8 0. -4. 9 0. -5. 10 0. -4. 11