DSS adalah salah satu sistem penunjang keputusan yang dibuat untuk membantu perusahaan dalam mengoptimalisasikan.

Tujuan memaximalkan Z = 50 x1 + 40 x2
Kendala-kendala:
0,4x1 + 0,5x2 < 326
0,5x1 + 0,3x2 < 354
0,05x1 + 0,1 < 62
Bentuk bakunya :
Z = 50x1 + 40x2 + 0.s1 +0.s2 + 0.s3
0,4x1 + 0,4x2 + s1 = 326
0,5x1 + 0,3x2 + s2 = 354
0,05x1 + 0,1 + s3 = 62

Tabel simpleks

VD Z X1 X2 S1 S2 S3 NK
Z 1 -50 -40 0 0 0 0
S1 0 0,4 0,5 1 0 0 326
S2
0 0,5 0,3 0 1 0 354
S3 0 0,05 0,1 0 0 1 62



Kolom kerja adalah nilai negatif terbesar
Baris pivot adalah perbandingan nilai solusi dengan nilai pada kolom kerja
S1  326 : 0,4 = 815
S2  354 : 0,5 = 708
S3  62 : 0,05 = 1240
Rubah semua nilai pada baris Pivot dengan cara membagi nilai lama bari pivot dengan baris pivot (0,5)
Maka tabel simpleks alan berubah
VD Z X1 X2 S1 S2 S3 NK
Z 1 -50 -40 0 0 0 0
S1 0 0,4 0,5 1 0 0 326
CB 0 1 0,6 0 2 0 708
S3 0 0,05 0,1 0 0 1 62

Lakukan interasi pertama
Rubah nilai dengan nilai baru dengan cara:
Nilai baru = nilai lama – (nilai kolom kerja X nilai baru baris pivot)
Tabel simpleks
VD Z CB X2 S1 S2 S3 NK
Z 1 0 -10 0 100 0 35400
S1 0 0,4 0,26 1 -0,8 0 32,8
CB 0 1 0,6 0 2 0 708
S3 0 0 0,07 0 -0,1 1 26,6

Karena masih terdapat nilai negatif pada baris CB dan PR, lakukan interasi kedua
Lakukan hal yang sama, yaitu tentukan dulu kolom kerja sampai menghitung nilai baru.
Tabel simpleks
VD Z CB PR S1 S2 S3 NK
Z 1 0 0 38,46 69,23 0 37046,15
PR 0 0 1 3,84 -3,07 0 164,61
CB 0 1 0 -2,30 3,84 0 609,23
S3 0 0 0 -0,26 0,11 1 15,07

Pada tabel diatas sudah tidak terdapat nilai negatif pada baris CB dan PR, maka didapatkan nilai :
max CB = 609,23
max PR = 164,61




koding untuk membuat program diatas :

Private Sub Command1_Click()
HASIL1.Text = NK2.Text
HASIL2.Text = NK3.Text
End Sub

Private Sub DISS_Click()
If Int(X1A) < Int(X2A) Then
kk1 = X1A
KK2 = X1B
KK3 = X1C
KK4 = X1D
Label21.Caption = "CB"
VGANTI_BP = "CB"
Else
kk1 = X2A
KK2 = X2B
KK3 = X2C
KK4 = X2D
Label22.Caption = "PR"
VGANTI_BP = "PR"

End If
If KK2 = 0 Then
A = 0
Else
A = NK2 / KK2
If KK3 = 0 Then
B = 0
Else
B = NK3 / KK3
If KK4 = 0 Then
C = 0
Else
C = NK4 / KK4

End If
End If
End If

'blok yang kemungkinan dimulai'
'If a < b And b < c And a > c Then'
'tak mungkin'

If A < B And B < C And A < C Then
x = A
F = KK2
P = Z2 / F
Q = X1B / F
R = X2B / F
S = S1B / F
T = S2B / F
U = S3B / F
V = NK2 / F
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z3.Text = Z1 - (KK3 * P)
X1C.Text = X1C - (KK3 * Q)
X2C.Text = X2C - (KK3 * R)
S1C.Text = S1C - (KK3 * S)
S2C.Text = S2C - (KK3 * T)
S3C.Text = S3C - (KK3 * U)
NK3.Text = NK3 - (KK3 * V)
Z4.Text = Z4 - (KK4 * P)
X1D.Text = X1D - (KK4 * Q)
X2D.Text = X2D - (KK4 * R)
S1D.Text = S1D - (KK4 * S)
S2D.Text = S2D - (KK4 * T)
S3D.Text = S3D - (KK4 * U)
NK4.Text = NK4 - (KK4 * V)
Z2.Text = P
X1B.Text = Q
X2B.Text = R
S1B.Text = S
S2B.Text = T
S3B.Text = U
NK2.Text = V
Label17.Caption = VGANTI_BP



'If a < b And b < c And a = c Then'
'tak mungkin'


