A Python package for TOPSIS multi-criteria decision making
Project description
Topsis-Gurshaan-Bajwa-102303264
By Gurshaan Bajwa (Roll No: 102303264)
This Python package implements the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method for solving Multi-Criteria Decision Making (MCDM) problems.
Installation
pip install Topsis-Gurshaan-Bajwa-102303264
Input File Format
First column: Alternatives
Remaining columns: Numeric criteria
Example CSV:
| Model | Storage | Camera | Price | Looks |
|---|---|---|---|---|
| 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 and Impacts
Weights vector:
0.25,0.25,0.25,0.25
Impacts vector:
+,+,-,+
Command Line Usage
topsis <inputfile> <weights> <impacts> <outputfile>
Example:
topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+" result.csv
Output File Example
Result CSV will contain Topsis Score and Rank:
| Model | Score | Rank |
|---|---|---|
| M1 | 0.534 | 3 |
| M2 | 0.308 | 5 |
| M3 | 0.692 | 1 |
| M4 | 0.535 | 2 |
| M5 | 0.401 | 4 |
Higher score means better alternative.
Error Handling
Program validates:
- File existence
- Numeric values
- Correct weights count
- Correct impacts
- Invalid symbols
Conclusion
TOPSIS helps rank alternatives based on multiple criteria and is useful in decision-making problems.
Project details
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_gurshaan_bajwa_102303264-0.0.4.tar.gz.
File metadata
- Download URL: topsis_gurshaan_bajwa_102303264-0.0.4.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
849d6820cbfd7973531905f411a1e1470b41238d486713ebd9bc312059e23fb4
|
|
| MD5 |
fbdd7be06192b4e29e19ce3ad691af67
|
|
| BLAKE2b-256 |
a58792dc79107066ba64ebee74b17be432386997bb22c5206d07d16c9969b340
|
File details
Details for the file topsis_gurshaan_bajwa_102303264-0.0.4-py3-none-any.whl.
File metadata
- Download URL: topsis_gurshaan_bajwa_102303264-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a31181c3df5a791a2612d2f45e0bc60e61a62980f74a47bc07384a9cb4452b9e
|
|
| MD5 |
05c78808fae9b34f6812fe0ec0dc9c40
|
|
| BLAKE2b-256 |
0a2837fd9db6d354b3f11082c1273497552a66b4473242b84d93e3cae9bc8692
|