sequencingphase.m
来自「這一個排程的程式」· M 代码 · 共 31 行
M
31 行
%(c) by Jing Feng Deng (jiing) at 2002
function Sj=sequencingPhase(ExjobStageProcTime)
global numOfMPS
disp('======== The Sequencing Phase Begins ========')
p=ExjobStageProcTime;
p=[6 0 0 3 0
0 3 1 0 5
3 2 1 3 2
4 5 0 3 0
0 0 6 0 4]
Wi=sum(p,2)'
W=sum(Wi)
pk=sum(p,1)
for ix=1:size(p,1)
for jx=1:size(p,2)
oij_matrix(ix,jx)=p(ix,jx)-pk(jx)*Wi(ix)/W;
end
end
oij_matrix
[maxY,Ind]=min(sum( oij_matrix.*(oij_matrix>0) ,1 ));
Oi{Ind}=oij_matrix(:,Ind);
Sj=Ind;
while length(Sj)<size(p,2)
Oi=[]; %
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?