ElseIf A < B And B > C And A > C Then
x = C
F = KK4
P = Z4 / F
Q = X1D / F
R = X2D / F
S = S1D / F
T = S2D / F
U = S3D / F
V = NK4 / F
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z3.Text = Z1 - (KK3 * P)
X1C.Text = X1C - (KK3 * Q)
X2C.Text = X2C - (KK3 * R)
S1C.Text = S1C - (KK3 * S)
S2C.Text = S2C - (KK3 * T)
S3C.Text = S3C - (KK3 * U)
NK3.Text = NK3 - (KK3 * V)
Z4.Text = P
X1D.Text = Q
X2D.Text = R
S1D.Text = S
S2D.Text = T
S3D.Text = U
NK4.Text = V
Label19.Caption = "CB"
ElseIf A < B And B > C And A < C Then
x = A
F = KK2
P = Z2 / F
Q = X1B / F
R = X2B / F
S = S1B / F
T = S2B / F
U = S3B / F
V = NK2 / F
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z3.Text = Z1 - (KK3 * P)
X1C.Text = X1C - (KK3 * Q)
X2C.Text = X2C - (KK3 * R)
S1C.Text = S1C - (KK3 * S)
S2C.Text = S2C - (KK3 * T)
S3C.Text = S3C - (KK3 * U)
NK3.Text = NK3 - (KK3 * V)
Z4.Text = Z4 - (KK4 * P)
X1D.Text = X1D - (KK4 * Q)
X2D.Text = X2D - (KK4 * R)
S1D.Text = S1D - (KK4 * S)
S2D.Text = S2D - (KK4 * T)
S3D.Text = S3D - (KK4 * U)
NK4.Text = NK4 - (KK4 * V)
Z2.Text = P
X1B.Text = Q
X2B.Text = R
S1B.Text = S
S2B.Text = T
S3B.Text = U
NK2.Text = V
Label17.Caption = VGANTI_BP
'ElseIf a < B And B > c And a = c Then'
'tak mungkin'
'ElseIf a < b And b = c And a > c Then
'tak mungkin'
ElseIf A < B And B = C And A < C Then
x = A
F = KK2
P = Z2 / F
Q = X1B / F
R = X2B / F
S = S1B / F
T = S2B / F
U = S3B / F
V = NK2 / F
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z3.Text = Z1 - (KK3 * P)
X1C.Text = X1C - (KK3 * Q)
X2C.Text = X2C - (KK3 * R)
S1C.Text = S1C - (KK3 * S)
S2C.Text = S2C - (KK3 * T)
S3C.Text = S3C - (KK3 * U)
NK3.Text = NK3 - (KK3 * V)

Z4.Text = Z4 - (KK4 * P)
X1D.Text = X1D - (KK4 * Q)
X2D.Text = X2D - (KK4 * R)
S1D.Text = S1D - (KK4 * S)
S2D.Text = S2D - (KK4 * T)
S3D.Text = S3D - (KK4 * U)
NK4.Text = NK4 - (KK4 * V)
Z2.Text = P
X1B.Text = Q
X2B.Text = R
S1B.Text = S
S2B.Text = T
S3B.Text = U
NK2.Text = V
Label17.Caption = VGANTI_BP

'ElseIf a < b And b = c And a = c Then
'tak mungkin'
ElseIf A > B And B < C And A > C Then
x = B
F = KK3
P = Z3 / F
Q = X1C / F
R = X2C / F
S = S1C / F
T = S2C / F
U = S3C / F
V = NK3 / F
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z4.Text = Z4 - (KK4 * P)
X1D.Text = X1D - (KK4 * Q)
X2D.Text = X2D - (KK4 * R)
S1D.Text = S1D - (KK4 * S)
S2D.Text = S2D - (KK4 * T)
S3D.Text = S3D - (KK4 * U)
NK4.Text = NK4 - (KK4 * V)
Z3.Text = P
X1C.Text = Q
X2C.Text = R
S1C.Text = S
S2C.Text = T
S3C.Text = U
NK3.Text = V
Label18.Caption = VGANTI_BP
ElseIf A > B And B < C And A < C Then
x = B
F = KK3
P = Z3 / F
Q = X1C / F
R = X2C / F
S = S1C / F
T = S2C / F
U = S3C / F
V = NK3 / F
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z4.Text = Z4 - (KK4 * P)
X1D.Text = X1D - (KK4 * Q)
X2D.Text = X2D - (KK4 * R)
S1D.Text = S1D - (KK4 * S)
S2D.Text = S2D - (KK4 * T)
S3D.Text = S3D - (KK4 * U)
NK4.Text = NK4 - (KK4 * V)
Z3.Text = P
X1C.Text = Q
X2C.Text = R
S1C.Text = S
S2C.Text = T
S3C.Text = U
NK3.Text = V
Label18.Caption = VGANTI_BP

