﻿ 一种融合相对有效性的两阶段理想点法 Two-Stage TOPSIS Based on Relative Efficiency

Operations Research and Fuzziology
Vol.07 No.04(2017), Article ID:22609,28 pages
10.12677/ORF.2017.74013

Two-Stage TOPSIS Based on Relative Efficiency

Lanmei Deng, Tianmin Huang

Mathematics School, Southwest Jiaotong University, Chengdu Sichuan

Received: Oct. 19th, 2017; accepted: Oct. 31st, 2017; published: Nov. 8th, 2017

ABSTRACT

For solving multi-objective optimization and decision making problems, decision-makers need to pick out a final decision from the Pareto optimal solution set. A two-stage technique for order preference by similarity to ideal solution (TOPSIS) containing multi-objective optimization and decision is presented. In the first stage, Pareto optimal solution set is obtained by using the TOPSIS based on relative efficiency. Decision-makers’ participation interacts with calculating weight vector in decision-making process, ensuring the objectivity of the weight vector and the degree of decision-makers’ participation; in the second phase, sort of the Pareto optimal solutions is obtained by using TOPSIS based on the linear combination of subjective empowerment based on the analytic hierarchy process (AHP) and objective empowerment based on coefficient of variation, helping decision-makers complete the decision.

Keywords:Multi-Objective Problem, TOPSIS, Relative Efficiency, Pareto Optimal Solution, Analytic Hierarchy Process, Coefficient of Variation

1. 引言

2. 多目标优化问题及求解方法

2.1. 多目标优化问题模型

$\left(VP\right)\text{}\underset{x\in R}{\mathrm{max}}f\left(x\right)=\left({f}_{1}\left(x\right),{f}_{2}\left(x\right),\cdots ,{f}_{p}\left(x\right)\right)$ (1)

2.2. 理想点法(TOPSIS)

${f}_{j}{}^{*}\ge \underset{x\in R}{\mathrm{max}}{f}_{j}\left(x\right),\text{}j=1,2,\cdots ,p$ (2)

${f}_{j}{}^{*}=\underset{x\in R}{\mathrm{max}}{f}_{j}\left(x\right),\text{}j=1,2,\cdots ,p$ (3a)

$\underset{x\in R}{\mathrm{min}}U\left(x\right)=‖f\left(x\right)-{f}^{*}‖$ (3b)

2.3. 相对有效性

$\begin{array}{l}VP\left({x}^{0}\right):\text{}\mathrm{max}\sum _{i=1}^{p}{w}_{i}{f}_{i}\left({x}^{0}\right)={w}^{\text{T}}f\left({x}^{0}\right)=h\left({x}^{0}\right)\\ \begin{array}{cc}s.t.& w\in B\left(W\right)\end{array}\text{}w\ge 0\end{array}$ (4)

$\begin{array}{l}\underset{w,x}{\mathrm{max}}{w}^{\text{T}}f\left(x\right)={w}_{1}{f}_{1}+{w}_{2}{f}_{2}+\cdots +{w}_{p}{f}_{p}\\ s.t.\text{}x\in R,w\ge 0,{w}_{1}+{w}_{2}+\cdots +{w}_{p}=1\end{array}$ (5)

${x}^{0}$ 为(VP)的弱相对有效解。进一步，若 ${w}^{0}>0$ ，则 ${x}^{0}$ 为(VP)的相对有效解。

3. 基于相对有效性的理想点法

$\begin{array}{l}{m}_{i}=\underset{x\in R}{\mathrm{min}}{f}_{i}\left(x\right)\\ {M}_{i}=\underset{x\in R}{\mathrm{max}}{f}_{i}\left(x\right)\end{array}$ (6)

$\left[{m}_{i},{M}_{i}\right]$ 即可作为目标 ${f}_{i}$ ( $i=1,2,\cdots ,p$ )的取值范围。令 ${f}_{i}{\left(x\right)}^{\prime }=\frac{{f}_{i}\left(x\right)-{m}_{i}}{{M}_{i}-{m}_{i}}$ ( $i=1,2,\cdots ,p$ )，这时， ${f}_{i}{\left(x\right)}^{\prime }\in \left[0,1\right]$ ( $i=1,2,\cdots ,p$ )，(VP)的各目标均成为取正值的目标。易知在新的目标下，(VP)的相对有效解集不变。

${f}_{j}{}^{*}\le \underset{x\in R}{\mathrm{min}}{f}_{j}{\left(x\right)}^{\prime },\text{}j=1,2,.\cdots ,p$ (7)

$\begin{array}{l}\left(WP\right)\text{}\underset{w,x}{\mathrm{max}}\left(f{\left(x\right)}^{\prime }=\sum _{i=1}^{p}{w}_{i}\left({f}_{i}{\left(x\right)}^{\prime }-{f}_{i}^{*}\right)\right)\\ \begin{array}{cc}s.t.\text{}x\in R,& \begin{array}{cc}w\ge \epsilon ,& {w}_{1}+{w}_{2}+\cdots +{w}_{p}=1\end{array}\end{array}\end{array}$ (8)

