A Python package to implement TOPSIS for MCDM
Project description
TOPSIS-Aryaman-102303622
📌 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:
- Command Line Interface (CLI)
- As a Python Library
1️⃣ Command Line Interface (CLI)
Run the following command in your terminal:
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
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 topsis_aryaman_102303622-1.0.2.tar.gz.
File metadata
- Download URL: topsis_aryaman_102303622-1.0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
850a38d12717ee2dcb4f71b837c47d72d2a118eb611cb0e7cb24e683625c0b21
|
|
| MD5 |
a37478a15d231aa8cda0f0aed4dfe6d4
|
|
| BLAKE2b-256 |
17737d9732e628bde72c27abe850c9471b5d37db4f4307ef1648a9ba4c7be897
|
File details
Details for the file topsis_aryaman_102303622-1.0.2-py3-none-any.whl.
File metadata
- Download URL: topsis_aryaman_102303622-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78bf4ab0b22af69de513d1ad0f2fab804e9a3734e51675b23ae81ae62c5bc57e
|
|
| MD5 |
6f579c17ab1ba44064c1a36f24126776
|
|
| BLAKE2b-256 |
76ac4057a79a67f968ced0cfb1cfde4cfddf28f25e16775ae5276ab4237cc779
|