Skip to main content

A Python package to implement TOPSIS for MCDM

Project description

TOPSIS-Aryaman-102303622

PyPI Latest Release License Python Versions Downloads

📌 Overview

TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a Multi-Criteria Decision-Making (MCDM) method.

It ranks alternatives based on:

  • Minimum distance from the Ideal Best solution
  • Maximum distance from the Ideal Worst solution

The alternative closest to the ideal solution is considered the best choice.

This package provides a simple CLI tool and Python API to apply TOPSIS on CSV or Excel datasets.


📦 Installation

Install the package using pip:

pip install Topsis-Aryaman-102303622

---

## 🚀 Usage

You can use this package in **two ways**:
1. Command Line Interface (CLI)
2. As a Python Library

---

### 1️⃣ Command Line Interface (CLI)

Run the following command in your terminal:

```bash
topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
from topsis_aryaman_102303622 import topsis

topsis("data.xlsx", "1,1,1,1", "+,+,-,+", "result.csv")

🔹 Command Line Arguments

Argument Description Example
InputDataFile Path to input CSV or Excel file data.xlsx
Weights Comma-separated weights for criteria "1,1,1,1"
Impacts Comma-separated impacts (+ or -) "+,+,-,+"
ResultFileName Output CSV file name result.csv

📊 Input Data Format

The input file must be in CSV or Excel format.

Structure

  • First column: Names of alternatives (e.g., M1, M2, M3)
  • Remaining columns: Numeric criteria values

Example (data.csv)

Fund Name,P1,P2,P3,P4,P5
M1,0.84,0.71,6.7,42.1,12.59
M2,0.91,0.83,7.0,31.7,10.11
M3,0.79,0.62,4.8,46.7,13.23

⚠️ Constraints & Assumptions

  • Number of weights must equal number of criteria
  • Number of impacts must equal number of criteria
  • Criteria values must be numeric
  • Impacts must be:
    • + for benefit criteria
    • - for cost criteria

📄 License

This project is licensed under the MIT License.


👤 Author

Aryaman Shukla
Roll No: 102303622

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

topsis_aryaman_102303622-1.0.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

topsis_aryaman_102303622-1.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file topsis_aryaman_102303622-1.0.1.tar.gz.

File metadata

File hashes

Hashes for topsis_aryaman_102303622-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7da81bb89ddf912ff4c3bbf616d3e0e44e83d3c84f240d21eeaee0da790b55f3
MD5 61349e8860d7dd77724d0c368fb82216
BLAKE2b-256 86801ad3936e61c3e5fed066e68c2fb21780d6922c0af2586444edb08ceeb896

See more details on using hashes here.

File details

Details for the file topsis_aryaman_102303622-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_aryaman_102303622-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b75a4dbc0c9da84d7dbd2cb217894a493c7b6aef56045a4978361f064b60b8be
MD5 89ae030334f248c3c06a54a4fb9d8398
BLAKE2b-256 1e2bd9c14b1d1efc3cea344e83085ee37dfb00c29f923c1e20bbe3d0e2b387a7

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