lingo原料分配问题
发布网友
发布时间:2024-01-08 01:40
我来回答
共1个回答
热心网友
时间:2024-02-25 08:17
model:
sets:
material/1..3/:a,b;
proct/1..3/:c;
schele(material,proct):x;
endsets
data:
a=100 100 60;
b=65 25 35;
c=50 35 25;
enddata
max=@sum(schele(i,j):x(i,j)*(c(j)-b(i)));
@for(material(i):@sum(proct(j):x(i,j))<=a(i));
x(1,1)>=0.5*(x(1,1)+x(2,1)+x(3,1));
x(1,2)>=0.5*(x(1,2)+x(2,2)+x(3,2));
x(2,1)<=0.25*(x(1,1)+x(2,1)+x(3,1));
x(2,2)<=0.5*(x(1,2)+x(2,2)+x(3,2));
end