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

if (time1_analiz<>0)and(time1_analiz<=time_analiz) then

begin

inc(time1_analiz);

if time1_analiz>2 then

begin

Shape1.Brush.Color:=clblue;

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

end;

end

else

begin

if Shape1.Brush.Color<>clyellow then Shape1.Brush.Color:=clwhite;

Gauge4.Progress:=0;

time1_analiz:=0;

end;

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

if (time2_analiz<>0)and(time2_analiz<=time_analiz) then

begin

inc(time2_analiz);

if time2_analiz>2 then

begin

Shape2.Brush.Color:=clblue;

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

end;

end

else

begin

if Shape2.Brush.Color<>clyellow then Shape2.Brush.Color:=clwhite;

Gauge6.Progress:=0;

time2_analiz:=0;

end;

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

if (time3_analiz<>0)and(time3_analiz<=time_analiz) then

begin

inc(time3_analiz);

if time3_analiz>2 then

begin

Shape3.Brush.Color:=clblue;

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

end;

end

else

begin

if Shape3.Brush.Color<>clyellow then Shape3.Brush.Color:=clwhite;

Gauge7.Progress:=0;

time3_analiz:=0;

end;

{заполняем ЭВМ строкой}

if (index_nakop<>0)and(flag4=false)and(flag1=false)and(flag2=false)and(flag3=false) then

begin

flag4:=true;

Shape11.Pen.Color:=clred;

EVM:=nakopitel[1];

for i:=1 to index_nakop-1 do

nakopitel[i]:=nakopitel[i+1];

nakopitel[index_nakop].time:=0;

nakopitel[index_nakop].number:=0;

dec(index_nakop);

inc(time_stEVM);

Shape4.Brush.Color:=clgreen;

Gauge2.Progress:=Gauge2.Progress+round(100/time_st_EVM);

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

end

else

Shape11.Pen.Color:=clblack;

if (time_stEVM<>0)and(time_stEVM<=time_st_EVM)and(flag4=true)then

begin

inc(time_stEVM);

if time_stEVM>2 then

begin

Shape4.Brush.Color:=clgreen;

Gauge2.Progress:=Gauge2.Progress+round(100/time_st_EVM)+1;

end;

end

else

begin

if (flag1=false)and(flag2=false)and(flag3=false) then

begin

Shape4.Brush.Color:=clwhite;

end;

Gauge2.Progress:=0;

time_stEVM:=0;

flag4:=false;

end;

if time_stEVM-1=time_st_EVM then

begin

if EVM.number=1 then

begin

Shape18.Pen.Color:=clred;

Shape19.Pen.Color:=clred;

Shape20.Pen.Color:=clred;

Shape21.Pen.Color:=clred;

Shape22.Pen.Color:=clred;

inc(i1);

k1[i1]:=i1;

Label43.Caption:='('+IntToStr(i1)+')';

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

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

end;

if EVM.number=2 then

begin

Shape15.Pen.Color:=clred;

Shape16.Pen.Color:=clred;

Shape17.Pen.Color:=clred;

inc(i2);

k2[i2]:=i2;

Label44.Caption:='('+IntToStr(i2)+')';

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

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

end;

if EVM.number=3 then

begin

Shape12.Pen.Color:=clred;

Shape13.Pen.Color:=clred;

Shape14.Pen.Color:=clred;

inc(i3);

k3[i3]:=i3;

Label45.Caption:='('+IntToStr(i3)+')';

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

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

end;

end

else

begin

Shape18.Pen.Color:=clblack;

Shape19.Pen.Color:=clblack;

Shape20.Pen.Color:=clblack;

Shape21.Pen.Color:=clblack;

Shape22.Pen.Color:=clblack;

Shape15.Pen.Color:=clblack;

Shape16.Pen.Color:=clblack;

Shape17.Pen.Color:=clblack;

Shape12.Pen.Color:=clblack;

Shape13.Pen.Color:=clblack;

Shape14.Pen.Color:=clblack;

end;

