Курсовая работа: Моделирование систем
with TShop(Elements[i]).Generator do
if Mean-Disp < Min then Min := Mean-Disp;
{$ifndef Precision}
Result := Min;
{$else}
Result := Min div 10;
{$endif}
end;
procedure TQSheme.InitAnalize;
begin
FSysTime := 0;
FStepCount := 0;
FOrderElementCount := 0;
FLastElements := TList.Create;
FSourceElements := TList.Create;
end;
procedure TQSheme.FreeAnalize;
begin
FLastElements.Free;
FSourceElements.Free;
end;
procedure TQSheme.GetRecipientsOrder;
var i,s : integer;
LastElement : TElement;
begin
if FLastElements.Count = 0 then Exit;
for i := 0 to FLastElements.Count-1 do begin
LastElement := TElement(FLastElements[i]);
FOrder[FOrderElementCount] := FElements.IndexOf(LastElement);