Skip to main content

TOPSIS implementation as a command line tool

Project description

Topsis-Khushveer-102303327

This package provides a command-line implementation of the Technique for Order Preference by Similarity to Ideal Solution (TOPSIS), a popular multi-criteria decision-making (MCDM) method.

The package allows users to rank multiple alternatives based on multiple criteria, user-defined weights, and impacts (benefit or cost).


Features

  • Command-line based TOPSIS implementation
  • Supports any number of alternatives and criteria
  • User-defined weights and impacts
  • Automatic calculation of TOPSIS score and rank
  • Output generated in CSV format

Installation

Install the package using pip:

pip install Topsis-Khushveer-102303327

Usage

Run the TOPSIS program from the command line: topsis <input_file.csv> "" "" <output_file.csv>

Example

topsis data.csv "1,1,1,1,1" "+,+,-,+,+" result.csv

Input Format

Input CSV File

  • The first column should contain the names of alternatives.
  • The remaining columns should contain numeric values only.
  • The file must contain at least three columns.

Weights

  • Provided as a comma-separated list.
  • Number of weights must be equal to the number of criteria.

Example:

"1,1,1,1,1"

Impacts

Provided as a comma-separated list. Each impact must be either:

  • "+" for benefit criteria
  • "-" for cost criteria

Example:

"+,+,-,+,+"

Output Format

The output CSV file contains:

  • All original input columns
  • Topsis Score for each alternative
  • Rank (Rank 1 indicates the best alternative)

Error Handling

The program performs validation for:

  • Incorrect number of command-line arguments
  • File not found errors
  • Non-numeric values in criteria columns
  • Mismatch between number of weights, impacts, and criteria
  • Invalid impact symbols

Author

Khushveer Kaur (102303327) Computer Engineering, TIET


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_khushveer_102303327-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

topsis_khushveer_102303327-0.0.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file topsis_khushveer_102303327-0.0.2.tar.gz.

File metadata

File hashes

Hashes for topsis_khushveer_102303327-0.0.2.tar.gz
Algorithm Hash digest
SHA256 459abefea4c46577d1c26b403a0dd5b389e9e9faa0b67986e0a33a97c5658671
MD5 d4c5765a5c5153d657d70173a2488fcb
BLAKE2b-256 908fc74773be770cade9012b1714561c8ba2ed5a377d46b88b53bb77c5a7e515

See more details on using hashes here.

File details

Details for the file topsis_khushveer_102303327-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_khushveer_102303327-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7dd98ac02f3cfe1b2d55d59d5500dde3d02695ec80d9c70b219e38a415187494
MD5 4f367a09c2cbedce404fe440468449ab
BLAKE2b-256 ccf245cc929c1f3e560f4f35590ddae3bd60bb2dfc9a220f470b0434c99352dc

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