$f{\left({x}^{0}\right)}^{\prime }$${x}^{0}$ 反馈给决策者，要其作出反应，即是否对 ${x}^{0}$ 所达到的各项目标值满意。如是，则 ${x}^{0}$ 即为决策者满意的相对有效方案， ${w}^{0}$ 为对应的相对有效目标权重。否则，要决策者对下列问题作出反应：请选择你较不满意的目标值 ${f}_{k}{\left(x\right)}^{\prime }$ 并提出希望水平 ${\beta }_{k}$ ，即希望 ${f}_{k}{\left(x\right)}^{\prime }\ge {\beta }_{k}$ 。把这一约束加人到原问题(VP)的规范化问题中，形成新的多目标问题并开始新的一轮迭代 [20] ，即以下列问题：

$\left(V{P}^{\prime }\right)\text{}\underset{x\in {R}^{*}}{\mathrm{max}}f\left(x\right)=\left({f}_{1}\left(x\right),{f}_{2}\left(x\right),\cdots ,{f}_{p}\left(x\right)\right)$ (9)

$\begin{array}{l}\left(W{P}^{\prime }\right)\text{}\underset{w,x}{\mathrm{max}}\sum _{i=1}^{p}{w}_{i}\left({f}_{i}{\left(x\right)}^{\prime }-{f}_{i}^{*}\right)\\ \begin{array}{cc}\begin{array}{cc}s.t.\text{}{f}_{k}{\left(x\right)}^{\prime }\ge {\beta }_{k},& x\in R\end{array},& \begin{array}{cc}w\ge \epsilon ,& {w}_{1}+{w}_{2}+\cdots +{w}_{p}=1\end{array}\end{array}\end{array}$ (10)

4. 基于主客观线性组合赋权的理想点法

1) 建立规范化决策矩阵

2) 层次分析法(Analytic Hierarchy Process, AHP)计算主观权重向量 ${w}_{1}$ [21] [22]

${\underset{¨}{s}}_{ij}=\sqrt[p]{\prod _{k=1}^{p}{s}_{ik}\cdot {s}_{kj}}\text{}i,j=1,2,\cdots ,p$ (11)

${w}_{1}=\left(\frac{1}{\sum _{i=1}^{p}{\stackrel{˜}{s}}_{i1}},\frac{1}{\sum _{i=1}^{p}{\stackrel{˜}{s}}_{i2}},\cdots ,\frac{1}{\sum _{i=1}^{p}{\stackrel{˜}{s}}_{ip}}\right)$ (12)

3) 变异系数法计算客观权重向量 ${w}_{2}$

${q}_{i}=\frac{{\sigma }_{i}}{{\stackrel{˜}{b}}_{i}}$ (13)

${\overline{b}}_{i}$ 是第i个目标的平均值。变异系数大小反映指标的离差程度和信息量，变异系数越大，赋予权重越大。变异系数权向量 ${w}_{2}={\left[\frac{{q}_{i}}{\sum _{i=1}^{p}{q}_{i}}\right]}_{1×p}$

4) 基于组合权向量w构造加权规范化矩阵C

5) 确定理想点 ${c}^{+}$ 和负理想点 ${c}^{-}$

6) 计算各备选方案到理想点与负理想点的欧氏距离 ${d}_{i}^{{}^{+}}$${d}_{i}^{-}$

${d}_{i}^{{}^{+}}=\sqrt{\sum _{j=1}^{p}{\left({c}_{ij}-{c}_{j}^{+}\right)}^{2}},\text{}i=1,2,\cdots ,m$ (14)

${d}_{i}^{-}=\sqrt{\sum _{j=1}^{p}{\left({c}_{ij}-{c}_{j}^{-}\right)}^{2}},\text{}i=1,2,\cdots ,m$ (15)

7) 计算各方案的综合评价指数 ${Y}_{i}$ ，并按 ${Y}_{i}$ 对方案进行排序

5. 实例演示

$\begin{array}{l}\mathrm{max}f\left(x\right)=\left({f}_{1}\left(x\right),{f}_{2}\left(x\right),{f}_{3}\left(x\right),{f}_{4}\left(x\right)\right)\\ \begin{array}{cc}s.t.& x\in X\end{array}\end{array}$

$x={\left({x}_{1},{x}_{2},{x}_{3},{x}_{4}\right)}^{\text{T}}\in {E}^{4}$${f}_{1}\left(x\right)=0.5*{x}^{\text{T}}*A1*x+B{1}^{\text{T}}*x$${f}_{2}\left(x\right)=B{2}^{\text{T}}*x$

${f}_{3}\left(x\right)=0.5*{x}^{\text{T}}*A3*x+B{3}^{\text{T}}*x$${f}_{4}\left(x\right)=B{4}^{\text{T}}*x$

$A1=\left[\begin{array}{cccc}1& 2& -1& 1\\ 2& 5& 0& 3\\ -1& 0& 5& 1\\ 1& 3& 1& 2\end{array}\right]$$B1=\left[\begin{array}{c}1\\ -2\\ 0\\ 4\end{array}\right]$$B2=\left[\begin{array}{c}-2\\ -1\\ 3\\ -5\end{array}\right]$$A3=\left[\begin{array}{cccc}1& -2& 4& -1\\ -2& 5& 0& -5\\ 4& 0& 7& 1\\ -1& -5& 1& 2\end{array}\right]$

$B3=\left[\begin{array}{c}-1\\ 3\\ -7\\ 5\end{array}\right]$$B4=\left[\begin{array}{c}-1\\ 1\\ 2\\ -1\end{array}\right]$$X=\left\{\begin{array}{l}-2*{x}_{1}+6*{x}_{2}-{x}_{3}+{x}_{4}\le 1\hfill \\ -{x}_{1}-2*{x}_{2}+{x}_{3}+4{x}_{4}=1\hfill \\ 0\le {x}_{1}\le 3,0\le {x}_{2}\le 4,-1\le {x}_{3}\le 6,1\le {x}_{4}\le 7\hfill \end{array}$

1) 优化阶段

