Skip to main content

A command-line tool implementing the TOPSIS multi-criteria decision-making algorithm.

Project description

TOPSIS CLI

A lightweight command-line tool implementing the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS). The tool accepts CSV or Excel datasets, applies user-defined weights and impacts, and generates a ranked output using the TOPSIS decision-making algorithm.

🌐 Live Demo

Try the web version here:

https://topsis-zzre.vercel.app/

📦 Installation

Install the package from PyPI:

pip install topsis-cli

🚀 Usage

Run the tool from the command line using:

topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>

Parameters

Parameter Description
InputDataFile Path to the input .csv or .xlsx file
Weights Comma-separated numeric weights (e.g. 1,1,1,1)
Impacts Comma-separated impacts using + (benefit) or - (cost)
ResultFileName Output CSV filename

Input Requirements

  • The dataset must contain at least three columns.
  • The first column should contain the names of alternatives (e.g., M1, M2, M3).
  • All remaining columns must contain numeric values.

Example

Input (data.csv)

Model Price Storage Camera Looks
M1 250 16 12 5
M2 200 16 8 3
M3 300 32 16 4
M4 275 32 8 4
M5 225 16 16 2

Weights

1,1,1,1

Impacts

-,+,+,+
  • Price → Cost (-)
  • Storage → Benefit (+)
  • Camera → Benefit (+)
  • Looks → Benefit (+)

Run

topsis data.csv "1,1,1,1" "-,+,+,+" result.csv

Output

The generated result.csv contains two additional columns:

  • TOPSIS Score
  • Rank
Model Price Storage Camera Looks TOPSIS Score Rank
M1 250 16 12 5 0.534277 3
M2 200 16 8 3 0.308368 5
M3 300 32 16 4 0.691632 1
M4 275 32 8 4 0.534737 2
M5 225 16 16 2 0.492650 4

Features

  • Supports CSV and Excel datasets
  • Implements the complete TOPSIS algorithm
  • User-defined weights and impacts
  • Automatic ranking based on TOPSIS score
  • Simple command-line interface
  • Fast and lightweight implementation

Project Links


License

This project is licensed under the MIT License.

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_core-1.0.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

topsis_core-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file topsis_core-1.0.0.tar.gz.

File metadata

  • Download URL: topsis_core-1.0.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for topsis_core-1.0.0.tar.gz
Algorithm Hash digest
SHA256 41a465eebda18ca3575290fb6e380210fb3ae6d523485f939db8c0f3eb82d239
MD5 b05f798f1c4f0d867434fd689b940fb5
BLAKE2b-256 5d1f744d6098cd40d69e0a2299bed6b99f32518a599fda5ff1ea2d5c054fe47f

See more details on using hashes here.

File details

Details for the file topsis_core-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: topsis_core-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for topsis_core-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3e73b1507529ede6b11315b01ce0893292e3e15bc889569f38eb4c07564eb6b
MD5 cc82f1346de8eacf9ba29ef1e1689de0
BLAKE2b-256 8e2fa11402fa52b91c0851b962b987a31062fbeeddf67f7506d985077cfbf374

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