Skip to main content

A Python package implementing TOPSIS for multi-criteria decision making

Project description

Topsis-Trishti-102313056

For: Project-1 (UCS654) Submitted by: Trishti Roll No: 102313056 Group: 3C33

Topsis-Trishti-10155792 is a Python library designed to solve Multiple Criteria Decision Making (MCDM) problems using the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method.

The package helps users rank alternatives based on multiple quantitative criteria by calculating their closeness to the ideal best and ideal worst solutions. It is implemented as a command-line tool, making it easy to use for academic and real-world decision-making problems.

Installation

The package can be installed using the Python package manager pip.

pip install Topsis-Trishti-10155792

Usage

Provide the input CSV file name, followed by the weights vector and the impacts vector.

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

Alternatively, vectors can be passed without quotes:

topsis input.csv 1,1,1,1 +,+,-,+

Note: If the vectors contain spaces, they must be enclosed within double quotes " ".

To view help instructions, use:

topsis /h

Example

Input File: sample.csv

A CSV file containing data for different mobile handsets with multiple attributes.

Model Storage (GB) Camera (MP) Price ($) Looks (out of 5)
M1 16 12 250 5
M2 16 8 200 3
M3 32 16 300 4
M4 32 8 275 4
M5 16 16 225 2

Weights Vector:

[0.25, 0.25, 0.25, 0.25]

Impacts Vector:

[+, +, -, +]

Command

topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+"

Output

        TOPSIS RESULTS
-----------------------------
   Topsis Score   Rank
1     0.534277      3
2     0.308368      5
3     0.691632      1
4     0.534737      2
5     0.401046      4

The output file contains the TOPSIS score and rank for each alternative.


Important Notes

  • The first column (identifiers) and the header row are ignored during computation.
  • The CSV file must contain only numerical values (no categorical data).
  • The number of weights and impacts must match the number of criteria.
  • Impacts must be either + (benefit) or - (cost).

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_trishti_102313056-0.1.2.tar.gz (3.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_trishti_102313056-0.1.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file topsis_trishti_102313056-0.1.2.tar.gz.

File metadata

  • Download URL: topsis_trishti_102313056-0.1.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for topsis_trishti_102313056-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dcb3f27d1d4c9295a4cd381243d432e11571cd0ac5ce3db0cc74ccd330b7155b
MD5 d00e2bd7406410404eb9cf106dbe9927
BLAKE2b-256 5b2b257200bd4d00a32358a8b8455fd08d313f539dd8d1a6539b53960fc3d32f

See more details on using hashes here.

File details

Details for the file topsis_trishti_102313056-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_trishti_102313056-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5fd6fd28c34f7ece692c5bfa63b862063270ade6b67cbf4de58b1c089100e198
MD5 7c4765978f9397df0356eb4b9822b10a
BLAKE2b-256 863d1c6fc1889bc5ef0b9213b848d3c702cd0dfcc4e8cc1f224def0a79276672

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