当前位置:网站首页>Analytic hierarchy process (matlab)
Analytic hierarchy process (matlab)
2022-07-23 23:08:00 【Wolves_ YY】
This article draws on mathematical modeling Teacher Qingfeng's courseware and ideas , You can click the view link to view the video explanation of teacher Qingfeng : Qingfeng mathematical modeling :https://www.bilibili.com/video/BV1DW411s7wi
Just look at the following blog , Here is a supplement to this blog .
Learning notes of Qingfeng mathematical modeling —— Analytic hierarchy process (AHP)
What if the consistency inspection fails ? Here's the picture :

Program
clc,clear
disp(' Please enter the judgment matrix A')
A=input('A=');
[n,n] = size(A);
% % % % % % % % % % % % % Method 1: Calculate the weight by arithmetic average % % % % % % % % % % % % %
Sum_A = sum(A);
SUM_A = repmat(Sum_A,n,1);
Stand_A = A ./ SUM_A;
disp(' The result of calculating the weight by arithmetic average method is :');
disp(sum(Stand_A,2)./n)
% % % % % % % % % % % % % Method 2: Calculate the weight by geometric average method % % % % % % % % % % % % %
Prduct_A = prod(A,2);
Prduct_n_A = Prduct_A .^ (1/n);
disp(' The result of weight calculation by geometric average method is :');
disp(Prduct_n_A ./ sum(Prduct_n_A))
% % % % % % % % % % % % % Method 3: Calculate the weight by eigenvalue method % % % % % % % % % % % % %
[V,D] = eig(A);
Max_eig = max(max(D));
[r,c]=find(D == Max_eig , 1);
disp(' The result of calculating the weight by eigenvalue method is :');
disp( V(:,c) ./ sum(V(:,c)) )
% % % % % % % % % % % % % Here is how to calculate the consistency ratio CR Link % % % % % % % % % % % % %
CI = (Max_eig - n) / (n-1);
RI=[0 0.0001 0.52 0.89 1.12 1.26 1.36 1.41 1.46 1.49 1.52 1.54 1.56 1.58 1.59]; % Watch out! , there RI Most support n = 15
% here n=2 when , It must be a uniform matrix , therefore CI = 0, In order to avoid denominator being 0, Change the second element here to be very close to 0 Positive number of
CR=CI/RI(n);
disp(' Consistency indicators CI=');disp(CI);
disp(' Consistency ratio CR=');disp(CR);
if CR<0.10
disp(' because CR<0.10, So the judgment matrix A The consistency of is acceptable !');
else
disp(' Be careful :CR >= 0.10, Therefore, the judgment matrix A Need to change !');
endThe variables inside n Is the number of indicators , In this case n by 5 .
In practice , Just input the judgment matrix into the program . In this case , As follows 6 A judgment matrix :

边栏推荐
- TAP 系列文章7 | 易于管理的流水线配置
- Utilisation des fonctions fléchées es6
- Three network modes of VMware virtual machine
- TikTok推出多语种字幕和翻译工具
- What else do entrepreneurs need besides money? Exclusive interview with Mingyue Lake venture capital institutions
- TAP 系列文章4 | 基于 Backstage 的 TAP 开发者门户
- dried food! Implicit sparse regularization effect in neural networks
- STM32F4查看系统各部分频率
- Leetcode: palindrome number
- Inspiration from Buffett's shareholders' meeting 2021-05-06
猜你喜欢
![[jailhouse article] a novel software architecture for mixed criticality systems (2020)](/img/ab/b9269acfa5135fdaa3d0d8cc052105.png)
[jailhouse article] a novel software architecture for mixed criticality systems (2020)

USB to can device in nucleic acid extractor high performance USB interface can card

Microsoft SQL Server database language and function usage (XIII)

Introduction and project development of MVVM and mvvmlight (I)

Upgrade unity visual studio 2019 to 2022 (throw away pirated red slag)

TAP 系列文章6 | TAP的应用模型
![Is the height of binary tree [log2n]+1 equal to log2 (n+1)](/img/64/381376190218d5b2cdfd8b1197e8f6.png)
Is the height of binary tree [log2n]+1 equal to log2 (n+1)
![[C language] address book (static version)](/img/bc/655c1176e11f66fd168c3fae01bb11.png)
[C language] address book (static version)

Rails搭配OSS最佳实践

狂神redis笔记10
随机推荐
None和nan、NaN、NAN
What else do entrepreneurs need besides money? Exclusive interview with Mingyue Lake venture capital institutions
Diabetes genetic risk testing challenge baseline
Drools (1): introduction to drools
Three network modes of VMware virtual machine
【Unity3D日常BUG】Unity3D解决“找不到类型或命名空间名称“XXX”(您是否缺少using指令或程序集引用?)”等问题
Niuke C basic exercises
1000 okaleido tiger launched binance NFT, triggering a rush to buy
视频号加强打击低俗内容:对违背公序良俗的内容必须赶尽杀绝
糖尿病遗传风险检测挑战赛进阶
Programming in the novel [serial 20] the moon bends in the yuan universe
[Matplotlib drawing]
小说里的编程 【连载之十六】元宇宙里月亮弯弯
Excel password related
Introduction and project development of MVVM and mvvmlight (I)
Analysis of video capability and future development trend based on NVR Technology
[in depth study of 4g/5g/6g topic -40]: urllc-11 - in depth interpretation of 3GPP urllc related protocols, specifications and technical principles -5-5g QoS principle and Architecture: slicing, PDU s
Remember an experience of being cheated by the Internet
Brief analysis of compiling principle of.Net CLR R2R
Leetcode: palindrome number