Skip to main content

TOPSIS implementation for MCDM problems

Project description

topsis-3283

Project Description

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

This project is developed as part of academic coursework and provides a command-line interface to rank alternatives based on multiple criteria, weights, and impacts.


What is TOPSIS?

TOPSIS is a decision-making method based on the concept that the chosen alternative should have the shortest distance from the ideal solution and the farthest distance from the negative-ideal solution.


Installation

Use the Python package manager pip to install the package from PyPI:

pip install topsis-3283

Usage
Run the package from the command line using the following format:
topsis <input_file.csv> <weights> <impacts>
Example Commands
topsis sample.csv "1,1,1,1" "+,-,+,+"
OR (without quotes):
topsis sample.csv 1,1,1,1 +,-,+,+
⚠️ Note:
If the input vectors contain spaces, they must be enclosed in double quotes " ".
To view help:
topsis /h
Example
Sample Input File (sample.csv)
A CSV file containing data for different mobile handsets:
Model	Storage space (GB)	Camera (MP)	Price ($)	Looks (out of 5)
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
Weights Vector
[0.25, 0.25, 0.25, 0.25]
Impacts Vector
[+, +, -, +]
Command Used
topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+"
Output
        TOPSIS RESULTS
-----------------------------

    P-Score    Rank
1   0.534277     3
2   0.308368     5
3   0.691632     1
4   0.534737     2
5   0.401046     4
Other Notes
The first column and first row are removed automatically to eliminate indices and headers.
Ensure the CSV file:
Contains only numerical values (except the first column)
Does not contain categorical data
Follows the same structure as sample.csv

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_rakshita_102303498-1.0.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

topsis_rakshita_102303498-1.0.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file topsis_rakshita_102303498-1.0.0.tar.gz.

File metadata

File hashes

Hashes for topsis_rakshita_102303498-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d39aedb20a4686d322c95734feda59756eb5d54ed5692a730151bc4f59ee30d4
MD5 bfae3cca77323d935a6ab666578781c0
BLAKE2b-256 7317b29383940b6bb158c3a5735c8b7bc8c26f90f19c028840b85e0bc49e6116

See more details on using hashes here.

File details

Details for the file topsis_rakshita_102303498-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_rakshita_102303498-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9e5f874c4fb0a8313a351d662e7338650363b2c55455c01bbc0cbc278fc4e9c
MD5 5a9d3d9f6b91e4bbf4c89465de959e84
BLAKE2b-256 dcbd7003a267e6d72b411f63adc6bec3fdd42a736a7a0b4584de90299b8ccb49

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