Topsis technique for MCDM
Project description
TOPSIS Package
This package implements the TOPSIS technique for Multi-Criteria Decision Making Problems.
Installation
You can install the package using pip. First,run:
pip install topsis-mohit-102397005
Usage
After installing the package, you can use it from the command line.
Command Line Usage
To use the TOPSIS package from the command line, run the following command:
import topsis_mohit_102397005
python -m topsis_mohit_102397005.topsis_102397005 inputFileName weights impacts resultFileName
Example
Suppose you have an input file data.csv with the following content:
Model,Price,Quality,Service:
M1,25000,7,8
M2,30000,8,6
M3,27500,9,7
M4,28000,6,9
You can run the following command:
import topsis_mohit_102397005
python -m topsis_mohit_102397005.topsis_102397005 data.csv "0.25,0.25,0.5" "-,+,+" result.csv
This is the result.csv file created after running the command:
Model,Price,Quality,Service,TOPSIS Score,Rank
M1,25000,7,8,0.5345,2
M2,30000,8,6,0.3083,4
M3,27500,9,7,0.6912,1
M4,28000,6,9,0.4657,3
Function Usage
You can also use the TOPSIS package by calling the function directly in your Python code.
Example
import topsis_mohit_102397005
inputFileName = 'data.csv'
weights = '0.25,0.25,0.5'
impacts = '-,+,+'
resultFileName = 'result.csv'
topsis_mohit_102397005.run_topsis(inputFileName, weights, impacts, resultFileName)
This will produce the same output as the command line example, saving the results to result.csv.
Parameters
inputFileName: The name of the input CSV file containing the data.weights: A string of weights separated by commas (e.g., "1,1,1").impacts: A string of impacts separated by commas, where each impact is either + or - (e.g., "+,+,-").resultFileName: The name of the output CSV file where the results will be saved.
About
Author: Mohit BansalGithub: https://github.com/Mohit-Bansal-31/Topsis-Mohit-102397005Contact: mohitbansal0031@gmail.comDate: 20-Jan-2025
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_mohit_102397005-1.0.22.tar.gz.
File metadata
- Download URL: topsis_mohit_102397005-1.0.22.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2038ba85c9ab60e56188647dc8f463809afd5320acb609708e3b90f5d88cb564
|
|
| MD5 |
1fcbfea34167f8b2a401c459b2e589a7
|
|
| BLAKE2b-256 |
9ae045e2a1f225b2b3a59bfe84543d5867798d853283958d43fb7593407c2e6c
|
File details
Details for the file topsis_mohit_102397005-1.0.22-py3-none-any.whl.
File metadata
- Download URL: topsis_mohit_102397005-1.0.22-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65ecbd2593b694290850968623a2e29cce1a1a191e160669c26456ac32bdaa37
|
|
| MD5 |
8a87fd6031b4270d153533b1dc12fa71
|
|
| BLAKE2b-256 |
3dc4d90c0a2e65bfc1fd57e5463e91334ace7774b246f0824befda3c48c18257
|