Metadata-Version: 2.3
Name: topsis-core
Version: 1.0.0
Summary: A command-line tool implementing the TOPSIS multi-criteria decision-making algorithm.
Author: Harshit Katyal
Author-email: Harshit Katyal <hkatyal_be23@thapar.edu>
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# TOPSIS CLI

A lightweight command-line tool implementing the **Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS)**. The tool accepts CSV or Excel datasets, applies user-defined weights and impacts, and generates a ranked output using the TOPSIS decision-making algorithm.

## 🌐 Live Demo

Try the web version here:

**https://topsis-zzre.vercel.app/**

## 📦 Installation

Install the package from PyPI:

```bash
pip install topsis-cli
```

## 🚀 Usage

Run the tool from the command line using:

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

### Parameters

| Parameter | Description |
|-----------|-------------|
| `InputDataFile` | Path to the input `.csv` or `.xlsx` file |
| `Weights` | Comma-separated numeric weights (e.g. `1,1,1,1`) |
| `Impacts` | Comma-separated impacts using `+` (benefit) or `-` (cost) |
| `ResultFileName` | Output CSV filename |

### Input Requirements

- The dataset must contain **at least three columns**.
- The **first column** should contain the names of alternatives (e.g., M1, M2, M3).
- All remaining columns must contain **numeric values**.

---

## Example

### Input (`data.csv`)

| Model | Price | Storage | Camera | Looks |
|------|------:|--------:|-------:|------:|
| M1 | 250 | 16 | 12 | 5 |
| M2 | 200 | 16 | 8 | 3 |
| M3 | 300 | 32 | 16 | 4 |
| M4 | 275 | 32 | 8 | 4 |
| M5 | 225 | 16 | 16 | 2 |

### Weights

```text
1,1,1,1
```

### Impacts

```text
-,+,+,+
```

- Price → Cost (`-`)
- Storage → Benefit (`+`)
- Camera → Benefit (`+`)
- Looks → Benefit (`+`)

### Run

```bash
topsis data.csv "1,1,1,1" "-,+,+,+" result.csv
```

---

## Output

The generated `result.csv` contains two additional columns:

- **TOPSIS Score**
- **Rank**

| Model | Price | Storage | Camera | Looks | TOPSIS Score | Rank |
|------|------:|--------:|-------:|------:|-------------:|----:|
| M1 | 250 | 16 | 12 | 5 | 0.534277 | 3 |
| M2 | 200 | 16 | 8 | 3 | 0.308368 | 5 |
| M3 | 300 | 32 | 16 | 4 | 0.691632 | 1 |
| M4 | 275 | 32 | 8 | 4 | 0.534737 | 2 |
| M5 | 225 | 16 | 16 | 2 | 0.492650 | 4 |

---

## Features

- Supports CSV and Excel datasets
- Implements the complete TOPSIS algorithm
- User-defined weights and impacts
- Automatic ranking based on TOPSIS score
- Simple command-line interface
- Fast and lightweight implementation

---

## Project Links

- **GitHub Repository:** https://github.com/HarshitCodes16/topsis-cli
- **Live Demo:** https://topsis-zzre.vercel.app/

---

## License

This project is licensed under the MIT License.