Өзбекстан республикасы жоқары ҳӘм орта арнаўлы билимлендириў министрлиги


Download 1.38 Mb.
bet24/24
Sana01.03.2023
Hajmi1.38 Mb.
#1239711
1   ...   16   17   18   19   20   21   22   23   24
Bog'liq
Д И С С Е Р Т А Ц И Я Шхиев

Қ О С Ы М Ш А
unit untGlobVars;
interface
var
alfa,ksi,bt : array[1..50] of Real;
bz : array[0..50] of shortint;
a,teta : array[1..50,1..50] of Real;
au,ab,t : array[1..50,1..50] of Real;
eps : Real;
n,nit,m,k : Integer;
xn,xn1,zn,
zn1,xc : array[1..100] of Single;
flen : byte;
pralfa,prlt,
prbt,prau,
prab,praij,
prtheta : boolean;
implementation
end.

unit untModuls;


interface
function rs(kk:integer):real;
function ds(kk:integer):real;
procedure GenTeta;
procedure Evala;
function dta(a1,a2:integer):byte;
function GetMinI:byte;
procedure EvalKsi(p:byte);
procedure EvalZn1;
procedure EZnZn1;
procedure EvalXn1;
procedure EXnXn1;
procedure PrintRez;
procedure PrintRezA;

implementation


uses untGlobVars;
function rs(kk:integer):real;
begin
rs:=1/(1+kk);
end;
function ds(kk:integer):real;
begin
if kk=0 then
ds:=1
else
ds:=1/exp((3/4)*ln(1+kk));
end;
procedure GenTeta;
var
kl1,kl2:integer;
begin
randomize;
for kl1:=1 to n do
for kl2:=1 to n do
teta[kl1,kl2]:=random(10000)/10000;
case nit of
0:begin
teta[1,1]:=0.3177;teta[1,2]:=0.6814;teta[1,3]:=0.7990;
teta[2,1]:=0.1248;teta[2,2]:=0.1086;teta[2,3]:=0.6220;
teta[3,1]:=0.5246;teta[3,2]:=0.3459;teta[3,3]:=0.4636;
end;
1:begin
teta[1,1]:=0.2866;teta[1,2]:=0.5326;teta[1,3]:=0.6363;
teta[2,1]:=0.4313;teta[2,2]:=0.0810;teta[2,3]:=0.2047;
teta[3,1]:=0.1304;teta[3,2]:=0.1373;teta[3,3]:=0.5454;
end;
2:begin
teta[1,1]:=0.1304;teta[1,2]:=0.3960;teta[1,3]:=0.5685;
teta[2,1]:=0.6262;teta[2,2]:=0.4508;teta[2,3]:=0.1637;
teta[3,1]:=0.4515;teta[3,2]:=0.3177;teta[3,3]:=0.7110;
end;
3:begin
teta[1,1]:=0.7563;teta[1,2]:=0.4461;teta[1,3]:=0.8149;
teta[2,1]:=0.3422;teta[2,2]:=0.1993;teta[2,3]:=0.7040;
teta[3,1]:=0.9452;teta[3,2]:=0.0020;teta[3,3]:=0.1721;
end;
4:begin
teta[1,1]:=0.6594;teta[1,2]:=0.4792;teta[1,3]:=0.5420;
teta[2,1]:=0.7466;teta[2,2]:=0.0717;teta[2,3]:=0.1646;
teta[3,1]:=0.5058;teta[3,2]:=0.9141;teta[3,3]:=0.6787;
end;
end;
end;
procedure Evala;
var
e1,e2:integer;
begin
randomize;
for e1:=1 to n do
for e2:=1 to n do
a[e1,e2]:=(au[e1,e2]-ab[e1,e2])*teta[e1,e2]+ab[e1,e2];//random(1)+ab[e1,e2];
end;
function dta(a1,a2:integer):byte;
begin
if a1=a2 then dta:=1 else dta:=0;
end;
function GetMinI:byte;
var
i,j:integer;
s,s1:real;
begin
s1:=0;
GetMinI:=1;
for j:=1 to n do
s1:=s1+a[1,j]*xn[j];
if alfa[1]=0 then s1:=0 else s1:=s1/alfa[1];
for i:=2 to n do
begin
s:=0;
for j:=1 to n do
s:=s+a[i,j]*xn[j];
if alfa[i]=0 then s:=0 else s:=s/alfa[i];
if s1>s then
begin
s1:=s;
GetMinI:=i;
end;
end;
end;
procedure EvalKsi(p:byte);
var
i:integer;
begin
for i:=1 to n do
if i=p then
ksi[i]:=1-a[p,i]
else
ksi[i]:=-a[p,i];
end;
procedure EvalZn1;
var
i:integer;
begin
for i:=1 to n do
zn1[i]:=zn[i]+ds(nit)*(ksi[i]-zn[i]);
end;

