Skip to main content

A Python package implementing TOPSIS for MCDM problems

Project description

## Project Description

**Topsis-Chahat-102303831**

For: **Project-1 (UCS633)**

Submitted by: **Chahat**

Roll No: **102303831**

Topsis-Chahat-102303831 is a Python package for solving **Multiple Criteria Decision Making (MCDM)** problems using the **Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS)**.

The package ranks alternatives based on their distance from the ideal best and ideal worst solutions.


## Installation

Install the package using pip:

pip install Topsis-Chahat-102303831


## Usage

Provide the input file name, followed by the **weights vector**, **impacts vector**, and the **output file name**.

topsis data.xlsx "1,1,1,1,1" "+,+,+,+,+" output.csv

Vectors can also be entered without double quotes:

topsis data.xlsx 1,1,1,1,1 +,+,+,+,+ output.csv

If the vectors contain spaces, they must be enclosed in double quotes.

To view help:

topsis /h


## Example

### Input File (data.xlsx)

| Fund Name | P1 | P2 | P3 | P4 | P5 |

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

| M1 | 0.62 | 0.38 | 7.0 | 42.6 | 12.65 |

| M2 | 0.79 | 0.62 | 4.8 | 65.5 | 17.93 |

| M3 | 0.75 | 0.56 | 4.6 | 63.7 | 17.40 |

| M4 | 0.78 | 0.61 | 4.9 | 66.3 | 18.15 |

| M5 | 0.61 | 0.37 | 6.4 | 32.3 | 9.92 |

| M6 | 0.78 | 0.61 | 4.2 | 45.4 | 12.75 |

| M7 | 0.90 | 0.81 | 3.5 | 63.3 | 17.13 |

| M8 | 0.63 | 0.40 | 4.1 | 61.7 | 16.71 |

Weights vector = [ 1 , 1 , 1 , 1 , 1 ]

Impacts vector = [ + , + , + , + , + ]


### Input Command

topsis data.xlsx "1,1,1,1,1" "+,+,+,+,+" output.csv


### Output (output.csv)

| Fund Name | P1 | P2 | P3 | P4 | P5 | Topsis Score | Rank |

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

| M1 | 0.84 | 0.71 | 6.7 | 42.1 | 12.59 | 0.563692 | 3 |

| M2 | 0.91 | 0.83 | 7.0 | 31.7 | 10.11 | 0.513032 | 4 |

| M3 | 0.79 | 0.62 | 4.8 | 46.7 | 13.23 | 0.439177 | 6 |

| M4 | 0.78 | 0.61 | 6.4 | 42.4 | 12.55 | 0.491956 | 5 |

| M5 | 0.94 | 0.88 | 3.6 | 62.2 | 16.91 | 0.641886 | 2 |

| M6 | 0.88 | 0.77 | 6.5 | 51.5 | 14.91 | 0.738148 | 1 |

| M7 | 0.66 | 0.44 | 5.3 | 48.9 | 13.83 | 0.407390 | 8 |

| M8 | 0.93 | 0.86 | 3.4 | 37.0 | 10.55 | 0.408499 | 7 |


## Notes

- The first column represents the alternatives and is not used in calculations.

- All criteria columns must contain numeric values only.

- The number of weights, impacts, and criteria columns must be equal.

- The input file must contain at least three columns.


## License

MIT

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_chahat_102303831-1.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

topsis_chahat_102303831-1.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file topsis_chahat_102303831-1.0.1.tar.gz.

File metadata

  • Download URL: topsis_chahat_102303831-1.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for topsis_chahat_102303831-1.0.1.tar.gz
Algorithm Hash digest
SHA256 32a859e3dbfc05c742ba4e373d5e067ff22874f0090a120b3207038d6aa841b6
MD5 27321edcbb2789f6a8b9823454ddd02f
BLAKE2b-256 35c3871550018844e55082ae8db3c90737bef484463c5955c154d3a9d551dadc

See more details on using hashes here.

File details

Details for the file topsis_chahat_102303831-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_chahat_102303831-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1526f148954e5171624f801a7852c4eb99055d075b841f57290c67553048f459
MD5 f5eddbcb063e4145f8e0fb1e171e1ccc
BLAKE2b-256 89de8735d553e1aca69771fde45d8f0166847e3cf2ebd8678548716dd4844f20

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