${f}_{1}\left(x\right)\in \left[m1,M1\right]=\left[\text{12}\text{.7353},\text{33}\text{.1013}\right]$${f}_{2}\left(x\right)\in \left[m2,M2\right]=\left[-\text{17}\text{.8077},\text{3}\text{.5000}\right]$

${f}_{3}\left(x\right)\in \left[m3,M3\right]=\left[-\text{2}\text{.7850},\text{6}\text{.8650}\right]$${f}_{4}\left(x\right)\in \left[m4,M4\right]=\left[-\text{6}\text{.2500},\text{3}\text{.5000}\right]$

$\begin{array}{l}\mathrm{max}\text{}\sum _{i=1}^{4}{w}_{i}\left({f}_{i}{\left(x\right)}^{\prime }-{f}_{i}*\right)\\ \begin{array}{cc}s.t.& x\in X,\sum _{i=1}^{4}{w}_{i}=1,{w}_{i}\ge {10}^{-3}\end{array}\left(i=1,2,3,4\right)\end{array}$

$\begin{array}{l}\mathrm{max}\text{}\sum _{i=1}^{4}{w}_{i}\left({f}_{i}{\left(x\right)}^{\prime }-{f}_{i}*\right)\\ \begin{array}{cc}s.t.& x\in X,\sum _{i=1}^{4}{w}_{i}=1,{w}_{i}\ge {10}^{-3}\end{array}\left(i=1,2,3,4\right),{f}_{4}{\left(x\right)}^{\prime }\ge 0.6\end{array}$

$P={\left[\begin{array}{c}\text{2}\text{.21092}\text{.59562}\text{.88932}\text{.78302}\text{.36512}\text{.64962}\text{.21082}\text{.64502}\text{.79942}\text{.21173}\text{.0000}\\ \text{0}\text{.90810}\text{.99621}\text{.06801}\text{.04160}\text{.94251}\text{.00920}\text{.90811}\text{.00811}\text{.04570}\text{.90831}\text{.0958}\\ \text{1}\text{.02710}\text{.94670}\text{.90850}\text{.92030}\text{.99010}\text{.93831}\text{.02710}\text{.93900}\text{.91841}\text{.02690}\text{.8982}\\ \text{1}\text{.00001}\text{.16031}\text{.27921}\text{.23651}\text{.06501}\text{.18241}\text{.00001}\text{.18051}\text{.24311}\text{.00041}\text{.3234}\end{array}\right]}^{T}$

$A={\left[\begin{array}{c}\text{0}\text{.36870}\text{.60090}\text{.80350}\text{.72770}\text{.45710}\text{.63660}\text{.36870}\text{.63350}\text{.73930}\text{.36920}\text{.8851}\\ \text{0}\text{.73800}\text{.60520}\text{.50960}\text{.54370}\text{.68360}\text{.58720}\text{.73800}\text{.58880}\text{.53840}\text{.73770}\text{.4745}\\ \text{1}\text{.00001}\text{.00001}\text{.00001}\text{.00001}\text{.00000}\text{.99991}\text{.00001}\text{.00001}\text{.00001}\text{.00001}\text{.0000}\\ \text{0}\text{.61550}\text{.55220}\text{.50940}\text{.52440}\text{.58900}\text{.54400}\text{.61550}\text{.54470}\text{.52210}\text{.61540}\text{.4942}\end{array}\right]}^{T}$

2) 决策阶段

$B={\left[\begin{array}{c}\text{00}\text{.44970}\text{.84200}\text{.69520}\text{.17120}\text{.518800}\text{.51280}\text{.71770}\text{.00101}\text{.0000}\\ \text{1}\text{.00000}\text{.49600}\text{.13320}\text{.26260}\text{.79350}\text{.42771}\text{.00000}\text{.43380}\text{.24250}\text{.99890}\\ \text{1}\text{.00001}\text{.00001}\text{.00001}\text{.00001}\text{.000001}\text{.00001}\text{.00001}\text{.00001}\text{.00001}\text{.0000}\\ \text{1}\text{.00000}\text{.47820}\text{.12530}\text{.24900}\text{.78150}\text{.41061}\text{.00000}\text{.41630}\text{.23000}\text{.99920}\end{array}\right]}^{T}$

${r}_{1}={r}_{2}=0.5$ 并计算组合权向量 $w={r}_{1}{w}_{1}+{r}_{2}{w}_{2}=\left(\text{0}\text{.3986,0}\text{.2825,0}\text{.1230,0}\text{.1958}\right)$

$C={\left[\begin{array}{c}\text{0}\text{.14700}\text{.23950}\text{.32030}\text{.29010}\text{.18220}\text{.25370}\text{.14700}\text{.25250}\text{.29470}\text{.14720}\text{.3528}\\ \text{0}\text{.20850}\text{.17100}\text{.14400}\text{.15360}\text{.19320}\text{.16590}\text{.20850}\text{.16640}\text{.15210}\text{.20840}\text{.1341}\\ \text{0}\text{.12300}\text{.12300}\text{.12300}\text{.12300}\text{.12300}\text{.12300}\text{.12300}\text{.12300}\text{.12300}\text{.12300}\text{.1230}\\ \text{0}\text{.12050}\text{.10810}\text{.09970}\text{.10270}\text{.11530}\text{.10650}\text{.12050}\text{.10660}\text{.10220}\text{.12050}\text{.0967}\end{array}\right]}^{T}$

