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

topsispackage1_1_1-0.0.7.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

topsispackage1_1_1-0.0.7-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file topsispackage1_1_1-0.0.7.tar.gz.

File metadata

  • Download URL: topsispackage1_1_1-0.0.7.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for topsispackage1_1_1-0.0.7.tar.gz
Algorithm Hash digest
SHA256 4e243ef7922e1fbd653a482ed37c2a7598d831a5a5abb9a4caba5cfa3e2043ca
MD5 7f61d25e3fd1608f53a6f4158e6cea6d
BLAKE2b-256 387e7d5cd4ff5363be328d6778cdb9cd2499e11a158b7f1bd635c89875ab3cee

See more details on using hashes here.

File details

Details for the file topsispackage1_1_1-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for topsispackage1_1_1-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d4dd47a50a7063871157817b573f8f1e32750b2738ec0f670d485fc2cadd2988
MD5 6e806c7c128f11c912f16f1e14ca4dd8
BLAKE2b-256 6fb2e98507d6faa23896b40f4c15f71a355f389033af209d03f2d413da5c826c

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