Градиентный метод первого порядка
Дипломная работа - Компьютеры, программирование
Другие дипломы по предмету Компьютеры, программирование
MinProcessor:=PPossibleMove(AllMoves[i]).ProcCount;:=0;iCurUIN then break;workPPM.processor<MinProcessor then
MinProcessor:=workPPM.processor;:=j+1;;;(PPM.CurrentState)or(PPM.processor>MinProcessor).delete(i);(PPM);i:=i+1;:=0;MinTime = CurTime theni<AllMoves.Count do:=AllMoves[i];:=GetProcTaskByUIN(PPM.UIN);PPM.processor = PPT.ProcNum then.delete(i);(PPM);i:=i+1;:=AllMoves.Count-1;i:=0 to AllMoves.Count-2 do:=AllMoves[i];:=AllMoves[BestFit];(PPM.Time<bestPPM.Time)or
((PPM.Time=bestPPM.Time)and(PPM.ProcCount-1 then
(GetProcTaskByUIN(bestPPM.afterUIN)).MayBeAfter:=true;(bestPPM.processor,bestPPM.afterUIN);GetProcCountnil then L2.Caption:=inttostr(bestPPM.ProcCount);:=trueResult:=false;
//-->>
{ Memo.Lines.Add('');.Lines.Add('--- Min ---');.Lines.Add('');i:=0 to AllMoves.Count-1 do:=AllMoves[i];.Lines.Add(inttostr(PPM.UIN)+' <>
'+inttostr(PPM.processor)+':'+inttostr(PPM.afterUIN)+' Time=
'+inttostr(PPM.Time)+' PC='+inttostr(PPM.ProcCount));PPM.CurrentState then Memo.Lines.Add('Was current state!');}
//<<--(AllMoves);;;ComparePPT(Item1, Item2: Pointer): Integer;PProcTask(Item1).StartTime<PProcTask(Item2).StartTime then Result:=-
1PProcTask(Item1).StartTime>PProcTask(Item2).StartTime then Result:=1
else Result:=0;TSubMerger.OptimizeAuto(Form:TForm;L1,L2:TLabel);i,j,k:integer;,UINList:TList;,nextPPT:PProcTask;:integer;:boolean;:TList;:integer;:boolean;,NewStartFrom:integer;:TList;:integer;OptimizeOneStep(L1,L2) do Form.Update;:=GetTime;:=TList.Create;:=0;:=NewStartFrom;:=true;i:=0 to Procs.Count-2 do:=i+1;:=Procs[i];j:=0 to List.Count-1 do UINList.Add(List[j]);:=Procs[i+1];j:=0 to List.Count-1 do UINList.Add(List[j]);.Sort(ComparePPT);:=false;:=UINList.first;j:=1 to UINList.Count-1 do:=UINList[j];(PPT.StartTime = nextPPT.StartTime) or
(PPT.StartTime+PPT.Length>nextPPT.StartTime) then:=true;;:=nextPPT;;not MatchError then(BackList);:=GetTime;:=Procs.Count-1;(true);(false);j:=0 to UINList.Count-1 do:=UINList[j];.ProcNum:=i+1;.delete(AllProcTasks.indexOf(PPT));;j:=0 to AllProcTasks.Count-1 do:=AllProcTasks[j];PPT.ProcNum>i+1 then PPT.ProcNum:=PPT.ProcNum-1;j:=0 to UINList.Count-1 do AllProcTasks.add(UINList[j]);(NOP);BackTime>=GetTime then:=false;:=0;BackList.Count<>0 do:=BackList.first;.delete(0);(PPT);RestoreBackUp(BackList,NOP+1,true);;;.Clear;;.Clear;NoChange;.Destroy;;TSubMerger.SaveBackUp(var List:Tlist);backPPT,PPT:PProcTask;:integer;:=TList.Create;i:=0 to AllProcTasks.Count-1 do:=AllProcTasks[i];(backPPT);^:=PPT^;.Prev:=nil;.add(backPPT);;;TSubMerger.RestoreBackUp(var
List:Tlist;NOP:integer;ClearCurrent:boolean);backPPT,PPT:PProcTask;:integer;:=nil;(true);(true);i:=0 to List.Count-1 do:=List[i];(PPT);^:=backPPT^;.add(PPT);ClearCurrent then dispose(backPPT);;ClearCurrent then List.Destroy;(NOP);;.