program ReliabilityLab5;
uses
SysUtils;
var
vibor: Integer;
q11, q12, q13, p11, p12, p13, p20, p21, p22, p23, p24, p25, cascade1, cascade2, cascade3, cascade4, ps: Real;
p31, p32, p33, cass1, cass2, ps1, cass3, cass4, ps2: Real;
begin
Writeln('Лабораторная работа №5.');
Writeln('Вариант 1');
Writeln('Какое задание будем решать? Напишите от 1 до 3');
Readln(vibor);
case vibor of
1:
begin
q11 := 0.025;
q12 := 0.03;
q13 := 0.01;
p11 := 1 - q11;
p12 := 1 - q12;
p13 := 1 - q13;
Writeln('Изначальные данные: ', q11:0:3, ' ', q13:0:3, ' ', q12:0:3);
Writeln('ВБР для каждого блока: ', p11:0:3, ' ', p12:0:3, ' ', p13:0:3);
Writeln('ВБР для всей схемы: ', (p11 * p12 * p13):0:3);
end;
2:
begin
p20 := 0.993;
p21 := p20;
p22 := 0.93 * p21;
p23 := p21;
p24 := 0.99 * p23;
p25 := p24 * p24;
cascade1 := 1 - p21;
cascade2 := 1 - ((1 - p22) * (1 - p23));
cascade3 := 1 - (cascade2 * p24);
cascade4 := 1 - p25;
ps := 1 - cascade1 * cascade3 * cascade4;
Writeln('Изначальные данные: ', p20:0:3);
Writeln('ВБР для каждого блока: ', p21:0:3, ' ', p22:0:3, ' ', p23:0:3, ' ', p24:0:3, ' ', p25:0:3);
Writeln('ВБР для всей схемы: ', ps:0:3);
end;
3:
begin
p31 := 0.6;
p32 := 0.8;
p33 := 0.9;
cass1 := 1 - ((1 - p32) * (1 - p33));
cass2 := p31;
ps1 := cass1 * cass2;
cass3 := 1 - (p31 * p33);
cass4 := 1 - p32;
ps2 := 1 - cass3 * cass4;
Writeln('Изначальные данные: ', p31:0:3, ' ', p32:0:3, ' ', p33:0:3);
Writeln('ВБР для первой схемы: ', ps1:0:3);
Writeln('ВБР для второй схемы: ', ps2:0:3);
end;
else
Writeln('Введено неверное значение!');
end;
end.
cHJvZ3JhbSBSZWxpYWJpbGl0eUxhYjU7Cgp1c2VzCiAgU3lzVXRp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dGF0LXQvNGLOiAnLCAocDExICogcDEyICogcDEzKTowOjMpOwogICAgICBlbmQ7CiAgICAgIAogICAgMjoKICAgICAgYmVnaW4KICAgICAgICBwMjAgOj0gMC45OTM7CiAgICAgICAgcDIxIDo9IHAyMDsKICAgICAgICBwMjIgOj0gMC45MyAqIHAyMTsKICAgICAgICBwMjMgOj0gcDIxOwogICAgICAgIHAyNCA6PSAwLjk5ICogcDIzOwogICAgICAgIHAyNSA6PSBwMjQgKiBwMjQ7CiAgICAgICAgY2FzY2FkZTEgOj0gMSAtIHAyMTsKICAgICAgICBjYXNjYWRlMiA6PSAxIC0gKCgxIC0gcDIyKSAqICgxIC0gcDIzKSk7CiAgICAgICAgY2FzY2FkZTMgOj0gMSAtIChjYXNjYWRlMiAqIHAyNCk7CiAgICAgICAgY2FzY2FkZTQgOj0gMSAtIHAyNTsKICAgICAgICBwcyA6PSAxIC0gY2FzY2FkZTEgKiBjYXNjYWRlMyAqIGNhc2NhZGU0OwogICAgICAgIAogICAgICAgIFdyaXRlbG4oJ9CY0LfQvdCw0YfQsNC70YzQvdGL0LUg0LTQsNC90L3Ri9C1OiAnLCBwMjA6MDozKTsKICAgICAgICBXcml0ZWxuKCfQktCR0KAg0LTQu9GPINC60LDQttC00L7Qs9C+INCx0LvQvtC60LA6ICcsIHAyMTowOjMsICcgJywgcDIyOjA6MywgJyAnLCBwMjM6MDozLCAnICcsIHAyNDowOjMsICcgJywgcDI1OjA6Myk7CiAgICAgICAgV3JpdGVsbign0JLQkdCgINC00LvRjyDQstGB0LXQuSDRgdGF0LXQvNGLOiAnLCBwczowOjMpOwogICAgICBlbmQ7CiAgICAgIAogICAgMzoKICAgICAgYmVnaW4KICAgICAgICBwMzEgOj0gMC42OwogICAgICAgIHAzMiA6PSAwLjg7CiAgICAgICAgcDMzIDo9IDAuOTsKICAgICAgICBjYXNzMSA6PSAxIC0gKCgxIC0gcDMyKSAqICgxIC0gcDMzKSk7CiAgICAgICAgY2FzczIgOj0gcDMxO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