procedure EZnZn1;


var
i:integer;
begin
for i:=1 to n do
zn[i]:=zn1[i];
end;
procedure EvalXn1;
var
i:integer;
begin
for i:=1 to n do
xn1[i]:=xn[i]+rs(nit)*(xc[i]-xn[i]);
end;
procedure EXnXn1;
var
i:integer;
begin
for i:=1 to n do
xn[i]:=xn1[i];
end;
procedure PrintRez;
var
i,j:integer;
tf:textfile;
begin
assignfile(tf,'rez.txt');
rewrite(tf);
writeln(tf,'Итерация=',nit);
writeln(tf,'---------------------------------------------------');
writeln(tf,'alfa');
for i:=1 to n do
writeln(tf,alfa[i]:10);
writeln(tf);
writeln(tf,'---------------------------------------------------');
writeln(tf,'t');
for i:=1 to m do
begin
for j:=1 to n do
write(tf,t[i,j]:flen);
writeln(tf);
end;
writeln(tf,'---------------------------------------------------');
writeln(tf,'bz');
for i:=1 to m do
write(tf,bz[i]);
writeln(tf);
writeln(tf,'---------------------------------------------------');
writeln(tf,'T');
for i:=1 to m do
writeln(tf,bt[i]:flen);
writeln(tf);
writeln(tf,'---------------------------------------------------');
writeln(tf,'teta');
for i:=1 to n do
begin
write(tf,i:3);
for j:=1 to n do
write(tf,teta[i,j]:flen);
writeln(tf);
end;
writeln(tf,'---------------------------------------------------');
writeln(tf,'Au');
for i:=1 to n do
begin
write(tf,i:3);
for j:=1 to n do
write(tf,au[i,j]:flen);
writeln(tf);
end;
writeln(tf,'---------------------------------------------------');
writeln(tf,'Ab');
for i:=1 to n do
begin
write(tf,i:3);
for j:=1 to n do
write(tf,ab[i,j]:flen);
writeln(tf);
end;
writeln(tf,'---------------------------------------------------');
writeln(tf,'Aij');
for i:=1 to n do
begin
write(tf,i:3);
for j:=1 to n do
write(tf,a[i,j]:flen);
writeln(tf);
end;
writeln(tf,'---------------------------------------------------');
writeln(tf,'Ksi');
for i:=1 to n do
writeln(tf,ksi[i]:flen);
writeln(tf,'---------------------------------------------------');
writeln(tf,'Z1');
for i:=1 to n do
writeln(tf,zn1[i]:flen);
writeln(tf,'---------------------------------------------------');
writeln(tf,'Xc');
for i:=1 to n do
writeln(tf,xc[i]:flen);
writeln(tf,'---------------------------------------------------');
writeln(tf,'Xn1');
for i:=1 to n do
writeln(tf,xn1[i]:flen);
closefile(tf);
end;

Итерация=0


---------------------------------------------------
alfa
4.0E-0001
5.0E-0001
1.0E-0001

---------------------------------------------------


t
6.000000E-0001 7.000000E-0001 3.000000E-0001
---------------------------------------------------
bz
-1
---------------------------------------------------
T
3.000000E+0000

---------------------------------------------------


