Hướng nghiên cứu tiếp theo

Một phần của tài liệu Các kỹ thuật giải bài toán ra quyết định (Trang 73 - 85)

Xây dựng phần mềm hoàn chỉnh có thể giải được các bài toán ra quyết định đa thuộc tính trong thực tế.

Nghiên cứu thêm nữa về các mô hình giải bài toán ra quyết định đa thuộc tính bằng các phương pháp khác nhau và nghiên cứu về cách tiếp cận giải bài toán ra quyết định đa thuộc tính với thông tin không đầy đủ.

73

KẾT LUẬN VÀ KIẾN NGHỊ

Luận văn đã hoàn thành được các mục tiêu đề ra, cụ thể là:

¾ Tổng quan về ra quyết định và các kỹ thuật cơ bản giải bài toán ra quyết định đa thuộc tính.

¾ Các mô hình giải bài toán ra quyết định thuộc tính dựa trên quan hệ ưu tiên bội, ưu tiên mờ và kết hợp quan hệ ưu tiên bội với ưu tiên mờ và ma trận quyết định.

¾ Giới thiệu tổng quan về phần mềm LINGO.

¾ Xây dựng được chương trình minh họa giải các mô hình bài toán ra quyết định đa thuộc tính dựa trên quan hệ ưu tiên sử dụng ngôn ngữ Visual Basic 6.0.

74

TÀI LIỆU THAM KHẢO

1. Baker, D., Bridges, D., Hunter, R., Johnson, G., Krupa, J., Murphy, J. and Sorenson, K. (2002) Guidebook to Decision-Making Methods, WSRC- IM-2002-00002, Department of Energy, USA.

2. Cogger, K.O., Yu, P.L., (1985), Eigenweight vectors and least-distance approximation for revealedpreference inpairwiseweight ratios, Journal of Optimization Theory and Application 46, 483–491.

3. Crawford, G., Williams, C., (1985), A note on the analysis of subjective judgement matrices, Journal ofMathematical Psychology 29, 387–405. 4. E. Triantaphyllou, B. Shu, S. Nieto Sanchez, T. Ray, Multi-Criteria

Decision Making: An Operations Research Approach, Encyclopedia of

Electrical and Electronics Engineering, John Wiley & Sons, New York, NY, Vol. 15, pp. 175 – 186, (1998).

5. Harris, R. (1998) Introduction to Decision Making, VirtualSalt.

http://www.virtualsalt.com/crebook5.htm.

6. Jensen, R.E., (1984), An alternative scaling method for priorities in hierarchical structures, Journal of Mathematical Psychology 28, 317–332. 7. Jian Ma, Quan Zhang, Zhiping Fan, Jiazhi Liang, Duanning Zhou (2001), “An approach to Mutiple Attribute Decision Making based on Preference Information on alternatives”, Proceedings of the 34th Hawaii International Conference on System Sciences.

8. Jian Ma, Zhi-Ping Fan, Li-Hua Huang (1999), “A subjective and objective integrated approach to determine attribute weights”, European Journal of Operational Research 112 (1999) 397 – 404.

9. Saaty, T.L., (1980), The Analytic Hierarchy Process, McGraw-Hill, NewYork.

10.Xu, Z.S., (2002), Generalized chi squaremethod for the estimation of weights, Journal of OptimizationTheory andApplications 107, 183–192.

75

11.Ying-Ming Wang, Celik Parkan (2005), “Multiple attribute decision making based on fuzzy preference information on alternatives: Ranking and weighting”, Fuzzy Sets and Systems 153 (2005) 331 – 346.

12.Ying-Ming Wang, Celik Parkan (2006), “A general multiple attribute decision-making approach for integrating subjective preferences and objective information”, Fuzzy Sets and System 157 (2006) 1333 – 1345. 13.Zhi-Ping Fan, Jian Ma, Quan Zhang (2002), “An approach to multiple

