TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) 多准则决策工具

写在前面 Notice

1. 这是一个完全免费的工具。
This is a completely free tool.

2. 我不是专业码农,因此不能保证功能不出现问题。如果你在使用中发现任何bug,请和我联系,除了用户电脑本身的问题以外,绝大多数的问题都可以得到及时解决。
It is hard to get rid of all bugs, and I cannot make guarantee for the functionality of the tool. If you find any bug when using it, please contact with me. I promise that most of the problems (expect those caused only by your computer) could be solved in time.

3. 本工具基于Python 3.6开发,不需要安装运行环境,直接下载、解压后找到exe文件就可以用。
This tool is developed based on Python 3.6. Compared with Matlab-based tools, python-based tools do not need additional installation of Runtime and thus could be directly executed by double-clicking .exe file.

4. This tool is particularly for my friend Garfield.

下载 Download

Option 1. Download the executable (packed in zip file, named ‘TOPSIS.exe’) and directly use it without needs to install python.

TOPSIS-exe版 (TOPSIS, executable)

方式二:如果有python基础,并安装了python3,那么可以下载下面的zip文件,运行py文件即可。需要注意的是,运行本文件需要一系列的python依赖包,包括:pandas, numpy, tkinter, pickle,.
Option 2. Those who have already installed python3 could use following zip file, which contains a py file. Please note that this py file would have to import several modules, including pandas, numpy, tkinter, pickle.

python源代码 (python code for this tool)

视频示例 Video Demo

功能介绍 Introduction of Functionality

TOPSIS is a kind of multi-criteria decision making (MCDM) method. As to MCDM, the most straightforward method might be simple weighted summation. TOPSIS is a more complicated method, but still very simple.

Supposing we have N criteria and M options, so we will have a M by N evaluation matrix.

TOPSIS would firstly normalize the evaluation matrix, which contains 2 steps. The first step is to make all criteria ‘the higher, the better’. For those criteria which should be ‘the lower the better’, it will use reciprocals. The second step is to divide each column (corresponding to a specific criterion) by its norm to get rid of different scales.

If criteria have different importance, TOPSIS would weight the normalized evaluation matrix, that is to multiply each column with a weight. Weights could be obtained by other methods, such as AHP.

After that, TOPSIS will find the maximum value  and minimum value of each column. The maximum values of all columns would constitute a theoretically best option, and the minimum values of all columns would constitute a theoretically worst option. They might not necessarily exist, just a kind of possibility.

有了最佳和最差(可能)方案,TOPSIS将计算每一个实际方案——即每一行——与最佳可能方案的欧氏距离d1,以及与最差可能方案的欧氏距离d2,然后计算指标score = d2/(d1+d2)。
Given the best and the worst (possible) options, TOPSIS would calculate the Euclidean distance of each real option (corresponding to a row) to the best option, denoted as d1, as well the Euclidean distance to the worst option, denoted as d2. Then, score = d2 / (d1+d2) would be calculated.

Apparently, the better a real option is, the smaller its d1 should be, the larger its d2 should be, and consequently the larger its score should be, vice versa. Specifically, if a real option happens to be the best possible option, then d1=0, d2=1, score=1.

Finally, TOPSIS will rank options according to their scores and tell you the best option.

This tool allows users to import evaluation matrix in csv file, set the criteria which should be the lower the better (and keep the else the higher the better), set weights (all to 1s, or set weight for a specific criterion, or import a weight csv file), run TOPSIS, and export final and intermediate results.


Close Menu