Skip to main content

topsis

Project description

TOPSIS Ranking Tool

By Karanveer Singh (Roll No: 102303670)

This command-line tool applies the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method to rank alternatives based on multiple quantitative criteria.


Installation

pip install Topsis-Karanveer-102303670


Input Data Format

The input must be a CSV file with the following structure:

Column 1: Alternatives

Column 2 onwards: Numerical criteria values

Example:

| City | AirQuality | Cost | Transport | Safety |

|------|------------|------|-----------|--------|

| C1 | 72 | 32000 | 7 | 8 |

| C2 | 88 | 47000 | 9 | 6 |

| C3 | 65 | 28000 | 6 | 9 |

| C4 | 80 | 36000 | 8 | 8 |


Weights and Impacts

Weights (comma separated):

0.30,0.20,0.25,0.25

Impacts (comma separated):

+,-,+,+


Usage

topsis <input_file.csv> <output_file.csv>

Example:

topsis city.csv "0.30,0.20,0.25,0.25" "+,-,+,+" ranks.csv


Output Format

The output CSV will contain:

City, Score, Rank

Example:

C1, 0.51, 3

C2, 0.56, 2

C3, 0.44, 4

C4, 0.67, 1

Higher score means better rank.


Error Handling

The program checks for:

Incorrect number of arguments

Non-numeric values in criteria columns

Invalid impact symbols (+ or - only)

Incorrect CSV format

Appropriate error messages are displayed for invalid input.


Conclusion

This tool helps in decision making by converting multiple evaluation criteria into a single composite score using the TOPSIS method.

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_karanveer_102303670-0.0.9.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

topsis_karanveer_102303670-0.0.9-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file topsis_karanveer_102303670-0.0.9.tar.gz.

File metadata

File hashes

Hashes for topsis_karanveer_102303670-0.0.9.tar.gz
Algorithm Hash digest
SHA256 4a9aa742123709c911023920a849bf03a4db5680e15322f1ecc739b17babf1c4
MD5 b58653cba7c546bb7c7349d6982ea057
BLAKE2b-256 5b98d04d0c4f33f42a73e82387794344db5a373b7f5007d35ddaa207a65bc619

See more details on using hashes here.

File details

Details for the file topsis_karanveer_102303670-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_karanveer_102303670-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d1e572c839d11129d7df323cb381f1824702981921b239924e59d08cd5e40ccc
MD5 a9d0e0ce3458371db025bc1241f13a0e
BLAKE2b-256 f3558dac13df9a77eb21a8fd499abb4dafe55dae527c35fc006b40221fd23b85

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