lingo问题求助——下面式子如何编写lingo代码

2025-04-09 12:02:43
推荐回答(1个)
回答1:

sets:
x/1..106/:m;
y/1..5/:;
link(x,y):p,d,c;
endsets
max=@sum(y(j):@sum(x(i):@sum(x(k)|k#ge#i+1:p(k,j)*m(i)*d(k,j)/p(i,j)-m(i)*c(i,j))));
@for(x(i)|i#le#105:m(i)<=m(i+1));
@for(link:@bin(c);@bin(d));