资源描述:
《Lingo解决邮局所需员工问题》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、某邮局每天需一定数量的全职员工:星期一,17;星期二,13;星期三,15;星期四,19;星期五,14;星期六,16;星期日,11.全职员工连续工作5天后休息2天.问该邮局学要多少员工?LINGOModel如下:model:sets:worker/1..5/:;job/1..4/:;link(worker,job):t,x;endsetsdata:t=2218301818100272226202828162210014211002528;enddatamin=@sum(link:t*x);@for(worker(i):@sum(job(j):x(i,j))<=1);@for(job(j):@s
2、um(worker(i):x(i,j))=1);@for(link:@bin(x));End运算结果:Globaloptimalsolutionfound.Objectivevalue:75.00000Objectivebound:75.00000Infeasibilities:0.000000Extendedsolversteps:0Totalsolveriterations:0ModelClass:PILPTotalvariables:20Nonlinearvariables:0Integervariables:20Totalconstraints:10Nonlinearconstrai
3、nts:0Totalnonzeros:60Nonlinearnonzeros:0VariableValueReducedCostT(1,1)22.000000.000000T(1,2)18.000000.000000T(1,3)30.000000.000000T(1,4)18.000000.000000T(2,1)18.000000.000000T(2,2)100.00000.000000T(2,3)27.000000.000000T(2,4)22.000000.000000T(3,1)26.000000.000000T(3,2)20.000000.000000T(3,3)28.000000
4、.000000T(3,4)28.000000.000000T(4,1)16.000000.000000T(4,2)22.000000.000000T(4,3)100.00000.000000T(4,4)14.000000.000000T(5,1)21.000000.000000T(5,2)100.00000.000000T(5,3)25.000000.000000T(5,4)28.000000.000000X(1,1)0.00000022.00000X(1,2)1.00000018.00000X(1,3)0.00000030.00000X(1,4)0.00000018.00000X(2,1)
5、1.00000018.00000X(2,2)0.000000100.0000X(2,3)0.00000027.00000X(2,4)0.00000022.00000X(3,1)0.00000026.00000X(3,2)0.00000020.00000X(3,3)0.00000028.00000X(3,4)0.00000028.00000X(4,1)0.00000016.00000X(4,2)0.00000022.00000X(4,3)0.000000100.0000X(4,4)1.00000014.00000X(5,1)0.00000021.00000X(5,2)0.000000100.0
6、000X(5,3)1.00000025.00000X(5,4)0.00000028.00000RowSlackorSurplusDualPrice175.00000-1.00000020.0000000.00000030.0000000.00000041.0000000.00000050.0000000.00000060.0000000.00000070.0000000.00000080.0000000.00000090.0000000.000000100.0000000.000000结果分析:共需要75名员工