matlab的基本使用入门(萌说新语Matlab入门学习之)

Matlab入门学习之

VIKOR方法步骤与代码实现(3)

Getting started with Matlab

VIKOR method steps and code implementation (3)

matlab的基本使用入门(萌说新语Matlab入门学习之)(1)

分享兴趣,传播快乐,

增长见闻,留下美好!

亲爱的您,

这里是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.

折衷系数敏感性分析

Sensitivity Analysis of Compromise Coefficient

matlab的基本使用入门(萌说新语Matlab入门学习之)(2)

在实际决策中,专家可能有不同的主观决策态度,进而采取不同的折衷系数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的基本使用入门(萌说新语Matlab入门学习之)(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的基本使用入门(萌说新语Matlab入门学习之)(4)

下一步,使用Origin软件绘制雷达图:

  1. 输入上述运行结果:

matlab的基本使用入门(萌说新语Matlab入门学习之)(5)

2.选择雷达图进行绘制,并得出结果:

matlab的基本使用入门(萌说新语Matlab入门学习之)(6)

3.之后可以根据个人需求进行图形的各项指标的调整。

4.点击工具栏文件——导出图形,保存图表。选择(*.PNG)或(*.JPG)的图片格式。设置完毕后点击确定即可导出图片。

matlab的基本使用入门(萌说新语Matlab入门学习之)(7)

属性权重敏感性分析

Attribute weight sensitivity analysis

matlab的基本使用入门(萌说新语Matlab入门学习之)(8)

设置属性Cj经扰动后的评价准则权重为:

matlab的基本使用入门(萌说新语Matlab入门学习之)(9)

其中:

matlab的基本使用入门(萌说新语Matlab入门学习之)(10)

则:

matlab的基本使用入门(萌说新语Matlab入门学习之)(11)

以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的基本使用入门(萌说新语Matlab入门学习之)(12)

计算扰动后的权重矩阵:

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的基本使用入门(萌说新语Matlab入门学习之)(13)

扰动权重的敏感性分析,本质上就是更换权重对方法进行重新计算。本文在扰动权重的基础上重新对群体效用值和个体遗憾值进行计算,最终得到不同权重下的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!

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页