Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
отчет по курсовой работе.doc
Скачиваний:
1
Добавлен:
01.04.2025
Размер:
1.94 Mб
Скачать
  1. Хомоненко А. «Самоучитель Delphi.net» - М: Издательство: BHV, 2011г. – 290 с.

  2. Гагарина а. «Основы технологии разработки программных продуктов».Учебное пособие. – м: 2006г.–312 с.

  3. Агальцов В.П. Математические методы в программирование. – М., 2012.–218 с.

  4. Самарский А.А., Михайлов А.П.  Математическое моделирование–ФИЗМАТЛИТ. –М:2013г.- 847 с.

  5. Бережная Е.В. Математические методы моделирования.- М.: Финансы и статистика, 2010. – 432 с.

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

program Project1;

uses

Forms,

Unit_glav in 'Unit_glav.pas' {glav},

Unit_proga in 'Unit_proga.pas' {proga},

Unit_proga2 in 'Unit_proga2.pas' {Proga2},

Unit_ometode in 'Unit_ometode.pas' {ometode},

Unit_razrab in 'Unit_razrab.pas' {razrab},

Unit_help in 'Unit_help.pas' {help};

{$R *.res}

begin

Application.Initialize;

Application.CreateForm(Tglav, glav);

Application.CreateForm(Tproga, proga);

Application.CreateForm(TProga2, Proga2);

Application.CreateForm(Tometode, ometode);

Application.CreateForm(Trazrab, razrab);

Application.CreateForm(Thelp, help);

Application.Run;

end.

unit Unit_glav;

interface

uses

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

Dialogs, Menus, sSkinProvider, sSkinManager;

type

Tglav = class(TForm)

MainMenu1: TMainMenu;

N1: TMenuItem;

N2: TMenuItem;

N4: TMenuItem;

N3: TMenuItem;

N5: TMenuItem;

N6: TMenuItem;

N7: TMenuItem;

sSkinManager1: TsSkinManager;

sSkinProvider1: TsSkinProvider;

procedure N5Click(Sender: TObject);

procedure N1Click(Sender: TObject);

procedure N2Click(Sender: TObject);

procedure N4Click(Sender: TObject);

procedure N7Click(Sender: TObject);

procedure N6Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

glav: Tglav;

implementation

uses Unit_proga, Unit_proga2, Unit_ometode, Unit_razrab, Unit_help;

{$R *.dfm}

procedure Tglav.N5Click(Sender: TObject);

begin

close;

end;

procedure Tglav.N1Click(Sender: TObject);

begin

proga.show;

end;

procedure Tglav.N2Click(Sender: TObject);

begin

proga2.show;

end;

procedure Tglav.N4Click(Sender: TObject);

begin

ometode.show;

end;

procedure Tglav.N7Click(Sender: TObject);

begin

razrab.show;

end;

procedure Tglav.N6Click(Sender: TObject);

begin

help.show;

end;

end.

unit Unit_help;

interface

uses

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

Dialogs, StdCtrls;

type

Thelp = class(TForm)

Memo1: TMemo;

private

{ Private declarations }

public

{ Public declarations }

end;

var

help: Thelp;

implementation

{$R *.dfm}

end.

unit Unit_ometode;

interface

uses

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

Dialogs, StdCtrls, jpeg, ExtCtrls;

type

Tometode = class(TForm)

Image1: TImage;

Image2: TImage;

Image3: TImage;

Image4: TImage;

Image5: TImage;

Image6: TImage;

Image7: TImage;

Image8: TImage;

Image9: TImage;

Image10: TImage;

private

{ Private declarations }

public

{ Public declarations }

end;

var

ometode: Tometode;

implementation

{$R *.dfm}

end.

unit Unit_proga;

interface

uses

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

Dialogs, StdCtrls, Buttons, Grids, ComCtrls, sButton, sLabel, sEdit;

type

Tproga = class(TForm)

StringGrid1: TStringGrid;

sButton1: TsButton;

sButton2: TsButton;

sLabel1: TsLabel;

sLabel2: TsLabel;

sLabel3: TsLabel;

sLabel4: TsLabel;

sEdit1: TsEdit;

sEdit2: TsEdit;

procedure sButton1Click(Sender: TObject);

procedure sButton2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

proga: Tproga;

x,y,i,j,n:integer;

sr:Real;

a,b:array[1..6,1..6] of Real;

mx,F:array[1..6] of Real;

implementation

{$R *.dfm}

procedure Tproga.sButton1Click(Sender: TObject);

begin

x:=Strtoint(sEdit1.Text);

y:=Strtoint(sEdit2.Text);

StringGrid1.ColCount:=x+1;

StringGrid1.RowCount:=y+2;

StringGrid1.Height:=73+(18*(y-2));

StringGrid1.Cells[0,y+1]:='Коэффициенты';

StringGrid1.Cells[1,0]:='Затраты на сырье';

