萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

Matlab入門學習之

VIKOR方法步驟與程式碼實現(3)

Getting started with Matlab

VIKOR method steps and code implementation (3)

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

分享興趣,傳播快樂,

增長見聞,留下美好!

親愛的您,

這裡是LearningYard學苑。

今天小編為大家帶來的主題是Matlab基礎學習,

歡迎您的用心訪問,

本期推文閱讀時長大約5分鐘,請您耐心閱讀。

Share interest, spread happiness,

Increase your knowledge and leave something beautiful!

Dear you,

This is LearningYard Academy。

The topic that the editor brings to you today is Matlab basic learning,

Welcome your visit,

This tweet takes about 5 minutes to read, please read it patiently。

Matlab入門學習(3)

Matlab入門學習(3)

00:42

來自LearningYard學苑

折衷係數敏感性分析

Sensitivity Analysis of Compromise Coefficient

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

在實際決策中,專家可能有不同的主觀決策態度,進而採取不同的折衷係數V。隨著V值的變化,方案排序也會受到影響。因此,本文將V

[0,1]

以0。1為步長進行11次取值,進行敏感性分析,檢驗評價模型的穩定性。

In actual decision-making, experts may have different subjective decision-making attitudes, and then adopt different compromise coefficients V。 As the value of V changes, the order of the schemes will also be affected。 Therefore, this article will V[0,1]

With 0。1 as the step size, the value was taken 11 times, and the sensitivity analysis was performed to test the stability of the evaluation model。

進行編輯:

% Following operations are sensitivity analysis 1。

vQ=[ ];

for Disturbed_v_Token=[0:0。1:1]

fori=[1:Origin_Matrix_Row]

vQ(end+1)=Disturbed_v_Token*(S(i)-Best_S)/(Worst_S-Best_S)+。。。

(1-Disturbed_v_Token)*(R(i)-Best_R)/(Worst_R-Best_R);

end

end

Disturbed_v=[0:0。1:1];

Disturbed_v_Size=size(Disturbed_v);

Disturbed_v_Column=Disturbed_v_Size(2);

Sensitive_Analysis_Matrix_1=[ ];

Count_Number=1+Origin_Matrix_Column*(Disturbed_v_Column-1);

for i=[1:4:Count_Number]

row=vQ(i:i+3);

Sensitive_Analysis_Matrix_1=[Sensitive_Analysis_Matrix_1;row];

end

display(Sensitive_Analysis_Matrix_1)

得出結果:

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

之後對擾動後的方案進行排序:

Sensitive_Analysis_Matrix_1_Size=size(Sensitive_Analysis_Matrix_1);

Sensitive_Analysis_Matrix_1_Row=Sensitive_Analysis_Matrix_1_Size(1);

Sensitive_Analysis_Matrix_1_Column=Sensitive_Analysis_Matrix_1_Size(2);

Rank_Matrix_Q_1st=[ ];

Rank_Matrix_Q_2nd=[ ];

Rank_Matrix_Q_3rd=[ ];

Rank_Matrix_Q_4th=[ ];

for i=[1:Sensitive_Analysis_Matrix_1_Row]

Each_Row=Sensitive_Analysis_Matrix_1(i,:);

Rank_Row=sort(Sensitive_Analysis_Matrix_1(i,:));

[row1,Q_4th]=find(Each_Row==max(Rank_Row));

[row2,Q_3rd]=find(Each_Row==Rank_Row(end-1));

[row3,Q_2nd]=find(Each_Row==Rank_Row(end-2));

[row4,Q_1st]=find(Each_Row==Rank_Row(end-3));

Rank_Matrix_Q_1st(end+1)=[Q_1st];

Rank_Matrix_Q_2nd(end+1)=[Q_2nd];

Rank_Matrix_Q_3rd(end+1)=[Q_3rd];

Rank_Matrix_Q_4th(end+1)=[Q_4th];

end

Rank_Sensitive_Analysis_Matrix_1=[ ];

for i=[1:Sensitive_Analysis_Matrix_1_Row]

row=[Rank_Matrix_Q_1st(i), Rank_Matrix_Q_2nd(i),Rank_Matrix_Q_3rd(i),Rank_Matrix_Q_4th(i)];