$d={\left[\begin{array}{c}\text{0}\text{.20580}\text{.23830}\text{.24980}\text{.26400}\text{.31470}\text{.33300}\text{.39150}\text{.40650}\text{.41490}\text{.46310}\text{.4696}\\ \text{0}\text{.07810}\text{.12710}\text{.21520}\text{.25920}\text{.26890}\text{.29120}\text{.30150}\text{.32120}\text{.35410}\text{.36260}\text{.4169}\end{array}\right]}^{T}$

d的第一行为各方案与理想点 ${c}^{+}$ 的欧氏距离，第一行为各方案与负理想点 ${c}^{-}$ 的欧氏距离。

$Y={\left(\text{0}\text{.3797,0}\text{.5337,0}\text{.8614,0}\text{.9820,0}\text{.8542,0}\text{.8745,0}\text{.7702,0}\text{.7901,0}\text{.8533,0}\text{.7829,0}\text{.8877}\right)}^{\text{T}}$

6. 结语

Two-Stage TOPSIS Based on Relative Efficiency[J]. 运筹与模糊学, 2017, 07(04): 110-137. http://dx.doi.org/10.12677/ORF.2017.74013

1. 1. 邱威, 张建华, 刘念. 电压稳定约束下最优潮流的多目标优化与决策[J]. 电力自动化设备, 2011, 31(5): 34-38.

2. 2. 胡翩. 船舶概念设计阶段的多目标优化与决策[J]. 计算机与数字工程, 2014, 42(3): 390-394.

3. 3. 孟小丁. 求解多目标优化问题的若干算法概述[J]. 信息通信, 2015(7): 8-9.

4. 4. 杨桂元, 郑亚豪. 多目标决策问题及其求解方法研究[J]. 数学的实践与认识, 2012, 42(2): 108-115.

5. 5. 张乐文, 邱道宏, 等. 基于粗糙集和理想点法的隧道围岩分类研究[J]. 岩土力学, 2011, 32(1): 171-175.

6. 6. Olson, D.L. (2004) Comparison of Weights in TOPSIS Models. Mathematical and Computer Modelling, 40, 721-727.

7. 7. 艾正海. 关于多目标决策问题的理想点法研究[D]: [硕士学位论文]. 成都: 西南交通大学, 2007.

8. 8. Wei, X., Zhang, B. and Wang, Q. (2014) Improved TOPSIS Model Based on Interval Numbers. WIT Transactions on Information and Communication Technologies, 48, 55-61.

9. 9. Elhassouny, A. and Smarandache, F. (2016) Neutrosophic-Simplified-TOPSIS Multi-Criteria Decision-Making using Combined Simplified-TOPSIS Method and Neutrosophics. IEEE International Conference on Fuzzy Systems, 2468-2474.

10. 10. Baky, A., Ibrahim, A.-S. and Mahmoud, A. (2013) TOPSIS for Bi-Level MODM Problems. Applied Mathematical Modelling, 37, 1004-1015.

11. 11. Jadidi, O., Firouzi, F. and Bagliery, E. (2010) TOPSIS Method for Supplier Selection Problem. World Academy of Science, Engineering and Technology, No. 47, 956-958.

12. 12. Yang, Y. (2010) SWOT-TOPSIS Integration Method for Strategic Decision. Proceedings of the International Conference on E-Business and E-Government, 1575-1578. https://doi.org/10.1109/ICEE.2010.399

13. 13. Xu, J.H., Li, L., Liu, J.Y., Fu, C.Q. and Zheng, J.L. (2011) Imprecise DEA Model Based on TOPSIS. Applied Mechanics and Materials, 63-64, 723-727. https://doi.org/10.4028/www.scientific.net/AMM.63-64.723

14. 14. Niu, D. and Lv, J. (2008) Application of Improved TOPSIS Method Based on ACO and BP Algorithm. Proceedings of the World Congress on Intelligent Control and Automation, 6183-6186.

15. 15. Athawale, V.M. and Chakraborty, S. (2010) A Combined Topsis-Ahp Method for Conveyor Belt Material Selection. Journal of the Institution of Engineers, Part PR: Production Engineering Division, 90, 8-13.

16. 16. 刘晓东, 等. 基于蒙特卡洛仿真的理想点决策方法及其应用[J]. 数学的实践与认识, 2005, 35(10): 99-103.

17. 17. 程芬, 等. 基于数据包络与逼近理想点法的预防性养护决策[J]. 交通科技与经济, 2016, 18(1): 56-60.

18. 18. 戎卫东, 杨新民. 向量优化及其若干进展[J]. 运筹学学报, 2014, 18(1): 9-38.

19. 19. 贺莉, 刘庆怀. 多目标优化理论与连续化方法[M]. 北京: 科学出版社, 2015.

20. 20. 冯俊文. 多目标优化与决策中的相对有效性理论[J]. 系统工程与电子技术, 1994(4): 38-43.

21. 21. 江正华. AHP中正互反判断矩阵一致性调整的新方法[J]. 南京大学学报数学半年刊, 2013, 30(2): 224-237.

22. 22. 吴祈宗, 等. 运筹学与最优化MATLAB编程[M]. 北京: 机械工业出版社, 2009.

