Курсовая работа: Моделирование систем
begin
TakeParcelsFromFinishElements;
for i := 0 to FOrderElementCount-1 do Elements[FOrder[i]].AskForParcel;
Form1.Gauge1.Progress := Round(FSysTime/FSysPeriod*100);
Inc(FSysTime,FStepPeriod);
Inc(FStepCount);
end;
procedure TQSheme.Analize;
begin
try
try
InitAnalize;
GetOrder;
FStepPeriod := FastestStepPeriod;
finally
FreeAnalize;
end;
except
on EInvalidPointer do raise;
end;
end;
procedure TQSheme.ClearEventQueue;
var i : integer;
begin
if Assigned(FEventQueue) then begin
for i := 0 to FEventQueue.Count - 1 do FreeMem(FEventQueue[i],SizeOf(TEventRec));
FEventQueue.Clear;
end;
end;