Заказать курсовые, контрольные, рефераты...
Образовательные работы на заказ. Недорого!

Текст программы. 
Расчет технико-экономических показателей выбора наиболее рационального метода получения заготовок по себестоимости детали

РефератПомощь в написанииУзнать стоимостьмоей работы

Zcn3:=strtofloat (edit18.Text); Zck3:=strtofloat (edit17.Text); dZc3:=strtofloat (edit19.Text); Edit16. Text:=''; Edit17. Text:=''; Edit18. Text:=''; Edit19. Text:=''; Edit10. Text:=''; Edit11. Text:=''; Edit12. Text:=''; Edit13. Text:=''; Edit14. Text:=''; Edit15. Text:=''; D1:=strtofloat (edit10.Text); d2:=strtofloat (edit8.Text); d3:=strtofloat (edit13.Text); L1:=strtofloat (edit5.Text… Читать ещё >

Текст программы. Расчет технико-экономических показателей выбора наиболее рационального метода получения заготовок по себестоимости детали (реферат, курсовая, диплом, контрольная)

unit KURS;

interface.

uses.

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

Dialogs, StdCtrls, Grids, ExtCtrls, Math;

type.

TForm1 = class (TForm).

Label1: TLabel;

Label3: TLabel;

Label6: TLabel;

Edit1: TEdit;

Label7: TLabel;

Edit2: TEdit;

Label9: TLabel;

StringGrid5: TStringGrid;

Button1: TButton;

Button2: TButton;

Edit7: TEdit;

Label16: TLabel;

Edit21: TEdit;

Label8: TLabel;

Edit3: TEdit;

Label2: TLabel;

Edit4: TEdit;

Edit5: TEdit;

Edit6: TEdit;

Label4: TLabel;

Edit8: TEdit;

Edit10: TEdit;

Edit13: TEdit;

Label17: TLabel;

Edit15: TEdit;

Label18: TLabel;

Label19: TLabel;

Edit17: TEdit;

Edit18: TEdit;

Edit19: TEdit;

Label20: TLabel;

Edit22: TEdit;

Edit23: TEdit;

Edit24: TEdit;

Label10: TLabel;

Edit25: TEdit;

Label11: TLabel;

Label12: TLabel;

Label13: TLabel;

Edit11: TEdit;

Edit12: TEdit;

Edit14: TEdit;

Edit16: TEdit;

Edit26: TEdit;

Edit27: TEdit;

Label14: TLabel;

Image1: TImage;

Button3: TButton;

procedure Button1Click (Sender: TObject);

procedure Button2Click (Sender: TObject);

procedure Button3Click (Sender: TObject);

private.

{ Private declarations }.

public.

{ Public declarations }.

end;

arr = array [1.2] of real;

const k_tz=1.06;

k_vv=1.18;

k_pr=1.3;

var.

Form1: TForm1;

Cm: arr;

Ng, C0, Ct,.

l1,l2,l3,.

d1,d2,d3,.

po, m, G3, G03, G10, G010,.

Zcn3, Zck3, dZc3, Zc3,.

Zdn3, Zdk3, dZd3, Zd3,.

Zcn10, Zck10, dZc10, Zc10,.

Zdn10, Zdk10, dZd10, Zd10,.

M03, Z03, C3, M010, Z010, C10, dC: real;

n1,n2,m1,m2,i, j, l, f, k: integer;

tb3, tb10:real;

implementation.

{$R *.dfm}.

procedure TForm1. Button1Click (Sender: TObject);

var i, j, k: integer;

begin.

l1:=strtofloat (edit5.Text); l2:=strtofloat (edit4.Text); l3:=strtofloat (edit6.Text);

d1:=strtofloat (edit10.Text); d2:=strtofloat (edit8.Text); d3:=strtofloat (edit13.Text);

po:=strtofloat (edit15.Text);

m:=pi*po*(sqr (d½)*l1+sqr (d2/2)*l2+sqr (d3/2)*l3);

edit25.Text:=floattostrf (m, fffixed, 9,3);

Zcn3:=strtofloat (edit18.Text); Zck3:=strtofloat (edit17.Text); dZc3:=strtofloat (edit19.Text);

Zdn3:=strtofloat (edit23.Text); Zdk3:=strtofloat (edit22.Text); dZd3:=strtofloat (edit24.Text);

Zcn10:=strtofloat (edit12.Text); Zck10:=strtofloat (edit11.Text); dZc10:=strtofloat (edit14.Text);

Zdn10:=strtofloat (edit26.Text); Zdk10:=strtofloat (edit16.Text); dZd10:=strtofloat (edit27.Text);

Cm[1]: =strtofloat (edit7.Text); Cm[2]: =strtofloat (edit21.Text);

Ng:=strtofloat (edit1.Text);

C0:=strtofloat (edit2.Text);

Ct:=strtofloat (edit3.Text);

n1:=round ((Zck3-Zcn3)/dZc3)+1;

n2:=round ((Zdk3-Zdn3)/dZd3)+1;

m1:=round ((Zck10-Zcn10)/dZc10);

m2:=round ((Zdk10-Zdn10)/dZd10);

StringGrid5.Cells[0,0]: ='#';

StringGrid5.Cells[1,0]: ='Zc3';

StringGrid5.Cells[2,0]: ='Zd3';

StringGrid5.Cells[3,0]: ='Масса заготоки';

StringGrid5.Cells[4,0]: ='Масса отходов';

StringGrid5.Cells[5,0]: ='Zc10';

StringGrid5.Cells[6,0]: ='Zd10';

StringGrid5.Cells[7,0]: ='Масса заготоки';

StringGrid5.Cells[8,0]: ='Масса отходов';

StringGrid5.Cells[9,0]: ='M3';

StringGrid5.Cells[10,0]: ='M10';

StringGrid5.Cells[11,0]: ='Разница';

StringGrid5.Cells[12,0] := 'Выгоднее';

Zc3:=Zcn3;

k:=1;

for i:=1 to n1 do.

begin.

Zd3:=Zdn3;

for j:=1 to n2 do.

begin.

Zc10:=Zcn10;

for l:=1 to m1 do.

begin.

Zd10:=Zdn10;

for f:=1 to m2 do.

begin.

G3:=pi*po*(sqr (d½+Zc3)*(l1+Zd3)+sqr (d2/2+Zc3)*l2+sqr (d3/2+Zc3)*(l3+Zd3));

G03:=G3-m;

G10:=pi*po*(sqr (d½+Zc10)*(l1+Zd10)+sqr (d2/2+Zc10)*l2+sqr (d3/2+Zc10)*(l3+Zd10));

G010:=G10-m;

tb3:=5.4*power (G3, 2/3)/60;

tb10:=G10/G3*tb3;

M03:=G3*Cm[1]*k_tz-G03*C0/1000;

Z03:=1.25*k_vv*k_pr*tb3*Ct;

C3:=80/100*(M03+Z03);

M010:=G10*Cm[2]*k_tz-G010*C0/1000;

Z010:=1.25*k_vv*k_pr*tb10*Ct;

C10:=80/100*(M010+Z010);

dC:=(C3-C10)*Ng;

StringGrid5.Cells[0,k]: =inttostr (k);

StringGrid5.Cells[1,k]: =floattostrf (Zc3, fffixed, 9,4);r.

StringGrid5.Cells[2,k]: =floattostrf (Zd3, fffixed, 9,5);

StringGrid5.Cells[3,k]: =floattostrf (G3, fffixed, 9,3);

StringGrid5.Cells[4,k]: =floattostrf (G03, fffixed, 9,3);

StringGrid5.Cells[5,k]: =floattostrf (Zc10, fffixed, 9,4);

StringGrid5.Cells[6,k]: =floattostrf (Zd10, fffixed, 9,5);

StringGrid5.Cells[7,k]: =floattostrf (G10, fffixed, 9,3);

StringGrid5.Cells[8,k]: =floattostrf (G010, fffixed, 9,3);

StringGrid5.Cells[9,k]: =floattostrf (C3, fffixed, 9,3);

StringGrid5.Cells[10,k]: =floattostrf (C10, fffixed, 9,3);

StringGrid5.Cells[11,k]: =floattostrf (dC, fffixed, 9,0);

if C3 < C10.

then StringGrid5. Cells[12,k] := 'M3 выгоднее'.

else StringGrid5. Cells[12,k] := 'M10 выгоднее';

k:=k+1;

Zd10:=Zd10+dZd10;

end;

Zc10:=Zc10+dZc10;

end;

Zd3:=Zd3+dZd3;

end;

Zc3:=Zc3+dZc3;

end;

end;

procedure TForm1. Button2Click (Sender: TObject);

var.

i:integer;

begin.

Edit1.Text:=''; Edit2. Text:=''; Edit3. Text:=''; Edit4. Text:=''; Edit5. Text:='';

Edit6.Text:=''; Edit7. Text:=''; Edit8. Text:='';

Edit11.Text:=''; Edit12. Text:=''; Edit13. Text:=''; Edit14. Text:=''; Edit15. Text:='';

Edit16.Text:=''; Edit17. Text:=''; Edit18. Text:=''; Edit19. Text:=''; Edit10. Text:='';

Edit21.Text:=''; Edit22. Text:=''; Edit23. Text:='';Edit24.Text:='';Edit25.Text:='';Edit26.Text:='';Edit27.Text:='';

StringGrid5.RowCount := 2;

for i:= 1 to 12 do.

StringGrid5.cells[i, 1]: = ' ' ;

procedure TForm1. Button3Click (Sender: TObject);

begin.

Form1.Close;

end;

end;

end.

Показать весь текст
Заполнить форму текущей работой