YM! Admin :
ANAKKREASI.COM
Pusat Seragam, Kaos, Promosi, dan Fashion

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
implementasi delphi 1 - Optimasi Linier
Sat, 31 Dec 2011, 06:52 AM (This post was last modified: Sat, 31 Dec 2011 08:09 AM by mas_kofa.)
Post: #1
implementasi delphi 1 - Optimasi Linier
Bismillahirrahmannirrahim...


Pemrograman linier

Metode Pemrograman linier pertama kali ditemukan oleh ahli statistika Amerika Serikat yang bernama Prof. George Dantzig (Father of the Linear Programming). Pemrograman Linier disingkat PL merupakan metode matematik dalam mengalokasikan sumber daya yang terbatas untuk mencapai suatu tujuan seperti memaksimumkan keuntungan dan meminimumkan biaya. PL banyak diterapkan dalam masalah ekonomi, industri, militer, social dan lain-lain. PL berkaitan dengan penjelasan suatu kasus dalam dunia nyata sebagai suatu model matematik yang terdiri dari sebuah fungsi tujuan linier dengan beberapa kendala linier. Tahapan dalam penyelesaian optimasi dari Linear programming ini adalah sebagai berikut :

1. Menentukan decision of variables
2. Membuat objective function
3. Memformulasikan constraints
4. Menggambarkan dalam bentuk grafik
5. Menentukan daerah kemungkinan/ "feasible"
6. Menentukan solusi optimum.

Dua jenis pendekatan yang sering digunakan dalam metode pemrograman linier ini, yaitu :

a) Metode Grafik -Digunakan untuk menyelesaikan optimasi dengan maksimum 2 variabel. -Untuk variabel lebih dari 2, penyelesaiannya menggunakan metode ke-dua.

b) Metode Simplex -Digunakan untuk proses dengan jumlah variabel lebih dari 2. -Tahapan dalam metode simplex ini lebih kompleks dibandingkan dengan metode grafik.

Sumber : http://id.wikipedia.org/wiki/Pemrograman_linier

Regards;


Mas Kofa
081 11 04 11 75
Me isn't Mine.
Visit this user's website Find all posts by this user
Quote this message in a reply
 Thanks given by: mrlee

THREAD ADVERTISEMENT
Untuk Pemasangan Iklan Silahkan Hubungi Admin

Sat, 31 Dec 2011, 08:15 AM
Post: #2
RE: implementasi delphi 1 - Optimasi Linier
A. Membuat Sistem koordinat Kartesius

apa itu sistem koordinat Kartesius??, silahkan baca http://id.wikipedia.org/wiki/Sistem_koordinat_Kartesius

Sebelum kita mulai ke contoh kasus yang sesungguh nya, terlebih dahulu kita harus bisa, bagaimana cara membuat :

1.) Sistem koordinat Kartesius.
2.) Membuat garis lurus (linier) dari satu titik x1 (x1, y1) ke x2 (x2, y2) yang dirumuskan dalam suatu persamaan linier y = ax + b;


Mariii....mari..... kita mulai............

Regards;


Mas Kofa
081 11 04 11 75
Me isn't Mine.
Visit this user's website Find all posts by this user
Quote this message in a reply
Sat, 31 Dec 2011, 08:31 AM (This post was last modified: Sat, 31 Dec 2011 03:46 PM by mas_kofa.)
Post: #3
RE: implementasi delphi 1 - Optimasi Linier
Kita mulai point 1, yakni Membuat Sistem koordinat Kartesius.

1. Mari kita buka delphi (aku masih setia di delphi7).
2. Buka New Project, lalu di Form 1 kita tambah kan

a.) TPanel
b.) TImage, ukuran : 473 x 473 (masukan ke dalam Panel1)
c.) Tbutton, Caption = "Draw"

lalu atur seperti gambar di bawah ini :

[Image: gambar1.png]

Regards;


Mas Kofa
081 11 04 11 75
Me isn't Mine.
Visit this user's website Find all posts by this user
Quote this message in a reply
Sat, 31 Dec 2011, 12:00 PM
Post: #4
RE: implementasi delphi 1 - Optimasi Linier
asikkkk, terus dong ampe tamat Big Grin

