A Python desktop application designed to solve and visualize Linear Programming (LP) optimization problems. It features an implementation of the Tabular Simplex Algorithm for
- Tabular Simplex Algorithm: Solves maximization problems with multiple decision variables and constraints.
-
Interactive 2D Graphical Method: Visualizes constraint lines, boundary intersection points, and the shaded convex feasible region using
matplotlib. -
Dynamic GUI: Built with
tkinter, enabling users to configure any number of decision variables and constraints on the fly. -
Optimal Point Highlighting: Instantly identifies and displays the optimal solution vector and maximum target value (
$Z$ ).
- Python 3.x
- NumPy: Linear algebra operations, matrix manipulation for Simplex tableaux, and system solving.
- Matplotlib: Graphical rendering of 2D geometry and feasible regions.
- Tkinter / ttk: Cross-platform GUI framework.
Ensure you have Python 3.8 or higher installed. Install the required dependencies using pip:
pip install numpy matplotlib-
Clone the repository:
git clone https://github.com/your-username/linear-programming-solver.git cd linear-programming-solver -
Run the application:
python main.py
-
Initial Setup: Enter the number of decision variables (
$n$ ) and constraints, then click Generar Campos (generate fields). -
Input Parameters: Define the Objective Function coefficients (
$Z$ ) and constraint matrix parameters along with operators (<=,>=,=). -
Solve: Click Resolver Problema (Solve Problem).
- For
$n \ge 2$ , the optimal values for all variables and maximum$Z$ will be computed via the Simplex Method and shown in the results panel. - For
$n = 2$ , an interactive chart will render, highlighting the Feasible Region in green and the Optimal Point in red.
- For