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>
Release files for 102383077-Shresth-Topsis 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| 102383077_shresth_topsis-1.0.0.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 102383077_Shresth_Topsis-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / 102383077_shresth_topsis-1.0.0.tar.gz
| Download URL | 102383077_shresth_topsis-1.0.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7c5a72d0d514a6b33127f2c6bedb88a02004daf26fb77ab211035f2898753d6
|
|
BLAKE2b-256 checksum How to use checksums |
cad70b0b9282b1212eaa4d420f76c4d966c18aeb0e0d1d14673b4ba8064b7b22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.1
|
Release files / 102383077_Shresth_Topsis-1.0.0-py3-none-any.whl
| Download URL | 102383077_Shresth_Topsis-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6c8cb0f47312f35e724ba1b87a5a96f5e1bc727d4fe0c11596a04cf4c7705fb
|
|
BLAKE2b-256 checksum How to use checksums |
7c028701eb7cc9a16816fddc95549e6c1ac2ffb84703fea07c210841c5879a77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.1
|