运筹学 下料问题

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

MODEL:

sets:

row/1..3/:b;

arrange/1..8/:x,c;

link(row,arrange):a;

endsets

data:

b=100,200,300;

c=0,1,0.5,1.5,1.5,0,0.5,1;

a=2,1,1,1,0,0,0,0,

0,1,2,0,3,2,1,0,

1,1,0,2,0,2,3,4;

enddata

[OBJ]min=@sum(arrange(j):c(j)*x(j));

@for(row(i):@sum(arrange(j):a(i,j)*x(j))=b(i;));

@for(arrange(j):x(j)>=0;@gin(x(j)););

end

model:

sets:

row/1..3/:a;

arrange/1..4/:b;

link(row,arrange):c,x;

endsets

data:

a=2500,2500,5000;

b=1500,2000,3000,3500;

c=10,5,6,7,

8,2,7,6,

9,3,4,8;

enddata

[obj]max=@sum(link(i,j):c(i,j)*x(i,j));

@for(row(i):@sum(arrange(j):x(i,j))=a(i););

@for(arrange(j):@sum(row(i):x(i,j))=b(j););

@for(link(i,j):x(i,j)>=0;);

end

model:

sets:

row/1,2/;

arrange1/1..3/;

arrange2/1..4/;

link1(row,arrange1):x;

link2(row,arrange2):y;

endsets

[obj]min=2*x(1,1)+3*x(1,2)+3*x(2,1)+x(2,2)+4*x(2,3)+2*y(1,1)+6*y(1,2)+3 *y(1,3)+6*y(1,4)+4*y(2,1)+4*y(2,2)+6*y(2,3)+5*y(2,4);

x(1,1)+x(1,2)=600;

x(2,1)+x(2,2)+x(2,3)=400;

-x(1,1)-x(2,1)+y(1,1)+y(1,2)+y(1,3)+y(1,4)=0; -x(1,2)-x(2,2)+y(2,1)+y(2,2)+y(2,3)+y(2,4)=0; y(1,1)+y(2,1)=200;

y(1,2)+y(2,2)=150;

y(1,3)+y(2,3)=350;

x(2,3)+y(1,4)+y(2,4)=300;

x(1,3)=0;

end

相关文档
最新文档