teta
1 3.177000E-0001 6.814000E-0001 7.990000E-0001
2 1.248000E-0001 1.086000E-0001 6.220000E-0001
3 5.246000E-0001 3.459000E-0001 4.636000E-0001
---------------------------------------------------
Au
1 7.400000E-0001 3.800000E-0001 4.200000E-0001
2 2.900000E-0001 3.200000E-0001 6.100000E-0001
3 2.800000E-0001 3.000000E-0001 4.900000E-0001
---------------------------------------------------
Ab
1 2.000000E-0001 2.800000E-0001 3.200000E-0001
2 1.200000E-0001 1.800000E-0001 4.400000E-0001
3 1.400000E-0001 1.600000E-0001 1.200000E-0001
---------------------------------------------------
Aij
1 3.715580E-0001 3.481400E-0001 3.999000E-0001
2 1.412160E-0001 1.952040E-0001 5.457400E-0001
3 2.134440E-0001 2.084260E-0001 2.915320E-0001
---------------------------------------------------
Ksi
6.284420E-0001
-3.481400E-0001
-3.999000E-0001
---------------------------------------------------
Z1
6.284420E-0001
-3.481400E-0001
-3.999000E-0001
---------------------------------------------------
Xc
0.000000E+0000
0.000000E+0000
0.000000E+0000
---------------------------------------------------
Xn1
0.000000E+0000
0.000000E+0000
0.000000E+0000
Итерация=1
---------------------------------------------------
alfa
4.000000E-0001 5.000000E-0001 1.000000E-0001
---------------------------------------------------
t
6.000000E-0001 7.000000E-0001 3.000000E-0001
---------------------------------------------------
bz
-1
---------------------------------------------------
T
3.000000E+0000
---------------------------------------------------
teta
1 2.866000E-0001 1 5.326000E-0001 1 6.363000E-0001
2 4.313000E-0001 2 8.100000E-0002 2 2.047000E-0001
3 1.304000E-0001 3 1.373000E-0001 3 5.454000E-0001
---------------------------------------------------
Au
1 7.400000E-0001 1 3.800000E-0001 1 4.200000E-0001
2 2.900000E-0001 2 3.200000E-0001 2 6.100000E-0001
3 2.800000E-0001 3 3.000000E-0001 3 4.900000E-0001
---------------------------------------------------
Ab
1 2.000000E-0001 1 2.800000E-0001 1 3.200000E-0001
2 1.200000E-0001 2 1.800000E-0001 2 4.400000E-0001
3 1.400000E-0001 3 1.600000E-0001 3 1.200000E-0001
---------------------------------------------------
Aij
3.547640E-0001 3.332600E-0001 3.836300E-0001
1.933210E-0001 1.913400E-0001 4.747990E-0001
1.582560E-0001 1.792220E-0001 3.217980E-0001
---------------------------------------------------
Ksi
6.452360E-0001
-3.332600E-0001
-3.836300E-0001
---------------------------------------------------
Z1
6.384278E-0001
-3.392923E-0001
-3.902258E-0001
---------------------------------------------------
Z0
6.284420E-0001
-3.481400E-0001
-3.999000E-0001
---------------------------------------------------
Xc
5.000000E+0000
0.000000E+0000
0.000000E+0000
---------------------------------------------------
Xn1
2.500000E+0000
0.000000E+0000
0.000000E+0000
Итерация=2
---------------------------------------------------
alfa
4.000000E-0001 5.000000E-0001 1.000000E-0001
---------------------------------------------------
t
6.000000E-0001 7.000000E-0001 3.000000E-0001
---------------------------------------------------
bz
-1
---------------------------------------------------
T
3.000000E+0000
---------------------------------------------------
teta
1 1.304000E-0001 1 3.960000E-0001 1 5.685000E-0001
2 6.262000E-0001 2 4.508000E-0001 2 1.637000E-0001
3 4.515000E-0001 3 3.177000E-0001 3 7.110000E-0001
---------------------------------------------------
Au
1 7.400000E-0001 1 3.800000E-0001 1 4.200000E-0001
2 2.900000E-0001 2 3.200000E-0001 2 6.100000E-0001
3 2.800000E-0001 3 3.000000E-0001 3 4.900000E-0001
---------------------------------------------------
Ab
1 2.000000E-0001 1 2.800000E-0001 1 3.200000E-0001
2 1.200000E-0001 2 1.800000E-0001 2 4.400000E-0001
3 1.400000E-0001 3 1.600000E-0001 3 1.200000E-0001
---------------------------------------------------
Aij
2.704160E-0001 3.196000E-0001 3.768500E-0001
2.264540E-0001 2.431120E-0001 4.678290E-0001
2.032100E-0001 2.044780E-0001 3.830700E-0001
---------------------------------------------------
Ksi
-2.264540E-0001
7.568880E-0001
-4.678290E-0001
---------------------------------------------------
Z1
2.590117E-0001
1.415925E-0001
-4.242696E-0001
---------------------------------------------------
Z0
6.384278E-0001
-3.392923E-0001
-3.902258E-0001
---------------------------------------------------
Xc
5.000000E+0000
0.000000E+0000
0.000000E+0000
---------------------------------------------------
Xn1
3.333333E+0000
0.000000E+0000
0.000000E+0000
Итерация=3
---------------------------------------------------
alfa
4.000000E-0001 5.000000E-0001 1.000000E-0001
---------------------------------------------------
t
6.000000E-0001 7.000000E-0001 3.000000E-0001
---------------------------------------------------
bz
-1
---------------------------------------------------
T
3.000000E+0000
---------------------------------------------------
teta
1 7.563000E-0001 1 4.461000E-0001 1 8.149000E-0001
2 3.422000E-0001 2 1.993000E-0001 2 7.040000E-0001
3 9.452000E-0001 3 2.000000E-0003 3 1.721000E-0001
---------------------------------------------------
Au
1 7.400000E-0001 1 3.800000E-0001 1 4.200000E-0001
2 2.900000E-0001 2 3.200000E-0001 2 6.100000E-0001
3 2.800000E-0001 3 3.000000E-0001 3 4.900000E-0001
---------------------------------------------------
Ab
1 2.000000E-0001 1 2.800000E-0001 1 3.200000E-0001
2 1.200000E-0001 2 1.800000E-0001 2 4.400000E-0001
3 1.400000E-0001 3 1.600000E-0001 3 1.200000E-0001
---------------------------------------------------
Aij
6.084020E-0001 3.246100E-0001 4.014900E-0001
1.781740E-0001 2.079020E-0001 5.596800E-0001
2.723280E-0001 1.602800E-0001 1.836770E-0001
---------------------------------------------------
Ksi
-1.781740E-0001
7.920980E-0001
-5.596800E-0001
---------------------------------------------------
Z1
1.044431E-0001
3.715809E-0001
-4.721444E-0001
---------------------------------------------------
Z0
2.590117E-0001
1.415925E-0001
-4.242696E-0001
---------------------------------------------------
Xc
5.000000E+0000
0.000000E+0000
0.000000E+0000
---------------------------------------------------
Xn1
3.750000E+0000
0.000000E+0000
0.000000E+0000
Итерация=4
---------------------------------------------------
alfa
4.000000E-0001 5.000000E-0001 1.000000E-0001
---------------------------------------------------
t
6.000000E-0001 7.000000E-0001 3.000000E-0001
---------------------------------------------------
bz
-1
---------------------------------------------------
T
3.000000E+0000
---------------------------------------------------
teta
1 6.594000E-0001 1 4.792000E-0001 1 5.420000E-0001
2 7.466000E-0001 2 7.170000E-0002 2 1.646000E-0001
3 5.058000E-0001 3 9.141000E-0001 3 6.787000E-0001
---------------------------------------------------
Au
1 7.400000E-0001 1 3.800000E-0001 1 4.200000E-0001
2 2.900000E-0001 2 3.200000E-0001 2 6.100000E-0001
3 2.800000E-0001 3 3.000000E-0001 3 4.900000E-0001
---------------------------------------------------
Ab
1 2.000000E-0001 1 2.800000E-0001 1 3.200000E-0001
2 1.200000E-0001 2 1.800000E-0001 2 4.400000E-0001
3 1.400000E-0001 3 1.600000E-0001 3 1.200000E-0001
---------------------------------------------------
Aij
5.560760E-0001 3.279200E-0001 3.742000E-0001
2.469220E-0001 1.900380E-0001 4.679820E-0001
2.108120E-0001 2.879740E-0001 3.711190E-0001
---------------------------------------------------
Ksi
-2.469220E-0001
8.099620E-0001
-4.679820E-0001
---------------------------------------------------
Z1
-6.395152E-0004
5.026875E-0001
-4.708996E-0001
---------------------------------------------------
Z0
1.044431E-0001
3.715809E-0001
-4.721444E-0001
---------------------------------------------------
Xc
0.000000E+0000
4.285714E+0000
0.000000E+0000
---------------------------------------------------
Xn1
3.000000E+0000
8.571428E-0001
0.000000E+0000
Итерация=5
---------------------------------------------------
alfa
4.000000E-0001 5.000000E-0001 1.000000E-0001
---------------------------------------------------
t
6.000000E-0001 7.000000E-0001 3.000000E-0001
---------------------------------------------------
bz
-1
---------------------------------------------------
T
3.000000E+0000
---------------------------------------------------
teta
1 8.213000E-0001 1 3.343000E-0001 1 8.457000E-0001
2 6.757000E-0001 2 1.357000E-0001 2 9.693000E-0001
3 9.696000E-0001 3 1.979000E-0001 3 5.860000E-0002
---------------------------------------------------
Au
1 7.400000E-0001 1 3.800000E-0001 1 4.200000E-0001
2 2.900000E-0001 2 3.200000E-0001 2 6.100000E-0001
3 2.800000E-0001 3 3.000000E-0001 3 4.900000E-0001
---------------------------------------------------
Ab
1 2.000000E-0001 1 2.800000E-0001 1 3.200000E-0001
2 1.200000E-0001 2 1.800000E-0001 2 4.400000E-0001
3 1.400000E-0001 3 1.600000E-0001 3 1.200000E-0001
---------------------------------------------------
Aij
6.435020E-0001 3.134300E-0001 4.045700E-0001
2.348690E-0001 1.989980E-0001 6.047810E-0001
2.757440E-0001 1.877060E-0001 1.416820E-0001
---------------------------------------------------
Ksi
-2.348690E-0001
8.010020E-0001
-6.047810E-0001
---------------------------------------------------
Z1
-6.173768E-0002
5.805020E-0001
-5.058222E-0001
---------------------------------------------------
Z0
-6.395152E-0004
5.026875E-0001
-4.708996E-0001
---------------------------------------------------
Xc
0.000000E+0000
4.285714E+0000
0.000000E+0000
---------------------------------------------------
Xn1
2.500000E+0000
1.428571E+0000
0.000000E+0000




Download 1.38 Mb.

Do'stlaringiz bilan baham:
1   ...   16   17   18   19   20   21   22   23   24




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling