Aplikasi Logika Fuzzy Dalam Penentuan Kepuasan Pasien Rawat Inap (Studi Kasus RSU Herna Medan)

  Lampiran : I

  

Universitas Sumatera Utara

  Universitas Sumatera Utara

  Universitas Sumatera Utara

Lampiran II

  

KUESIONER KEPUASAN PASIEN RAWAT INAP

RUMAH SAKIT UMUM HERNA MEDAN

  Pasien Kami yang terhormat, 1.

  Kami mohon kiranya Bapak/Ibu/Saudara dapat meluangkan waktu untuk menjawab pertanyaan- pertanyaan yang kami ajukan. Semua keterangan yang disampaikan, kami gunakan untuk kepentingan perbaikan mutu pelayanan di rumah sakit.

  2. Kami menjamin kerahasiaan Bapak/Ibu/Saudara dalam pengisian kuesioner ini.

  3. Untuk mengisinya, cukup memberikan tanda centang (√) pada salah satu pernyataan yang ada.

  4. Atas kesediaan Bapak/Ibu/Saudara, kami ucapkan terima kasih.

  A.

Informasi Umum/Informasi Pasien

  Ruang Perawatan : ………………………… Jenis Kelamin : ………………………… Umur : ………………………… Tanggal Perawatan : ….-….-2012 s/d ….-….-2012 Sumber Biaya : Biaya Pribadi

  Biaya Tempat Kerja Asuransi Biaya Pemerintah Lainnya, …………………………………………………….

  Apakah anda baru pertama kali di rawat pada rumah sakit ini Ya tidak

Petunjuk Untuk mengisi pertanyaan

  1 . Kategori 1: sangat tidak baik/ sangat tidak memuaskan

  2. Kategori 2: tidak baik/ tidak memuaskan

  3. Kategori 3: cukup baik/ cukup memuaskan

  4. Kategori 4: baik/ memuaskan

  5. Kategori 5: sangat baik/ sangat memuaskan

B. Instrumen

  

B.1 Tangibles (bukti langsung), meliputi penampilan fisik, perlengkapan, pelayan medis, dan

sarana komunikasi

  15.

  2

  3 Kondisi ruang rawat inap yang nyaman, bersih dan rapi 1

  4

  5 ฀ ฀ ฀ ฀ ฀

  1

  2

  3

  4

  5 ฀ ฀ ฀ ฀ ฀

  17. Penerangan lampu pada ruang perawatan/halaman

  5 ฀ 5.

  1 ฀

  2

  ฀

  3

  ฀

  4 ฀

  Kecepatan perawat menanggapi panggilan bel pasien

  

B.2 Reliability (keandalan), yaitu kemampuan memberikan pelayanan yang dijanjikan

dengan segera, akurat, dan memuaskan

  1 ฀

  2

  ฀

  3

  ฀

  4 ฀

  5 ฀ 6.

  4. Waktu periksa dokter di bangsal sesuai dengan jadwal

  5 ฀

  1 ฀

  ฀

  5 ฀ 27.

  Biaya sewa ruang rawat inap terjangkau

  1 ฀

  2

  ฀

  3

  4 ฀

  4 ฀

  5 ฀ 28.

  Biaya obat yang terjangkau

  1 ฀

  2

  ฀

  3

  ฀

  Kesesuaian pemberian obat dengan jadwalnya

  2

  ฀

  ฀

  5 ฀ 3.

  Sikap dan perilaku petugas pada saat memberikan pelayanan di fasilitas penunjang medis

  1 ฀

  2

  ฀

  3

  4 ฀

  ฀

  5 ฀

  ฀

  2

  ฀

  3

  ฀

  4 ฀

  4 ฀

  3

  ฀

  2

  3

  ฀

  4 ฀

  5 ฀

  

B.3 Responsiveness (daya tanggap), yaitu kesediaan para dokter,perawat dan pelayan medis

untuk membantu para pasien dan memberikan perhatian yang tepat

  1. Sikap perilaku dokter saat melakukan pemeriksaan rutin 1 ฀

  ฀

  ฀

  3

  ฀

  4 ฀

  5 ฀ 2.

  Pelayanan petugas ruang rawat inap yang sopan dan ramah

  1 ฀

  2

  4 ฀

  3

  1 ฀

  ฀

  ฀

  4 ฀

  5 ฀ 20.

  Variasi menu makanan

  1 ฀

  2

  3

  ฀

  ฀

  4 ฀

  5 ฀ 21.

  Kelengkapan perawatan medis sehingga tidak perlu dikirim ke rumah sakit lain untuk melakukan pemeriksaan tertentu

  1 ฀

  2

  ฀

  3

  2

  ฀

  Kelengkapan perabotan di ruang rawat inap

  2

  ฀

  3

  ฀

  4 ฀

  5 ฀ ruang rawat inap diwaktu malam 18.

  1 ฀

  1 ฀

  2

  ฀

  3

  ฀

  4 ฀

  5 ฀ 19.

  Ruang rawat inap bebas dari serangga

  3

  4 ฀

  ฀

  2

  3

  ฀

  4 ฀

  5 ฀ 25.

  Dokter mudah untuk dihubungi

  1 ฀

  ฀

  2

  3

  ฀

  4 ฀

  5 ฀ 26.

  Perawat mudah untuk dihubungi

  1 ฀

  2

  ฀

  1 ฀

  5 ฀ 22.

  5 ฀ 23.

  Tersedianya tempat parkir yang cukup

  1 ฀

  2

  ฀

  3

  ฀

  4 ฀

  Tersedianya tempat untuk keluarga penunggu pasien

  Ruang rawat inap mudah dicari

  1 ฀

  2

  ฀

  3

  ฀

  4 ฀

  5 ฀ 24.

  5 ฀

  

B.4 Assurance (jaminan), merupakan kemampuan dari dokter, perawat dan pelayan

kesehatan lainnya untuk memberikan keyakinan kepada pasien.

  1 ฀

  1 ฀

  Keterampilan petugas medis lain dalam memberikan pelayanan kesehatan

  5 ฀ 9.

  4 ฀

  ฀

  3

  ฀

  2

  Keterampilan perawat dalam memberikan pelayanan medis ke pasien

  ฀

  5 ฀ 8.

  4 ฀

  ฀

  3

  ฀

  2

  1 ฀

  Kebijaksanaan dokter/ Pengalaman dokter

  2

  3

  4 ฀

  5 ฀ keluarga pasien dan pengunjung/tamu pasien 4.

  5 ฀

  4 ฀

  ฀

  3

  ฀

  2

  1 ฀

  Kesediaan perawat untuk menolong pasien duduk, berdiri dan berjalan

  4 ฀

  ฀

  ฀

  3

  ฀

  2

  1 ฀

  Sikap perawat dan dokter menanggapi pertanyaan

  

B.5 Emphaty (empati), mencakup kepedulian serta perhatian individual kepada para Pasien

