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_sargun_102303367-0.1.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

topsis_sargun_102303367-0.1.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file topsis_sargun_102303367-0.1.1.tar.gz.

File metadata

  • Download URL: topsis_sargun_102303367-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for topsis_sargun_102303367-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2ce4ff20a1f3b8ceb48f9b20e3a33344a4aa37a8444aa0bd77ba33264f08fb24
MD5 4f26393f531e8a72391d2f4b773c7520
BLAKE2b-256 1f2cfa1a39ed14f1b4414bb40900020fcef66a59b49cd5cfaac49b31b41f64c7

See more details on using hashes here.

File details

Details for the file topsis_sargun_102303367-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_sargun_102303367-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 496d0a100fc258c474112ee76753e0e556704a9f309b8a036f634205736d1c16
MD5 f906bade8f2da925ae771b71111a8f93
BLAKE2b-256 171517b9fad84e9f8e8b9d4bb7c1e73b87ca0d53589c2c6ecf0df58ad91f69e7

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