运筹学实验一线性规划求解、运输问题、整数规划求解
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
西华大学上机实验报告
一、实验目的
掌握线性规划求解的基本方法,熟悉灵敏度分析的步骤和内容;掌握运输问题的模型,概念,求解方法;掌握整数规划的算法。在熟悉lingo软件基本功能基础上,能熟练操作,正确完成模型求解过程及分析过程。
二、实验内容或设计思想
1.lingo软件和运筹学实验软件的安装及菜单熟悉了解.
2.lingo软件和运筹学实验软件应用内容之:任选几种不同类型的LP输入计算程序,运行求解;完成产销平衡的运输问题求解;求解任一整数规划。
三、实验环境与工具
计算机,lingo软件,运筹学软件
四、实验过程或实验数据
1、用lingo求解线性规划
用DESKS、TABLES和CHAIRS分别表示三种产品的生产量,建立LP模型。
max=50*desks+30*tables+20*chairs;
7*desks+6*tables+chairs<=46;
4*desks+2*tables+1.5*chairs<=20;
2*desks+1.5*tables+.5*chairs<=8;
tables<=5;
Global optimal solution found.
Objective value: 272.0000
Total solver iterations: 2
Variable Value Reduced Cost
DESKS 0.000000 6.000000
TABLES 1.600000 0.000000
Row Slack or Surplus Dual Price
1 272.0000 1.000000
2 25.20000 0.000000
3 0.000000 12.00000
4 0.000000 4.000000
5 3.400000 0.000000
2、用LINGO软件计算运输问题
model:
sets:
warehouses/wh1..wh6/: capacity;
vendors/v1..v8/: demand;
links(warehouses,vendors): cost, volume;
endsets
min=@sum(links: cost*volume);
@for(vendors(J):
@sum(warehouses(I): volume(I,J))=demand(J));
@for(warehouses(I):
@sum(vendors(J): volume(I,J))<=capacity(I));
data:
capacity=60 55 51 43 41 52;
demand=35 37 22 32 41 32 43 38;
cost=6 2 6 7 4 2 9 5
4 9
5 3 8 5 8 2
5 2 1 9 7 4 3 3
7 6 7 3 9 2 7 1
2 3 9 5 7 2 6 5
5 5 2 2 8 1 4 3;
enddata
end
Global optimal solution found.
Objective value: 638.0000
Total solver iterations: 16
Variable Value Reduced Cost
CAPACITY( WH2) 55.00000 0.000000 CAPACITY( WH3) 57.00000 0.000000 CAPACITY( WH4) 43.00000 0.000000 CAPACITY( WH5) 41.00000 0.000000 CAPACITY( WH6) 52.00000 0.000000 DEMAND( V1) 35.00000 0.000000 DEMAND( V2) 37.00000 0.000000 DEMAND( V3) 25.00000 0.000000 DEMAND( V4) 32.00000 0.000000 DEMAND( V5) 41.00000 0.000000 DEMAND( V6) 36.00000 0.000000 DEMAND( V7) 43.00000 0.000000 DEMAND( V8) 38.00000 0.000000 COST( WH1, V1) 8.000000 0.000000 COST( WH1, V2) 2.000000 0.000000 COST( WH1, V3) 6.000000 0.000000 COST( WH1, V4) 7.000000 0.000000 COST( WH1, V5) 4.000000 0.000000 COST( WH1, V6) 2.000000 0.000000 COST( WH1, V7) 9.000000 0.000000 COST( WH1, V8) 5.000000 0.000000 COST( WH2, V1) 4.000000 0.000000 COST( WH2, V2) 9.000000 0.000000 COST( WH2, V3) 5.000000 0.000000 COST( WH2, V4) 3.000000 0.000000 COST( WH2, V5) 8.000000 0.000000 COST( WH2, V6) 5.000000 0.000000 COST( WH2, V7) 8.000000 0.000000 COST( WH2, V8) 2.000000 0.000000 COST( WH3, V1) 5.000000 0.000000 COST( WH3, V2) 2.000000 0.000000 COST( WH3, V3) 1.000000 0.000000 COST( WH3, V4) 9.000000 0.000000 COST( WH3, V5) 7.000000 0.000000 COST( WH3, V6) 4.000000 0.000000 COST( WH3, V7) 3.000000 0.000000 COST( WH3, V8) 3.000000 0.000000 COST( WH4, V1) 7.000000 0.000000 COST( WH4, V2) 6.000000 0.000000 COST( WH4, V3) 7.000000 0.000000 COST( WH4, V4) 3.000000 0.000000 COST( WH4, V5) 11.00000 0.000000 COST( WH4, V6) 2.000000 0.000000 COST( WH4, V7) 7.000000 0.000000 COST( WH4, V8) 1.000000 0.000000 COST( WH5, V1) 2.000000 0.000000 COST( WH5, V2) 3.000000 0.000000 COST( WH5, V3) 9.000000 0.000000 COST( WH5, V4) 5.000000 0.000000 COST( WH5, V5) 7.000000 0.000000 COST( WH5, V6) 2.000000 0.000000 COST( WH5, V7) 6.000000 0.000000 COST( WH5, V8) 5.000000 0.000000 COST( WH6, V1) 5.000000 0.000000 COST( WH6, V2) 5.000000 0.000000 COST( WH6, V3) 2.000000 0.000000 COST( WH6, V4) 2.000000 0.000000 COST( WH6, V5) 8.000000 0.000000 COST( WH6, V6) 1.000000 0.000000 COST( WH6, V7) 4.000000 0.000000