attribute decision making based on fuzzy preference information on alternatives”, Fuzzy Sets and Systems 131 (2002) 101 – 106.

14.Zhi-Ping Fan, Guo-Fen Hu, Si-Han Xiao (2004), “A method for multiple attribute decision-making with the fuzzy preference relation on alternatives”, Computers & Industrial Engineering 46 (2004) 321 – 327.

76

PHỤ LỤC

1. Mô hình WLDN trong LINGO MODEL:

SETS:

G; ! Thuoc tinh;

A; ! Phuong an;

X(A,G):Z,BZ; !Ma tran quyet dinh va ma tran tich

cua B va Z;

S(G,G): A1,E; !Ma tran uu tien boi va ma tran don

vi;

W(G):Wj,Ei,Ej; ! Ma tran trong so;

D(A):Yi,Yj; ENDSETS DATA: G = 1 2 3 4; A = 1 2 3 4; E = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1; alpha = @POINTER(1); beta = @POINTER(2); A1 = @POINTER(3); BZ = @POINTER(4); Z = @POINTER(5); ENDDATA

!Ham muc tieu;

Min = alpha * (@SUM(D(i): Yi(i) + Yj(i))) + beta*

(@SUM(W(j): Ei(j) + Ej(j)));

!Cac rang buoc;

@FOR(D(k): @SUM(W(l): (BZ(k,l)-(@SIZE(A)-

1)*Z(k,l))*Wj(l)) - Yi(k) + Yj(k) = 0);

@FOR(W(k): @SUM(W(l): (A1(k,l) -

@SIZE(G)*E(k,l))*Wj(l)) - Ei(k) + Ej(k) = 0);

@SUM(W(l):Wj(l))=1; @FOR(W(k):Ei>=0); @FOR(W(k):Ej>=0); @FOR(D(k):Yi>=0); @FOR(D(k):Yj>=0); @FOR(W(l):Wj>=0); DATA: @POINTER(6) = Wj;

77

@POINTER(7) = @STATUS();

ENDDATA END

2. Mô hình WMDN trong LINGO MODEL:

SETS:

G; ! Thuoc tinh;

A; ! Phuong an;

X(A,G): Z,BZ; !Ma tran quyet dinh va ma tran tich

cua B va Z;

S(G,G): A1,E; !Ma tran uu tien boi va ma tran don

vi;

W(G):Wj,Ei,Ej; !Ma tran trong so;

D(A):Yi,Yj; ENDSETS DATA: G = 1 2 3 4; A = 1 2 3 4; E = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1; alpha = @POINTER(1); beta = @POINTER(2); A1 = @POINTER(3); BZ = @POINTER(4); Z = @POINTER(5); ENDDATA

!Ham muc tieu;

MIN = alpha * y + beta* m;

!Cac rang buoc;

@FOR(D(k): @SUM(W(l): (BZ(k,l)-(@SIZE(A)-

1)*Z(k,l))*Wj(l)) + y >= 0);

@FOR(D(k): @SUM(W(l): (BZ(k,l)-(@SIZE(A)-

1)*Z(k,l))*Wj(l)) - y <= 0);

@FOR(W(k): @SUM(W(l): (A1(k,l) -

@SIZE(G)*E(k,l))*Wj(l)) + m >= 0);

@FOR(W(k): @SUM(W(l): (A1(k,l) -

@SIZE(G)*E(k,l))*Wj(l)) - m <= 0); @SUM(W(l):Wj(l))=1; @FOR(W(l):Wj>=0); y >=0; m >=0; DATA:

78

@POINTER(6) = Wj;

@POINTER(7) = @STATUS();

ENDDATA

END

3. Một số Module cài đặt trong chương trình

Dim dW(4) As Double Dim dB(4, 4) As Double Dim dZ1(4, 4) As Double Dim dBZ1(4, 4) As Double Dim dA1(4, 4) As Double

Private Sub cmdThoat_Click() End