Rank_Sensitive_Analysis_Matrix_1=[Rank_Sensitive_Analysis_Matrix_1;row];

end

display(Rank_Sensitive_Analysis_Matrix_1)

再次執行得出相應結果:

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

下一步,使用Origin軟體繪製雷達圖:

輸入上述執行結果:

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

2。選擇雷達圖進行繪製,並得出結果:

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

3。之後可以根據個人需求進行圖形的各項指標的調整。

4。

點選工具欄檔案——匯出圖形,儲存圖表。選擇(*。PNG)或(*。JPG)的圖片格式。設定完畢後點擊確定即可匯出圖片。

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

屬性權重敏感性分析

Attribute weight sensitivity analysis

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

設定屬性Cj經擾動後的評價準則權重為:

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

其中:

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

則:

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

以0。05為步長,在區間[0,2]內變換引數ξ的值,對決策評價屬性的原始權重共進行164次擾動,依次編寫以下程式碼:

% Following operations are sensitivity analysis 2。

Xi=[0:0。05:2]

% Xi is disturbance parameters。

k_Token=[ ];

% k is the weight after disturbing。

Omega_Size=size(Omega);

Omega_Column=Omega_Size(2);

Xi_Size=size(Xi);

Xi_Row=Xi_Size(1);

Xi_Column=Xi_Size(2);

for i=[1:Omega_Column]

for j=[1:Xi_Column]

k_Token(end+1)=[(1-Omega(i)*Xi(j))/(1-Omega(i))];

end

end

k=[ ];

Count_Number=1+Origin_Matrix_Column*(Origin_Matrix_Column-1);

for i=[1:Omega_Column:Count_Number]

row=k_Token(i:i+Xi_Column-1);

k=[k;row];

end

display(k)

我們即可到一下結果:

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

計算擾動後的權重矩陣:

k_Size=size(k);

k_Row=k_Size(1);

k_Column=k_Size(2);

Disturbed_Omega_Token=[ ];

n=1;

for i=[1:k_Row]

for j=[1:k_Column]

for m=[1:Omega_Column]

if m==n

Omega_Token=Omega(m)*Xi(j);

else Omega_Token=Omega(m)*k(i,j);

end

Disturbed_Omega_Token(end+1)=[Omega_Token];

end

end

n=n+1;

end

Disturbed_Omega_Matrix=[ ];

Disturbed_Omega_Matrix_Size=size(Disturbed_Omega_Token);

Disturbed_Omega_Matrix_Column=Disturbed_Omega_Matrix_Size(2);

for i=[1:Omega_Column:Disturbed_Omega_Matrix_Column]

row=Disturbed_Omega_Token(i:i+3);

Disturbed_Omega_Matrix=[Disturbed_Omega_Matrix;row];

end

display(Disturbed_Omega_Matrix)

擾動之後的矩陣為:

萌說新語——Matlab入門學習之VIKOR方法步驟與程式碼實現(3)

擾動權重的敏感性分析,本質上就是更換權重對方法進行重新計算。本文在擾動權重的基礎上重新對群體效用值和個體遺憾值進行計算,最終得到不同權重下的Q值。

這之後我們就可以將得到的結果用Origin繪製出雷達圖,利用結果進行分析。

根據實驗結果可得:方案A4在決策中相較於其他方案更加穩定,在不同權重的影響下基本上保持最優。因此,A4與 A1 均為最優方案。

The sensitivity analysis of the disturbance weight is essentially to recalculate the method by changing the weight。 This paper recalculates the group utility value and the individual regret value on the basis of the disturbance weight, and finally obtains the Q value under different weights。

After that, we can use Origin to draw a radar chart with the results obtained, and use the results for analysis。

According to the experimental results, it can be obtained that scheme A4 is more stable in decision-making than other schemes, and basically remains optimal under the influence of different weights。 Therefore, both A4 and A1 are the optimal solutions。

今天的分享就到這裡了。

如果您對今天的文章有獨特的想法,

歡迎給我們留言,讓我們相約明天,

祝您今天過得開心快樂!

That‘s it for today’s sharing。

If you have a unique idea about today’s article,

Welcome to leave us a message, let us meet tomorrow,

I wish you a happy day today!