A professional command-line tool for TOPSIS decision analysis.
Project description
TOPSIS Implementation
BY: Gurkirat Singh
Roll Number: 102303256
Group: 3C21
topsis-gurkirat-102303256 is a Python library for solving Multiple Criteria Decision Making (MCDM) problems using the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS).
Installation
Install the package from PyPI using pip:
pip install topsis-gurkirat-102303256
Usage
Run the package via the command line:
topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
Example
topsis topsis_dataset.csv "0.2,0.15,0.15,0.2,0.15,0.15" "-,+,+,+,+,+" result.csv
Steps Followed in TOPSIS
-
Normalization
Transform the data into a comparable scale. -
Weighting
Apply user-defined weights to the normalized decision matrix. -
Ideal Solutions
Determine the ideal best and ideal worst values for each criterion. -
Distance Calculation
Compute the Euclidean distance of each alternative from the ideal best and ideal worst. -
Closeness Score
Calculate the relative closeness of each alternative to the ideal solution. -
Ranking
Rank the alternatives based on the TOPSIS score.
Sample Dataset
| Alternative | Cost | Quality | Delivery Time | Durability | Service | Energy Efficiency |
|---|---|---|---|---|---|---|
| A1 | 250 | 7 | 5 | 8 | 8 | 6 |
| A2 | 200 | 6 | 7 | 7 | 7 | 7 |
| A3 | 300 | 8 | 4 | 9 | 9 | 8 |
| A4 | 275 | 7 | 6 | 8 | 8 | 7 |
| A5 | 225 | 9 | 3 | 9 | 8 | 9 |
| A6 | 260 | 8 | 5 | 8 | 9 | 8 |
Output (Printed in Terminal)
--- TOPSIS RESULTS (Score & Rank) ---
Topsis Score Rank
0.430121 5
0.651113 1
0.359169 6
0.517720 3
0.447729 4
0.537590 2
-------------------------------------
Results saved to result.csv
Description
This package helps users evaluate and rank alternatives based on multiple criteria by applying the TOPSIS methodology.
It is suitable for academic assignments, research work, and real-world decision-making problems.
Before proceeding, make sure of the following points:
- Correct number of parameters (
inputFileName,Weights,Impacts,resultFileName). - The input file must contain three or more columns.
- From the 2nd to the last columns, all values must be numeric.
- The number of weights, number of impacts, and number of criteria columns (from 2nd to last) must be the same.
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_gurkirat_102303256-1.1.1.tar.gz.
File metadata
- Download URL: topsis_gurkirat_102303256-1.1.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc7be06e5f57c5fd8f304a4392e37a17f4715551ec7d4391bf13e579750b7a76
|
|
| MD5 |
07714c302dd75edd0f60f1ad805a2ccf
|
|
| BLAKE2b-256 |
52d7addb2ec0ae206d2eb8100597eac9881b46e4a5da834c317f36a4d8e05f6f
|
File details
Details for the file topsis_gurkirat_102303256-1.1.1-py3-none-any.whl.
File metadata
- Download URL: topsis_gurkirat_102303256-1.1.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b2ee351de3938e465ab6fe8bb0b6b879822202935d15e5f27a79b8fbadc61d1
|
|
| MD5 |
beafcce5b19d2638240f8adc988e031a
|
|
| BLAKE2b-256 |
3070d66401bc587cd5c705aa23c0a96b8e65cf845b490907016905c4519ec57e
|