End Sub

Private Sub cmdTrongso_Click() Dim dAlpha As Double

Dim dBeta As Double Dim dZ(16) As Double Dim dBZ(16) As Double Dim dA(16) As Double dAlpha = txtAlpha.Text dBeta = txtBeta.Text DocfileB DocfileZ NhanBZ DocfileA k = 1 For i = 1 To 4 For j = 1 To 4 dBZ(k) = dBZ1(i, j) dZ(k) = dZ1(i, j) dA(k) = dA1(i, j) k = k + 1 Next j Next i

' Create the LINGO environment object Dim pLINGO As Long

79

pLINGO = LScreateEnvLng() If pLINGO = 0 Then

MsgBox ("Unable to create LINGO Environment.") GoTo FinalExit

End If

' Open LINGO's log file Dim nError As Long

nError = LSopenLogFileLng(pLINGO, "lingo.log") If nError <> 0 Then GoTo ErrorExit

' Pass memory transfer pointers to LINGO Dim dStatus As Double

' @POINTER(1)

nError = LSsetPointerLng(pLINGO, dAlpha, nPointersNow)

If nError <> 0 Then GoTo ErrorExit

' @POINTER(2)

nError = LSsetPointerLng(pLINGO, dBeta, nPointersNow)

If nError <> 0 Then GoTo ErrorExit ' @POINTER(3)

nError = LSsetPointerLng(pLINGO, dA(1), nPointersNow)

If nError <> 0 Then GoTo ErrorExit ' @POINTER(4)

nError = LSsetPointerLng(pLINGO, dBZ(1), nPointersNow)

If nError <> 0 Then GoTo ErrorExit ' @POINTER(5)

nError = LSsetPointerLng(pLINGO, dZ(1), nPointersNow)

If nError <> 0 Then GoTo ErrorExit

' @POINTER(6)

nError = LSsetPointerLng(pLINGO, dW(1), nPointersNow)

If nError <> 0 Then GoTo ErrorExit ' @POINTER(7)

80

nError = LSsetPointerLng(pLINGO, dStatus, nPointersNow)

If nError <> 0 Then GoTo ErrorExit

