资源描述:
《北交大LINGO考试1 转运问题等.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、《物流软件》实验报告实验编号:学号:序号::班级:2015年10月一,用lingo解决运输问题(1)建立数学模型设Cij为从工厂Ai销售到销售点Bj运费单价,Xij为从Ai到B觉得运输量,因此总运费为第i个产地的运出量应小于等于该地的需求量第j个销售地的运入量应等于该地的需求量因此得到数学模型如下:Min;s.t.Xij>=0,i=1,2,…,m,j=1,2,…,n.(1)编写相关的模型如下MODEL:SETS:warehouse/1,2,3,4/:a;customer/1,2,3,4,5/:b;ROUTES(WAREHOUSE,CUSTOMER):c,x;ENDSE
2、TSDATA:a=20,15,25,30;b=25,20,15,20,10;c=3,11,3,10,4,1,9,2,8,3,7,4,10,5,6,5,8,2,6,2;enddata[OBJ]min=sum(ROUTES:c*x);FOR(WAREHOUSE(I):[SUP]SUM(CUSTOMER(J):X(I,J))<=a(i));for(customer(j):[dem]sum(warehouse(i):x(i,j))=b(j));End!ROUTES为派生集合名,c,x为属性,c表示运费,x表决策的运量!customer为销售点集合名,1,2,3,4是元素;b为
3、属性,表示需求量!warehouse为库存集合名,1,2,3,4是元素;a为属性,表示产量上限(1)在lingo运行Globaloptimalsolutionfound.Objectivevalue:300.0000Totalsolveriterations:0VariableValueReducedCostA(1)20.000000.000000A(2)15.000000.000000A(3)25.000000.000000A(4)30.000000.000000B(1)25.000000.000000B(2)20.000000.000000B(3)15.00000
4、0.000000B(4)20.000000.000000B(5)10.000000.000000C(1,1)3.0000000.000000C(1,2)11.000000.000000C(1,3)3.0000000.000000C(1,4)10.000000.000000C(1,5)4.0000000.000000C(2,1)1.0000000.000000C(2,2)9.0000000.000000C(2,3)2.0000000.000000C(2,4)8.0000000.000000C(2,5)3.0000000.000000C(3,1)7.0000000.000
5、000C(3,2)4.0000000.000000C(3,3)10.000000.000000C(3,4)5.0000000.000000C(3,5)6.0000000.000000C(4,1)5.0000000.000000C(4,2)8.0000000.000000C(4,3)2.0000000.000000C(4,4)6.0000000.000000C(4,5)2.0000000.000000X(1,1)10.000000.000000X(1,2)0.0000005.000000X(1,3)10.000000.000000X(1,4)0.0000003.0000
6、00X(1,5)0.0000001.000000X(2,1)15.000000.000000X(2,2)0.0000005.000000X(2,3)0.0000001.000000X(2,4)0.0000003.000000X(2,5)0.0000002.000000X(3,1)0.0000006.000000X(3,2)20.000000.000000X(3,3)0.0000009.000000X(3,4)5.0000000.000000X(3,5)0.0000005.000000X(4,1)0.0000003.000000X(4,2)0.0000003.00000
7、0X(4,3)5.0000000.000000X(4,4)15.000000.000000X(4,5)10.000000.000000RowSlackorSurplusDualPriceOBJ300.0000-1.000000SUP(1)0.0000000.000000SUP(2)0.0000002.000000SUP(3)0.0000002.000000SUP(4)0.0000001.000000DEM(1)0.000000-3.000000DEM(2)0.000000-6.000000DEM(3)0.000000-3.000000DEM(4)0.