码迷,mamicode.com
首页 > 其他好文 > 详细

LINGO

时间:2015-03-14 08:27:13      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:

model:
sets:
row/1..4/:a,c,e;
col/1..3/:b,d;
link(row,col):x;
endsets
data:
a=18 15 23 12;
b=10 16 8;
c=480 650 580 390;
d=6800 8700 5300;
e=3100 3800 3500 2850;
enddata
    max = @sum(row(i):@sum(col(j):x(i,j))*e(i));

    @for(row(i):@sum(col(j):x(i,j))<=a(i));

    @for(col(j):@sum(row(i):x(i,j))<=b(j));

    @for(col(j):@sum(row(i):x(i,j)*c(i))<=d(j));
End

 

LINGO

标签:

原文地址:http://www.cnblogs.com/Arvin-9/p/4336983.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!