Skip to main content

TOPSIS implementation for MCDM problems

Project description

TOPSIS Python Package

Project-1 (UCS654)

Submitted by: Vansh Garg Roll No: 102303137 Group: 3C15

Project Description:

topsis-vansh-102303137 is a Python package for solving Multiple Criteria Decision Making (MCDM) problems using the Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) method.

This package helps in ranking alternatives based on their distance from the ideal best and ideal worst solutions.

Installation

Install the package using pip: pip install topsis-vansh-102303137

Usage

Run the package directly from the command line: topsis <input_file.csv>

Example: topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+"

Weights and impacts can also be passed without quotes: topsis sample.csv 0.25,0.25,0.25,0.25 +,+,-,+

⚠️ Important: If your input contains spaces, always enclose it in double quotes " ".

Input File Format:

  1. Input file must be a CSV file
  2. First column → Alternative name (identifier)
  3. Remaining columns → Numeric criteria only
  4. No missing or categorical values allowed

Sample CSV (sample.csv): Model,Storage,Camera,Price,Looks M1,16,12,250,5 M2,16,8,200,3 M3,32,16,300,4 M4,32,8,275,4 M5,16,16,225,2

Parameters Weights Vector Must be numeric Length = number of criteria

Example: 0.25,0.25,0.25,0.25

Impacts Vector Use + for benefit criteria Use - for cost criteria

Example: +,+,-,+

Output The program generates a CSV file with: Topsis Score → Relative closeness to ideal solution Rank → Higher score gets better rank

Sample Output: Topsis Score Rank 1 0.534277 3 2 0.308368 5 3 0.691632 1 4 0.534737 2 5 0.401046 4

Notes Higher Topsis Score indicates a better alternative Rank 1 represents the best option Input validation is performed for:

Missing values Incorrect weights/impacts length Invalid impact symbols

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_vansh_102303137-1.0.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

topsis_vansh_102303137-1.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_vansh_102303137-1.0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for topsis_vansh_102303137-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b9c5ffea16c65aad79cb13dc75a3d4821f31f28286dc4f9ccd408e60d489ee15
MD5 f6eed65cf0ee227babdef76006ffc1c8
BLAKE2b-256 e6ffc5948fbf217692146e1d0d92dba3f95b3098b935f39ed5cd91df4b35df18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_vansh_102303137-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 929f782aed58df6d91a4cca98d518156ed6b108f3b3d42ccc6762695167e4059
MD5 2f10cd998f86263bcedd1cbd1ec64a4a
BLAKE2b-256 afa83eadf7f7a2f6fe3a2c16fc151e1253721948eaf6bf7cc88827979c86eb62

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