TOPSIS command-line tool
Project description
TOPSIS Algorithm Implementation
Program 1: Overview
TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) is a multi-criteria decision-making (MCDM) technique used to rank alternatives based on their relative closeness to the ideal best and ideal worst solutions.
This project provides a complete command-line based Python implementation of the TOPSIS algorithm with proper validation and result generation.
Features
- Accepts custom weights and impacts for each criterion
- Computes TOPSIS Score and Rank
- Works as a command-line program
- Generates results in a CSV output file
- Robust error handling and input validation
- Available as an installable PyPI package
How TOPSIS Works (Brief)
- Normalize the decision matrix
- Apply weights to normalized values
- Determine ideal best and ideal worst solutions
- Compute separation measures
- Calculate TOPSIS score
- Rank alternatives based on score
How to Use
Prerequisites
- Python 3.7 or higher
- Required libraries:
pandasnumpy
Install dependencies (if running from source):
pip install pandas numpy
Command-Line Usage
topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
Parameters
- InputDataFile: Path to the dataset file (CSV/XLSX). The first column lists alternatives, followed by numeric data for criteria.
- Weights: Comma-separated values for criterion importance (e.g.,
"1,2,3"). - Impacts: Comma-separated values (
+for maximize,-for minimize) indicating desired impact for each criterion (e.g.,"+,-,+"). - ResultFileName: Name of the output file where results will be saved.
Example Command
topsis sample_input.csv "1,1,1,1" "+,+,+,+" output.csv
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_vansh_102303806-0.0.2.tar.gz.
File metadata
- Download URL: topsis_vansh_102303806-0.0.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c86e11a9e690fb421ba166cba803c9a3a8c7e70adeb9b681331568359b9b5219
|
|
| MD5 |
f80eaed26d4e5420d577e384e458f7a0
|
|
| BLAKE2b-256 |
08c61043bf0ea18d2d90da54106f8a6fdba8f25f6cc9754edcd14465fc320538
|
File details
Details for the file topsis_vansh_102303806-0.0.2-py3-none-any.whl.
File metadata
- Download URL: topsis_vansh_102303806-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c5a41c32c2472b25e95a5fbffa69fd245e8369d313a14202f38e5553c106fc
|
|
| MD5 |
d07077e6ef46cc01ebb57ff8ae94e714
|
|
| BLAKE2b-256 |
74fb393a448e20edeff713e12404b2e31faf78c02b915d364ca038fb9bcdd0e5
|