以下程序的加亮部分不怎么懂,大家知道应该找什么样的资料学习吗,我不知道是不是要找编程规则之类的书,希望大家多给我建议,先谢谢啦
data model;
array grade{6} grade1-grade6;
length _type_ $ 8 _row_ $ 8 _col_ $ 8;
keep _type_ _row_ _col_ _coef_;
ncust=5;
nmach=4;
ngrade=6;
/* generate the objective function */
_type_='MAX';
_row_='OBJ';
do k=1 to nmach;
do i=1 to ncust;
link readobj; /* read the objective coefficient data */
do j=1 to ngrade;
if grade{j}^=. then do;
_col_='X'||put(i,1.)||put(j,1.)||put(k,1.);
_coef_=grade{j};
output;
end;
end;
end;
end;
/* generate the demand constraints */ do i=1 to ncust; link readdmd; /* read the demand data */ do j=1 to ngrade; if grade{j}^=. then do; _type_='EQ'; _row_='DEMAND'||put(i,1.)||put(j,1.); _col_='_RHS_'; _coef_=grade{j}; output; _type_=' '; do k=1 to nmach; _col_='X'||put(i,1.)||put(j,1.)||put(k,1.); _coef_=1.0; output; end; end; end; end; /* generate the machine constraints */ do k=1 to nmach; link readres; /* read the machine data */ _type_='LE'; _row_='MACHINE'||put(k,1.); _col_='_RHS_'; _coef_=avail; output; _type_=' '; do i=1 to ncust; do j=1 to ngrade; if grade{j}^=. then do; _col_='X'||put(i,1.)||put(j,1.)||put(k,1.); _coef_=grade{j}; output; end; end; end; end; readobj: set object; return; readdmd: set demand; return; readres: set resource; return; run;