Metadata-Version: 2.4
Name: topsis-gurkirat-102303256
Version: 1.1.1
Summary: A professional command-line tool for TOPSIS decision analysis.
Author: Gurkirat Singh
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: openpyxl
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: summary

# 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:

```bash
pip install topsis-gurkirat-102303256
```

---

##  Usage

Run the package via the command line:

```bash
topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
```

### Example

```bash
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)

```text
--- 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](https://choosealicense.com/licenses/mit/)
