JonathanYofi

Untitled

Jul 30th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. 'bobot kriteriA
  2. c1 = 40
  3. c2 = 20
  4. c3 = 40
  5.  
  6. 'cari nilai max dan min hitung 2
  7. p1 = max_harga2(HARGA1.Text, HARGA2.Text)
  8. p2 = max_kap2(KAP1.Text, KAP2.Text)
  9. p3 = min_kon2(KON1.Text, KON2.Text)
  10.  
  11. 'normalisasi matrik
  12. c11 = Round((HARGA1.Text / p1), 4)
  13. a11 = c11 * c1
  14. '================================
  15. c21 = Round((KAP1.Text / p2), 4)
  16. a12 = c21 * c2
  17. '================================
  18. c31 = Round((p3 / KON1.Text), 4)
  19. a13 = c31 * c3
  20. '================================
  21. b21 = Round((HARGA2.Text / p1), 4)
  22. a14 = b21 * c1
  23. '=================================
  24. b22 = Round((KAP2.Text / p2), 4)
  25. a15 = b22 * c2
  26. '=================================
  27. b32 = Round((p3 / KON2.Text), 4)
  28. a16 = b32 * c3
  29.  
  30. 'total
  31. total1 = a11 + a12 + a13
  32. total2 = a14 + a15 + a16
  33. '=================================
  34.  
  35. If total1 >= total2 Then
  36. hasil.Text = total1
  37. layak.Text = "layak"
  38. If total2 <= total1 Then
  39. hasil1.Text = total2
  40. tdklayak.Text = "tidak layak"
  41. End If
  42. End If
Advertisement
Add Comment
Please, Sign In to add comment