电子商务物流课程设计.docx
《电子商务物流课程设计.docx》由会员分享,可在线阅读,更多相关《电子商务物流课程设计.docx(20页珍藏版)》请在冰豆网上搜索。
电子商务物流课程设计
电子商务物流课程设计
现有某配送中心,负责某地区的一些厂家到零售店的配送工作。
有以下条件
1、该配送中心日夜运作,需要工作人员轮班工作,每一个时段所需要的工作人员数量如下表,工作人员在各时间区段一开始上班,并连续工作八个小时,求该配送中心至少需要多少工作人员?
班次
时间
所需人数
1
6:
00-10:
00
60
2
10:
00-14:
00
70
3
14:
00-18:
00
60
4
18:
00-22:
00
50
5
22:
00-2:
00
20
6
2:
00-6:
00
30
解:
用Lingo软件编写程序
min=x11+x21+x31+x41+x51+x61;
x62+x11=60;
x12+x21=70;
x22+x31=60;
x32+x41=50;
x42+x51=20;
x52+x61=30;
x11>=x12;
x21>=x22;
x31>=x32;
x41>=x42;
x51>=x52;
x61>=x62;
@gin(x11);@gin(x21);@gin(x31);@gin(x41);@gin(x51);@gin(x61);
@gin(x12);@gin(x22);@gin(x32);@gin(x42);@gin(x52);@gin(x62);
程序运行后的结果
Globaloptimalsolutionfound.
Objectivevalue:
150.0000
Extendedsolversteps:
0
Totalsolveriterations:
5
VariableValueReducedCost
X1160.000001.000000
X2110.000001.000000
X3150.000001.000000
X410.0000001.000000
X5120.000001.000000
X6110.000001.000000
X620.0000000.000000
X1260.000000.000000
X2210.000000.000000
X3250.000000.000000
X420.0000000.000000
X5220.000000.000000
RowSlackorSurplusDualPrice
1150.0000-1.000000
20.0000000.000000
30.0000000.000000
40.0000000.000000
50.0000000.000000
60.0000000.000000
70.0000000.000000
80.0000000.000000
90.0000000.000000
100.0000000.000000
110.0000000.000000
120.0000000.000000
1310.000000.000000
最后的答案是:
至少150人。
第一班次:
0+60
第二班次:
60+10
第三班次:
10+50
第四班次:
50+0
第五班次:
0+20
第六班次:
20+10
2、该配送中心有五个产品区域(ABCDE),有甲乙丙丁戊共五个拣货员,每个人对每个产品区域的产品熟悉程度不同,因而时间不同,每个人在每个区域分别消耗的平均时间如下表,求效率最高的拣货员分配方案。
区域
人员
A
B
C
D
E
甲
12
7
9
7
9
乙
8
9
6
6
6
丙
7
17
12
14
9
丁
15
14
6
6
10
戊
4
10
7
10
9
解:
用Lingo软件编写程序
min=12*x11+7*x12+9*x13+7*x14+9*x15+8*x21+9*x22+6*x23+6*x24+6*x25+7*x31+17*x32+12*x33+14*x34+9*x35+15*x41+14*x42+6*x43+6*x44+10*x45+4*x51+10*x52+7*x53+10*x54+9*x55;
x11+x12+x13+x14+x15=1;
x21+x22+x23+x24+x25=1;
x31+x32+x33+x34+x35=1;
x41+x42+x43+x44+x45=1;
x51+x52+x53+x54+x55=1;
x11+x21+x31+x41+x51=1;
x12+x22+x32+x42+x52=1;
x13+x23+x33+x43+x53=1;
x14+x24+x34+x44+x54=1;
x15+x25+x35+x45+x55=1;
@bin(x11);@bin(x12);@bin(x13);@bin(x14);@bin(x15);
@bin(x21);@bin(x22);@bin(x23);@bin(x24);@bin(x25);
@bin(x31);@bin(x32);@bin(x33);@bin(x34);@bin(x35);
@bin(x41);@bin(x42);@bin(x43);@bin(x44);@bin(x45);
@bin(x51);@bin(x52);@bin(x53);@bin(x54);@bin(x55);
程序运行后的结果是
Globaloptimalsolutionfound.
Objectivevalue:
32.00000
Extendedsolversteps:
0
Totalsolveriterations:
0
VariableValueReducedCost
X110.00000012.00000
X121.0000007.000000
X130.0000009.000000
X140.0000007.000000
X150.0000009.000000
X210.0000008.000000
X220.0000009.000000
X230.0000006.000000
X241.0000006.000000
X250.0000006.000000
X310.0000007.000000
X320.00000017.00000
X330.00000012.00000
X340.00000014.00000
X351.0000009.000000
X410.00000015.00000
X420.00000014.00000
X431.0000006.000000
X440.0000006.000000
X450.00000010.00000
X511.0000004.000000
X520.00000010.00000
X530.0000007.000000
X540.00000010.00000
X550.0000009.000000
RowSlackorSurplusDualPrice
132.00000-1.000000
20.0000000.000000
30.0000000.000000
40.0000000.000000
50.0000000.000000
60.0000000.000000
70.0000000.000000
80.0000000.000000
90.0000000.000000
100.0000000.000000
110.0000000.000000
最后的答案是:
甲到B;乙到D;丙到E;丁到C;戊到A。
3、该配送中心有些产品采取从厂家直接送货的方式进行配送,其中有五个厂家的产量分别为1001201408060;六个零售店的需求量分别是100120100608040,各厂家到零售店的运费如下表,求最佳的运输方案。
销地
产地
甲
乙
丙
丁
戊
已
1
10
18
29
13
22
15
2
13
100
21
14
16
22
3
0
6
11
3
100
9
4
9
11
23
18
19
25
5
24
28
36
30
34
39
解:
用Lingo软件编写程序
min=10*x11+18*x12+29*x13+13*x14+22*x15+15*x16+13*x21+100*x22+21*x23+14*x24+16*x25+22*x26+0*x31+6*x32+11*x33+3*x34+100*x35+9*x36+9*x41+11*x42+23*x43+18*x44+19*x45+25*x46+24*x51+28*x52+36*x53+30*x54+34*x55+39*x56;
x11+x12+x13+x14+x15+x16=100;
x21+x22+x23+x24+x25+x26=120;
x31+x32+x33+x34+x35+x36=140;
x41+x42+x43+x44+x45+x46=80;
x51+x52+x53+x54+x55+x56=60;
x11+x21+x31+x41+x51=100;
x12+x22+x32+x42+x52=120;
x13+x23+x33+x43+x53=100;
x14+x24+x34+x44+x54=60;
x15+x25+x35+x45+x55=80;
x16+x26+x36+x46+x56=40;
@gin(x11);@gin(x12);@gin(x13);@gin(x14);@gin(x15);@gin(x16);
@gin(x21);@gin(x22);@gin(x23);@gin(x24);@gin(x25);@gin(x26);
@gin(x31);@gin(x32);@gin(x33);@gin(x34);@gin(x35);@gin(x36);
@gin(x41);@gin(x42);@gin(x43);@gin(x44);@gin(x45);@gin(x46);
@gin(x51);@gin(x52);@gin(x53);@gin(x54);@gin(x55);@gin(x56);
程序运行后的结果
Globaloptimalsolutionfound.
Objectivevalue:
6640.000
Extendedsolversteps:
0
Totalsolveriterations:
10
VariableValueReducedCost
X1160.0000010.00000
X120.00000018.00000
X130.00000029.00000
X140.00000013.00000
X150.00000022.00000
X1640.0000015.00000
X210.00000013.00000
X220.000000100.0000
X2340.0000021.00000
X240.00000014.00000
X2580.0000016.00000
X260.00000022.00000
X3120.000000.000000
X320.0000006.000000
X3360.0000011.00000
X3460.000003.000000
X350.000000100.0000
X360.0000009.000000
X410.0000009.000000
X4280.0000011.00000
X430.00000023.00000
X440.00000018.00000
X450.00000019.00000
X460.00000025.00000
X5120.0000024.00000
X5240.0000028.00000
X530.00000036.00000
X540.00000030.00000
X550.00000034.00000
X560.00000039.00000
RowSlackorSurplusDualPrice
16640.000-1.000000
20.0000000.000000
30.0000000.000000
40.0000000.000000
50.0000000.000000
60.0000000.000000
70.0000000.000000
80.0000000.000000
90.0000000.000000
100.0000000.000000
110.0000000.000000
120.0000000.000000
最后的答案是:
1厂家运送60到甲,运送40到已;
2厂家运送40到丙,运送80到戊;
3厂家运送20到甲,运送60到丙,运送60到丁;
4厂家运送80到乙;
5厂家运送20到甲,40到乙。
所需费用是6640。
4、现在该配送中心有一批货物要送到G店,其中的路线图如下,要求找到距离最短路线。
解:
运用Lingo软件编写程序
model:
data:
n=16;
enddata
sets:
cities/1..n/:
F;!
16个城市;
roads(cities,cities)/
1,21,3
2,42,52,6
3,53,63,7
4,84,9
5,85,9
6,96,10
7,97,10
8,118,12
9,129,13
10,1210,13
11,1411,15
12,1412,15
13,1413,15
14,16
15,16
/:
D,P;
endsets
data:
运用程序后的结果
Feasiblesolutionfound.
Totalsolveriterations:
0
VariableValue
N16.00000
F
(1)18.00000
F
(2)13.00000
F(3)16.00000
F(4)13.00000
F(5)10.00000
F(6)9.000000
F(7)12.00000
F(8)7.000000
F(9)6.000000
F(10)8.000000
F(11)7.000000
F(12)5.000000
F(13)9.000000
F(14)4.000000
F(15)3.000000
F(16)0.000000
D(1,2)5.000000
D(1,3)3.000000
D(2,4)1.000000
D(2,5)3.000000
D(2,6)6.000000
D(3,5)8.000000
D(3,6)7.000000
D(3,7)6.000000
D(4,8)6.000000
D(4,9)8.000000
D(5,8)3.000000
D(5,9)5.000000
D(6,9)3.000000
D(6,10)3.000000
D(7,9)8.000000
D(7,10)4.000000
D(8,11)2.000000
D(8,12)2.000000
D(9,12)1.000000
D(9,13)2.000000
D(10,12)3.000000
D(10,13)3.000000
D(11,14)3.000000
D(11,15)5.000000
D(12,14)5.000000
D(12,15)2.000000
D(13,14)6.000000
D(13,15)6.000000
D(14,16)4.000000
D(15,16)3.000000
P(1,2)1.000000
P(1,3)0.000000
P(2,4)0.000000
P(2,5)1.000000
P(2,6)0.000000
P(3,5)0.000000
P(3,6)1.000000
P(3,7)0.000000
P(4,8)1.000000
P(4,9)0.000000
P(5,8)1.000000
P(5,9)0.000000
P(6,9)1.000000
P(6,10)0.000000
P(7,9)0.000000
P(7,10)1.000000
P(8,11)0.000000
P(8,12)1.000000
P(9,12)1.000000
P(9,13)0.000000
P(10,12)1.000000
P(10,13)0.000000
P(11,14)1.000000
P(11,15)0.000000
P(12,14)0.000000
P(12,15)1.000000
P(13,14)0.000000
P(13,15)1.000000
P(14,16)1.000000
P(15,16)1.000000
RowSlackorSurplus
10.000000
20.000000
30.000000
40.000000
50.000000
60.000000
70.000000
80.000000
90.000000
100.000000
110.000000
120.000000
130.000000
140.000000
150.000000
160.000000
170.000000
180.000000
190.000000
200.000000
210.000000
220.000000
230.000000
240.000000
250.000000
260.000000
270.000000
280.000000
290.000000
300.000000
310.000000
320.000000
330.000000
340.000000
350.000000
360.000000
370.000000
380.000000
390.000000
400.000000
410.000000
420.000000
430.000000
440.000000
450.000000
460.000000
最后的答案是:
A到B1到C2到D1到E2到F2到G。
最短路径长度是18。
5、现在该配送中心需要扩展业务,派一业务员到相邻的区域洽谈业务,假设该配送中心所在的城市为A,另外三个分别是BCD,各个城市之间的距离如下表,求该业务员应该如何规划路线,使得经过每一个城市(有且仅有一次),最后回到A市,所经过的路线最短。
I
j
A
B
C
D
A
0
8
5
6
B
6
0
8
5
C
7
9
0
5
D
9
7
8
0
解:
运用Lingo软件编写程序
MODEL:
!
TravelingSalesmanProblemforthecitiesofA,B,C,D;
SETS:
CITY/1..4/:
U;!
U(I)=sequenceno.ofcity;
LINK(CITY,CITY):
DIST,!
Thedistancematrix;
X;!
X(I,J)=1ifweuselinkI,J;
ENDSETS
DATA:
!
Distancematrix,itneednotbesymmetric;
DIST=0856
6085
7905
9780;
ENDDATA
!
Themodel:
Ref.Desrochers&Laporte,ORLetters,
Feb.91;
N=@SIZE(CITY);
MIN=@SUM(LINK:
DIST*X);
@FOR(CITY(K):
!
Itmustbeentered;
@SUM(CITY(I)|I#NE#K:
X(I,K))=1;
!
Itmustbedeparted;
@SUM(CITY(J)|J#NE#K:
X(K,J))=1;
!
Weakformofthesubtourbreakingconstraints;
!
Thesearenotverypowerfulforlargeproblems;
@FOR(CITY(J)|J#GT#1#AND#J#NE#K:
运行程序后的结果
Globaloptimalsolutionfound.
Objectivevalue:
23.00000
Extendedsolversteps:
0
Totalsolveriterations:
14
VariableValueReducedCost
N4.0000000.000000
U
(1)0.0000000.000000
U
(2)3.0000000.000000
U(3)1.0000000.000000
U(4)2.0000000.000000
DIST(1,1)0.0000000.000000
DIST(1,2)8.0000000.000000
DIST(1,3)5.0000000.000000
DIST(1,4)6.0000000.000000
DIST(2,1)6.0000000.000000
DIST