Курсовая работа: Моделирование систем
FElements.Remove(Element);
end;
end;
function TQSheme.IsFinishElement(Element: TElement):Boolean;
var j,s : integer;
begin
Result := False;
for j := 0 to ElementCount-1 do begin
for s := 0 to Elements[j].SourceCount-1 do begin
if Element = Elements[j].Sources[s] then Exit;
end;
end;
Result := True;
end;
procedure TQSheme.FindFinishElements;
var i : integer;
begin
for i := 0 to ElementCount-1 do
if IsFinishElement(Elements[i]) then begin
FFinishElements.Add(Elements[i]);
FLastElements.Add(Elements[i]);
end;
end;
function TQSheme.FastestStepPeriod: TCustTime;
var i : integer;
Min : TCustTime;
begin
Min := FSysPeriod;
for i := 0 to ElementCount-1 do