TOPSIS algorithm as a command-line tool
Project description
Topsis-Py (CLI-Based Python Package)
A Python command-line implementation of TOPSIS
(Technique for Order Preference by Similarity to Ideal Solution) for
Multi-Criteria Decision Making (MCDM) problems.
This package is designed to be academically correct, easy to use, and PyPI-ready.
📌 Project Highlights
| Feature | Description |
|---|---|
| Algorithm | Standard TOPSIS methodology |
| Interface | Command-Line Interface (CLI) |
| Input | CSV-based decision matrix |
| Validation | Strict input & argument checks |
| Output | Ranked alternatives with scores |
| Documentation | Clear theory + workflow diagrams |
❓ What is TOPSIS?
TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) is a widely used
Multi-Criteria Decision Making (MCDM) technique.
🔑 Core Idea
The best alternative is the one that:
- Is closest to the ideal best solution
- Is farthest from the ideal worst solution
🌍 Common Applications
| Domain | Example Use |
|---|---|
| Engineering | Design or component selection |
| Business | Supplier & product evaluation |
| Finance | Investment ranking |
| Data Science | Model or algorithm comparison |
🔄 TOPSIS Algorithm Flow
flowchart TD
A[Decision Matrix] --> B[Normalization]
B --> C[Apply Weights]
C --> D[Ideal Best Solution]
C --> E[Ideal Worst Solution]
D --> F[Distance from Ideal Best]
E --> G[Distance from Ideal Worst]
F --> H[TOPSIS Score]
G --> H
H --> I[Final Ranking]
🧠 Program Workflow
flowchart LR
A[CLI Arguments] --> B[Input Validation]
B --> C[Load CSV File]
C --> D[TOPSIS Computation]
D --> E[Score & Rank Calculation]
E --> F[Write Output CSV]
📦 Installation
pip install topsis-swastik-102303585
🚀 Usage
python topsis.py <input_file> <weights> <impacts> <output_file>
Example:
python topsis.py data.csv "1,2,1,1" "+,+,-,+" result.csv
⚠️ Limitations
- Categorical data not supported
- Missing values not allowed
- Weights must be positive
- Impacts must be '+' or '-'
📜 License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file topsis_swastik_102303585-1.0.4.tar.gz.
File metadata
- Download URL: topsis_swastik_102303585-1.0.4.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61d28cdf750f10e8256e92ec2d5c8d2719269c7bb8565e6c5d7050ea7f5c834d
|
|
| MD5 |
1a60215cc7f5757618550ca2a12dc615
|
|
| BLAKE2b-256 |
1d0e349f7bd987d9569eb39f1b5b82098f3a93ac68240adc0bd344a289acc41f
|
File details
Details for the file topsis_swastik_102303585-1.0.4-py3-none-any.whl.
File metadata
- Download URL: topsis_swastik_102303585-1.0.4-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c9d1377875ea1811710ab26807d40ed57ddb23ce2eab664c52385557b1cf87f
|
|
| MD5 |
4561528b76b0c0606eb3dad81ad53aea
|
|
| BLAKE2b-256 |
a95958dd0e7e2f1c9471886c34a6cfc70688a416fbbecb4a6056b7601274940d
|