Skip to main content

A Python package implementing TOPSIS method for MCDM

Project description

TOPSIS Implementation by Garv

A Python package that implements the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method.

Submitted by: Garv Roll Number: 102203753

Installation

pip install Topsis-Garv-102203753

Usage

From command line:

topsis input.csv "1,1,1,2" "+,+,-,+" output.csv

From Python:

from topsis import calculate_topsis
calculate_topsis("input.csv", "1,1,1,2", "+,+,-,+", "output.csv")

Input Format

  1. Input file must be a CSV file with 3 or more columns
  2. First column is the object/variable name
  3. From 2nd column onwards should contain only numeric values
  4. Weights should be comma-separated numbers (e.g. "1,1,1,2")
  5. Impacts should be comma-separated +/- symbols (e.g. "+,+,-,+")

Output

The program will create a result CSV file containing:

  • All columns from input file
  • Two additional columns: 'Topsis Score' and 'Rank'

Error Handling

The program will check for:

  • Correct number of parameters
  • File existence
  • Input file format
  • Number of weights/impacts matching number of criteria
  • Valid impact symbols (+/-)

License

© 2024 Garv This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

topsis_garv_102203753-0.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

Topsis_Garv_102203753-0.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file topsis_garv_102203753-0.1.tar.gz.

File metadata

  • Download URL: topsis_garv_102203753-0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for topsis_garv_102203753-0.1.tar.gz
Algorithm Hash digest
SHA256 33c0007d0984ac5e507b584de8320b2213acad54a342ccdd7e2419600cecf51a
MD5 ab767071cb34a20a8e521e488c3fd687
BLAKE2b-256 24cd8f58915079d099800f4f6e884754747642d71ec9fe7e81685ff438b43da2

See more details on using hashes here.

File details

Details for the file Topsis_Garv_102203753-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Topsis_Garv_102203753-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1cdb066afb6fb791765b2ea75e5fc6fae4a686d9a5d342649a037a494c092405
MD5 6c95bdce680566064b4ceb799aa87b5f
BLAKE2b-256 f89e25dc3ab3f320433431543ad60bf7247d73667f0f4e7caad046d81dcd8a85

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