ElseIf A > B And B < C And A = C Then
x = B
F = KK3
P = Z3 / F
Q = X1C / F
R = X2C / F
S = S1C / F
T = S2C / F
U = S3C / F
V = NK3 / F
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z4.Text = Z4 - (KK4 * P)
X1D.Text = X1D - (KK4 * Q)
X2D.Text = X2D - (KK4 * R)
S1D.Text = S1D - (KK4 * S)
S2D.Text = S2D - (KK4 * T)
S3D.Text = S3D - (KK4 * U)
NK4.Text = NK4 - (KK4 * V)
Z3.Text = P
X1C.Text = Q
X2C.Text = R
S1C.Text = S
S2C.Text = T
S3C.Text = U
NK3.Text = V
Label18.Caption = ²
ElseIf A > B And B > C And A > C Then
x = C
F = KK4
P = Z4 / F
Q = X1D / F
R = X2D / F
S = S1D / F
T = S2D / F
U = S3D / F
V = NK4 / F
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z3.Text = Z1 - (KK3 * P)
X1C.Text = X1C - (KK3 * Q)
X2C.Text = X2C - (KK3 * R)
S1C.Text = S1C - (KK3 * S)
S2C.Text = S2C - (KK3 * T)
S3C.Text = S3C - (KK3 * U)
NK3.Text = NK3 - (KK3 * V)
Z4.Text = P
X1D.Text = Q
X2D.Text = R
S1D.Text = S
S2D.Text = T
S3D.Text = U
NK4.Text = V
Label19.Caption = VGANTI_BP


'ElseIf a > b And b > c And a < c Then
'tak mungkin'
'/ElseIf a > b And b > c And a = c Then
'tak mungkin'
'ElseIf a > b And b = c And a > c Then
'tak mungkin'
'ElseIf a > b And b = c And a < c Then
'tak mungkin'
'ElseIf a > b And b = c And a = c Then
'tak mungkin'
'ElseIf a = b And b < c And a > c Then
'tak mungkin'
'ElseIf a = b And b < c And a < c Then
'tak mungkin'
'ElseIf a = b And b < c And a = c Then
'tak mungkin'
Else
If A = B And B > C And A > C Then
x = C
F = KK4
P = Z4 / F
Q = X1D / F
R = X2D / F
S = S1D / F
T = S2D / F
U = S3D / F
V = NK4 / F
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NKZ2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z3.Text = Z1 - (KK3 * P)
X1C.Text = X1C - (KK3 * Q)
X2C.Text = X2C - (KK3 * R)
S1C.Text = S1C - (KK3 * S)
S2C.Text = S2C - (KK3 * T)
S3C.Text = S3C - (KK3 * U)
NK3.Text = NK3 - (KK3 * V)
Z4.Text = P
X1D.Text = Q
X2D.Text = R
S1D.Text = S
S2D.Text = T
S3D.Text = U
NK4.Text = V
Label19.Caption = VGANTI_BP


'ElseIf a = b And b > c And a < c Then
'tak mungkin '
'ElseIf a = b And b > c And a = c Then
'tak mungkin'
'ElseIf a = b And b = c And a > c Then
'tak mungkin'
'ElseIf a = b And b = c And a < c Then
'tak mungkin'
'ElseIf a = b And b = c And a = c Then
'tak mungkin'
'end blok yang benar

If Label17.Caption = "CB" Then
Text8.Text = NK2
ElseIf Label18.Caption = "CB" Then
Text8.Text = NK3
ElseIf Label19.Caption = "CB" Then
Text8.Text = NK4
ElseIf Label17.Caption = "PR" Then
Text9.Text = NK2
ElseIf Label18.Caption = "PR" Then
Text9.Text = NK3
ElseIf Label19.Caption = "PR" Then
Text9.Text = NK4


End If
End If




End If




End Sub



Private Sub HSL_Click()
Z1.Text = 1
Z2.Text = 0
Z3.Text = 0
Z4.Text = 0
X1A.Text = (CB * -1)
X1B.Text = CB1
X1C.Text = CB2
X1D.Text = CB3
X2A.Text = (PR * -1)
X2B.Text = PR1
X2C.Text = PR2
X2D.Text = PR3
S1A.Text = 0
S1B.Text = 1
S1C.Text = 0
S1D.Text = 0
S2A.Text = 0
S2B.Text = 0
S2C.Text = 1
S2D.Text = 0
S3A.Text = 0
S3B.Text = 0
S3C.Text = 0
S3D.Text = 1
NK1.Text = 0
NK2.Text = TOTAL1
NK3.Text = TOTAL2
NK4.Text = TOTAL3


End Sub


Private Sub KELUAR_Click()
Unload Me
End Sub

Private Sub ULANG_Click()
CB.Text = ""
PR.Text = ""
CB1.Text = ""
CB2.Text = ""
CB3.Text = ""
PR1.Text = ""
PR2.Text = ""
PR3.Text = ""
TOTAL1.Text = ""
TOTAL2.Text = ""
TOTAL3.Text = ""

End Sub

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar