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

Matlab入門學習之

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

Getting started with Matlab

VIKOR method steps and code implementation (2)

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

分享興趣,傳播快樂,

增長見聞,留下美好!

親愛的您,

這裡是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。

計算折衷決策指標值

Calculate compromise decision index value

根據群體效用值與個體遺憾值的結果,在此基礎上計算決策指標Qi的值,指標Qi值越小方案越優。

According to the results of the group utility value and the individual regret value, the value of the decision index Qi is calculated on this basis。 The smaller the value of the index Qi, the better the solution。

其中:

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

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

V 表示為決策機制係數,如果V>0。5,則表示根據最大化群體效應決策機制決策;如果V<0。5,則表示根據最小化個體遺憾值的決策機制決策;如果V=0。5,則表示根據協商達成最大群體效應和最小個體遺憾值同等重要的決策機制進行決策。最終,得到各方案的Qi值,而Qi值越小越好,將Qi進行升序排列得到各方案的排序結果。

V is expressed as the coefficient of the decision-making mechanism。 If V>0。5, it means that the decision-making mechanism is based on maximizing the group effect; if V<0。5, it means that it is based on the decision-making mechanism that minimizes the individual regret value; if V=0。5, it means that it is based on the negotiation A decision-making mechanism that achieves the largest group effect and the smallest individual regret value is equally important for decision-making。 Finally, the Qi value of each scheme is obtained, and the smaller the Qi value is, the better, and the Qi value is arranged in ascending order to obtain the sorting result of each scheme。

進行計算:

Best_S=min(S);

Worst_S=max(S);

Best_R=min(R);

Worst_R=max(R);

v=0。5

% v is decision mechanism coefficient。

Q=[ ];

% Q is the evaluation index。

for i=[1:Origin_Matrix_Row]

Q(end+1)=v*(S(i)-Best_S)/(Worst_S-Best_S)+(1-v)*(R(i)-Best_R)/(Worst_R-Best_R);

end

display(Q)

結果計算值:

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

確定備選方案排序及折衷方案

Determine the ranking of alternatives and trade-offs

按照 Si、Ri和 Qi 從小到大的順序對待決策方案進行排序,評價物件排在前面的優。

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

根據Qi的大小進行排序,Qi值越小,則待決策方案越優、若不能滿足條件②,則 Y1、Y2均為折衷方案;若排序第一的方案與其他幾個方案都不能滿足條件①,而只滿足條件②,則可確定不滿足條件①的方案的總體評價均為最優。

Sort according to the size of Qi。 The smaller the value of Qi, the better the solution to be decided。 If the condition ② is not satisfied, Y1 and Y2 are compromise solutions; if the first solution and several other solutions cannot meet the condition ① , And only meets the condition ②, it can be determined that the overall evaluation of the scheme that does not meet the condition ① is the best。

程式碼為:

Result_1=‘The best plan is A’;

Result_2=‘ and’;

Result_3=‘ A’;

Result_4=‘。’;

Q_1st=min(Q)

Q_2nd=min(Q(find(Q-min(Q))))

if S(find(Q==Q_1st))

ifR(find(Q==Q_1st))

disp(‘Condition 2 is satisfied。’)

Result=[Result_1,num2str(find(Q==min(Q))),Result_4];

end

elseif Q_2nd-Q_1st>(1/length(Q)-1)

disp(‘Condition 2 is not satisfied。’)

disp(‘Condition 1 is not satisfied。’)

Result=[Result_1,num2str(find(Q==min(Q))),Result_2,Result_3,。。。

num2str(find(Q==min(Q(find(Q-min(Q)))))),Result_4];

else disp(‘Condition 2 is not satisfied。’)

disp(‘Condition 1 is satisfied。’)

Result=[Result_1,num2str(find(Q==min(Q))),Result_4];

end

disp(Result)

算例中,Q(Y1)=0。0558,Q(Y2)=0。0695,其Si、Ri的結果並不滿足②,根據可接受優勢準則,也不滿足條件①。所以Y1和Y2均為最優方案。

計算結果如下:

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

今天的分享就到這裡了。

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

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

祝您今天過得開心快樂!

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!