{if Shape1.Brush.Color=clblue then time_zanytat1:=time_zanytat1+1;

if Shape2.Brush.Color=clblue then time_zanytat2:=time_zanytat2+1;

if Shape3.Brush.Color=clblue then time_zanytat3:=time_zanytat3+1;}

if (Shape4.Brush.Color=clgreen)or(Shape4.Brush.Color=clred) then inc(time_zagruz);

if work_system<>0 then

begin

Edit8.Text:=FloatToStr(time_zagruz/work_system);

Form5.Edit16.Text:=FloatToStr(time_zagruz/work_system);

end;

{ if time_zagruz<>0 then Edit5.Text:=FloatToStr((work_system-time_zanytat1)/time_zagruz);}

if StrToInt(Form5.Edit1.Text)<>0 then

begin

Edit5.Text:=FloatToStr((StrToInt(Form5.Edit1.Text)-StrToInt(Form5.Edit6.Text))/StrToInt(Form5.Edit1.Text));

Form5.Edit13.Text:=FloatToStr((StrToInt(Form5.Edit1.Text)-StrToInt(Form5.Edit6.Text))/StrToInt(Form5.Edit1.Text));

end;

if StrToInt(Form5.Edit2.Text)<>0 then

begin

Edit6.Text:=FloatToStr((StrToInt(Form5.Edit2.Text)-StrToInt(Form5.Edit5.Text))/StrToInt(Form5.Edit2.Text));

Form5.Edit14.Text:=FloatToStr((StrToInt(Form5.Edit2.Text)-StrToInt(Form5.Edit5.Text))/StrToInt(Form5.Edit2.Text));

end;

if StrToInt(Form5.Edit3.Text)<>0 then

begin

Edit7.Text:=FloatToStr((StrToInt(Form5.Edit3.Text)-StrToInt(Form5.Edit4.Text))/StrToInt(Form5.Edit3.Text));

Form5.Edit15.Text:=FloatToStr((StrToInt(Form5.Edit3.Text)-StrToInt(Form5.Edit4.Text))/StrToInt(Form5.Edit3.Text));

end;

end;

end;

procedure TForm1.ToolButton1Click(Sender: TObject);

begin

Timer1.Enabled:=true;

end;

procedure TForm1.N4Click(Sender: TObject);

begin

Timer1.Enabled:=true;

end;

procedure TForm1.Image6Click(Sender: TObject);

begin

Timer1.Enabled:=true;

end;

procedure TForm1.ToolButton2Click(Sender: TObject);

begin

Timer1.Enabled:=false;

end;

procedure TForm1.Image7Click(Sender: TObject);

begin

Timer1.Enabled:=false;

end;

procedure TForm1.SpinEdit1Change(Sender: TObject);

begin

Form8.SpinEdit1.Value:=SpinEdit1.Value;

end;

procedure TForm1.SpinEdit3Change(Sender: TObject);

begin

Form8.SpinEdit3.Value:=SpinEdit3.Value;

end;

procedure TForm1.SpinEdit4Change(Sender: TObject);

begin

Form8.SpinEdit4.Value:=SpinEdit4.Value;

end;

procedure TForm1.SpinEdit2Change(Sender: TObject);

begin

Form8.SpinEdit2.Value:=SpinEdit2.Value;

end;

procedure TForm1.SpinEdit6Change(Sender: TObject);

begin

Form8.SpinEdit6.Value:=SpinEdit6.Value;

end;

procedure TForm1.SpinEdit5Change(Sender: TObject);

begin

Form8.SpinEdit5.Value:=SpinEdit5.Value;

end;

procedure TForm1.SpinEdit7Change(Sender: TObject);

begin

Form8.SpinEdit7.Value:=SpinEdit7.Value;

end;

procedure TForm1.SpinEdit10Change(Sender: TObject);

begin

Form8.SpinEdit10.Value:=SpinEdit10.Value;

end;

procedure TForm1.SpinEdit8Change(Sender: TObject);

begin

Form8.SpinEdit8.Value:=SpinEdit8.Value;

end;

procedure TForm1.SpinEdit9Change(Sender: TObject);


Страница: