Skip to main content

A Python package for implementing TOPSIS

Project description


Topsis-Ayush-102203119

A Python package for implementing the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method. This method is used for multi-criteria decision-making.


Installation

Install the package using pip:

pip install Topsis-Ayush-102203119

Usage

Command-Line Interface

After installation, you can use the topsis command to calculate rankings for your dataset.

Command Syntax

topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
  • <InputDataFile>: Path to the input CSV file.
  • <Weights>: Comma-separated list of weights for each criterion (e.g., 1,1,1,2).
  • <Impacts>: Comma-separated list of impacts for each criterion (+ for positive, - for negative).
  • <ResultFileName>: Path to save the output CSV file.

Input File Format

  • The input file must be a CSV with at least 3 columns.
  • The first column should contain the names of the objects (e.g., M1, M2, ...).
  • The remaining columns should contain numeric criteria values.

Example Input (data.csv):

Object,Criteria1,Criteria2,Criteria3,Criteria4
M1,250,16,12,5
M2,200,16,8,3
M3,300,32,16,4
M4,275,16,8,4
M5,225,32,16,2

Example Usage

  1. Prepare the input CSV file (e.g., data.csv).
  2. Run the following command:
topsis data.csv 1,1,1,2 +,+,-,+ result.csv
  1. The result will be saved in the specified output file (e.g., result.csv).

Example Output (result.csv):

Object,Criteria1,Criteria2,Criteria3,Criteria4,Topsis Score,Rank
M1,250,16,12,5,0.75,2
M2,200,16,8,3,0.45,4
M3,300,32,16,4,0.85,1
M4,275,16,8,4,0.55,3
M5,225,32,16,2,0.30,5

Requirements

This package requires the following Python libraries:

  • numpy
  • pandas

These dependencies are automatically installed with the package.


License

This project is licensed under the MIT License. See the LICENSE file for details.


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_ayush_102203119-1.0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

Topsis_Ayush_102203119-1.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file topsis_ayush_102203119-1.0.1.tar.gz.

File metadata

  • Download URL: topsis_ayush_102203119-1.0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for topsis_ayush_102203119-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1cb41f71a0ac52d85f3a612887faffba2965d76a6eb48d8da7cdd54af0bae86e
MD5 2ef424d9a8e42b9e86d19f1bd8e826e0
BLAKE2b-256 39cfb886e115b83bbee26f3538cf6a5c42ee415a9b3124958f64be5bd0f8f53a

See more details on using hashes here.

File details

Details for the file Topsis_Ayush_102203119-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Topsis_Ayush_102203119-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45447e7fba14693d34ee4f151199db0d1dffc8cedc95f01a7ff547aef9b50d9c
MD5 a1f748659bff5ad772a53c398b54299d
BLAKE2b-256 0218ea6f2902f21d37b979909c60dd38b199fbbfc9cae9a0c5a41edd5af0c533

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