#Matric No= U22CS1088
This project implements the Simplex Algorithm in C++ to solve linear programming problems. The Simplex method is used to maximize or minimize a linear objective function subject to linear constraints.
- Supports standard form linear programming problems (maximization).
- Uses the tableau method for pivoting and iterating towards optimality.
- Detects unbounded solutions.
- Extracts the optimal values for the original variables.
The algorithm solves linear programming problems of the form:
Maximize: [ Z = c_1x_1 + c_2x_2 + ... + c_nx_n ]
- Initialize the tableau by adding slack variables to convert inequalities to equalities.
- Select the entering variable (most negative coefficient in the objective row).
- Select the leaving variable using the minimum ratio test.
- Pivot to update the tableau.
- Repeat until all coefficients in the objective row are non-negative.
- Extract the optimal solution and return the results.
To compile and run the program, use the following commands:
g++ simplex.cpp -o simplex
./simplex