http://forego.web.id/mirror/add-list.html
Visit this user's website Find all posts by this user
Quote this message in a reply
Sat, 31 Dec 2011, 03:53 PM (This post was last modified: Sat, 21 Jan 2012 10:04 PM by mas_kofa.)
Post: #5
RE: implementasi delphi 1 - Optimasi Linier
Setelah itu double klik Button1, sehingga masuk ke code editor Button1Click();

lalu tulislah pada event tersebut sehingga seeperti di bawah ini :

    PAS Programming
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3. zz: Integer;
  4. yy: Integer;
  5. xx: Integer;
  6. i: Integer;
  7. hh: Integer;
  8. ww: Integer;
  9. y0: Integer;
  10. x0: Integer;
  11. begin
  12. //menentukan lebar x tinggi canvas TImage;
  13. ww := Image1.Width;
  14. hh := Image1.Height;
  15.  
  16. //menentukan titik pusat (0, 0) atau (x0, y0) sistem koordinat kartesian (SKK);
  17. x0 := ww div 2;
  18. y0 := hh div 2;
  19.  
  20. //proses menggambar;
  21. //hitamkan canvas;
  22. Image1.Canvas.Brush.Color := clBlack;
  23. Image1.Canvas.FillRect(Rect(0, 0, ww, hh));
  24.  
  25. //menggambar sumbu x, dari titik (-n, y0) s/d (+n, y0);
  26. Image1.Canvas.Pen.Color := clWhite;
  27. Image1.Canvas.MoveTo(00, y0);
  28. Image1.Canvas.LineTo(ww, y0);
  29.  
  30. //menggambar sumbu y, dari titik (x0, -y) s/d (x0, +y);
  31. Image1.Canvas.MoveTo(x0, 00);
  32. Image1.Canvas.LineTo(x0, hh);
  33.  
  34. //pemberian notasi2 dan angka2 dengan skala 50:1;
  35. //notasi sumbu x;
  36. Image1.Canvas.Pen.Color := clRed;
  37. yy := x0 div 25;
  38. zz := -(yy div 2);
  39. for i := 0 to yy do
  40. begin
  41. xx := i * 50 + (x0 - 50 * 4);
  42. Image1.Canvas.Ellipse(xx - 2, y0 - 2, xx + 2, y0 + 2);
  43. Image1.Canvas.Font.Color := clRed;
  44. Image1.Canvas.Font.Style := [fsbold];
  45. Image1.Canvas.TextOut(xx, y0 + 5, IntToStr(zz));
  46. inc(zz);
  47. end;
  48.  
  49. //notasi sumbu y;
  50. yy := x0 div 25;
  51. zz := yy div 02;
  52. for i := 0 to yy do
  53. begin
  54. xx := i * 50 + (y0 - 50 * 4);
  55. Image1.Canvas.Ellipse(x0 - 2, xx - 2, x0 + 2, xx + 2);
  56. if zz <> 0 then
  57. Image1.Canvas.TextOut(x0 + 5, xx, IntToStr(zz));
  58. dec(zz);
  59. end;
  60. end;



Lalu jalan kan program, dan klik pada tombol "Draw" sehingga tampilannya seperti di bawah ini :

[Image: gambar2.png]

Source Lengkap nya bisa di download di bawah ini :


Attached File(s)
.zip  source1.zip (Size: 202.92 KB / Downloads: 8)

Regards;


Mas Kofa
081 11 04 11 75
Me isn't Mine.
Visit this user's website Find all posts by this user
Quote this message in a reply
 Thanks given by: mrlee , Forego
Sat, 31 Dec 2011, 04:13 PM
Post: #6
RE: implementasi delphi 1 - Optimasi Linier
link donlut buat demo nya donk
Ato video youtube nya Big Grin
Find all posts by this user
Quote this message in a reply
Sat, 31 Dec 2011, 05:29 PM (This post was last modified: Sat, 31 Dec 2011 05:30 PM by mas_kofa.)
Post: #7
RE: implementasi delphi 1 - Optimasi Linier
(Sat, 31 Dec 2011 04:13 PM)mrlee Wrote:  link donlut buat demo nya donk
Ato video youtube nya Big Grin

Lha itu link download ada di atas.....

Regards;


Mas Kofa
081 11 04 11 75
Me isn't Mine.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


Contact Us | Forego | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication