|
I have a question on the following code. I want to go through all three cases first and then go down and update z, sol and cz. Right now the code goes to case 1 and then updates, then case 2 and updates, then case 3 and updates.
for cycles=1:10
switch parte
case 1,
[CmaxIns,InsSch,CTIns,parte]=insertion(z,sol,cz,m,n,M);
Cmaxs(1)=CmaxIns; Progs{1,1}=InsSch; CTimes{1,1}=CTIns;
case 2,
[CmaxIE,IESch,CTIE,parte]=interexch(z,sol,cz,m,M);
Cmaxs(2)=CmaxIE; Progs{2,1}=IESch; CTimes{2,1}=CTIE;
case 3,
[CmaxIAE,IAESch,CTIAE,parte]=intraexch(z,sol,cz,m,M);
Cmaxs(3)=CmaxIAE; Progs{3,1}=IAESch; CTimes{3,1}=CTIAE;
end
[z pos]=min(Cmaxs);
sol=Progs{pos,1};
cz=CTimes{pos,1};
end
Thanks for the help!
|