Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topsis_102216116-1.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topsis_102216116-1.0.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file topsis_102216116-1.0.2.tar.gz.

File metadata

  • Download URL: topsis_102216116-1.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for topsis_102216116-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5ca2666e755128dfc9b814fec3a2e9736e080a2f4c10b32c20bc605c63b0cf3f
MD5 6cdb34f31f0b119ae27a20a82ea4f7ba
BLAKE2b-256 f5722fb153a147fe818b190a6b165fd9d2c4f5264ad7cc79dae4326f9e759e3c

See more details on using hashes here.

File details

Details for the file topsis_102216116-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_102216116-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 670f3f9bf2b900ab59ff6c42fe833e9e6399ee1bbcf638b70d5afd1dcf3f4d05
MD5 156fa8015194e6da4a1ca0f545340d47
BLAKE2b-256 cc5dbab0726f3d9e91109c5009d79e1bf06612e258f5a38a7b8c5aa8fd114b48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page