怎么用lingo去解决?
发布网友
发布时间:2022-04-30 20:24
我来回答
共1个回答
热心网友
时间:2022-07-01 10:08
model:
sets:
Warehouse/w1..w4/:F,g,P,k;
Customer/c1..c6/:M;
Tr/tr1..tr4/:X;
Link(warehouse,customer):a,v,s,d;
endsets
data:
F=120 140 180 150;
P=190 80 80 75;
g=34 32 35 32;
s=190 90 80 120 70 150
80 75 90 85 120 150
80 90 80 100 95 160
75 100 100 80 100 95;
a=10;
v=40;
k=0.5;
enddata
Min=@sum(warehouse(i):X(i)*F(i))+@sum(warehouse(i):X(i)*g(i)*(P(i)^k))+@sum(link(i,j):a(i,j)*s(i,j)*d(i,j));
@for(warehouse(i):@sum(link(i,j):d(i,j))<=(X(i)*P(i)));
@for(customer(j):@sum(link(i,j):d(i,j))>=(M(j)));
@for(warehouse(i):@max(link(i,j):(s(i,j)/v))<=4.8);
@sum(tr(i):X(i))<=4;
@for(tr(i):@bin(X));
end