Topsis-KhushiMehta-102303769 1.0.1
Command-line implementation of TOPSIS decision making method

TOPSIS Python Package

This project is a Python command-line tool that implements the TOPSIS
(Technique for Order Preference by Similarity to Ideal Solution) method.

TOPSIS is a multi-criteria decision making technique used to rank different
alternatives based on their distance from an ideal best solution and an
ideal worst solution.

This package allows users to apply the TOPSIS method easily using a single
command from the terminal.

-----------------------------------------------------------------------

Installation

The package can be installed using pip.

pip install Topsis-KhushiMehta-102303769

-----------------------------------------------------------------------

Usage

After installing the package, the TOPSIS method can be executed from the
command line using the following format:

topsis <input_file> <weights> <impacts> <output_file>

Example:

topsis data.csv "1,1,1" "+,+,+" result.csv

Here,
input_file  : CSV or Excel (.xlsx) file containing the data  
weights     : Comma-separated numerical values indicating importance of criteria  
impacts     : Comma-separated symbols (+ or -) indicating benefit or cost criteria  
output_file : CSV file where the result will be stored  

-----------------------------------------------------------------------

Input File Format

The input file must be provided in CSV or Excel (.xlsx) format.

The first column of the file should contain the names of the alternatives.
All remaining columns must contain numeric values only.

Sample Input Table:

Alternative | C1  | C2  | C3
A1          | 250 | 16  | 12
A2          | 200 | 20  | 8
A3          | 300 | 14  | 16

-----------------------------------------------------------------------

Weights and Impacts

Weights represent the importance of each criterion.
They must be provided as comma-separated numeric values.

Example:
"1,1,1"

Impacts specify whether a criterion is beneficial or non-beneficial.
Use '+' for benefit criteria and '-' for cost criteria.

Example:
"+,+,-"

The number of weights and impacts must be equal to the number of criteria
columns in the input file.

-----------------------------------------------------------------------

Output File

The output is generated in CSV format.

Two additional columns are added to the original data:
Topsis Score
Rank

A higher Topsis Score indicates a better alternative.
The alternative with the highest score is assigned rank 1.

-----------------------------------------------------------------------

Error Handling

The program performs the following validations before processing the data:

Correct number of command-line arguments  
Input file existence  
Minimum of three columns in the input file  
Numeric values in criteria columns  
Matching number of weights, impacts, and criteria columns  
Valid impact values (+ or -)  

Appropriate error messages are displayed if any of the above conditions fail.

-----------------------------------------------------------------------

About TOPSIS

TOPSIS ranks alternatives based on their relative closeness to the ideal solution.
The alternative closest to the ideal best solution and farthest from the
ideal worst solution is considered the best option.

-----------------------------------------------------------------------

Author

Khushi Mehta  
Developed as part of an academic assignment