TOPSIS Implementation
Overview
TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) is a multi-criteria decision-making method. This Python package implements the TOPSIS method, allowing you to rank alternatives based on multiple criteria.
This implementation is specifically designed to work with a CSV input file and provides results with TOPSIS scores and ranks.
Features
- Handles multi-criteria decision-making problems
- Accepts CSV input files
- Outputs a CSV file with TOPSIS scores and ranks
- Validates input data and handles common errors
- Command-line interface for ease of use
Installation
You can install this package directly from PyPI using pip:
pip install 102217227-TOPSISUsage
Command-Line Interface
After installing the package, you can use it from the command line. The basic usage is:
topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>Parameters
- InputDataFile: The path to the input CSV file containing the data.
- Weights: A string of comma-separated numerical weights (e.g., "1,1,1,2").
- Impacts: A string of comma-separated + or - signs indicating whether each criterion is beneficial (+) or non-beneficial (-) (e.g., "+,+,-,+").
- ResultFileName: The path to the output CSV file where results will be saved.
Example
Suppose you have an input file named 102218041-data.csv with the following content:
Alternative,Criterion1,Criterion2,Criterion3,Criterion4
M1,250,16,12,5
M2,200,6,8,3
M3,300,16,8,4
M4,275,10,10,4