' Build LINGO's command script (commands ' are terminated with an ASCII 10

Dim cScript As String

If OpWLDN.Value = True Then ' Causes LINGO to echo input

cScript = "SET ECHOIN 1" & Chr(10) ' Read in the model file

cScript = cScript & _ "TAKE wldn.lng" & Chr(10)

cScript = cScript & "LOOK ALL" & Chr(10) ' Solve the model

cScript = cScript & "GO" & Chr(10) ' Quit LINGO DLL

cScript = cScript & "QUIT" & Chr(10) ' Mark end of script with a null byte cScript = cScript & Chr(0)

' Run the script dStatus = -1#

nError = LSexecuteScriptLng(pLINGO, cScript) ' Close the log file

LScloseLogFileLng (pLINGO)

' Problems?

If nError <> 0 Then

MsgBox ("Unable to solve!") GoTo ErrorExit

End If

ElseIf OpWMDN.Value = True Then ' Causes LINGO to echo input

cScript = "SET ECHOIN 1" & Chr(10) ' Read in the model file

81

cScript = cScript & _ "TAKE wmdn.lng" & Chr(10)

cScript = cScript & "LOOK ALL" & Chr(10) ' Solve the model

cScript = cScript & "GO" & Chr(10) ' Quit LINGO DLL

cScript = cScript & "QUIT" & Chr(10) ' Mark end of script with a null byte cScript = cScript & Chr(0)

' Chay file .lng dStatus = -1#

nError = LSexecuteScriptLng(pLINGO, cScript) ' Dong file log

LScloseLogFileLng (pLINGO)

' Neu co loi

If nError <> 0 Then

MsgBox ("Unable to solve!") GoTo ErrorExit

End If

End If

' Hien thi gia tri vector trong so ra man hinh For i = 1 To 4 txtW(i).Text = dW(i) Next i LSdeleteEnvLng (pLINGO) GoTo FinalExit: ErrorExit:

MsgBox ("LINGO Error Code: " & nError) LSdeleteEnvLng (pLINGO)

FinalExit: End Sub

82

Private Sub cmdXephang_Click() DocfileZ

Dim d(4) As Double

' Nhan ma tran Z voi ma tran W, Tinh ra ma tran D For i = 1 To 4

d(i) = 0

For j = 1 To 4

d(i) = d(i) + dZ1(i, j) * dW(j) Next

Next i

' Hien thi gia tri ma tran D ra man hinh For k = 1 To 4

txtD(k).Text = d(k) Next k

' Xep hang cac phuong an Dim xh(4) As Integer n = 1 For i = 1 To 4 xh(n) = Xephang(d(i), d()) n = n + 1 Next Dim th As String th = " " For n = 1 To 3 th = th + "A" + Str(xh(n)) + " > " Next th = th + "A" + Str(xh(n))

lbXephang.Caption = "Thýì týò xêìp haòng caìc phýõng aìn laÌ: " + th

End Sub

Private Sub OpWLDN_Click() OpWLDN.Value = True

End Sub

Private Sub OpWMDN_Click() OpWMDN.Value = True

83

Function Xephang(diem As Double, mang() As Double) Dim i As Integer

i = 1

For j = 1 To 4

If diem < mang(j) Then i = i + 1 End If Xephang = i Next j End Function

Private Sub DocfileB()

' Doc tep B.txt, Thong tin ma tran uu tien boi Dim FileNum As Integer

Dim TotalFile As String

FileNum = FreeFile

Open "B.txt" For Binary As #FileNum TotalFile = Space(LOF(FileNum)) Get #FileNum, , TotalFile

Close #FileNum

TotalFile = Replace(TotalFile, vbNewLine, vbTab) Fields = Split(TotalFile, vbTab)

Dim k As Integer k = 0 For i = 1 To 4 For j = 1 To 4 dB(i, j) = Val(Fields(k)) k = k + 1 Next j Next i End Sub

Private Sub DocfileZ()

' Doc tep Z.txt, Thong tin ma tran uu tien boi Dim FileNum As Integer

Dim TotalFile As String

FileNum = FreeFile

Open "Z.txt" For Binary As #FileNum TotalFile = Space(LOF(FileNum)) Get #FileNum, , TotalFile

84

TotalFile = Replace(TotalFile, vbNewLine, vbTab) Fields = Split(TotalFile, vbTab)

Dim k As Integer k = 0 For i = 1 To 4 For j = 1 To 4 dZ1(i, j) = Val(Fields(k)) k = k + 1 Next j Next i End Sub

Private Sub NhanBZ()

Dim i As Integer, j As Integer, k As Integer For i = 1 To 4

For j = 1 To 4 dBZ1(i, j) = 0 For k = 1 To 4

dBZ1(i, j) = dBZ1(i, j) + dB(i, k) * dZ1(k, j) Next k

Next j Next i End Sub

Private Sub DocfileA()

' Doc tep A.txt, Thong tin ma tran uu tien boi Dim FileNum As Integer

Dim TotalFile As String FileNum = FreeFile

Open "A.txt" For Binary As #FileNum TotalFile = Space(LOF(FileNum)) Get #FileNum, , TotalFile

Close #FileNum

TotalFile = Replace(TotalFile, vbNewLine, vbTab) Fields = Split(TotalFile, vbTab)

Dim k As Integer k = 0 For i = 1 To 4 For j = 1 To 4 dA1(i, j) = Val(Fields(k)) k = k + 1 Next j Next i End Sub

Một phần của tài liệu Các kỹ thuật giải bài toán ra quyết định (Trang 73 - 85)

Tải bản đầy đủ (PDF)

(85 trang)