23. 23. 王莲芬, 许树柏. 层次分析法引论[M]. 北京: 中国人民大学出版社, 1990.

24. 24. Wind, Y. and Saaty, T.L. (1980) Marketing Applications of the Analytic Hierarchy Process. Management Science, 26, 641-658. https://doi.org/10.1287/mnsc.26.7.641

25. 25. 张炳江. 层次分析法及其应用案例[M]. 北京: 电子工业出版社, 2014.

1) 优化阶段的代码

a) 求解各目标函数的取值范围的M文件BESTok如下

%% fmincon函数用来求解函数ｆ在可行域内的最大值

A=[0,2,2,2,0,0,0,0,0,0,0;

0,-0.5,0,0,0,0,-0.25,-0.5,0,-0.25,0;

1,0,3,3,1,0,0.5,0,0,0.5,0;

0,0,0,0,0,0.25,0,0,0.25,0,0;

0,0,0,1,0,0,0,0,0.1,0.1,0;

0,0,0.5,0,0,0.5,0.5,0.5,0.4,0.3,0;

0,1,0.5,0,0,0.5,0.5,0.5,0.5,0.3,0;

0,0,0,0,1,0,0,0,0,0.3,0];

%A=[0,2,2,2,0,0,0,0,0,0,0;

%-0.5,-0.5,0,0,0,0,-0.25,-0.5,0,-0.25,0;

% 0,0,3,3,1,0,0.5,0,0,0.5,0;

%0,0,0,0,0,0.25,0,0,0.25,0,0;

% 0,0,0,1,0,0,0,0,0.1,0.1,0;

%0,0,0.5,0,0,0.5,0.5,0.5,0.4,0.3,0;

% 0,1,0.5,0,0,0.5,0.5,0.5,0.5,0.3,0;

% 1,0,0,0,1,0,0,0,0,0.3,0];

[m,n]=size(A)

BEST=zeros(m,n);

for i=1:n

x0=A(:,i);

%x0=[0;0;1;0;0;0;0;0];

a=[-2,6,-1,1,0,0,0,0];

b=1;

aeq=[-1,-2,1,4,0,0,0,0;0,0,0,0,1,1,1,1];

beq=[1;1];

lb=[0;0;-1;1;0.1;0.1;0.1;0.1];

ub=[3;4;6;7;1;1;1;1];

%options=optimset('LargeScale','off','display','iter');

[x,fval,exitflag,output]=fmincon('myfun222deng0713111',x0,a,b,aeq,beq,lb,ub,'mycon222deng0723')

x

BEST(:,i)=x;

distancemax=-fval

end

BEST

x0

m

n

b) M文件myfun222deng0713111：

function f=myfun(x)%%　x为列向量

h=[1,2,-1,1;2,5,0,3;-1,0,5,1;1,3,1,2];

f=[1;-2;0;4];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f1min=fval ;

h=-[1,2,-1,1;2,5,0,3;-1,0,5,1;1,3,1,2];

f=-[1;-2;0;4];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f1max=-fval ;

