lingo程序编写--不知道哪里出了问题,
lingo程序编写--不知道哪里出了问题,
model:
集合定义;
sets:
wh/w1..w6/:ai;
vd/v1..v8/:dj;
links(wh,vd):c,x;
endsets
数据初始化;
data:
ai=60,55,51,43,41,52;
dj=35,37,22,32,41,32,43,38;
c=6,2,6,7,4,2,5,9
4,9,5,3,8,5,8,2
5,2,1,9,7,4,3,3
7,6,7,3,9,2,7,1
2,3,9,5,7,2,6,5
5,5,2,2,8,1,4,3;
enddata
目标函数;
min=@sum(links(i,j):c(i,j)*x(i,j));
求和的不等式约束条件;
@for(wh(i):@sum(vd(j):x(i,j))