Skip to main content

A Python implementation of the TOPSIS algorithm for multi-criteria decision analysis.

Project description

TOPSIS Implementation

1. Methodology

  • Step 1: Data Collection
  • Step 2: Data Pre-Processing (Normalization and Validation)
  • Step 3: Weighted Normalization
  • Step 4: Calculation of Ideal Best and Ideal Worst Solutions
  • Step 5: Calculation of Separation Measures
  • Step 6: Calculation of Relative Closeness (TOPSIS Score)
  • Step 7: Ranking

2. Description

  • Objective: To implement the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method for multi-criteria decision analysis.
  • Inputs:
    • A CSV file containing alternatives and their performance across criteria.
    • Weights for criteria and their respective impacts (benefit or cost).
  • Outputs:
    • A CSV file with TOPSIS scores and ranks for the alternatives.
  • Error Handling:
    • File existence and format validation.
    • Ensures impacts are '+' (benefit) or '-' (cost).
    • Ensures the number of weights and impacts matches the criteria count.

3. Input / Output

Input File Example: <RollNumber>-data.csv

Alternative Criterion 1 Criterion 2 Criterion 3
A1 50 60 70
A2 60 80 90
A3 70 85 80

Output File Example: <RollNumber>-result.csv

Alternative Criterion 1 Criterion 2 Criterion 3 TOPSIS Score Rank
A1 50 60 70 0.556 2
A2 60 80 90 0.890 1
A3 70 85 80 0.467 3

4. Usage Instructions

Run the program from the command line with the following format:

python <RollNumber>.py <InputDataFile> <Weights> <Impacts> <ResultFileName>

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

102383077_shresth_topsis-1.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

102383077_Shresth_Topsis-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file 102383077_shresth_topsis-1.0.0.tar.gz.

File metadata

File hashes

Hashes for 102383077_shresth_topsis-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a7c5a72d0d514a6b33127f2c6bedb88a02004daf26fb77ab211035f2898753d6
MD5 8a7bf967830d3f6b3efd5da4c9c0ef5e
BLAKE2b-256 cad70b0b9282b1212eaa4d420f76c4d966c18aeb0e0d1d14673b4ba8064b7b22

See more details on using hashes here.

File details

Details for the file 102383077_Shresth_Topsis-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for 102383077_Shresth_Topsis-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6c8cb0f47312f35e724ba1b87a5a96f5e1bc727d4fe0c11596a04cf4c7705fb
MD5 4928c3590dab863ec775bfed2f1f4d7b
BLAKE2b-256 7c028701eb7cc9a16816fddc95549e6c1ac2ffb84703fea07c210841c5879a77

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