A command line python package to implement TOPSIS
Project description
Topsis-Sukhmanpreet-102317112
What is TOPSIS?
TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a multi-criteria decision-making method. It ranks a set of alternatives by identifying the solution that is closest to the Ideal Best and farthest from the Ideal Worst.
Installation
You can install this package via PyPi:
Bash
pip install Topsis-Sukhmanpreet-102317112
Usage The package can be executed directly from the command line:
Bash
python <program.py> <InputDataFile> <Weights> <Impacts> <OutputResultFileName>
Example
Bash
python topsis.py data.csv "1,1,1,1,1" "+,+,+,+,+" result.csv
Input Requirements
File Format: The input file must be a .csv.
Structure: The file must contain three or more columns.
Data Type: From the 2nd column to the last, all values must be numeric.
Parameters:
- Weights: Must be numeric and separated by commas.
- Impacts: Must be either + (for maximization) or - (for minimization), separated by commas.
- Matching: The number of weights, impacts, and numeric columns must be identical.
Error Handling
- The package includes robust validation and will show appropriate messages for:
- Incorrect number of parameters.
- "File Not Found" exceptions.
- Non-numeric values in criteria columns.
- Mismatch between weights, impacts, and criteria count.
Output
- The result is saved as a new .csv file containing all original data plus two additional columns:
Topsis Score: The calculated performance score.
Rank: The final ranking of the alternatives.
License
© 2026 Sukhmanpreet Singh
This repository is licensed under the MIT license. See LICENSE for details.
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_sukhmanpreet_102317112-1.1.0.tar.gz.
File metadata
- Download URL: topsis_sukhmanpreet_102317112-1.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a17bb7764dc13477d24ddaef2597729bac5a3b3f677f4488722633bb8d2973e7
|
|
| MD5 |
345fe622807ce2d0c19e0871fb1548f8
|
|
| BLAKE2b-256 |
20fd07b4e16881356251cb5af2f08554f20b12aa8b43ac55c9bff9ad427b3c0c
|
File details
Details for the file topsis_sukhmanpreet_102317112-1.1.0-py3-none-any.whl.
File metadata
- Download URL: topsis_sukhmanpreet_102317112-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2856985ac91eab6cfec21ad974f5ed8eac5885fa1898b9aac0c66bf00632b7c4
|
|
| MD5 |
1459e500837bc6ed700e9a7e53da0b32
|
|
| BLAKE2b-256 |
1ddf86e7e78dabcfb4e776de1d20cba171e61bcda3238bcec8053484ee18dedc
|