线性最优化的LINGO程序举例 使用LINGO软件计算6个发点8个收点的最小费用运输问题。产销单位运价如下表。单位 销地运价产地 B1 B2 B3 B4 B5 B6 B7 B8 产量A1 6 2 6 7 4 2 5 9 60A2 4 9 5 3 8 5 8 2 55A3 5 2 1 9 7 4 3 3 51A4 7 6 7 3 9 2 7 1 43A5 2 3 9 5 7 2 6 5 41A6 5 5 2 2 8 1 4 3 52销量 35 37 22 32 41 32 43 38使用LINGO软件,编制程序如下:model:6发点8收点运输问题;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))(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 54 9 5 3 8 5 8 25 2 1 9 7 4 3 37 6 7 3 9 2 7 12 3 9 5 7 2 6 55 5 2 2 8 1 4 3;enddataend
急急!!使用lingo求解最优化问题,我的电脑lingo软件好就没用,今天开出来进用不了了,麻烦大家帮下忙吧 截图就算了,太麻烦了,还要审查,附上程序和结果max=175*x1+300*x2+120*x3+3.5*y2+450*y1+6.8*x+7*y;x1+x2+x3+1.5*y1;400*y1+y2;20*x1+35*x2+10*x3+100*y1+0.6*y2+x=3500;30*x1+75*x2+40*x3+50*y1+0.3*y2+y=4000;y1;y2;运行结果:Global optimal solution found.Objective value:51800.00Total solver iterations:0Variable Value Reduced CostX1 0.000000 171.0000X2 0.000000 463.0000X3 0.000000 228.0000Y2 0.000000 2.680000Y1 0.000000 580.0000X 3500.000 0.000000Y 4000.000 0.000000Row Slack or Surplus Dual Price1 51800.00 1.0000002 100.0000 0.0000003 25000.00 0.0000004 0.000000 6.8000005 0.000000 7.0000006 32.00000 0.0000007 3000.000 0.000000
lingo最优化问题 model:sets:jihe1/1.12/;jihe2/1.47/:b;jihe(jihe1,jihe2):x;endsetsdata:b=34 34 34 34 34 34 34 34 34 3446 46 46 4685 85 85 85128 128 128142 142 142 142 142 142 142 142142 142 142 142142 142 142 142142 142 142 194 194 194 194 194 215 350;enddatamin=sum(jihe1(i):@abs(@sum(jihe2(j):b(j)*x(i,j))-360));for(jihe:@bin(x));for(jihe1(i):@sum(jihe2(j):x(i,j)));for(jihe2(j):@sum(jihe1(i):x(i,j))=1);sum(jihe:x)=47;运行时间一分钟左右结果如下Local optimal solution found.Objective value:1161.000 最优解Objective bound:1161.000Infeasibilities:0.000000Extended solver steps:128Total solver iterations:8383不懂再问,自己运行吧 字数达到上限了,答案绝对正确采纳哦 亲