Skip to main content

A professional command-line tool for TOPSIS decision analysis.

Project description

TOPSIS Implementation

BY: Gurkirat Singh
Roll Number: 102303256
Group: 3C21

topsis-gurkirat-102303256 is a Python library for solving Multiple Criteria Decision Making (MCDM) problems using the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS).


Installation

Install the package from PyPI using pip:

pip install topsis-gurkirat-102303256

Usage

Run the package via the command line:

topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>

Example

topsis topsis_dataset.csv "0.2,0.15,0.15,0.2,0.15,0.15" "-,+,+,+,+,+" result.csv

Steps Followed in TOPSIS

  1. Normalization
    Transform the data into a comparable scale.

  2. Weighting
    Apply user-defined weights to the normalized decision matrix.

  3. Ideal Solutions
    Determine the ideal best and ideal worst values for each criterion.

  4. Distance Calculation
    Compute the Euclidean distance of each alternative from the ideal best and ideal worst.

  5. Closeness Score
    Calculate the relative closeness of each alternative to the ideal solution.

  6. Ranking
    Rank the alternatives based on the TOPSIS score.


Sample Dataset

Alternative Cost Quality Delivery Time Durability Service Energy Efficiency
A1 250 7 5 8 8 6
A2 200 6 7 7 7 7
A3 300 8 4 9 9 8
A4 275 7 6 8 8 7
A5 225 9 3 9 8 9
A6 260 8 5 8 9 8

Output (Printed in Terminal)

--- TOPSIS RESULTS (Score & Rank) ---
   Topsis Score    Rank
       0.430121     5
       0.651113     1
       0.359169     6
       0.517720     3
       0.447729     4
       0.537590     2
-------------------------------------
Results saved to result.csv

Description

This package helps users evaluate and rank alternatives based on multiple criteria by applying the TOPSIS methodology.
It is suitable for academic assignments, research work, and real-world decision-making problems.

Before proceeding, make sure of the following points:

  1. Correct number of parameters (inputFileName, Weights, Impacts, resultFileName).
  2. The input file must contain three or more columns.
  3. From the 2nd to the last columns, all values must be numeric.
  4. The number of weights, number of impacts, and number of criteria columns (from 2nd to last) must be the same.

License

MIT

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_gurkirat_102303256-1.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

topsis_gurkirat_102303256-1.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file topsis_gurkirat_102303256-1.1.1.tar.gz.

File metadata

File hashes

Hashes for topsis_gurkirat_102303256-1.1.1.tar.gz
Algorithm Hash digest
SHA256 cc7be06e5f57c5fd8f304a4392e37a17f4715551ec7d4391bf13e579750b7a76
MD5 07714c302dd75edd0f60f1ad805a2ccf
BLAKE2b-256 52d7addb2ec0ae206d2eb8100597eac9881b46e4a5da834c317f36a4d8e05f6f

See more details on using hashes here.

File details

Details for the file topsis_gurkirat_102303256-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_gurkirat_102303256-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b2ee351de3938e465ab6fe8bb0b6b879822202935d15e5f27a79b8fbadc61d1
MD5 beafcce5b19d2638240f8adc988e031a
BLAKE2b-256 3070d66401bc587cd5c705aa23c0a96b8e65cf845b490907016905c4519ec57e

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