MODEL:
SETS:
CUTFA/1..6/:x;
CUTFAA/1..11/:y;
!切割的方法有17种,x表示对应1-6种切割方法的原料钢管的需求量,y表示对应7-17种切割方法的原料钢管的需求量;
BUJ/1..3/:n,b;
!3种钢管,b表示钢管长度,n表示每种钢管的需求量;
SHUL(BUJ,CUTFA):R;
SHULA(BUJ,CUTFAA):S;
!第I种切割方法所切出的第J种钢管的数量用NIJ表示;
ENDSETS
DATA:
B=1.5,1.8,1.2;
N=16500,12000,8000;
ENDDATA
MIN=@SUM(CUTFA(j):x(j))+@sum(CUTFAA(j):y(j));
!目标函数时17种切割方法所切割的钢管总根数最少;
@FOR(buj(i):
@sum(buj(j):r(j,i)*x(i))+@sum(buj(j):s(i,j)*y(i))
>n(i));
!切割出的每种部件总数满足需求量;
@FOR(cutfa(i):@sum(buj(j):r(j,i)*b(j))=2.8);
@FOR(cutfaa(i):@sum(buj(j):s(j,i)*b(j))=4.8);
@sum(cutfa(i):x(i))