A Python package for implementing the TOPSIS method.
Project description
Multi-Criteria Decision Making with TOPSIS
Overview This repository contains a Python-based implementation of the TOPSIS decision-making methodology (Technique for Order of Preference by Similarity to Ideal Solution). The tool helps evaluate and rank different options based on multiple decision criteria while considering their relative significance.
System Requirements
- Python 3.x environment
- Required packages: pandas numpy
To set up the dependencies: pip install pandas numpy
File Structure
- Main script: 102203557.py
- Required input: CSV format decision matrix
- Generated output: CSV file with rankings
Input Data Requirements Your input CSV file should be structured as follows:
- Column 1: Alternative identifiers
- Columns 2+: Numerical values for each criterion
Sample input format (input.csv): Alternative,Metric1,Metric2,Metric3,Metric4 Option1,20,300,50,0.5 Option2,25,250,60,0.7
Running the Program Execute the script using the following syntax: python 102203557.py input_file weights impacts output_file
Parameters:
- input_file: Path to your input CSV
- weights: Criterion weights (comma-separated)
- impacts: Criterion types (+ for maximization, - for minimization)
- output_file: Desired location for results
Example: python 102203557.py input.csv "1,1,1,1" "+,-,+,+" results.csv
Results Format The output CSV includes:
- All original input data
- TOPSIS score column
- Final ranking column
Sample output structure: Alternative,Metric1,Metric2,Metric3,Metric4,TOPSIS_Score,Rank Option1,20,300,50,0.5,0.78,2 Option2,25,250,60,0.7,0.85,1
Error Management The program includes validation for:
- File existence and accessibility
- Data format requirements
- Input parameter consistency
- Valid impact indicators
Common error messages:
- "Unable to locate specified input file"
- "Input data must contain 3+ columns"
- "Weight/impact count must match criterion count"
- "Impact values limited to '+' or '-'"
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_chahat_garg_102203557-0.1.0.tar.gz.
File metadata
- Download URL: topsis_chahat_garg_102203557-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8213162f99b7c9c9c336455721cd59262f79ed75d884476aca54f07c20e9fdaa
|
|
| MD5 |
737bea61d7cd9abb123e4f22454e5dc8
|
|
| BLAKE2b-256 |
eb8d6307cefc9bf8aba141e7106c333bcfcb676d20cdaf5b34a12e9c6a339daa
|
File details
Details for the file Topsis_Chahat_Garg_102203557-0.1.0-py3-none-any.whl.
File metadata
- Download URL: Topsis_Chahat_Garg_102203557-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
262fb38eef571abb1ca3347b14886d86013edc25c1ae3c719ae2463b3164750c
|
|
| MD5 |
72687855911af56eb6f2b55cb9332652
|
|
| BLAKE2b-256 |
702e9181aa1dd7616c2d8d2b399e67f7f7754694de077d99aa3972e5455dd3ea
|