This project is a graphical user interface (GUI) application developed using Python and Tkinter for solving the assignment problem. The assignment problem is a fundamental combinatorial optimization problem that involves assigning tasks to agents in a way that minimizes the total cost or maximizes the total profit. Users can input the cost matrix via the Tkinter GUI, and the application will provide the optimal assignment solution.
- User-Friendly GUI: Enter the cost matrix directly through a graphical user interface.
- Optimal Assignment Solution: Computes and displays the optimal assignment solution using a custom implementation of the Hungarian Algorithm.
- Error Handling: Validates user input to ensure a valid cost matrix.
- Dynamic Matrix Creation: Users can specify the number of rows and columns for the cost matrix.
- Interactive Input: Matrix entries can be easily navigated using the keyboard.
- Clear and Reset: Easily clear the input matrix and start over with new data.
- Result Display: Clearly displays the steps and final results in the GUI.
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/sohailshk/Assignment-Problem.git
-
Navigate to the project directory:
cd Assignment-Problem
-
Run the application:
python main.py
- Launch the application by running
python main.py
. - Enter the number of rows and columns in the respective input fields.
- Click "Create Matrix" to generate the matrix input fields.
- Enter the cost matrix values into the provided input fields in the Tkinter GUI.
- Click "Compute" to calculate and display the optimal assignment solution.
- The result will be displayed in the GUI, showing the optimal assignment and the total cost.
- Structured Code: The project follows a modular structure, encapsulating the logic in static methods for better organization and readability.
- Error Handling: Ensures the application handles invalid inputs gracefully.
- Optimized Algorithm: Implements the Hungarian Algorithm with additional optimizations for performance.
- Interactive and Dynamic GUI: The Tkinter interface is designed to be intuitive, allowing users to easily interact with the matrix and view results.
- Comprehensive Output: Displays intermediate steps and the final optimized assignment with the total cost for better understanding.
![Screenshot 1](
)
![Screenshot 2](
)
Contributions are welcome! Please open an issue or submit a pull request for any improvements or new features.
For any questions or feedback, please contact [[email protected]]