A CLI tool for TOPSIS decision-making
Project description
TOPSIS CLI Tool
TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) is a multi-criteria decision-making method that helps evaluate and rank options based on their relative closeness to an ideal solution. This CLI tool provides a simple and efficient way to perform TOPSIS analysis directly from the command line.
Features
Supports weighted and impact-based decision-making. Reads input data from a CSV file. Outputs ranked results with scores in an easy-to-read CSV format. Lightweight and user-friendly command-line interface.
Installation
Install the package using pip:
pip install topsis-cli
Usage
Run the CLI tool with the following syntax:
topsis <input_file> <weights> <impacts> <output_file>
input_file: Path to the input CSV file containing decision matrix.
weights: Comma-separated list of weights for each criterion (e.g., 0.4,0.3,0.2,0.1).
impacts: Comma-separated list of impacts for each criterion, either + (positive) or - (negative) (e.g., +,+,-,+).
output_file: Path to save the output CSV file with scores and ranks.
Example
Input File (data.csv):
Name Criterion 1 Criterion 2 Criterion 3 Criterion 4
Option A 250 16 12 5
Option B 200 18 8 3
Option C 300 14 10 4
Option D 275 15 9 2
Command:
topsis data.csv 0.4,0.3,0.2,0.1 +,+,-,+ results.csv
Output File (results.csv):
Name Criterion 1 Criterion 2 Criterion 3 Criterion 4 Score Rank
Option A 250 16 12 5 0.75 2
Option B 200 18 8 3 0.50 4
Option C 300 14 10 4 0.80 1
Option D 275 15 9 2 0.65 3
Requirements
Python 3.7 or higher
Libraries: numpy, pandas
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
Author
Naman Babbar
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_cli-1.0.1.tar.gz.
File metadata
- Download URL: topsis_cli-1.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03f013116a15546b3a8aae4986d22125e8877c589dce9fcadbc007aeb71ecece
|
|
| MD5 |
df7e3c3edaad1a2da0c72d2870192b55
|
|
| BLAKE2b-256 |
cbc4b47dbf79b36cd755e6500f2968d268a6aee01e3f4c97428a95b7f5d05c00
|
File details
Details for the file topsis_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: topsis_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30456b3baaad6ee18cd1aec1024b6cc3d65405f327210eab70c0bb408fd32201
|
|
| MD5 |
286db17b545cf942d2c9ee5f87f4e734
|
|
| BLAKE2b-256 |
6608506d065b9d1cc857cd793fce5769f16db3acb27b40b6ccd64c3d2ca0a029
|