Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in the 1980s as a multi-criteria decision making method. TOPSIS chooses the alternative of shortest Euclidean distance from the ideal solution, and greatest distance from the negative-ideal solution
Project description
What is TOPSIS Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in the 1980s as a multi-criteria decision making method. TOPSIS chooses the altenrative of shortest Euclidean distance from the idael solution, and fartherst distance from the negative-ideal solution. More details at wikipedia. The TOPSIS algorithm is succintly explained in this paper comparing TOPSIS and VIKOR methods
Using TOPSIS-Python TOPSIS-Python can be run as in the following example:
import numpy as np from topsis import topsis a = [[7, 9, 9, 8], [8, 7, 8, 7], [9, 6, 8, 9], [6, 7, 8, 6]] w = [0.1, 0.4, 0.3, 0.2] I = np.array([1, 1, 1, 0] decision = topsis.topsis(a, w, I) The decision matrix (a) should be constructed with each row representing an alternative, and each column representing a criterion. We have used an example given in TOPSIS Method in MADM (Dr. Farhad Faez)
Weights (w) is not already normalised will be normalised upon initialisation. Information on benefit (1) cost (0) criteria should be provided in I.
By default, the optimisation (TOPSIS calculation) does not take place. No values are stored in decision.C or decision.optimum_choice.
These can be calculated, either by calling decision.calc(), or by calling a representation of the decision (which will itself call decision.calc()):
decision
Alternatives ranking C: [0.74269409 0.40359933 0.17586999 0.44142927]
Best alternative a[0]: [7. 9. 9. 8.]
The rankings are saved in decision.C, with the highest ranking $0.74269409$ offering us the best decision, and lowest ranking $0.17586999$ offering the worst decision making, according to TOPSIS method.
We are also then shown the best alternative index (which happens to be index 0 in this example), and the associated criteria coefficients of this alternative.
Anant Chopra 101703063 Aarshi Arora 101703005
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file topsis-antuanant-0.0.3.tar.gz
.
File metadata
- Download URL: topsis-antuanant-0.0.3.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b64589f37bcc4da67db8c98fdc9fd8406b025f4efe3431c6af0972b76e5dc8fd |
|
MD5 | 6a27f9bf657e9dbcd6f1501e5a4fe96e |
|
BLAKE2b-256 | 7b356ca165f0d27e98e4d27f0c6d9c92ccc60ea78a96f21db99f33af44e09397 |