f=[-2;-1;3;-5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f2min=fval ;

f=-[-2;-1;3;-5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f2max=-fval ;

h=[1,-2,4,-1;-2,5,0,-5;4,0,7,1;-1,-5,1,2];

f=[-1;3;-7;5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f3min=fval;

h=-[1,-2,4,-1;-2,5,0,-5;4,0,7,1;-1,-5,1,2];

f=-[-1;3;-7;5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f3max=-fval ;

f=[-1;1;2;-1];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f4min=fval ;

f=-[-1;1;2;-1];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f4max=-fval;

%%函数ｆ的定义

A1=[1,2,-1,1,0,0,0,0;2,5,0,3,0,0,0,0;-1,0,5,1,0,0,0,0;1,3,1,2,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0];

B1=[1;-2;0;4;0;0;0;0];

B2=[-2;-1;3;-5;0;0;0;0];

A3=[1,-2,4,-1,0,0,0,0;-2,5,0,-5,0,0,0,0;4,0,7,1,0,0,0,0;-1,-5,1,2,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0];

B3=[-1;3;-7;5;0;0;0;0];

B4=[-1;1;2;-1;0;0;0;0];

f=-(0.5*x'*A1*x + B1'*x-f1min)*x(5)/(f1max-f1min)-(B2'*x-f2min)*x(6)/(f2max-f2min)-(0.5*x'*A3*x + B3'*x-f3min)*x(7)/(f3max-f3min)-(B4'*x-f4min)*x(8)/(f4max-f4min);

c) M文件mycon222deng0723：

function [c,ceq]=mycon(x)%%非线性约束条件

h=[1,2,-1,1;2,5,0,3;-1,0,5,1;1,3,1,2];

f=[1;-2;0;4];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f1min=fval ;

h=-[1,2,-1,1;2,5,0,3;-1,0,5,1;1,3,1,2];

f=-[1;-2;0;4];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f1max=-fval ;

f=[-2;-1;3;-5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f2min=fval ;

f=-[-2;-1;3;-5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f2max=-fval ;

h=[1,-2,4,-1;-2,5,0,-5;4,0,7,1;-1,-5,1,2];

f=[-1;3;-7;5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f3min=fval;

h=-[1,-2,4,-1;-2,5,0,-5;4,0,7,1;-1,-5,1,2];

f=-[-1;3;-7;5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f3max=-fval ;

f=[-1;1;2;-1];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f4min=fval ;

f=-[-1;1;2;-1];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f4max=-fval;

A1=[1,2,-1,1,0,0,0,0;2,5,0,3,0,0,0,0;-1,0,5,1,0,0,0,0;1,3,1,2,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0];

B1=[1;-2;0;4;0;0;0;0];

B2=[-2;-1;3;-5;0;0;0;0];

A3=[1,-2,4,-1,0,0,0,0;-2,5,0,-5,0,0,0,0;4,0,7,1,0,0,0,0;-1,-5,1,2,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0];

B3=[-1;3;-7;5;0;0;0;0];

B4=[-1;1;2;-1;0;0;0;0];

c(1)=f1min-(0.5*x'*A1*x + B1'*x);

c(2)=0.5*x'*A1*x + B1'*x-f1max;

c(3)=f2min-B2'*x;

c(4)=B2'*x-f2max;

c(5)=f3min-(0.5*x'*A3*x + B3'*x);

c(6)=0.5*x'*A3*x + B3'*x-f3max;

c(7)=f4min-B4'*x;

c(8)=B4'*x-f4max;

%c(9)=-(0.5*x'*A1*x + B1'*x-f1min)/(f1max-f1min)+0.8;

%c(10)=-(B2'*x-f2min)/(f2max-f2min)+0.6;

%c(11)=-(0.5*x'*A3*x + B3'*x-f3min)/(f3max-f3min)-0.8;

%c(12)=-(B4'*x-f4min)/(f4max-f4min)+0.6;

ceq=[];

%c=[];

d) 规范化最优解矩阵M文件Percentok

h=[1,2,-1,1;2,5,0,3;-1,0,5,1;1,3,1,2];

f=[1;-2;0;4];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f1min=fval

h=-[1,2,-1,1;2,5,0,3;-1,0,5,1;1,3,1,2];

f=-[1;-2;0;4];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f1max=-fval

f=[-2;-1;3;-5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub)

f2min=fval

f=-[-2;-1;3;-5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub)

f2max=-fval

h=[1,-2,4,-1;-2,5,0,-5;4,0,7,1;-1,-5,1,2];

f=[-1;3;-7;5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f3min=fval

h=-[1,-2,4,-1;-2,5,0,-5;4,0,7,1;-1,-5,1,2];

f=-[-1;3;-7;5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f3max=-fval

f=[-1;1;2;-1];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub)

f4min=fval

f=-[-1;1;2;-1];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub)

f4max=-fval

A1=[1,2,-1,1,0,0,0,0;2,5,0,3,0,0,0,0;-1,0,5,1,0,0,0,0;1,3,1,2,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0];

B1=[1;-2;0;4;0;0;0;0];

B2=[-2;-1;3;-5;0;0;0;0];

A3=[1,-2,4,-1,0,0,0,0;-2,5,0,-5,0,0,0,0;4,0,7,1,0,0,0,0;-1,-5,1,2,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0];

B3=[-1;3;-7;5;0;0;0;0];

B4=[-1;1;2;-1;0;0;0;0];

BEST=[2.21092.59562.88932.78302.36512.64962.21082.64502.79942.21173.0000;

0.90810.99621.06801.04160.94251.00920.90811.00811.04570.90831.0958;

1.02710.94670.90850.92030.99010.93831.02710.93900.91841.02690.8982;

1.00001.16031.27921.23651.06501.18241.00001.18051.24311.00041.3234;

0.10000.10000.10000.10000.10000.10000.10000.10000.10000.10000.1000;

0.10000.10000.10000.10000.10000.10000.10000.10000.10000.10000.1000;

0.70000.70000.70000.70000.70000.70000.70000.70000.70000.70000.7000;

0.10000.10000.10000.10000.10000.10000.10000.10000.10000.10000.1000]

percent=zeros(n,4);%percent为最优解对应原各目标函数的最优值的归一化矩阵

for i=1:n

x=BEST(:,i);

percent(i,1)=(0.5*x'*A1*x + B1'*x-f1min)/(f1max-f1min);

percent(i,2)=(B2'*x-f2min)/(f2max-f2min);

percent(i,3)=(0.5*x'*A3*x + B3'*x-f3min)/(f3max-f3min);

percent(i,4)=(B4'*x-f4min)/(f4max-f4min);

end

percent

2) 决策阶段的代码

a) 求解最后决策方案的M文件trydengokjieguook0815

disp('=====================================================');

%BEST =

% Columns 1 through 9

% 2.2109 2.5956 2.8893 2.7830 2.3651 2.6496 2.2108 2.6450 2.7994

% 0.9081 0.9962 1.0680 1.0416 0.9425 1.0092 0.9081 1.0081 1.0457

% 1.0271 0.9467 0.9085 0.9203 0.9901 0.9383 1.0271 0.9390 0.9184

% 1.0000 1.1603 1.2792 1.2365 1.0650 1.1824 1.0000 1.1805 1.2431

% 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000

% 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000

% 0.7000 0.7000 0.7000 0.7000 0.7000 0.7000 0.7000 0.7000 0.7000

% 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000

% Columns 10 through 11

% 2.2117 3.0000

% 0.9083 1.0958

% 1.0269 0.8982

% 1.0004 1.3234

% 0.1000 0.1000

% 0.1000 0.1000

% 0.7000 0.7000

% 0.1000 0.1000

disp('第一阶段优化得到的最优解矩阵：');%BEST为第一阶段（融合相对有效性的理想点法）的一系列最优解(运行 BESTok.m 得到)

BEST = [2.21092.59562.88932.78302.36512.64962.21082.64502.79942.21173.0000;

0.90810.99621.06801.04160.94251.00920.90811.00811.04570.90831.0958;

1.02710.94670.90850.92030.99010.93831.02710.93900.91841.02690.8982;

1.00001.16031.27921.23651.06501.18241.00001.18051.24311.00041.3234;

0.10000.10000.10000.10000.10000.10000.10000.10000.10000.10000.1000;

0.10000.10000.10000.10000.10000.10000.10000.10000.10000.10000.1000;

0.70000.70000.70000.70000.70000.70000.70000.70000.70000.70000.7000;

0.10000.10000.10000.10000.10000.10000.10000.10000.10000.10000.1000]

disp('最优解对应原各目标函数的最优值的归一化矩阵：');%percent为最优解对应原各目标函数的最优值的归一化矩阵 (运行 将BEST代入Percentok.m 得到)

percent =[0.3687 0.7380 1.0000 0.6155;

0.6009 0.6052 1.0000 0.5522;

0.8035 0.5096 1.0000 0.5094;

0.7277 0.5437 1.0000 0.5244;

0.4571 0.6836 1.0000 0.5890;

0.6366 0.5872 0.9999 0.5440;

0.3687 0.7380 1.0000 0.6155;

0.6335 0.5888 1.0000 0.5447;

0.7393 0.5384 1.0000 0.5221;

0.3692 0.7377 1.0000 0.6154;

0.8851 0.4745 1.0000 0.4942]

%最小最大值规范化矩阵percent

[M,N]=size(percent);

maxpercent=max(percent)

minpercent=-max(-percent)

MM=zeros(M,N);

for i=1:M

for j=1:N

MM(i,j)=(percent(i,j)-minpercent(1,j))/(maxpercent(1,j)-minpercent(1,j));

end

end

disp('规范化函数值矩阵percent的规范化矩阵为：');

MM

disp('层次分析法得到的主观权重向量为：');%(运行 Ahpweight2220815ok.m 得到)

weight1 =[0.4821 0.2913 0.1158 0.1107]

disp('变异系数法得到的客观权重向量为：');%(运行 将MM代入bianyixishufa222ok.m 得到)

weight2 =[0.3151 0.2738 0.1303 0.2808]

weight=zeros(1,4);

for i=1:4

weight(1,i)=0.5*weight1(1,i)+0.5*weight2(1,i);

end

disp('加权组合权重向量为：');

weight

disp('加权规范化矩阵为：');

[m,n]=size(percent);

weightpercent=zeros(m,n);

for i=1:m

for j=1:n

weightpercent(i,j)=percent(i,j)*weight(1,j);

end

end

weightpercent

disp('正理想点为：');

posideal=max(weightpercent)

disp('负理想点为：');

p=-weightpercent;

negideal=-max(p)

disp('各方案到正负理想点的距离矩阵为：');

distance=zeros(m,3); %distance为各方案到正负理想点的距离及相对距离矩阵

sum1=0;

sum2=0;

for i=1:m

for j=1:n

sum1=sum1+(weightpercent(i,j)-posideal(1,j))*(weightpercent(i,j)-posideal(1,j));

sum2=sum2+(weightpercent(i,j)-negideal(1,j))*(weightpercent(i,j)-negideal(1,j));

end

distance(i,1)=sqrt(sum1);

distance(i,2)=sqrt(sum2);

distance(i,3)=distance(i,2)/distance(i,1);

end

distance

disp('相对距离排序');

[Y,I] = sort(distance(:,3),1);

aa=Y'

disp('对应的方案排序');

bb=I'

[m,n]=size(bb);

fprintf('\n方案%i为最优决策方案\n',bb(1,n));

h=[1,2,-1,1;2,5,0,3;-1,0,5,1;1,3,1,2];

f=[1;-2;0;4];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f1min=fval ;

h=-[1,2,-1,1;2,5,0,3;-1,0,5,1;1,3,1,2];

f=-[1;-2;0;4];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f1max=-fval ;

f=[-2;-1;3;-5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f2min=fval ;

f=-[-2;-1;3;-5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f2max=-fval ;

h=[1,-2,4,-1;-2,5,0,-5;4,0,7,1;-1,-5,1,2];

f=[-1;3;-7;5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f3min=fval;

h=-[1,-2,4,-1;-2,5,0,-5;4,0,7,1;-1,-5,1,2];

f=-[-1;3;-7;5];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

f3max=-fval ;

f=[-1;1;2;-1];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f4min=fval ;

f=-[-1;1;2;-1];

a=[-2,6,-1,1];

b=1;

aeq=[-1,-2,1,4];

beq=1;

lb=[0;0;-1;1];

ub=[3;4;6;7];

[y,fval,exitflag,output]=linprog(f,a,b,aeq,beq,lb,ub) ;

f4max=-fval;

A1=[1,2,-1,1,0,0,0,0;2,5,0,3,0,0,0,0;-1,0,5,1,0,0,0,0;1,3,1,2,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0];

B1=[1;-2;0;4;0;0;0;0];

B2=[-2;-1;3;-5;0;0;0;0];

A3=[1,-2,4,-1,0,0,0,0;-2,5,0,-5,0,0,0,0;4,0,7,1,0,0,0,0;-1,-5,1,2,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0];

B3=[-1;3;-7;5;0;0;0;0];

B4=[-1;1;2;-1;0;0;0;0];

BEST=[2.21092.59562.88932.78302.36512.64962.21082.64502.79942.21173.0000;

0.90810.99621.06801.04160.94251.00920.90811.00811.04570.90831.0958;

1.02710.94670.90850.92030.99010.93831.02710.93900.91841.02690.8982;

1.00001.16031.27921.23651.06501.18241.00001.18051.24311.00041.3234;

0.10000.10000.10000.10000.10000.10000.10000.10000.10000.10000.1000;

0.10000.10000.10000.10000.10000.10000.10000.10000.10000.10000.1000;

0.70000.70000.70000.70000.70000.70000.70000.70000.70000.70000.7000;

0.10000.10000.10000.10000.10000.10000.10000.10000.10000.10000.1000];

fprintf('\n方案%i的最优值及其归一化值分别为：\n',bb(1,n));

bestok=BEST(:,bb(1,n))

percentok=zeros(1,4);%percent为最优解对应原各目标函数的最优值的归一化矩阵

x=BEST(:,bb(1,n));

percentok(1,1)=(0.5*x'*A1*x + B1'*x-f1min)/(f1max-f1min);

percentok(1,2)=(B2'*x-f2min)/(f2max-f2min);

percentok(1,3)=(0.5*x'*A3*x + B3'*x-f3min)/(f3max-f3min);

percentok(1,4)=(B4'*x-f4min)/(f4max-f4min);

percentok

b) 计算主观权重向量M文件Ahpweight2220815ok

disp('========================================');

%A=[1 2 6;1/2 1 2;1/6 1/2 1];

A=[1,3,5,2;1/3,1,6,2;1/5,1/6,1,3;1/2,1/2,1/3,1];

[m0,n0]=size(A)

disp('DecMatrix=A');

[WeightVector,CR]=AHPWeightVector(A)

%disp('一致性比率为：');

%CR

if CR<0.1

disp('判断矩阵A通过一致性检验');

M=ones(1,m0);

M1=ones(1,m0);

weight=ones(1,m0);

for i=1:m0 %%计算判断矩阵每一行元素乘积M（1，i）

for j=1:m0

M(1,i)=M(1,i)*A(i,j);

end

end

for i=1:m0

%M1(1,i)=nthroot(M(1,i), m0);

M1(1,i)=power(M(1,i), 1/m0);

end

sum=0;

for i=1:m0

sum=sum+M1(1,i);

end

for i=1:m0

weight(1,i)= M1(1,i)/sum;

end

disp('采用方根法得到的权重向量为：');

weight

else

disp('判断矩阵A未通过一致性检验');

A1=zeros(m0,m0);%%修正判断矩阵

for i=1:m0

for j=1:m0

m=1;

for k=1:m0

m=m*A(i,k)*A(k,j);

end

A1(i,j)=power(m, 1/m0);

%A1(i,j)=nthroot(m, m0);

end

end

disp('将判断矩阵A修正为A1：');

A1

[WeightVector,CR]=AHPWeightVector(A1)

sum1=zeros(1,m0);

weight1=zeros(1,m0);

for i=1:m0

for j=1:m0

sum1(1,i)=sum1(1,i)+A1(j,i);

end

weight1(1,i)=1/sum1(1,i);

end

disp('权重向量为：');

weight1

end

c) 计算客观权重向量M文件bianyixishufa222ok

disp('================================================');

%A=[1 2 3;1 1 1]

%这里A为第一阶段得到的规范化函数值矩阵percent的规范化矩阵（最优解对应原各目标函数的最优值归一化矩阵）

percent =[0.3687 0.7380 1.0000 0.6155;

0.6009 0.6052 1.0000 0.5522;

0.8035 0.5096 1.0000 0.5094;

0.7277 0.5437 1.0000 0.5244;

0.4571 0.6836 1.0000 0.5890;

0.6366 0.5872 0.9999 0.5440;

0.3687 0.7380 1.0000 0.6155;

0.6335 0.5888 1.0000 0.5447;

0.7393 0.5384 1.0000 0.5221;

0.3692 0.7377 1.0000 0.6154;

0.8851 0.4745 1.0000 0.4942];

A=[ 0 1.0000 1.0000 1.0000;

0.4497 0.4960 1.0000 0.4782;

0.8420 0.1332 1.0000 0.1253;

0.6952 0.2626 1.0000 0.2490;

0.1712 0.7935 1.0000 0.7815;

0.5188 0.4277 0 0.4106;

0 1.0000 1.0000 1.0000;

0.5128 0.4338 1.0000 0.4163;

0.7177 0.2425 1.0000 0.2300;

0.0010 0.9989 1.0000 0.9992;

1.0000 0 1.0000 0];

[m1,n1]=size(A)

%standard=std(A,0)%除以n-1 样本标准差

standard=std(A,1)%除以n 标总体准差

aver=zeros(1,n1);

stdnumber=zeros(1,n1);

for i=1:n1

aver(1,i)=mean(A(:,i));

stdnumber(1,i)=standard(1,i)/mean(A(:,i));

%stdnumber(1,i)=standard(1,i)/aver(1,i);

end

aver

stdnumber

sum=0;

for i=1:n1

sum=sum+stdnumber(1,i);

end

weight2=zeros(1,n1);

for i=1:n1

weight2(1,i)=stdnumber(1,i)/sum;

end

disp('客观权重向量为：');

weight2