如何用lingo编程解决运输问题,题目如下
发布网友
发布时间:2022-05-01 13:18
我来回答
共1个回答
热心网友
时间:2023-10-14 15:22
sets:
s1/1..3/:c,d;
s2/1..3/:e;
s12(s1,s2):f,x;
endsets
data:
c=6 7 4;
d=11 7 99;
e=10 4 6;
f=2 4 3
1 5 6
3 2 4;
enddata
min=@sum(s12:f*x);
@for(s1(i):@sum(s2(j):x(i,j))<=d(i); @sum(s2(j):x(i,j))>=c(i));
@for(s2(j):@sum(s1(i):x(i,j))=e(j));
热心网友
时间:2023-10-14 15:22
sets:
s1/1..3/:c,d;
s2/1..3/:e;
s12(s1,s2):f,x;
endsets
data:
c=6 7 4;
d=11 7 99;
e=10 4 6;
f=2 4 3
1 5 6
3 2 4;
enddata
min=@sum(s12:f*x);
@for(s1(i):@sum(s2(j):x(i,j))<=d(i); @sum(s2(j):x(i,j))>=c(i));
@for(s2(j):@sum(s1(i):x(i,j))=e(j));