说清楚你要做的东西 我只能给你改成这样 是不是跟你的题目符合没法知道
model:
sets:
gong/1..8/;
shou/1..8/;
links(gong,shou):x,m;
endsets
max=x(1,3)+x(2,4);
@for(gong(I):@for(shou(J):@bnd(0,x(I,J),m(I,J))));
@for(links(I,a)|a#ge#3 #and# a#le#5:x(I,a)=@sum(shou(J):x(a,J)));
data:
m=12 0 0 0 0 0 0 0
0 20 0 0 0 0 0 0
12 0 0 0 2 0 0 0
0 20 6 0 0 0 0 0
0 0 3 7 0 0 0 0
0 0 6 0 5 11 0 0
0 0 0 0 8 0 12 4
0 0 0 9 0 0 0 5 ;
enddata