




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、数学建模实验三(线性规划实验)基本实验1. 生产计划方案解答:设生产玩具火车、玩具卡车和玩具汽车的数量分别为X1,X2,X3,则总收入(目标函数)为:3X1+2X2+5X3时间限制(约束条件):X1 +2X2 +X3<=4303X1 +2X3<=460X1 +4X2 <=420X1>=0;X2>=0;X3>=0最优的生产方案应使目标函数取得最大。使用Lingo建模:运行结果: Global optimal solution found. Objective value: 1350.000 Infeasibilities: 0.000000 Total sol
2、ver iterations: 2 Model Class: LP Total variables: 3 Nonlinear variables: 0 Integer variables: 0 Total constraints: 4 Nonlinear constraints: 0 Total nonzeros: 10 Nonlinear nonzeros: 0 Variable Value Reduced Cost X1 0.000000 4.000000 X2 100.0000 0.000000 X3 230.0000 0.000000 Row Slack or Surplus Dual
3、 Price 1 1350.000 1.000000 2 0.000000 1.000000 3 0.000000 2.000000 4 20.00000 0.000000(1)由运行结果可得,最优的生产方案为:火车、卡车和汽车的生产数量分别为:0、100、230;收入为1350.(2) 若每加班一小时加班费为50美元,则每分钟加班费为5/6美元,此时操作一无时间限制,使用Lingo建模:运行结果: Global optimal solution found. Objective value: 1351.667 Infeasibilities: 0.000000 Total solver it
4、erations: 0 Model Class: LP Total variables: 3 Nonlinear variables: 0 Integer variables: 0 Total constraints: 3 Nonlinear constraints: 0 Total nonzeros: 7 Nonlinear nonzeros: 0 Variable Value Reduced Cost X1 0.000000 4.166667 X2 105.0000 0.000000 X3 230.0000 0.000000 Row Slack or Surplus Dual Price
5、1 1351.667 1.000000 2 0.000000 2.083333 3 0.000000 0.83333E-01即生产火车、卡车和汽车的数量分别为0,105,230个,可得利润为1351.667美元。加班时间为x1+2*x2+x3-430=10分钟。(3) 使用Lingo建模:运行结果: Global optimal solution found. Objective value: 1480.000 Infeasibilities: 0.000000 Total solver iterations: 2 Model Class: LP Total variables: 3 Nonl
6、inear variables: 0 Integer variables: 0 Total constraints: 4 Nonlinear constraints: 0 Total nonzeros: 10 Nonlinear nonzeros: 0 Variable Value Reduced Cost X1 0.000000 4.000000 X2 70.00000 0.000000 X3 290.0000 0.000000 Row Slack or Surplus Dual Price 1 1480.000 1.000000 2 0.000000 1.000000 3 0.000000
7、 2.000000 4 140.0000 0.000000即每天实际收入结果为1480美元。(4) 设X4为加班时间,使用Lingo建模:运行结果: Local optimal solution found. Objective value: 1350.000 Infeasibilities: 0.000000 Extended solver steps: 5 Total solver iterations: 45 Model Class: NLP Total variables: 5 Nonlinear variables: 2 Integer variables: 0 Total cons
8、traints: 4 Nonlinear constraints: 1 Total nonzeros: 13 Nonlinear nonzeros: 2 Variable Value Reduced Cost X1 0.000000 4.000000 X2 100.0000 0.000000 X3 230.0000 0.000000 A 0.000000 0.000000 X4 0.000000 0.000000 Row Slack or Surplus Dual Price 1 1350.000 1.000000 2 0.000000 1.000000 3 0.000000 2.000000
9、 4 20.00000 0.000000可见A和x4均为0,即操作3不需要加班时间。2. 动物饲料制造解答:设X、Y、Z分别表示使用燕麦、玉米、糖渣的重量。目标函数(成本):1.3*X+1.7*Y+1.2*Z+2.5*(X+Y)+0.5*(X+Y+Z)+9000*4.2+12000*1.7约束条件:(13.6*X+4.1*Y+5*Z)/(X+Y+Z)>=9.5;(7.1*X+2.4*Y+0.3*Z)/(X+Y+Z)>=2;(7*X+3.7*Y+25*Z)/(X+Y+Z)<=6;X+Y+Z=21000;X<=11900;Y<=23500;Z<=750;使用Li
10、ngo建模:运行结果: Local optimal solution found. Objective value: 150868.0 Infeasibilities: 0.000000 Extended solver steps: 5 Total solver iterations: 50 Model Class: NLP Total variables: 3 Nonlinear variables: 3 Integer variables: 0 Total constraints: 8 Nonlinear constraints: 3 Total nonzeros: 18 Nonlinea
11、r nonzeros: 9 Variable Value Reduced Cost X 11896.63 0.000000 Y 8678.905 0.000000 Z 424.4658 0.000000 Row Slack or Surplus Dual Price 1 150868.0 -1.000000 2 0.000000 -145.3506 3 3.020132 0.000000 4 0.000000 2963.888 5 0.000000 -4.412760 6 3.370448 0.000000 7 14821.10 0.000000 8 325.5342 0.000000分析结果
12、可知,使用燕麦11896.63千克、玉米8678.905千克、糖渣424.4658千克时,总成本最小,为150868元。3. 投资问题解答:设Ai、Bi、Ci、Di分别表示第i年给A、B、C、D的投资金额,其中,i=1,2,3。第1年,将300000全部用于A、B两个计划的投资,则:A1+B1=300000;第2年,将第一年A的本金加利息用于A、C两个计划的投资,则:A2+C2=1.2A1;且C2<=150000;第3年,将第二年A的本金加利息以及第一年B的本金加利息用于A、D两个计划的投资,则:A3+D3=1.2A2+1.5B1;且D3<=100000;第3年末的收入即为所求目标
13、函数:1.2A3+1.6C2+1.4D3使用Lingo建模:运行结果: Global optimal solution found. Objective value: 575000.0 Infeasibilities: 0.000000 Total solver iterations: 3 Model Class: LP Total variables: 6 Nonlinear variables: 0 Integer variables: 0 Total constraints: 6 Nonlinear constraints: 0 Total nonzeros: 14 Nonlinear
14、nonzeros: 0 Variable Value Reduced Cost A3 162500.0 0.000000 C2 150000.0 0.000000 D3 100000.0 0.000000 A1 125000.0 0.000000 B1 175000.0 0.000000 A2 0.000000 0.6000000E-01 Row Slack or Surplus Dual Price 1 575000.0 1.000000 2 0.000000 1.800000 3 0.000000 1.500000 4 0.000000 1.200000 5 0.000000 0.1000
15、000 6 0.000000 0.2000000由运行结果可得:第一年将投入A计划125000元,投入B计划175000元,第二年再将钱全部投入C计划,第三年年初投入A计划162500元,投入D计划100000元,第三年年末可以获得最大收入为575000元。4. 自行车生产规划解答:设每个月正常生产自行车xi千辆,工人加班生产的自行车为yi千辆,每个月库存为ri千辆,每月销售为ai千辆,i=1,2,12.目标函数:设总成本为M,我们希望目标函数最小约束条件: (i=2,12)xi(0,30) (i=1,2,12)yi(0,15) (i=1,2,12)使用Lingo建模:运行结果: Global
16、 optimal solution found. Objective value: 10645.00 Objective bound: 10645.00 Infeasibilities: 0.000000 Extended solver steps: 0 Total solver iterations: 0 Model Class: MILP Total variables: 36 Nonlinear variables: 0 Integer variables: 24 Total constraints: 49 Nonlinear constraints: 0 Total nonzeros:
17、 119 Nonlinear nonzeros: 0 Variable Value Reduced Cost X( 1) 28.00000 90.00000 X( 2) 15.00000 85.00000 X( 3) 15.00000 80.00000 X( 4) 28.00000 75.00000 X( 5) 30.00000 70.00000 X( 6) 30.00000 65.00000 X( 7) 30.00000 60.00000 X( 8) 30.00000 55.00000 X( 9) 26.00000 50.00000 X( 10) 14.00000 45.00000 X( 1
18、1) 25.00000 40.00000 X( 12) 30.00000 35.00000 Y( 1) 0.000000 100.0000 Y( 2) 0.000000 95.00000 Y( 3) 0.000000 90.00000 Y( 4) 0.000000 85.00000 Y( 5) 0.000000 80.00000 Y( 6) 10.00000 75.00000 Y( 7) 15.00000 70.00000 Y( 8) 15.00000 65.00000 Y( 9) 0.000000 60.00000 Y( 10) 0.000000 55.00000 Y( 11) 0.0000
19、00 50.00000 Y( 12) 0.000000 45.00000 A( 1) 30.00000 0.000000 A( 2) 15.00000 0.000000 A( 3) 15.00000 0.000000 A( 4) 25.00000 0.000000 A( 5) 33.00000 0.000000 A( 6) 40.00000 0.000000 A( 7) 45.00000 0.000000 A( 8) 45.00000 0.000000 A( 9) 26.00000 0.000000 A( 10) 14.00000 0.000000 A( 11) 25.00000 0.0000
20、00 A( 12) 30.00000 0.000000 R( 1) 0.000000 0.000000 R( 2) 0.000000 0.000000 R( 3) 0.000000 0.000000 R( 4) 3.000000 0.000000 R( 5) 0.000000 0.000000 R( 6) 0.000000 0.000000 R( 7) 0.000000 0.000000 R( 8) 0.000000 0.000000 R( 9) 0.000000 0.000000 R( 10) 0.000000 0.000000 R( 11) 0.000000 0.000000 R( 12)
21、 0.000000 0.000000 Row Slack or Surplus Dual Price 1 10645.00 -1.000000 2 0.000000 -55.00000 3 0.000000 -50.00000 4 0.000000 -45.00000 5 0.000000 -40.00000 6 0.000000 -35.00000 7 0.000000 -30.00000 8 0.000000 -25.00000 9 0.000000 -20.00000 10 0.000000 -15.00000 11 0.000000 -10.00000 12 0.000000 -5.0
22、00000 13 0.000000 -60.00000 14 0.000000 0.000000 15 0.000000 0.000000 16 0.000000 0.000000 17 3.000000 0.000000 18 0.000000 0.000000 19 0.000000 0.000000 20 0.000000 0.000000 21 0.000000 0.000000 22 0.000000 0.000000 23 0.000000 0.000000 24 0.000000 0.000000 25 0.000000 0.000000 26 2.000000 0.000000
23、 27 15.00000 0.000000 28 15.00000 0.000000 29 2.000000 0.000000 30 0.000000 0.000000 31 0.000000 0.000000 32 0.000000 0.000000 33 0.000000 0.000000 34 4.000000 0.000000 35 16.00000 0.000000 36 5.000000 0.000000 37 0.000000 0.000000 38 15.00000 0.000000 39 15.00000 0.000000 40 15.00000 0.000000 41 15.00000 0.000000 42 15.00000 0.000000 43 5.000000 0.000000 44 0.000000 0.000000 45 0.000000 0.000000 46 15.00000 0.000000 47 15.00000 0.000000 48 15.00000 0.000000 49 15.00000 0.000000由运行结果可列下表:月份123456789101112正常生产281515303030303026142530加班
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《生物与环境的关系》教学设计
- 2025年人教版小学数学一年级下册期中考试卷(带答案)
- 2025版合同管理员聘用合同
- 初中历史明朝的统治课件+2024-2025学年统编版七年级历史下册
- 初中历史明朝的灭亡和清朝的建立课件 2024-2025学年统编版七年级历史下
- 阿米巴病的临床护理
- 2025聘用图书馆管理员的合同
- 2025茶叶购销合同范本
- 新质生产力发酵
- 2025国际贸易公司合同模板
- 2023-2024年《劳务劳动合同样本范本书电子版模板》
- 中国居民口腔健康状况第四次中国口腔健康流行病学调查报告
- MOOC 数据挖掘-国防科技大学 中国大学慕课答案
- 中药注射剂合理使用培训
- 第13课+清前中期的兴盛与危机【中职专用】《中国历史》(高教版2023基础模块)
- 2024年国家粮食和物资储备局直属事业单位招聘笔试参考题库附带答案详解
- 苏轼临江仙课件大学语文完美版
- 《施工测量》课件
- 情绪健康管理服务规范
- 【环氧树脂复合材料研究进展文献综述6000字】
- 人行道混凝土专项施工方案
评论
0/150
提交评论