((t[i]*t[i]-t[1]*t[1])/(2*b[i]));
For i:=3 to 4 do
begin
if i=3 then B4[3]:=(p[1]*p[i]/(1-R[1]))*
Продолжение приложения А
((t[i]*t[i]-t[1]*t[1])/(2*b[i]))
else
begin
B4[3]:=(p[1]*p[i]/(1-R[1]))*
((t[i]*t[i]-t[1]*t[1])/(2*b[i]));
q:=B4[3]/(1-R[2]);
B4[3]:=B4[3]+B4[3]/(1-R[2]);
end;
end;
B4[4]:=(p[1]*p[4]/(1-R[1]))*
((t[4]*t[4]-t[1]*t[1])/(2*b[4]));
B4[4]:=B4[4]+q;
B4[4]:=B4[4]+(p[1]*p[3]/(1-R[3]))*
((t[4]*t[4]-t[3]*t[3])/(2*b[4]))/(1-R[4]);
For i:=1 to 4 do N[i]:=R[i]*(t[i+1]-t[i])/(1-R[i]);
T4[1]:=N[1];
For i:=2 to 4 do T4[i]:=T4[i-1]+N[i];
For i:=1 to 4 do sum:=sum+p[i]*t[i]*t[i]/(2*b[i]);
{--------------------------------------------3расч}
For i:=1 to 4 do
begin
ls1:=ls1+l[i];
Vrem3:= Vrem3+l[i]*l[i]*l[i]/constS*constS;
if i=1 then R[i]:=p[i] else R[i]:=R[i-1]+p[i];
if i=1 then svo3[i]:= Vrem3/2*(1-R[i])
else svo3[i]:= Vrem3/2*(1-R[i-1])*(1-R[i]);
end;
{--------------------------------------------}
{расчет СВО}
X[1]:=svo3[1]*p[1];
For i:=2 to 4 do X[i]:=X[i-1]+svo3[i]*p[i];
For i:=1 to 4 do
begin
svo4[i]:=X[i]*sum*B4[i]*T4[i];
Продолжение приложения А
sp4:=sp4+svo4[i];
end;
Form8.ShowModal;
end;
end.
unit Unit2;
interface
uses
Unit1, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Edit9: TEdit;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
GroupBox3: TGroupBox;
Label1: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
Edit8: TEdit;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
c[1]:=StrToFloat(Edit1.Text);
c[2]:=StrToFloat(Edit2.Text);
c[3]:=StrToFloat(Edit3.Text);
c[4]:=StrToFloat(Edit4.Text);
l[1]:=StrToFloat(Edit5.Text);
l[2]:=StrToFloat(Edit6.Text);
l[3]:=StrToFloat(Edit7.Text);
l[4]:=StrToFloat(Edit8.Text);
constS:=StrToFloat(Edit9.Text);
close;
end;
end.
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm3 = class(TForm)
Button1: TButton;
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
procedure Button1Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TForm3.FormActivate(Sender: TObject);
begin
Edit1.Text:=FloatToStr(svp1);
Edit2.Text:=FloatToStr(svo1);
Edit3.Text:=FloatToStr(sp1);
end;
end.
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm4 = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
StaticText2: TStaticText;
Button1: TButton;
Panel1: TPanel;
Image1: TImage;
StaticText1: TStaticText;
GroupBox2: TGroupBox;
StaticText3: TStaticText;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
{$R *.dfm}
procedure TForm4.Button1Click(Sender: TObject);
begin
close;
end;
end.
unit Unit5;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm5 = class(TForm)
Button1: TButton;
Panel1: TPanel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form5: TForm5;
implementation
{$R *.dfm}
procedure TForm5.Button1Click(Sender: TObject);
begin
close;
end;
end.
unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm6 = class(TForm)
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Button1: TButton;
Edit5: TEdit;
GroupBox3: TGroupBox;
Label5: TLabel;
Label6: TLabel;
procedure FormActivate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form6: TForm6;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm6.FormActivate(Sender: TObject);
begin
Edit1.Text:=FloatToStr(svo2[1]);
Edit2.Text:=FloatToStr(svo2[2]);
Edit3.Text:=FloatToStr(svo2[3]);
Edit4.Text:=FloatToStr(svo2[4]);
Edit5.Text:=FloatToStr(sp2);
end;
procedure TForm6.Button1Click(Sender: TObject);
begin
close
end;
end.
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm7 = class(TForm)
Button1: TButton;
GroupBox1: TGroupBox;
GroupBox3: TGroupBox;
Label5: TLabel;
Label6: TLabel;
GroupBox2: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
procedure FormActivate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form7: TForm7;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm7.FormActivate(Sender: TObject);
begin
Edit1.Text:=FloatToStr(svo3[1]);
Edit2.Text:=FloatToStr(svo3[2]);
Edit3.Text:=FloatToStr(svo3[3]);
Edit4.Text:=FloatToStr(svo3[4]);
Edit5.Text:=FloatToStr(sp3);
end;
procedure TForm7.Button1Click(Sender: TObject);
begin
close;
end;
end.
unit Unit8;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm8 = class(TForm)
Button2: TButton;
GroupBox1: TGroupBox;
GroupBox3: TGroupBox;
Label5: TLabel;
Label6: TLabel;
GroupBox2: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
procedure Button1Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form8: TForm8;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm8.Button1Click(Sender: TObject);
begin
close;
end;
procedure TForm8.FormActivate(Sender: TObject);
begin
Edit1.Text:=FloatToStr(svo4[1]);
Edit2.Text:=FloatToStr(svo4[2]);
Edit3.Text:=FloatToStr(svo4[3]);
Edit4.Text:=FloatToStr(svo4[4]);
Edit5.Text:=FloatToStr(sp4);
end;
end.