Компьютерное моделирование. Тарасов В.Н - 128 стр.

UptoLike

18
for i:=1 to N do Nzc:=Nzc+Nz[i];
LEN.Text:=floattostrf(Nzc,ffGeneral,3,3);
for i:=1 to N do wc:=wc+w[i]*(la[i]/gmo);
LEW.Text:=floattostrf(wc,ffGeneral,3,3);
for i:=1 to N do Uc:=Uc+U[i]*(la[i]/gmo);
LEU.Text:=floattostrf(Uc,ffGeneral,3,3);
{_____________График__________________}
gmi:=gmo;
Chart1.Series[0].Clear;
bad:=false;
repeat
for i:=1 to N do
for j:=1 to N do
if i=j then A[i,j]:=R[i,j]-1 else A[i,j]:=R[j,i];
for i:=1 to N do la[i]:=-(gm[i]*gmi)/gmo;
Simq(N,A,la);
for i:=1 to N do if Ro[i]>0.9 {mu[i]<=la[i]} then exit;
for i:=1 to N do SMO(la[i],mu[i],m[i],k[i], Ro[i],w[i],Nq[i],Nz[i],U[i],P[i]);
wc:=0;
for i:=1 to N do wc:=wc+w[i]*(la[i]/gmi);
Chart1.Series[0].AddXY(gmi,wc);
gmi:=gmi+0.1;
until bad;
end;
procedure TForm1.PageControl1Changing(Sender: TObject;
var AllowChange: Boolean);
var
i,j:integer;
begin
StringGrid3.RowCount:=N+1;
StringGrid3.Cells[1,0]:='Ro';
StringGrid3.Cells[2,0]:='W';
StringGrid3.Cells[3,0]:='Nq';
StringGrid3.Cells[4,0]:='N';
StringGrid3.Cells[5,0]:='P[1]';
StringGrid3.Cells[6,0]:='P[2]';
StringGrid3.Cells[7,0]:='P[3]';
for i:=1 to N do StringGrid3.Cells[0,i]:='Узел '+inttostr(i);
end;
end.
 for i:=1 to N do Nzc:=Nzc+Nz[i];
 LEN.Text:=floattostrf(Nzc,ffGeneral,3,3);
 for i:=1 to N do wc:=wc+w[i]*(la[i]/gmo);
 LEW.Text:=floattostrf(wc,ffGeneral,3,3);
 for i:=1 to N do Uc:=Uc+U[i]*(la[i]/gmo);
 LEU.Text:=floattostrf(Uc,ffGeneral,3,3);
 {_____________График__________________}
 gmi:=gmo;
 Chart1.Series[0].Clear;
 bad:=false;
 repeat
  for i:=1 to N do
  for j:=1 to N do
   if i=j then A[i,j]:=R[i,j]-1 else A[i,j]:=R[j,i];
  for i:=1 to N do la[i]:=-(gm[i]*gmi)/gmo;
  Simq(N,A,la);
  for i:=1 to N do if Ro[i]>0.9 {mu[i]<=la[i]} then exit;
  for i:=1 to N do SMO(la[i],mu[i],m[i],k[i], Ro[i],w[i],Nq[i],Nz[i],U[i],P[i]);
  wc:=0;
  for i:=1 to N do wc:=wc+w[i]*(la[i]/gmi);
  Chart1.Series[0].AddXY(gmi,wc);
  gmi:=gmi+0.1;
 until bad;
 end;
procedure TForm1.PageControl1Changing(Sender: TObject;
  var AllowChange: Boolean);
  var
  i,j:integer;
begin
  StringGrid3.RowCount:=N+1;
  StringGrid3.Cells[1,0]:='Ro';
  StringGrid3.Cells[2,0]:='W';
  StringGrid3.Cells[3,0]:='Nq';
  StringGrid3.Cells[4,0]:='N';
  StringGrid3.Cells[5,0]:='P[1]';
  StringGrid3.Cells[6,0]:='P[2]';
  StringGrid3.Cells[7,0]:='P[3]';
for i:=1 to N do StringGrid3.Cells[0,i]:='Узел '+inttostr(i);
 end;
end.




                                                                                   18