Моделирование системы автоматизации проектирования
Рефераты >> Кибернетика >> Моделирование системы автоматизации проектирования

Gauge9.Progress:=0;

end;

Shape6.Pen.Color:=clblack;

Shape9.Pen.Color:=clblack;

if time_st1-1=time_st_term then

begin

inc(index_nakop);

nakopitel[index_nakop]:=a;

Label5.Caption:='('+IntToStr(index_nakop)+')';

Shape6.Pen.Color:=clred;

Shape9.Pen.Color:=clred;

Shape10.Pen.Color:=clred;

end;

{время обработки строки вторым терминалом}

if (time_st2<>0)and(time_st2<=time_st_term) then

begin

inc(time_st2);

if time_st2>2 then begin

Shape2.Brush.Color:=clyellow;

Gauge3.Progress:=Gauge3.Progress+Round(100/time_st_term);

end;

end

else

begin

time_st2:=0;

Shape2.Brush.Color:=clwhite;

Gauge3.Progress:=0;

end;

Shape7.Pen.Color:=clblack;

if time_st2-1=time_st_term then

begin

inc(index_nakop);

nakopitel[index_nakop]:=b;

Label5.Caption:='('+IntToStr(index_nakop)+')';

Shape7.Pen.Color:=clred;

Shape10.Pen.Color:=clred;

end;

{время обработки строки третьим терминалом}

if (time_st3<>0)and(time_st3<=time_st_term) then

begin

inc(time_st3);

if time_st3>2 then begin

Shape3.Brush.Color:=clyellow;

Gauge5.Progress:=Gauge5.Progress+Round(100/time_st_term);

end;

end

else

begin

time_st3:=0;

Shape3.Brush.Color:=clwhite;

Gauge5.Progress:=0;

end;

Shape8.Pen.Color:=clblack;

Shape36.Pen.Color:=clblack;

if time_st3-1=time_st_term then

begin

inc(index_nakop);

nakopitel[index_nakop]:=c;

Label5.Caption:='('+IntToStr(index_nakop)+')';

Shape8.Pen.Color:=clred;

Shape36.Pen.Color:=clred;

Shape10.Pen.Color:=clred;

end;

Shape28.Pen.Color:=clblack;

Shape29.Pen.Color:=clblack;

Shape32.Pen.Color:=clblack;

{обработка задания от первого терминала}

if (k1[i1]=SpinEdit5.Value)and(time_EVM_zadan=0) then

begin

flag1:=true;

time_zadan_EVM:=get_zadan_time;

inc(time_EVM_zadan);

Shape4.Brush.Color:=clred;

Label7.Caption:='1-го терминала';

Edit3.Text:=IntToStr(StrToInt(Edit3.Text)+1);

Form5.Edit7.Text:=IntToStr(StrToInt(Form5.Edit7.Text)+1);

i1:=0;

for i:=1 to SpinEdit5.Value do

k1[i]:=0;

Label43.Caption:='( )';

Shape28.Pen.Color:=clred;

Shape29.Pen.Color:=clred;

Shape32.Pen.Color:=clred;

Shape33.Pen.Color:=clred;

Shape34.Pen.Color:=clred;

Gauge8.Progress:=Gauge8.Progress+round(100/time_zadan_EVM);

end;

{время выполнения задания от первого терминала}

if (time_EVM_zadan<>0)and(time_EVM_zadan<=time_zadan_EVM)and(flag1=true) then

begin

inc(time_EVM_zadan);

if time_EVM_zadan>2 then

begin

Gauge8.Progress:=Gauge8.Progress+round(100/time_zadan_EVM);

Shape4.Brush.Color:=clred;

end;

end

else

begin

if (Shape4.Brush.Color<>clgreen)and(flag2=false)and(flag3=false) then

begin

Shape4.Brush.Color:=clwhite;

Label7.Caption:=' -го терминала';

if (time_EVM_zadan-1=time_zadan_EVM)and(time_EVM_zadan<>0)then

begin

Edit4.Text:=IntToStr(StrToInt(Edit4.Text)+1);

Form5.Edit10.Text:=IntToStr(StrToInt(Form5.Edit10.Text)+1);

time1_analiz:=1;

Shape1.Brush.Color:=clblue;

Gauge4.Progress:=Gauge4.Progress+round(100/time_analiz);

end;

time_EVM_zadan:=0;

Gauge8.Progress:=0;

end;

flag1:=false;

end;

{обработка задания от второго терминала}

Shape30.Pen.Color:=clblack;

