TOPSIS implementation for MCDM problems
Project description
TOPSIS-Atishay-102303112
Project-1 (UCS659) Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS)
topsis-aj is a Python library designed to solve Multiple Criteria Decision Making (MCDM) problems. It ranks alternatives based on their distance from an ideal solution and a negative-ideal solution.
👤 Author Information
- Name: Atishay Jain
- Roll No: 102303112
- Group: 3C14
📦 Installation
Use the package manager pip to install the library:
pip install topsis-aj
Usage
Run the TOPSIS command using the following syntax:
topsis <inputFileName.csv> <weights> <impacts> <resultFileName.csv>
Example
topsis sample.csv "1,1,1,1" "+,-,+,+"
Help
To view the usage instructions:
topsis /h
Example Dataset sample.csv
| Model | Storage space (in GB) | Camera (in MP) | Price (in $) | Looks (out of 5) |
|---|---|---|---|---|
| M1 | 16 | 12 | 250 | 5 |
| M2 | 16 | 8 | 200 | 3 |
| M3 | 32 | 16 | 300 | 4 |
| M4 | 32 | 8 | 275 | 4 |
| M5 | 16 | 16 | 225 | 2 |
Weights Vector
[0.25, 0.25, 0.25, 0.25]
Impacts Vector
[+, +, -, +]
Input command
topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+" result.csv
Output
TOPSIS RESULTS
| Index | P-Score | Rank |
|---|---|---|
| 1 | 0.534277 | 3 |
| 2 | 0.308368 | 5 |
| 3 | 0.691632 | 1 |
| 4 | 0.534737 | 2 |
| 5 | 0.401046 | 4 |
Notes
-
The first column and header row are removed before processing.
-
All columns from the second to last must contain numeric values only.
-
The number of weights, impacts, and criteria columns must be equal.
-
Impacts must be either + or -.
License
This project is licensed under the MIT License.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file topsis_3112-0.1.0.tar.gz.
File metadata
- Download URL: topsis_3112-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25786543aa09878a017ef80cf906a225cfd51af58dadc95803f3b5c1ae7a9841
|
|
| MD5 |
4b09e0fb851d52599cda13c81fb9a3ef
|
|
| BLAKE2b-256 |
0ba1e3b321ae27b27d212a1bea1e303c8f09c0b493e995eca50dff4265ee060a
|
File details
Details for the file topsis_3112-0.1.0-py3-none-any.whl.
File metadata
- Download URL: topsis_3112-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8503d81b83e5433ac09362ef54a433daae4b5004b7fa24f1958645352171a560
|
|
| MD5 |
9eab1cac3e1410902f4c46114cb3b7fe
|
|
| BLAKE2b-256 |
74ab3a464eaed6a3165b359a9c6f5887f61dfdd9780348616d07e718a12d21ec
|