运筹学用lingo做课程设计选题(17):生产调运配问题
课程设计选题(17):生产调运配问题某建筑公司有5个施工项目准备开工,该公司有两个金属构件生产车间,有两个仓库,内存3种规格钢材,1种规格塑钢门窗(成套使用)。仓库的钢材...
课程设计选题(17):生产调运配问题某建筑公司有5个施工项目准备开工,该公司有两个金属构件生产车间,有两个仓库,内存3种规格钢材,1种规格塑钢门窗(成套使用)。仓库的钢材品种及拥有量见表12,构件车间生产的单位构件材料消耗、工时消耗、生产能力和生产成本见表13--16,各项目构件和钢材需求量见表17,由构件车间向各项目和由仓库向各项目运送物资的单位运费见表18。如生产能力不足,可加班生产,但是费用每件产品会增加200元。试建立并求解模型,编制各车间的产品生产计划、由构件车间向各项目和由仓库向各项目、各车间的物资调运计划,使总成本为最小。表12 仓库的钢材品种、塑钢拥有量 甲仓库 乙仓库A型钢材(吨) 5000 7000B型钢材(吨) 5500 6500C型钢材(吨) 10000 6000塑钢门窗(套) 380 450表13 单位构件材料消耗量 单位:吨/件 A型钢材 B型钢材 C型钢材钢梁 9 13 23钢架 11 15 20表14 车间构件生产工时消耗表 钢梁(小时/件) 钢架(小时/件) 工时拥有量(小时)一车间 30 40 20000二车间 40 35 10000表15 车间生产能力表 单位:件 钢梁 钢架一车间 120 80二车间 100 120表16 车间生产成本表 单位:元/件 钢梁 钢架一车间 320 300二车间 280 360表17 各项目钢梁、钢架、钢材、塑钢门窗需求量表 钢梁(件) 钢架(件) A型钢材(吨) B型钢材(吨) C型钢材(吨) 塑钢门窗(套)项目1 80 0 50 30 40 140项目2 100 90 0 120 100 120项目3 100 60 70 120 160 100项目4 60 50 40 90 30 220项目5 30 120 60 90 40 70合计 370 320 220 450 370 650表18 单位物资运价表 单位:元/吨.公里 元/套.公里 元/件.公里 一车间 二车间 项目1 项目2 项目3 项目4 项目5一车间 -- -- 20 40 100 50 40二车间 -- -- 40 50 120 70 60甲仓库 90 50 10 10 20 30 20乙仓库 60 40 10 15 15 5 30
展开
1个回答
展开全部
model:
sets:
warehouse/1..2/:ownership2;
factory/1..2/:ttime;
item/1..5/:demand3;
material/1..3/:;
production/1..2/:;
link1(material,warehouse):ownership1;
link2(production,material):expend;
link3(factory,production):time,cost,produce,ability;
link4(item,production):demand1;
link5(item,material):demand2;
link6(factory,item):transportcost1;
link7(factory,item,production):transport1;
link8(warehouse,factory):transportcost2;
link9(warehouse,factory,material):transport2;
link10(warehouse,item):transportcost3,transport3;
link11(warehouse,item,material):transport4;
endsets
data:
ownership1=
5000 7000
5500 6500
10000 6000;
ownership2=380 450;
expend=
9 13 23
11 15 20;
time=
30 40
40 35;
ttime=20000 10000;
ability=
120 80
100 120;
cost=
320 300
280 360;
demand1=
80 0
100 90
100 60
60 50
30 120;
demand2=
50 30 40
0 120 100
70 120 160
40 90 30
60 90 40;
demand3=140 120 100 220 70;
transportcost1=
20 40 100 50 40
40 50 120 70 60;
transportcost2=
90 50
60 40;
transportcost3=
10 10 20 30 20
10 15 15 5 30;
enddata
min=@sum(link11(i,k,m):transport4(i,k,m)*transportcost3(i,k))
+@sum(link10(i,k):transport3(i,k)*transportcost3(i,k))
+@sum(link9(i,j,m):transport2(i,j,m)*transportcost2(i,j))
+@sum(link7(j,k,n):transport1(j,k,n)*transportcost1(j,k))
+@sum(link3(j,n):produce(j,n)*cost(j,n)+@if(produce(j,n)#gt#ability(j,n),200*(produce(j,n)-ability(j,n)),0));
@for(factory(j):@for(material(m):@sum(warehouse(i):transport2(i,j,m))=@sum(production(n):produce(j,n)*expend(n,m))));
@for(production(n):@for(factory(j):@sum(item(k):transport1(j,k,n))=produce(j,n)));
@for(warehouse(i):@sum(item(k):transport3(i,k))<=ownership2(i));
@for(warehouse(i):@for(material(m):@sum(item(k):transport4(i,k,m))+@sum(factory(j):transport2(i,j,m))<=ownership1(m,i)));
@for(factory(i):@sum(production(n):produce(i,n)*time(i,n))<=ttime(i));
@for(item(k):@for(production(n):@sum(factory(j):transport1(j,k,n))=demand1(k,n)));
@for(item(k):@for(material(m):@sum(warehouse(i):transport4(i,k,m))=demand2(k,m)));
@for(item(k):@sum(warehouse(i):transport3(i,k))=demand3(k));
end
sets:
warehouse/1..2/:ownership2;
factory/1..2/:ttime;
item/1..5/:demand3;
material/1..3/:;
production/1..2/:;
link1(material,warehouse):ownership1;
link2(production,material):expend;
link3(factory,production):time,cost,produce,ability;
link4(item,production):demand1;
link5(item,material):demand2;
link6(factory,item):transportcost1;
link7(factory,item,production):transport1;
link8(warehouse,factory):transportcost2;
link9(warehouse,factory,material):transport2;
link10(warehouse,item):transportcost3,transport3;
link11(warehouse,item,material):transport4;
endsets
data:
ownership1=
5000 7000
5500 6500
10000 6000;
ownership2=380 450;
expend=
9 13 23
11 15 20;
time=
30 40
40 35;
ttime=20000 10000;
ability=
120 80
100 120;
cost=
320 300
280 360;
demand1=
80 0
100 90
100 60
60 50
30 120;
demand2=
50 30 40
0 120 100
70 120 160
40 90 30
60 90 40;
demand3=140 120 100 220 70;
transportcost1=
20 40 100 50 40
40 50 120 70 60;
transportcost2=
90 50
60 40;
transportcost3=
10 10 20 30 20
10 15 15 5 30;
enddata
min=@sum(link11(i,k,m):transport4(i,k,m)*transportcost3(i,k))
+@sum(link10(i,k):transport3(i,k)*transportcost3(i,k))
+@sum(link9(i,j,m):transport2(i,j,m)*transportcost2(i,j))
+@sum(link7(j,k,n):transport1(j,k,n)*transportcost1(j,k))
+@sum(link3(j,n):produce(j,n)*cost(j,n)+@if(produce(j,n)#gt#ability(j,n),200*(produce(j,n)-ability(j,n)),0));
@for(factory(j):@for(material(m):@sum(warehouse(i):transport2(i,j,m))=@sum(production(n):produce(j,n)*expend(n,m))));
@for(production(n):@for(factory(j):@sum(item(k):transport1(j,k,n))=produce(j,n)));
@for(warehouse(i):@sum(item(k):transport3(i,k))<=ownership2(i));
@for(warehouse(i):@for(material(m):@sum(item(k):transport4(i,k,m))+@sum(factory(j):transport2(i,j,m))<=ownership1(m,i)));
@for(factory(i):@sum(production(n):produce(i,n)*time(i,n))<=ttime(i));
@for(item(k):@for(production(n):@sum(factory(j):transport1(j,k,n))=demand1(k,n)));
@for(item(k):@for(material(m):@sum(warehouse(i):transport4(i,k,m))=demand2(k,m)));
@for(item(k):@sum(warehouse(i):transport3(i,k))=demand3(k));
end
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询