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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file 102383077_shresth_topsis-1.0.0.tar.gz.
File metadata
- Download URL: 102383077_shresth_topsis-1.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7c5a72d0d514a6b33127f2c6bedb88a02004daf26fb77ab211035f2898753d6
|
|
| MD5 |
8a7bf967830d3f6b3efd5da4c9c0ef5e
|
|
| BLAKE2b-256 |
cad70b0b9282b1212eaa4d420f76c4d966c18aeb0e0d1d14673b4ba8064b7b22
|
File details
Details for the file 102383077_Shresth_Topsis-1.0.0-py3-none-any.whl.
File metadata
- Download URL: 102383077_Shresth_Topsis-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6c8cb0f47312f35e724ba1b87a5a96f5e1bc727d4fe0c11596a04cf4c7705fb
|
|
| MD5 |
4928c3590dab863ec775bfed2f1f4d7b
|
|
| BLAKE2b-256 |
7c028701eb7cc9a16816fddc95549e6c1ac2ffb84703fea07c210841c5879a77
|