Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
АНАЛИЗ МО!.doc
Скачиваний:
1
Добавлен:
01.03.2025
Размер:
426.5 Кб
Скачать

Библиографический список

  1. Перегудов, Ф.И. Введение в системный анализ [Текст] / Ф.И. Перегудов, Ф.П.Тарасенко. – М, Высшая школа, 1989. – 128 с.

  2. Данилов, Г.В. Некоторые вероятностные задачи «о встрече» в моделях массового обслуживания [Текст] / Г.В.Данилов, Г.С.Филиппов, Я.И.Якумайте. – Ухта: УИИ, 1988. – 12 с.

  3. Данилов, Г.В. Методические указания к выполнению лабораторных и курсовых работ [Текст] / Г.В.Данилов. – Ухта: МИБИ, 2007. – 65 с.

Приложение Листинг программы

unit Unit1;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Series, TeEngine, ExtCtrls, TeeProcs, Chart, StdCtrls, Grids,math,

XPMan;

type

TForm1 = class(TForm)

GroupBox1: TGroupBox;

GroupBox3: TGroupBox;

Chart1: TChart;

Series1: TPointSeries;

Series3: TLineSeries;

XPManifest1: TXPManifest;

GroupBox5: TGroupBox;

StringGrid1: TStringGrid;

StringGrid22: TStringGrid;

Series2: TFastLineSeries;

lbl1: TLabel;

lbl2: TLabel;

lbl3: TLabel;

lbl4: TLabel;

btn1: TButton;

Label1: TLabel;

Label2: TLabel;

Edit1: TEdit;

Edit2: TEdit;

Edit3: TEdit;

Edit4: TEdit;

Label3: TLabel;

procedure FormCreate(Sender: TObject);

procedure btn1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

const m=3; //число мест в очереди

t=0.08; //среднее время обслуживания одного запроса

k=10; // количество последовательных сигналов

var

Form1: TForm1;

n,x:integer;

q1,q2:array[1..10] of real;

d1,d2:array[1..10] of real;

s:array[1..10] of real;

a: array [1..10] of integer;

no:real;

implementation

{$R *.dfm}

function fact(v:integer):integer;

var c,i:integer;

begin

c:=1;

for i:=1 to v do begin

c:=c*i;

end;

fact:=c;

end;

procedure pareto;

var i:integer;

begin

x:=1;

d2[1]:=d1[n];

q2[1]:=q1[n];

a[1]:=n;

for i:=n-1 downto 1 do begin

if d1[i]>=d2[x] then begin

x:=x+1;

d2[x]:=d1[i];

q2[x]:=q1[i];

a[x]:=i;

end;

end;

for i:=1 to x do begin

form1.StringGrid22.Cells[0,i]:=inttostr(a[x-i+1]);

form1.StringGrid22.Cells[1,i]:=floattostr(roundto(q2[x-i+1],-3));

end;

end;

procedure metod;

var i,j:integer;

rq,rd,y:real;

begin

for i:=1 to x do

begin

d2[i]:=d2[i]/d2[x];

form1.StringGrid22.Cells[2,x+1-i]:=floattostr(roundto(d2[i],-3));

end;

rd:=0.5-0.01*no;

rq:=1-rd;

for i:=1 to x do s[i]:=rd*d2[i]+rq*q2[i];

y:=s[1];

j:=1;

for i:=1 to x do begin

if s[i]>=y then begin

y:=s[i];

j:=i;

end;

end;

form1.Label1.Caption:='Метод линейной свертки: '+ inttostr(a[j]);

for i:=1 to x do s[i]:=sqrt((1-d2[i])*(1-d2[i])+(1-q2[i])*(1-q2[i]));

y:=s[1];

j:=1;

for i:=1 to x do begin

if s[i]<=y then begin

y:=s[i];

j:=i;

end;

end;

form1.Label2.Caption:='Метод идеальной точки: '+ inttostr(a[j]);

Form1.Chart1.Series[2].AddXY(d2[j],q2[j]);

Form1.Chart1.Series[2].AddXY(1,1);

end;

procedure grafic;

var i:integer;

labeler:integer;

begin