Shape31.Pen.Color:=clblack;

Shape32.Pen.Color:=clblack;

if (k2[i2]=SpinEdit5.Value)and(time_EVM_zadan=0) then

begin

flag2:=true;

time_zadan_EVM:=get_zadan_time;

inc(time_EVM_zadan);

Shape4.Brush.Color:=clred;

Label7.Caption:='2-го терминала';

Edit3.Text:=IntToStr(StrToInt(Edit3.Text)+1);

Form5.Edit8.Text:=IntToStr(StrToInt(Form5.Edit8.Text)+1);

i2:=0;

for i:=1 to SpinEdit5.Value do

k2[i]:=0;

Label44.Caption:='( )';

Shape30.Pen.Color:=clred;

Shape31.Pen.Color:=clred;

Shape32.Pen.Color:=clred;

Shape33.Pen.Color:=clred;

Shape34.Pen.Color:=clred;

Gauge8.Progress:=Gauge8.Progress+round(100/time_zadan_EVM);

end;

{время выполнения задания от второго терминала}

if (time_EVM_zadan<>0)and(time_EVM_zadan<=time_zadan_EVM)and(flag2=true) then

begin

inc(time_EVM_zadan);

if time_EVM_zadan>2 then

begin

Gauge8.Progress:=Gauge8.Progress+round(100/time_zadan_EVM);

Shape4.Brush.Color:=clred;

end;

end

else

begin

if (Shape4.Brush.Color<>clgreen)and(flag1=false)and(flag3=false) then

begin

Shape4.Brush.Color:=clwhite;

Label7.Caption:=' -го терминала';

if (time_EVM_zadan-1=time_zadan_EVM)and(time_EVM_zadan<>0)then

begin

Edit4.Text:=IntToStr(StrToInt(Edit4.Text)+1);

Form5.Edit11.Text:=IntToStr(StrToInt(Form5.Edit11.Text)+1);

time2_analiz:=1;

Shape2.Brush.Color:=clblue;

Gauge6.Progress:=Gauge6.Progress+round(100/time_analiz);

end;

time_EVM_zadan:=0;

Gauge8.Progress:=0;

end;

flag2:=false;

end;

{обработка задания от третьего терминала}

Shape26.Pen.Color:=clblack;

Shape27.Pen.Color:=clblack;

Shape37.Pen.Color:=clblack;

if (k3[i3]=SpinEdit5.Value)and(time_EVM_zadan=0) then

begin

flag3:=true;

time_zadan_EVM:=get_zadan_time;

inc(time_EVM_zadan);

Shape4.Brush.Color:=clred;

Label7.Caption:='3-го терминала';

Edit3.Text:=IntToStr(StrToInt(Edit3.Text)+1);

Form5.Edit9.Text:=IntToStr(StrToInt(Form5.Edit9.Text)+1);

i3:=0;

for i:=1 to SpinEdit5.Value do

k3[i]:=0;

Label45.Caption:='( )';

Shape26.Pen.Color:=clred;

Shape27.Pen.Color:=clred;

Shape37.Pen.Color:=clred;

Shape33.Pen.Color:=clred;

Shape34.Pen.Color:=clred;

Gauge8.Progress:=Gauge8.Progress+round(100/time_zadan_EVM);

end;

{время выполнения задания от третьего терминала}

if (time_EVM_zadan<>0)and(time_EVM_zadan<=time_zadan_EVM)and(flag3=true) then

begin

inc(time_EVM_zadan);

if time_EVM_zadan>2 then

begin

Gauge8.Progress:=Gauge8.Progress+round(100/time_zadan_EVM);

Shape4.Brush.Color:=clred;

end;

end

else

begin

if (Shape4.Brush.Color<>clgreen)and(flag1=false)and(flag2=false) then

begin

Shape4.Brush.Color:=clwhite;

Label7.Caption:=' -го терминала';

if (time_EVM_zadan-1=time_zadan_EVM)and(time_EVM_zadan<>0)then

begin

Edit4.Text:=IntToStr(StrToInt(Edit4.Text)+1);

Form5.Edit12.Text:=IntToStr(StrToInt(Form5.Edit12.Text)+1);

Shape3.Brush.Color:=clblue;

Gauge7.Progress:=Gauge7.Progress+round(100/time_analiz);

time3_analiz:=1;

end;

time_EVM_zadan:=0;

Gauge8.Progress:=0;

end;

flag3:=false;

end;

{анализ задания первым терминалом}


Страница: