01整数规划的lingo语言问题MODEL: sets: factory/1..5/:a,f,z; warhouse/1..3/:c; link(factory,warhouse):m,x; endsets data: a=30 10 20 30 40; f=100 175 300 375 500; c=30 20 20;m=8 5 4 9 10 4 2 3 7 4 3 3 4 5 2;enddata min=@sum (warhouse (
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/29 00:16:57
01整数规划的lingo语言问题MODEL: sets: factory/1..5/:a,f,z; warhouse/1..3/:c; link(factory,warhouse):m,x; endsets data: a=30 10 20 30 40; f=100 175 300 375 500; c=30 20 20;m=8 5 4 9 10 4 2 3 7 4 3 3 4 5 2;enddata min=@sum (warhouse (
01整数规划的lingo语言问题
MODEL:
sets:
factory/1..5/:a,f,z;
warhouse/1..3/:c;
link(factory,warhouse):m,x;
endsets
data:
a=30 10 20 30 40;
f=100 175 300 375 500;
c=30 20 20;
m=8 5 4 9 10
4 2 3 7 4
3 3 4 5 2;
enddata
min=@sum (warhouse (j):@sum (factory (i):m (i,j)*x (i,j)*z (i)))
+@sum(factory(i):f(i)*z (i));
@for(factory(i):@sum(warhouse(j):x(i,j))<=a(i));
@for(factory:@bin(z));
@for(factory(i):@sum(factory(i):x(i,j))<=9999999*z(j));
@for(warhouse(j):@sum(factory(i):x(i,j))<=c(j));
这句有问题 @for(warhouse(j):@sum(factory(i):x(i,j))<=c(j));
f表示固定成本.在A1-A5中选择一个或几个的案例
模型如图,求最小成本的
01整数规划的lingo语言问题MODEL: sets: factory/1..5/:a,f,z; warhouse/1..3/:c; link(factory,warhouse):m,x; endsets data: a=30 10 20 30 40; f=100 175 300 375 500; c=30 20 20;m=8 5 4 9 10 4 2 3 7 4 3 3 4 5 2;enddata min=@sum (warhouse (
前一句 @for(factory(i):@sum(warhouse(j):x(i,j))