StringGrid1.Cells[2,0]:='Время производства';

StringGrid1.Cells[3,0]:='Объем производимой продукции';

StringGrid1.Cells[4,0]:='Прибыль';

StringGrid1.Cells[0,1]:='Отдел 1';

StringGrid1.Cells[0,2]:='Отдел 2';

StringGrid1.Cells[0,3]:='Отдел 3';

Sbutton1.Enabled:=false;

end;

procedure Tproga.sButton2Click(Sender: TObject);

begin

ClientHeight:=360;

For i:=1 to x do

for j:=1 to y do

a[j,i]:=Strtofloat(StringGrid1.Cells[i,j]);

For i:=1 to x do

for j:=1 to y do

if a[j,i]>mx[i] then mx[i]:=a[j,i];

For i:=1 to x do

sr:=sr+mx[i];

sr:=sr/x;

For i:=1 to x do

begin {for i}

if mx[i]<sr then

for j:=1 to y do b[j,i]:=a[j,i]/mx[i]

else

for j:=1 to y do b[j,i]:=1-(a[j,i]/mx[i]);

end; {/for i}

For i:=1 to x do

mx[i]:=Strtofloat(StringGrid1.Cells[i,y+1]);

for j:=1 to y do

For i:=1 to x do

F[j]:=F[j]+(mx[i]*b[j,i]);

sr:=0;

For i:=1 to y do

if F[i]>sr then

begin

sr:=F[i];

n:=i;

end;

sLabel3.Caption:=sLabel3.Caption+floattostr(n)+'='+floattostr(F[n])+' ';

sLabel4.Caption:='Предприятие №'+floattostr(n)+' - наиболее эффективно работающее ';

sButton2.Enabled:=false;

end;

end.

unit Unit_proga2;

interface

uses

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

Dialogs, StdCtrls, Buttons, Grids, ComCtrls, sEdit, sLabel, sButton;

type

TProga2 = class(TForm)

UpDown1: TUpDown;

UpDown2: TUpDown;

StringGrid1: TStringGrid;

sButton1: TsButton;

sButton2: TsButton;

sLabel1: TsLabel;

sEdit1: TsEdit;

sEdit2: TsEdit;

sLabel3: TsLabel;

sLabel4: TsLabel;

sLabel2: TsLabel;

procedure sButton1Click(Sender: TObject);

procedure sButton2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Proga2: TProga2;

x,y,i,j,n:integer;

sr:Real;

a,b:array[1..6,1..6] of Real;

mx,F:array[1..6] of Real;

implementation

{$R *.dfm}

procedure TProga2.sButton1Click(Sender: TObject);

begin

ClientHeight:=286;

x:=Strtoint(sEdit1.Text);

y:=Strtoint(sEdit2.Text);

StringGrid1.ColCount:=x+1;

StringGrid1.Width:=253+(84*(x-2));

StringGrid1.RowCount:=y+2;

StringGrid1.Height:=73+(18*(y-2));

StringGrid1.Cells[0,y+1]:='Коэффициенты';

for i:=1 to x do

StringGrid1.Cells[i,0]:=Inttostr(i);

for i:=1 to y do

StringGrid1.Cells[0,i]:=Inttostr(i);

sButton1.Enabled:=false;

end;

procedure TProga2.sButton2Click(Sender: TObject);

begin

ClientHeight:=360;

For i:=1 to x do

for j:=1 to y do

a[j,i]:=Strtofloat(StringGrid1.Cells[i,j]);

For i:=1 to x do

for j:=1 to y do

if a[j,i]>mx[i] then mx[i]:=a[j,i];

For i:=1 to x do

sr:=sr+mx[i];

sr:=sr/x;

For i:=1 to x do

begin {for i}

if mx[i]<sr then

for j:=1 to y do b[j,i]:=a[j,i]/mx[i]

else

for j:=1 to y do b[j,i]:=1-(a[j,i]/mx[i]);

end; {/for i}

For i:=1 to x do

mx[i]:=Strtofloat(StringGrid1.Cells[i,y+1]);

for j:=1 to y do

For i:=1 to x do

F[j]:=F[j]+(mx[i]*b[j,i]);

sr:=0;

For i:=1 to y do

if F[i]>sr then

begin

sr:=F[i];

n:=i;

end;

sLabel3.Caption:=sLabel3.Caption+floattostr(n)+'='+floattostr(F[n])+' ';

sLabel4.Caption:='Предприятие №'+floattostr(n)+' - наиболее эффективно работающее ';

sButton2.Enabled:=false;

end;

end.

unit Unit_razrab;

interface

uses

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

Dialogs, StdCtrls;

type

Trazrab = class(TForm)

Memo1: TMemo;

private

{ Private declarations }

public

{ Public declarations }

end;

var

razrab: Trazrab;

implementation

{$R *.dfm}

end.