labeler:=10;

for i:=1 to x do begin

form1.Chart1.SeriesList[0].AddXY(d2[i],q2[i],inttostr(labeler),clred);

dec(labeler);

end;

labeler:=1;

for i:=1 to n-x do begin

form1.Chart1.SeriesList[0].AddXY(d1[i]/d1[n-x],q1[i],inttostr(labeler), clyellow);

inc(labeler);

end;

Form1.Chart1.Series[1].AddXY(0,1);

Form1.Chart1.Series[1].AddXY(1,1);

Form1.Chart1.Series[1].AddXY(1,0);

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

n:=10;

StringGrid22.Cells[0,0]:='n';

StringGrid22.Cells[1,0]:='Q(n)';

StringGrid22.Cells[2,0]:='D(n)/Dmax';

stringgrid1.cells[0,0]:='n';

stringgrid1.cells[1,0]:='Po';

stringgrid1.cells[2,0]:='Potk';

StringGrid1.Cells[3,0]:='Q';

StringGrid1.Cells[4,0]:='K';

StringGrid1.Cells[5,0]:='Loch';

StringGrid1.Cells[6,0]:='Lsis';

StringGrid1.Cells[7,0]:='LWoch';

StringGrid1.Cells[8,0]:='Wsis';

StringGrid1.Cells[9,0]:='A';

StringGrid1.Cells[10,0]:='D';

end;

procedure TForm1.btn1Click(Sender: TObject);

var

A, q, m, d, e1, e2, wsys, lb, lbm, uy, lsys, loch,Lwoch, r, p, ro, po, h, k, verot, z, t, Dabs:real;

i,j, n:integer;

begin

no:=strtofloat(Edit1.text);

lbm:=100;

k:=10;

uy:=0.93+0.001*no;

if uy>1 then

r:=1

else

r:=k*power(uy,(k-1))*(1-(k-1)*uy/k);

Edit4.Text:=floattostr(r);

t:=0.08;

n:=10;

m:=3;

lb:=r*lbm;

Edit2.Text:=floattostr(lb);

p:=1-r;

Edit3.Text:=floattostr(p);

ro:=lb*t;

d:=100+0.1*no;

e1:=1000+0.1*no;

e2:=50+0.1*no;

for i:=1 to n do begin

po:=1;

h:=ro/i;

for j:=1 to i do

po:=po+power(ro,j)/fact(j);

po:=1/(po+power(ro,(i+1))*(1-power(h,m))/(i*fact(i)*(1-h)));

verot:=po*power(ro,(i+m))/(power(i,m)*fact(i));

q:=1-verot;

z:=ro*(1-verot);

loch:=power(ro,(i+1))*po*(1-(m+1)*power(h,m)+m*power(h,(m+1)))/(i*fact(i)*(1-h)*(1-h));

lsys:=loch+z;

Lwoch:=loch/lb;

wsys:=lsys/lb;

A:=lb*q;

Dabs:=(d-(e1*wsys))*A-e2*power(i,3/2);

stringgrid1.cells[0,j-1]:=inttostr(j-1);

stringgrid1.cells[1,j-1]:=floattostr(0.0001*round(10000*po));

stringgrid1.cells[2,j-1]:=floattostr(0.0001*round(10000*verot));

stringgrid1.cells[3,j-1]:=floattostr(0.0001*round(10000*q));

stringgrid1.cells[4,j-1]:=floattostr(0.0001*round(10000*z));

stringgrid1.cells[5,j-1]:=floattostr(0.0001*round(10000*loch));

stringgrid1.cells[6,j-1]:=floattostr(0.0001*round(10000*Lsys));

stringgrid1.cells[7,j-1]:=floattostr(0.0001*round(10000*Lwoch));

stringgrid1.cells[8,j-1]:=floattostr(0.0001*round(10000*wsys));

stringgrid1.cells[9,j-1]:=floattostr(0.0001*round(10000*A));

stringgrid1.cells[10,j-1]:=floattostr(0.0001*round(10000*Dabs));

q1[i]:=q;

d1[i]:=Dabs;

end;

pareto;

metod;

grafic;

end;

end.