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:

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.2.tar.gz (4.6 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.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for topsis_aryaman_102303622-1.0.2.tar.gz
Algorithm Hash digest
SHA256 850a38d12717ee2dcb4f71b837c47d72d2a118eb611cb0e7cb24e683625c0b21
MD5 a37478a15d231aa8cda0f0aed4dfe6d4
BLAKE2b-256 17737d9732e628bde72c27abe850c9471b5d37db4f4307ef1648a9ba4c7be897

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_aryaman_102303622-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 78bf4ab0b22af69de513d1ad0f2fab804e9a3734e51675b23ae81ae62c5bc57e
MD5 6f579c17ab1ba44064c1a36f24126776
BLAKE2b-256 76ac4057a79a67f968ced0cfb1cfde4cfddf28f25e16775ae5276ab4237cc779

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