3.

  5 ฀

  4 ฀

  5 ฀ 7.

  ฀

  2

  3

  3

  ฀

  2

  1 ฀

  Dokter menjelaskan pengobatan yang akan dilakukan

  5 ฀ 3.

  4 ฀

  ฀

  ฀

  4 ฀

  2

  1 ฀

  Ketelitian dokter dalam memeriksa pasien

  5 ฀ 2.

  4 ฀

  ฀

  3

  ฀

  ฀

  5 ฀ 4.

  3

  ฀

  ฀

  2

  1 ฀

  Tanggapan dan jawaban dokter atas keluhan pasien

  5 ฀ 6.

  4 ฀

  ฀

  3

  2

  Kemanjuran/ketepatan terapi yang diberikan dokter

  1 ฀

  Penjelasan dokter tentang makanan makanan

  5 ฀ 5.

  4 ฀

  ฀

  3

  ฀

  2

  1 ฀

  `

Lampiran : III

  unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,comobj, Grids, ComCtrls, ExtCtrls, Buttons; type TForm1 = class(TForm) OpenDialog1: TOpenDialog; PageControl1: TPageControl; TabSheet1: TTabSheet; TabSheet2: TTabSheet; Button1: TButton; Button2: TButton; Button3: TButton; Label1: TLabel; Label2: TLabel; Edit1: TEdit; Label3: TLabel; Label4: TLabel; Label5: TLabel; SaveDialog1: TSaveDialog; Label6: TLabel; procedure Button1Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button2Click(Sender: TObject); procedure TabSheet1Show(Sender: TObject); procedure Button3Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } procedure baca_tab(SheetIndex:integer); end; var Form1: TForm1; Xlapp1, Sheet:Variant ; i, MaxRow, MaxCol,X, Y:integer ; dtTmp,str:string; row : TListItem; implementation uses Unit2;

  {$R *.dfm} procedure TForm1.baca_tab(SheetIndex:integer); begin Str:=trim(Edit1.Text);

  XLApp1 := createoleobject('excel.application');

  XLApp1.Workbooks.open(Str) ; Sheet := XLApp1.WorkSheets[SheetIndex] ; MaxRow := Sheet.Usedrange.EntireRow.count ; MaxCol := sheet.Usedrange.EntireColumn.count; //ListView1.Columns.Clear; for i:=1 to MaxCol do begin //ListView1.Columns.Add.Caption:=sheet.cells.ite m[1,i].value; form2.sg.Cells[i-1,0] := sheet.cells.item[1,i].value; end; for x:=2 to MaxRow do begin //row:=ListView1.Items.add; //row.Caption:=sheet.cells.item[x,1]; for y:=2 to MaxCol do begin //row.SubItems.Add(''); //dtTmp:=sheet.cells.item[x,y]; //ListView1.Items[x-2].SubItems.Strings[y- 2]:=dtTmp; form2.sg.Cells[0,x-1] := sheet.cells.item[x,1]; form2.sg.Cells[y-1,x-1] := sheet.cells.item[x,y]; end; end;

  XLApp1.Workbooks.close; PageControl1.ActivePageIndex:=1; //form2.Show; end; procedure TForm1.Button1Click(Sender: TObject); begin if OpenDialog1.Execute then begin Edit1.Text:=OpenDialog1.FileName; baca_tab(1); end; end; procedure TForm1.Button4Click(Sender: TObject); begin Close; end; procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin Action:=CaFree; end; procedure TForm1.Button2Click(Sender: TObject); begin PageControl1.ActivePageIndex:=0; end; procedure TForm1.TabSheet1Show(Sender: TObject); begin Edit1.Clear; end; procedure TForm1.Button3Click(Sender: TObject); begin form2.Show; end; procedure TForm1.FormCreate(Sender: TObject); begin PageControl1.ActivePageIndex:=0; end; end.

unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, ExtCtrls, StdCtrls; type TForm2 = class(TForm) sg: TStringGrid; Button1: TButton; Panel1: TPanel; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; Label8: TLabel; Label9: TLabel; Label10: TLabel; Label11: TLabel; Label12: TLabel; Label13: TLabel; Label14: TLabel; Label15: TLabel; Label16: TLabel; Label17: TLabel; Label18: TLabel; Button2: TButton; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public bx1,bx2,bx3,bx4,bx5 : integer; kx1,kx2,kx3,kx4,kx5 : integer; { Public declarations } end; var Form2: TForm2; implementation uses Unit1, Unit3, Unit5; {$R *.dfm} procedure TForm2.FormCreate(Sender: TObject); var i1 : integer; begin sg.ColWidths[0] := 70; //sg2.ColWidths [0] := 70; sg.ColCount :=39; for i1 := 1 to 38 do sg.ColWidths[i1]:=30; end; procedure TForm2.Button1Click(Sender: TObject); var i,j,n: integer; r : array[1..20] of string; ruang,rg : string; n1,n2,n3,n4,n5 : integer; x1,x2,x3,x4,x5 : integer; k1,k2,k3,k4,k5 : integer; b1,b2,b3,b4,b5 : integer; begin //edit1.Text := inttostr(maxcol); //edit2.Text := inttostr(maxrow); {sg2.Cells[0,0] := 'N. RUANGAN'; sg2.Cells[1,0] := 'X1'; sg2.Cells[2,0] := 'X2'; sg2.Cells[3,0] := 'X3'; sg2.Cells[4,0] := 'X4'; sg2.Cells[5,0] := 'X5'; } {sg2.Cells[6,0] := 'MAX-X1'; sg2.Cells[7,0] := 'MAX-X2'; sg2.Cells[8,0] := 'MAX-X3'; sg2.Cells[9,0] := 'MAX-X4'; sg2.Cells[10,0] := 'MAX-X5'; sg2.Cells[11,0] := 'MIN-X1'; sg2.Cells[12,0] := 'MIN-X2'; sg2.Cells[13,0] := 'MIN-X3'; sg2.Cells[14,0] := 'MAX-X4'; sg2.Cells[15,0] := 'MAX-X5';} {for i := 1 to 15 do sg2.ColWidths[i] := 30; } ruang:= sg.Cells[0,1]; rg := sg.Cells[0,1]; i :=1; J:= 1; bx1:=0; bx2:=0; bx3:=0; bx4:=0; bx5:=0; kx1:=100; kx2:=100; kx3:=100;

kx4:=100; kx5:=100; while i< maxrow do begin n:=1; x1:=0; x2:=0; x3:=0; x4:=0; x5:=0; b1:=0; b2:=0; b3:=0; b4:=0; b5:=0; k1:=100; k2:=100; k3:=100; k4:=100; k5:=100; while ruang = rg do begin n1 := strtoint(sg.Cells[33,i]); n2 := strtoint(sg.Cells[34,i]); n3 := strtoint(sg.Cells[35,i]); n4 := strtoint(sg.Cells[36,i]); n5 := strtoint(sg.Cells[37,i]); x1 := x1+ n1; x2 := x2+ n2; x3 := x3+ n3; x4 := x4+ n4; x5 := x5+ n5; if k1 > n1 then k1 := n1; if k2 > n2 then k2 := n2; if k3 > n3 then k3 := n3; if k1 > n4 then k4 := n4; if k1 > n5 then k5 := n5; if b1 < n1 then b1 := n1; if b2 < n2 then b2 := n2; if b3 < n3 then b3 := n3; if b4 < n4 then b4 := n4; if b5 < n5 then b5 := n5; if kx1 > n1 then kx1 := n1; if kx2 > n2 then kx2 := n2; if kx3 > n3 then kx3 := n3; if kx4 > n4 then kx4 := n4; if kx5 > n5 then kx5 := n5; if bx1 < n1 then bx1 := n1; if bx2 < n2 then bx2 := n2; if bx3 < n3 then bx3 := n3; if bx4 < n4 then bx4 := n4; if bx5 < n5 then bx5 := n5; n:= n+1; i:= i+1; rg := sg.Cells[0,i]; end; //memo1.Lines.Add(ruang); R[J] := RUANG; FORM3.SG1.Cells[0,J]:= RUANG; FORM3.sg1.Cells[1,j]:= copy(floattostr((x1/(n- 1))),1,5); FORM3.sg1.Cells[2,j]:= copy(floattostr((x2/(n- 1))),1,5); FORM3.sg1.Cells[3,j]:= copy(floattostr((x3/(n- 1))),1,5); FORM3.sg1.Cells[4,j]:= copy(floattostr((x4/(n- 1))),1,5); FORM3.sg1.Cells[5,j]:= copy(floattostr((x5/(n- 1))),1,4); R[J] := RUANG; FORM3.SG2.Cells[0,J]:= RUANG; FORM3.sg2.Cells[1,j]:= copy(floattostr((x1/(n- 1))),1,5); FORM3.sg2.Cells[2,j]:= copy(floattostr((x2/(n- 1))),1,5); FORM3.sg2.Cells[3,j]:= copy(floattostr((x3/(n- 1))),1,5); FORM3.sg2.Cells[4,j]:= copy(floattostr((x4/(n- 1))),1,5); FORM3.sg2.Cells[5,j]:= copy(floattostr((x5/(n- 1))),1,4); ruang:= sg.Cells[0,i]; rg:= sg.Cells[0,i]; J:= J+1; end; form5.edit1.text := inttostr(i-1); FORM5.Edit12.Text := INTTOSTR(J-1); label7.Caption := COPY(FLOATTOSTR(bx1),1,6); label8.Caption := COPY(FLOATTOSTR(kx1),1,6); label9.Caption := COPY(FLOATTOSTR(bx2),1,6); label10.Caption := COPY(FLOATTOSTR(kx2),1,6); label11.Caption := COPY(FLOATTOSTR(bx3),1,6); label12.Caption := COPY(FLOATTOSTR(kx3),1,6); label13.Caption := COPY(FLOATTOSTR(bx4),1,6); label14.Caption := COPY(FLOATTOSTR(kx4),1,6); label15.Caption := COPY(FLOATTOSTR(bx5),1,6); label16.Caption := COPY(FLOATTOSTR(kx5),1,6); FORM3.LBX1.Caption := COPY(FLOATTOSTR(bx1),1,6); FORM3.KBX1.Caption := COPY(FLOATTOSTR(kx1),1,6);

  FORM3.LBX2.Caption := COPY(FLOATTOSTR(bx2),1,6); FORM3.KBX2.Caption := COPY(FLOATTOSTR(kx2),1,6); FORM3.LBX3.Caption := COPY(FLOATTOSTR(bx3),1,6); FORM3.KBX3.Caption := COPY(FLOATTOSTR(kx3),1,6); FORM3.LBX4.Caption := COPY(FLOATTOSTR(bx4),1,6); FORM3.KBX4.Caption := COPY(FLOATTOSTR(kx4),1,6); FORM3.LBX5.Caption := COPY(FLOATTOSTR(bx5),1,6); FORM3.KBX5.Caption := COPY(FLOATTOSTR(kx5),1,6); end; procedure TForm2.Button2Click(Sender: TObject); begin form3.show; end; end. unit Unit3; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,Unit2, TeeProcs, TeEngine, Chart, ExtCtrls, Grids, Series, Buttons, ActnMan, ActnColorMaps; type TForm3 = class(TForm) Panel1: TPanel; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; LBX1: TLabel; KBX1: TLabel; Label10: TLabel; Label11: TLabel; Label14: TLabel; Label15: TLabel; Label16: TLabel; Label17: TLabel; Label18: TLabel; Label19: TLabel; LBX2: TLabel; KBX2: TLabel; LBX3: TLabel; KBX3: TLabel; LBX4: TLabel; KBX4: TLabel; LBX5: TLabel; KBX5: TLabel; Panel2: TPanel; Chart2: TChart; Chart3: TChart; Chart4: TChart; Chart5: TChart; sg1: TStringGrid; Panel3: TPanel; Chart6: TChart; Chart7: TChart; Chart8: TChart; Chart9: TChart; Chart10: TChart; SG2: TStringGrid; BitBtn1: TBitBtn; Edit1: TEdit; Button1: TButton; Chart1: TChart; Series1: TLineSeries;

  Series2: TLineSeries; Series3: TLineSeries; Series4: TLineSeries; Series5: TLineSeries; Series6: TLineSeries; Series7: TLineSeries; Series8: TLineSeries; Series9: TLineSeries; Series10: TLineSeries; Series11: TLineSeries; Series12: TLineSeries; Series13: TLineSeries; Series14: TLineSeries; Series15: TLineSeries; Series16: TLineSeries; Series17: TLineSeries; Series18: TLineSeries; Series19: TLineSeries; Series20: TLineSeries; Button2: TButton; Button3: TButton; procedure BitBtn1Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; type datamf = array[1..5] of real; var Form3: TForm3; f3bx1 : integer; implementation uses Unit4, Unit5; {$R *.dfm} function kcl( kcl1,kcl2,kcl3,kcl4,kcl5 :real) : real; var kecil : real; begin kecil := 10; if (kecil> KCL1) AND (KCL1 >= 0) then kecil := kcl1; if (kecil > kcl2) and (kcl2>= 0) then kecil := kcl2; if (kecil > kcl3) and (kcl3>= 0) then kecil := kcl3; if (kecil > kcl4) and (kcl4>= 0) then kecil := kcl4; if (kecil > kcl5) and (kcl5>= 0) then kecil := kcl5; kcl := kecil; end; procedure gbrchart(ch :tchart; nmax,nmin : REAL; judul : string); var nint,dt : real; nx : array[1..6] of real; i : integer; X : REAL; begin Ch.BottomAxis.SetMinMax(nmin-2,nmax+2); Ch.LeftAxis.SetMinMax(-0.25,1.25);//Mengatur min dan max pd sb y Ch.LeftAxis.Increment := 0.5; ch.Legend.Visible:=false; ch.Title.Text.Clear; ch.Title.Font.Color := clred; ch.Title.Text.Insert(0,judul); nint := (nmax-nmin)/4; Ch.BottomAxis.Increment := nint; nx[1]:= nmin; for i:= 2 to 6 do nx[i]:= nx[i-1]+nint; X :=0; WHILE X< NMAX+2 DO begin if X <= nx[1] then dt := 1 else if (X <= nx[2]) and (X > nx[1]) then dt := (nx[2]-X)/nint else if (X <= nx[3]) and (X > nx[2]) then dt := ( X -nx[2])/nint else if (X <= nx[4]) and (X > nx[3]) then dt := (nx[4]-X)/nint else if(X <= nx[5]) and (X > nx[4]) then dt := ( X -nx[4])/nint else dt :=1; ch.Series[1].AddXY(X,dt,'',clblue); X:= X+0.25 end; //series 2 X :=0; WHILE X<= NMAX+2 DO begin if X <= nx[1] then dt := 0 else if (X <= nx[2]) and (X > nx[1]) then dt := (X- nx[1])/nint else if (X <= nx[3]) and (X > nx[2]) then dt := ( nx[3]-X)/nint else if (X <= nx[4]) and (X > nx[3]) then dt := (X-nx[3])/nint else if(i <= nx[5]) and (X > nx[4]) then dt := ( nx[5]-x)/nint else dt :=0; ch.Series[0].AddXY(X,dt,'',clblue); X:= X+0.25 end; end; //sigmoid procedure gbrchart1(ch :tchart; nmax,nmin : REAL; judul : string); var nint,dt : real; nx : array[1..6] of real; i : integer; x :real; begin Ch.BottomAxis.SetMinMax(nmin-2,nmax+2); Ch.LeftAxis.SetMinMax(-0.25,1.25);//Mengatur min dan max pd sb y Ch.LeftAxis.Increment := 0.5; ch.Legend.Visible:=false; ch.Title.Text.Clear; ch.Title.Font.Color := clred; ch.Title.Font.Size:=12; ch.Title.Text.Insert(0,judul); nint := (nmax-nmin)/4; Ch.BottomAxis.Increment := nint; nx[1]:= nmin; for i:= 2 to 6 do nx[i]:= nx[i-1]+nint; x :=0; while x<= nmax+2 do begin if x <= nx[1] then dt:=1 else if (x <= (nx[1]+nint/2)) and (i>nx[1]) then dt := 1-2* sqr((x-nx[1])/(nx[2]-nx[1])) else if (x <= nx[2]) and (x > (nx[1]+nint/2)) then dt :=2* sqr((nx[2]-x)/(nx[2]-nx[1])) else if (x > nx[2]) and (x <= nx[4]) then dt :=(1/(1+ sqr((x-nx[3])/(nint/2)))) else if (x <= (nx[4]+nint/2)) and (x>nx[4]) then dt := 2* sqr((x-nx[4])/(nx[5]-nx[4])) else if (x <= nx[5]) and (x > (nx[4]+ nint/2)) then dt :=1-2* sqr((nx[5]-x)/(nx[5]-nx[4])) else

dt :=1; ch.Series[1].AddXY(x,dt,'',clblue); x:= x+0.25; end; //series 2 x :=0; while x<= (nmax +2) do begin if x <= nx[1] then dt :=0 else if (x <= nx[3]) and (x>nx[1]) then dt := 1/(1+ sqr((x-nx[2])/(nint/2))) else if (x <= nx[5]) and ( x>nx[3]) then dt :=(1/(1+ sqr((x-nx[4])/(nint/2)))) else dt :=0; ch.Series[0].AddXY(x,dt,'',clblue); x := x+0.25; end; end; procedure segitiga ( NMAX,NMIN : REAL; N : REAL; KOL: INTEGER; brs :integer; SG: TStringGrid);

  VAR X : ARRAY[1..5] OF REAL; KOLOM :INTEGER;

  INTERVAl : REAL; dt : real; begin

  INTERVAL :=(NMAX-NMIN)/4; X[1] := NMIN; X[2] := x[1]+INTERVAL; x[3] := x[2]+interval; x[4] := x[3]+interval; x[5] := x[4]+interval; //stb

  IF N< X[1] THEN dt :=1 else if (N >= X[1]) AND (N <X[2]) THEN DT := (x[2] -n)/interval ELSE DT :=0; sg.Cells[5*kol+1,brs] :=copy(floattostr(dt),1,5); //tb if (n < x[1])or (n>=x[3]) then dt :=0 else if (n>= x[1]) and( n< x[2]) then dt := (n-x[1])/interval else dt :=(x[3]-n)/interval; sg.Cells[5*kol+2,brs] :=copy(floattostr(dt),1,5); if (n < x[2])or (n>=x[4]) then dt :=0 else if (n>= x[2]) and( n< x[3]) then dt := (n-x[2])/interval else dt := (x[4]-n)/interval; sg.Cells[5*kol+3,brs] :=copy(floattostr(dt),1,5); if (n < x[3])or (n>=x[5]) then dt :=0 else if (n>= x[3]) and( n< x[4]) then dt := (n-x[3])/interval else dt := (x[5]-n)/interval; sg.Cells[5*kol+4,brs] :=copy(floattostr(dt),1,5);

  IF N< X[4] THEN dt :=0 else if (N >= X[4]) AND (N <=X[5]) THEN DT := (n-x[4])/interval ELSE DT :=1; sg.Cells[5*kol+5,brs] :=copy(floattostr(dt),1,5); end; PROCEDURE SIGMOID( NMAX,NMIN : REAL; N : REAL; KOL: INTEGER; brs :integer; SG: TStringGrid );

  VAR X : ARRAY[1..5] OF REAL; KOLOM :INTEGER;

  INTERVAl : REAL; dt : real; BEGIN

  INTERVAL :=(NMAX-NMIN)/4; X[1] := NMIN; X[2] := x[1]+INTERVAL; x[3] := x[2]+interval; x[4] := x[3]+interval; x[5] := x[4]+interval; //stb

  IF N< X[1] THEN dt :=1 else if (N >= X[1]) AND (N <X[1]+ INTERVAL/2) THEN DT := 1- 2* SQR((N-X[1])/(X[2]-X[1])) ELSE IF (N>= X[1]+ INTERVAL/2) AND (N <X[2]) THEN DT := 2*SQR((X[2]-N)/(X[2]-X[1])) ELSE DT :=0; sg.Cells[5*kol+1,brs] :=copy(floattostr(dt),1,4); //tb if (n < x[1])or (n>x[3]) then dt :=0 else if (n>= x[1]) and( n< x[3]) then dt := 1/(1+ sqr(( n-x[2])/(interval/2))); sg.Cells[5*kol+2,brs] :=copy(floattostr(dt),1,4); if (n < x[2])or (n>x[4]) then dt :=0 else if (n>= x[2]) and( n< x[4]) then dt := 1/(1+ sqr(( n-x[3])/(interval/2))); sg.Cells[5*kol+3,brs] :=copy(floattostr(dt),1,4); if (n < x[3])or (n>x[5]) then dt :=0 else if (n>= x[3]) and( n< x[5]) then dt := 1/(1+ sqr(( n-x[4])/(interval/2))); sg.Cells[5*kol+4,brs] :=copy(floattostr(dt),1,4);

  IF N< X[4] THEN dt :=0 else if (N >= X[4]) AND (N <X[4]+ INTERVAL/2) THEN DT := 2*SQR((n-x[4])/(X[5]-X[4])) ELSE IF (N>= X[4]+ INTERVAL/2) AND (N <X[5]) THEN DT := 1- 2* SQR((x[5]-N)/(X[5]-X[4])) ELSE DT :=1; sg.Cells[5*kol+5,brs] :=copy(floattostr(dt),1,4); END; procedure infrenisegitiga( sg : tstringgrid; mem: tmemo); var nilai : array[1..5,1..5] of real; x1,x2,x3,x4,x5 : array[1..2] of string; nx1,nx2,nx3,nx4,nx5 : array[1..2] of real; nmf1,nmf2,nmf3,nmf4,nmf5 : array[1..2] of real; I : INTEGER;

  R1,R2,R3,R4,R5 : BYTE; RULE : ARRAY[1..32] OF STRING; Z : ARRAY[1..32] OF REAL; predikat : array[1..32] of real; mf : array[1..5] of real; J : BYTE; zhitung,predhitung : real; kepuasan,RATA : real ; begin nilai[1,1] := 43.73; nilai[1,2] := 35; nilai[1,3] := 26.25; nilai[1,4] := 17.5; nilai[1,5] := 8.75; nilai[2,1] := 9.375; nilai[2,2] := 7.5; nilai[2,3] := 5.625; nilai[2,4] := 3.75; nilai[2,5] := 1.875; nilai[3,1] := 12.5; nilai[3,2] := 10; nilai[3,3] := 7.5; nilai[3,4] := 5; nilai[3,5] := 2.5; nilai[4,1] := 28.125; nilai[4,2] := 22.5; nilai[4,3] := 16.875; nilai[4,4] := 11.25; nilai[4,5] := 5.625; nilai[5,1] := 6.25; nilai[5,2] := 5; nilai[5,3] := 3.75; nilai[5,4] := 2.5; nilai[5,5] := 1.25; I :=1; while sg.Cells[0,i] <> '' do begin //mencari nilai tangibles if sg.Cells[6,I] <> '0' then begin x1[1] :='STB'; x1[2] :='TB'; nx1[1]:= nilai[1,5]; nx1[2] := nilai[1,4]; nmf1[1] := strtofloat(sg.Cells[6,i]); nmf1[2] := strtofloat(sg.Cells[7,i]); end else if sg.Cells[7,I] <> '0' then begin x1[1] :='TB'; x1[2] :='CB'; nx1[1]:= nilai[1,4]; NX1[2] := NILAI[1,3]; nmf1[1] := strtofloat(sg.Cells[7,i]); nmf1[2] := strtofloat(sg.Cells[8,i]); end ELSE if sg.Cells[8,I] <> '0' then begin x1[1] :='CB'; X1[2] :='B'; nx1[1]:= nilai[1,3]; NX1[2] := NILAI[1,2]; nmf1[1] := strtofloat(sg.Cells[8,i]); nmf1[2] := strtofloat(sg.Cells[9,i]); end ELSE BEGIN x1[1] :='B'; X1[2] :='SB'; nx1[1]:= nilai[1,2]; NX1[2] := NILAI[1,1]; nmf1[1] := strtofloat(sg.Cells[9,i]); nmf1[2] := strtofloat(sg.Cells[10,i]); END; //mencari nilai RELIABILITY if sg.Cells[11,I] <> '0' then begin x2[1] :='STB'; x2[2] :='TB'; nx2[1]:= nilai[2,5]; nx2[2] := nilai[2,4]; nmf2[1] := strtofloat(sg.Cells[11,i]); nmf2[2] := strtofloat(sg.Cells[12,i]); end else if sg.Cells[12,I] <> '0' then begin x2[1] :='TB'; x2[2] :='CB'; nx2[1]:= nilai[2,4]; NX2[2] := NILAI[2,3]; nmf2[1] := strtofloat(sg.Cells[12,i]); nmf2[2] := strtofloat(sg.Cells[13,i]); end ELSE if sg.Cells[13,I] <> '0' then begin x2[1] :='CB'; X2[2] :='B'; nx2[1]:= nilai[2,3]; NX2[2] := NILAI[2,2]; nmf2[1] := strtofloat(sg.Cells[13,i]); nmf2[2] := strtofloat(sg.Cells[14,i]); end ELSE BEGIN x2[1] :='B'; X2[2] :='SB'; nx2[1]:= nilai[2,2]; NX2[2] := NILAI[2,1]; nmf2[1] := strtofloat(sg.Cells[14,i]); nmf2[2] := strtofloat(sg.Cells[15,i]); END; //mencari nilai RESPONSIVE if sg.Cells[16,I] <> '0' then begin x3[1] :='STB'; x3[2] :='TB'; nx3[1]:= nilai[3,5]; nx3[2] := nilai[3,4]; nmf3[1] := strtofloat(sg.Cells[16,i]); nmf3[2] := strtofloat(sg.Cells[17,i]); end else if sg.Cells[17,I] <> '0' then begin x3[1] :='TB'; x3[2] :='CB'; nx3[1]:= nilai[3,4]; NX3[2] := NILAI[3,3]; nmf3[1] := strtofloat(sg.Cells[17,i]); nmf3[2] := strtofloat(sg.Cells[18,i]); end ELSE if sg.Cells[18,I] <> '0' then begin x3[1] :='CB'; X3[2] :='B'; nx3[1]:= nilai[3,3]; NX3[2] := NILAI[3,2]; nmf3[1] := strtofloat(sg.Cells[18,i]); nmf3[2] := strtofloat(sg.Cells[19,i]); end ELSE BEGIN x3[1] :='B'; X3[2] :='SB'; nx3[1]:= nilai[3,2]; NX3[2] := NILAI[3,1]; nmf3[1] := strtofloat(sg.Cells[19,i]); nmf3[2] := strtofloat(sg.Cells[20,i]); END; //mencari nilai RESPONSIVE if sg.Cells[21,I] <> '0' then begin x4[1] :='STB'; x4[2] :='TB'; nx4[1]:= nilai[4,5]; nx4[2] := nilai[4,4]; nmf4[1] := strtofloat(sg.Cells[21,i]); nmf4[2] := strtofloat(sg.Cells[22,i]);

  X5[2] :='B'; nx5[1]:= nilai[5,3]; NX5[2] := NILAI[5,2]; nmf5[1] := strtofloat(sg.Cells[28,i]); nmf5[2] := strtofloat(sg.Cells[29,i]); end ELSE BEGIN x5[1] :='B'; X5[2] :='SB'; nx5[1]:= nilai[5,2]; NX5[2] := NILAI[5,1]; nmf5[1] := strtofloat(sg.Cells[29,i]); nmf5[2] := strtofloat(sg.Cells[30,i]); END; //RULE J :=1; FOR R1 := 1 TO 2 DO FOR R2 := 1 TO 2 DO FOR R3 := 1TO 2 DO FOR R4 := 1 TO 2 DO FOR R5 := 1 TO 2 DO BEGIN

  end else if sg.Cells[22,I] <> '0' then begin x4[1] :='TB'; x4[2] :='CB'; nx4[1]:= nilai[4,4]; NX4[2] := NILAI[4,3]; nmf4[1] := strtofloat(sg.Cells[22,i]); nmf4[2] := strtofloat(sg.Cells[23,i]); end ELSE if sg.Cells[23,I] <> '0' then begin x4[1] :='CB'; X4[2] :='B'; nx4[1]:= nilai[4,3]; NX4[2] := NILAI[4,2]; nmf4[1] := strtofloat(sg.Cells[23,i]); nmf4[2] := strtofloat(sg.Cells[24,i]); end ELSE BEGIN x4[1] :='B'; X4[2] :='SB'; nx4[1]:= nilai[4,2]; NX4[2] := NILAI[4,1]; nmf4[1] := strtofloat(sg.Cells[24,i]); nmf4[2] := strtofloat(sg.Cells[25,i]); END; //mencari nilai EMPHTY if sg.Cells[26,I] <> '0' then begin x5[1] :='STB'; x5[2] :='TB'; nx5[1]:= nilai[5,5]; nx5[2] := nilai[5,4]; nmf5[1] := strtofloat(sg.Cells[26,i]); nmf5[2] := strtofloat(sg.Cells[27,i]); end else if sg.Cells[27,I] <> '0' then begin x5[1] :='TB'; x5[2] :='CB'; nx5[1]:= nilai[5,4]; NX5[2] := NILAI[5,3]; nmf5[1] := strtofloat(sg.Cells[27,i]); nmf5[2] := strtofloat(sg.Cells[28,i]); end ELSE if sg.Cells[28,I] <> '0' then begin x5[1] :='CB';

  RULE[J]:= X1[R1]+' '+ X2[R2]+' '+ X3[R3]+' '+X4[R4]+' '+X5[R5]; Z[J] := NX1[R1]*STRTOFLOAT(SG.Cells[1,I])*(100/70)+ NX2[R2]*STRTOFLOAT(SG.Cells[2,I])*(100/15)+ NX3[R3]*STRTOFLOAT(SG.Cells[3,I])*(100/20)+ NX4[R4]*STRTOFLOAT(SG.Cells[4,I])*(100/45)+ NX5[R5]*STRTOFLOAT(SG.Cells[5,I])*(100/10); mf[1] := nmf1[r1]; mf[2] := nmf2[r2]; mf[3] := nmf3[r3]; mf[4] := nmf4[r4]; mf[5] := nmf5[r5]; // kc := 10; predikat[j] := kcl(mf[1],mf[2],mf[3],mf[4],mf[5]); FORM4.Memo1.Lines.Add(RULE[J]+' '+ floattostr(predikat[j])+ ' '

  • floattostr(mf[1]) ); FORM4.Memo1.Lines.Add(FLOATTOSTR(Z[J])); J:=J+1; END; PREDHITUNG :=0; ZHITUNG :=0;

  for j := 1 to 32 do begin predhitung := predhitung+ predikat[j]*z[j]; zhitung := zhitung+predikat[j]; end; kepuasan := (predhitung/zhitung); if mem = form4.memo1 then BEGIN form5.SG5.CELLS[0,I] :=SG.CELLS[0,I]; form5.SG5.CELLS[1,I] :=SG.CELLS[1,I]; form5.SG5.CELLS[2,I] :=SG.CELLS[2,I]; form5.SG5.CELLS[3,I] :=SG.CELLS[3,I]; form5.SG5.CELLS[4,I] :=SG.CELLS[4,I]; form5.SG5.CELLS[5,I] :=SG.CELLS[5,I]; {RATA := 100/70*STRTOFLOAT(SG.CELLS[1,I])+ 100/15*STRTOFLOAT(SG.CELLS[2,I])+ 100/20*STRTOFLOAT(SG.CELLS[3,I])+ 100/45* STRTOFLOAT(SG.CELLS[4,I])+ 100/10*STRTOFLOAT(SG.CELLS[5,I]);} RATA := STRTOFLOAT(SG.CELLS[1,I])+ STRTOFLOAT(SG.CELLS[2,I])+ STRTOFLOAT(SG.CELLS[3,I])+ STRTOFLOAT(SG.CELLS[4,I])+ STRTOFLOAT(SG.CELLS[5,I]); FORM5.SG5.Cells[6,I] := COPY(FLOATTOSTR(RATA/160*100),1,6); FORM5.SG5.CELLS[7,I] :=copy(floattostr(kepuasan/100),1,6); //form4.Memo2.Lines.Add(sg.Cells [0,i]+ ' '+ copy(floattostr(kepuasan/100),1,6)) END else BEGIN //form5.SG5.CELLS[0,I] :=SG.CELLS[0,I]; FORM5.SG5.CELLS[8,I] :=copy(floattostr(kepuasan/100),1,6); END; //form4.Memo3.Lines.Add(sg.Cells [0,i]+ ' '+ copy(floattostr(kepuasan/100),1,6)); //form4.Memo2.Lines.Add(floattostr(kepuasan)); i:= i+1; end; end; procedure TForm3.BitBtn1Click(Sender: TObject); var minx1,minx2,minx3,minx4,minx5 : real; max1,max2,max3,max4,max5 : real; interval1,interval2,interval3,interval4,interval5 : real; x1,x2,x3,x4,x5: array[1..6] of real; n1,n2,n3,n4,n5: real; ruang : string; jlh,i :integer; begin max1 := strtofloat(lbx1.Caption); max2 := strtofloat(lbx2.Caption); max3 := strtofloat(lbx3.Caption); max4 := strtofloat(lbx4.Caption); max5 := strtofloat(lbx5.Caption); minx1 := strtofloat(kbx1.Caption ); minx2 := strtofloat(kbx2.Caption ); minx3 := strtofloat(kbx3.Caption ); minx4 := strtofloat(kbx4.Caption ); minx5 := strtofloat(kbx5.Caption ); interval1 := (max1-minx1)/4; interval2 := (max2-minx2)/4; interval3 := (max3-minx3)/4; interval4 := (max4-minx4)/4; interval5 := (max5-minx5)/4; form5.Edit2.Text := lbx1.Caption; form5.Edit4.Text := lbx2.Caption; form5.Edit6.Text := lbx3.Caption; form5.Edit8.Text := lbx4.Caption; form5.Edit10.Text := lbx5.Caption; form5.Edit3.Text := kbx1.Caption ; form5.Edit5.Text := kbx2.Caption ; form5.Edit7.Text := kbx3.Caption ; form5.Edit9.Text := kbx4.Caption ; form5.Edit11.Text := kbx5.Caption ; x1[1] := minx1; i:= 2; while i<= 5 do begin x1[i] := x1[i-1]+interval1; i:= i+1; end; x2[1] := minx2; i:= 2; while i<= 5 do begin x2[i] := x2[i-1]+interval2; i:= i+1; end; x3[1] := minx3; i:= 2; while i<= 5 do begin x3[i] := x3[i-1]+interval3; i:= i+1; end; x4[1] := minx4; i:= 2;

while i<= 5 do begin x4[i] := x4[i-1]+interval4; i:= i+1; end; x5[1] := minx5; i:= 2; while i<= 5 do begin x5[i] := x5[i-1]+interval5; i:= i+1; end; gbrchart(chart1,max1,minx1,'Tangibles'); gbrchart(chart2,max2,minx2,'Reliability'); gbrchart(chart3,max3,minx3,'Responsive'); gbrchart(chart4,max4,minx4,'Assurance'); gbrchart(chart5,max5,minx5,'Emphaty'); gbrchart1(chart6,max1,minx1,'Tangibles'); gbrchart1(chart7,max2,minx2,'reliability'); gbrchart1(chart8,max3,minx3,'Responsive'); gbrchart1(chart9,max4,minx4,'Assurance'); gbrchart1(chart10,max5,minx5,'Emphaty'); ruang := sg1.Cells [0,1]; i:=1; while ruang <>'' do begin n1 := strtofloat(sg1.Cells[1,i]); n2 := strtofloat(sg1.Cells[2,i]); n3 := strtofloat(sg1.Cells[3,i]); n4 := strtofloat(sg1.Cells[4,i]); n5 := strtofloat(sg1.Cells[5,i]); // derajat keanggotaan dengan dengan kurva segitiga segitiga(max1,minx1,n1,1,i,sg1); segitiga(max2,minx2,n2,2,i,sg1); segitiga(max3,minx3,n3,3,i,sg1); segitiga(max4,minx4,n4,4,i,sg1); segitiga(max5,minx5,n5,5,i,sg1); //derajat keanggotaan dengan kombinasi sigmoid dan bell //di simpan pada string grid 2 sigmoid(max1,minx1,n1,1,i,sg2); sigmoid(max2,minx2,n2,2,i,sg2); sigmoid(max3,minx3,n3,3,i,sg2); sigmoid(max4,minx4,n4,4,i,sg2); sigmoid(max5,minx5,n5,5,i,sg2); //counter i:= i+1; ruang := sg1.Cells [0,i]; end; //edit1.Text := inttostr(i); end; procedure TForm3.Button1Click(Sender: TObject); begin halt; end; procedure TForm3.FormCreate(Sender: TObject); var a: integer; begin for a:= 1 to 5 do begin sg1.ColWidths[a] :=35; sg2.ColWidths[a] :=35; end; for a:= 6 to 30 do begin sg1.ColWidths[a] :=45; sg2.ColWidths[a] :=45; end; sg1.Cells[0,0] :='RUANGAN'; SG1.Cells[1,0] :='X1'; SG1.Cells[2,0] :='X2'; SG1.Cells[3,0] :='X3'; SG1.Cells[4,0] :='X4'; SG1.Cells[5,0] :='X5'; SG1.Cells[6,0] :='µX1 STB'; SG1.Cells[7,0] :='µX1 TB'; SG1.Cells[8,0] :='µX1 CB'; SG1.Cells[9,0] :='µX1 B'; SG1.Cells[10,0] :='µX1 SB'; SG1.Cells[11,0] :='µX2 STB'; SG1.Cells[12,0] :='µX2 TB'; SG1.Cells[13,0] :='µX2 CB'; SG1.Cells[14,0] :='µX2 B'; SG1.Cells[15,0] :='µX2 SB'; SG1.Cells[16,0] :='µX3 STB'; SG1.Cells[17,0] :='µX3 TB'; SG1.Cells[18,0] :='µX3 CB'; SG1.Cells[19,0] :='µX3 B'; SG1.Cells[20,0] :='µX3 SB'; SG1.Cells[21,0] :='µX4 STB'; SG1.Cells[22,0] :='µX4 TB'; SG1.Cells[23,0] :='µX4 CB'; SG1.Cells[24,0] :='µX4 B'; SG1.Cells[25,0] :='µX4 SB'; SG1.Cells[26,0] :='µX5 STB'; SG1.Cells[27,0] :='µX5 TB'; SG1.Cells[28,0] :='µX5 CB'; SG1.Cells[29,0] :='µX5 B';

  SG1.Cells[30,0] :='µX5 SB'; //STRINGGRID II SG2.Cells[0,0] :='RUANGAN'; SG2.Cells[1,0] :='X1'; SG2.Cells[2,0] :='X2'; SG2.Cells[3,0] :='X3'; SG2.Cells[4,0] :='X4'; SG2.Cells[5,0] :='X5'; SG2.Cells[6,0] :='µX1 STB'; SG2.Cells[7,0] :='µX1 TB'; SG2.Cells[8,0] :='µX1 CB'; SG2.Cells[9,0] :='µX1 B'; SG2.Cells[10,0] :='µX1 SB'; SG2.Cells[11,0] :='µX2 STB'; SG2.Cells[12,0] :='µX2 TB'; SG2.Cells[13,0] :='µX2 CB'; SG2.Cells[14,0] :='µX2 B'; SG2.Cells[15,0] :='µX2 SB'; SG2.Cells[16,0] :='µX3 STB'; SG2.Cells[17,0] :='µX3 TB'; SG2.Cells[18,0] :='µX3 CB'; SG2.Cells[19,0] :='µX3 B'; SG2.Cells[20,0] :='µX3 SB'; SG2.Cells[21,0] :='µX4 STB'; SG2.Cells[22,0] :='µX4 TB'; SG2.Cells[23,0] :='µX4 CB'; SG2.Cells[24,0] :='µX4 B'; SG2.Cells[25,0] :='µX4 SB'; SG2.Cells[26,0] :='µX5 STB'; SG2.Cells[27,0] :='µX5 TB'; SG2.Cells[28,0] :='µX5 CB'; SG2.Cells[29,0] :='µX5 B'; SG2.Cells[30,0] :='µX5 SB'; end; procedure TForm3.Button3Click(Sender: TObject); begin FORM5.Show; end; procedure TForm3.Button2Click(Sender: TObject); begin infrenisegitiga(sg1,form4.Memo1); infrenisegitiga(sg2,form4.Memo2); FORM5.Show; end; end. unit Unit5; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, Grids, StdCtrls, ExtCtrls, TeeProcs, TeEngine, Chart, Series; type TForm5 = class(TForm) SG5: TStringGrid; Label1: TLabel; Label2: TLabel; GroupBox1: TGroupBox; Label3: TLabel; Edit1: TEdit; GroupBox2: TGroupBox; Label4: TLabel; Label5: TLabel; Edit2: TEdit; Edit3: TEdit; GroupBox3: TGroupBox; Label6: TLabel; Label7: TLabel; Edit4: TEdit; Edit5: TEdit; GroupBox4: TGroupBox; Label8: TLabel; Label9: TLabel; Edit6: TEdit; Edit7: TEdit; GroupBox5: TGroupBox; Label10: TLabel; Label11: TLabel; Edit8: TEdit; Edit9: TEdit; GroupBox6: TGroupBox; Label12: TLabel; Label13: TLabel; Edit10: TEdit; Edit11: TEdit; Button1: TButton; Memo1: TMemo; gbr1: TChart; Label14: TLabel; Edit12: TEdit; Series1: TLineSeries; Series2: TLineSeries; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form5: TForm5; max,min :real; JLH :INTEGER; implementation {$R *.dfm} procedure gbrchart(ch :tchart; nmax,nmin : REAL; judul : string); var nint,dt : real; nx : array[1..4] of real; i : integer; X : REAL; begin Ch.BottomAxis.SetMinMax(nmin-2,nmax+2); Ch.LeftAxis.SetMinMax(-0.25,1.25);//Mengatur min dan max pd sb y Ch.LeftAxis.Increment := 0.5; ch.Legend.Visible:=false; ch.Title.Text.Clear; ch.Title.Font.Color := clred; ch.Title.Text.Insert(0,judul); nint := (nmax-nmin)/3; Ch.BottomAxis.Increment := nint; nx[1]:= nmin; for i:= 2 to 4 do nx[i]:= nx[i-1]+nint; X :=0; WHILE X< NMAX+2 DO begin if X <= nx[1] then dt := 1 else if (X <= nx[2]) and (X > nx[1]) then dt := (nx[2]-X)/nint else if (X <= nx[3]) and (X > nx[2]) then dt := ( X -nx[2])/nint else if (X <= nx[4]) and (X > nx[3]) then dt := (nx[4]-X)/nint else dt :=0; ch.Series[1].AddXY(X,dt,'',clblue); X:= X+0.25 end; //series 2 X :=0; WHILE X<= NMAX+2 DO begin if X <= nx[1] then dt := 0 else if (X <= nx[2]) and (X > nx[1]) then dt := (X- nx[1])/nint else if (X <= nx[3]) and (X > nx[2]) then dt := ( nx[3]-X)/nint else if (X <= nx[4]) and (X > nx[3]) then dt := (X-nx[3])/nint else dt :=1; ch.Series[0].AddXY(X,dt,'',clblue); X:= X+0.25 end; end; procedure TForm5.FormCreate(Sender: TObject); begin SG5.Cells [0,0] :='RUANGAN'; SG5.Cells [1,0] :='X1'; SG5.Cells [2,0] :='x2'; SG5.Cells [3,0] :='x3'; SG5.Cells [4,0] :='x4'; SG5.Cells [5,0] :='x5'; SG5.Cells [6,0] :='RATA-RATA'; SG5.Cells [7,0] :='SEGITIGA'; SG5.Cells [8,0] :='SIGMOID'; sg5.Font.Size :=10; sg5.ColWidths[0] :=100; end; procedure bacadatA(sg :TStringGrid; mem :tmemo; GBR :TCHART); var i : integer; MAXR,MAXS,MAXSG : REAL; MINR,MINS,MINSG : REAL;

  INT1,INT2,INT3 : REAL; X1,X2,X3,X4 :REAL;

  XSG1,XSG2,XSG3,XSG4 : REAL; X,mf :REAL; kp1,kp2,kp3 : string; begin //MENCARI JUMLAH MINIMUN PADA RATA-RATA I := 1; MINR := STRTOFLOAT(SG.Cells[6,I]); MAXR := STRTOFLOAT(SG.Cells[6,I]); WHILE (I <= JLH) DO BEGIN

  IF MINR > STRTOFLOAT(SG.Cells[6,I]) THEN MINR := STRTOFLOAT(SG.Cells[6,I]);

  IF MAXR < STRTOFLOAT(SG.Cells[6,I]) THEN MAXR := STRTOFLOAT(SG.Cells[6,I]); I:= I+1; END; //MENCARI INTERVAL DARI NILAI SEGITIGA I := 1; MINS := STRTOFLOAT(SG.Cells[7,I]); MAXS := STRTOFLOAT(SG.Cells[7,I]); WHILE (I <= JLH) DO BEGIN IF MINS > STRTOFLOAT(SG.Cells[7,I]) THEN MINS := STRTOFLOAT(SG.Cells[7,I]);

  IF MAXS < STRTOFLOAT(SG.Cells[7,I]) THEN MAXS := STRTOFLOAT(SG.Cells[7,I]); I:= I+1; END; gbrchart(gbr,maxs,mins,'KEPUASAN');

  INT2 := (MAXS-MINS)/3; X1 := MINS; X2 := X1 + INT2; X3 := X2 + INT2; X4 := X3 + INT2; //MENCARI INTERVAL DARI NILAI SIGMOID I := 1; MINSG := STRTOFLOAT(SG.Cells[8,I]); MAXSG := STRTOFLOAT(SG.Cells[8,I]); WHILE (I <= JLH) DO BEGIN

  IF MINSG > STRTOFLOAT(SG.Cells[8,I]) THEN MINSG := STRTOFLOAT(SG.Cells[8,I]);

  IF MAXSG < STRTOFLOAT(SG.Cells[8,I]) THEN MAXSG := STRTOFLOAT(SG.Cells[8,I]); I:= I+1; END;

  INT3 := (MAXSG-MINSG)/3;

  XSG1 := MINSG;

  XSG2 := XSG1 + INT3;

  XSG3 := XSG2 + INT3;

  XSG4 := XSG3 + INT3; //MENCARI NILAI KEPUASAN PASIEN; I:=1; WHILE I <= JLH DO BEGIN mem.Lines.Add(sg.Cells[0,i]); mem.Lines.Add(' '); mem.Lines.Add('Dengan perhitungan Rata-rata'); X := STRTOFLOAT(SG.Cells[6,I]);

  IF X >= 75 THEN KP1 :='SANGAT BAIK ' else if x >= 50 then kp1 := 'BAIK' else if x>= 25 then kp1 :='CUKUP' else kp1 :='KURANG'; mem.Lines.Add(' kepuasan dengan nilai :'+ kp1); //dengan segitigs mem.Lines.Add('Nilai Segitiga '); X := STRTOFLOAT(SG.Cells[7,I]); if x <= x1 then mf :=1 else if x <= x2 then mf := (x2-x)/(x2-x1) else mf := 0; if mf <> 0 then mem.Lines.Add(' kurang dengan derajat keanggotaan '+ COPY(floattostr(mf),1,5)); if (x <= x1) or ( x > x3) then mf :=0 else if x <= x2 then mf := (x-x1)/(x2-x1) else mf := (x3-x)/(x3-x2); if mf <> 0 then mem.Lines.Add(' Cukup dengan derajat keanggotaan '+ COPY(floattostr(mf),1,5)); if (x <= x2) or ( x > x4) then mf :=0 else if x <= x3 then mf := (x-x2)/(x3-x2) else mf := (X4-x)/(x4-x3); if mf <> 0 then mem.Lines.Add(' BAIK dengan derajat keanggotaan '+ COPY(floattostr(mf),1,5)); if (x <= x3) then mf :=0 else if x <= x4 then mf := (x-x3)/(x4-x3) else mf := 1; if mf <> 0 then mem.Lines.Add(' SANGAT BAIK dengan derajat keanggotaan '+ COPY(floattostr(mf),1,5)); MEM.Lines.Add(' '); // kurva sigmoid mem.Lines.Add('Nilai sigmoid '); X := STRTOFLOAT(SG.Cells[8,I]); if x <= x1 then mf :=1 else if x <= x2 then mf := (x2-x)/(x2-x1) else mf := 0; if mf <> 0 then mem.Lines.Add(' kurang dengan derajat keanggotaan '+ COPY(floattostr(mf),1,5)); if (x <= x1) or ( x > x3) then mf :=0 else if x <= x2 then mf := (x-x1)/(x2-x1) else mf := (x3-x)/(x3-x2); if mf <> 0 then mem.Lines.Add(' Cukup dengan derajat keanggotaan '+ COPY(floattostr(mf),1,5)); if (x <= x2) or ( x > x4) then mf :=0 else if x <= x3 then mf := (x-x2)/(x3-x2) else mf := (X4-x)/(x4-x3); if mf <> 0 then mem.Lines.Add(' BAIK dengan derajat keanggotaan '+ COPY(floattostr(mf),1,5)); if (x <= x3) then mf :=0 else if x <= x4 then mf := (x-x3)/(x4-x3) else mf := 1; if mf <> 0 then mem.Lines.Add(' SANGAT BAIK dengan derajat keanggotaan '+ COPY(floattostr(mf),1,5)); MEM.Lines.Add(' '); i:=i+1; END; MEM.Lines.SaveToFile('HASIL.TXT'); end; procedure TForm5.Button1Click(Sender: TObject); begin JLH := STRTOINT(EDIT12.Text ); BACADATA(SG5,memo1,GBR1); end; end.