Find the optimal solution in linear programming exercises with our Simplex Method Online Calculator, which will allow you to develop maximization and minimization problems with the normal method and applying the two-phase method when appropriate. Our tool has a friendly and easy-to-use design. It also shows us all the intermediate steps that are needed to reach the final solution, which will facilitate your learning.
How to use the simplex method online calculator
To use our tool you must perform the following steps:
- Enter the number of variables and constraints of the problem.
- Select the type of problem: maximize or minimize.
- Enter the coefficients in the objective function and the constraints. You can enter negative numbers, fractions, and decimals (with point).
- Click on “Solve”.
- The online software will adapt the entered values to the standard form of the simplex algorithm and create the first tableau.
- Depending on the sign of the constraints, the normal simplex algorithm or the two-phase method is used.
- We can see step by step the iterations and tableaus of the simplex method calculator.
- In the last part will show the results of the problem.
We have considered for our application to solve problems with a maximum of 20 variables and 50 restrictions; this is because exercises with a greater number of variables would make it difficult to follow the steps using the simplex method. For problems with more variables, we recommend using other more advanced tools.
Solving an exercise with the Simplex Method Calculator – Two Phase
Minimize z = -3x1 + x2 – 2x3
Subject to x1 + 3x2 + x3 ≤ 5
2x1 – x2 + x3 ≥ 2
4x1 + 3x2 – 2x3 = 5
x1, x2, x3 ≥ 0
We put the number of variables and restrictions in the form:
We select the type of problem and enter the coefficients of the objective function and the constraints:
Finally, we click on “Solve” and we will see the adaptation of the problem to the standard form and the iterations of the simplex table with the algorithm of the two-phase method. For this example, the explanation would be:
The problem will be adapted to the standard linear programming model, adding the slack, excess and / or artificial variables in each of the constraints:
- Constraint 1: It has a sign “≤” (less than or equal) so the slack variable will be added S1.
- Constraint 2: It has a sign “≥” (greater than or equal) so the excess variable S2 will be subtracted and the artificial variable A1 will be added.
- Constraint 3: It has an “=” sign (equal) so the artificial variable A2 will be added.
The problem has artificial variables, so we will use the two-phase method. In the first phase, the objective function seeks to minimize the sum of the artificial variables.
The problem is shown below in standard form. The coefficient 0 (zero) will be placed where it corresponds to create our table:
Minimize: Z = 0X1 + 0X2 + 0X3 + 0S1 + 0S2 + 1A1 + 1A2
1X1 + 3X2 + 1X3 + 1S1 + 0S2 + 0A1 + 0A2 = 5
2X1 – 1X2 + 1X3 + 0S1 – 1S2 + 1A1 + 0A2 = 2
4X1 + 3X2 – 2X3 + 0S1 + 0S2 + 0A1 + 1A2 = 5
X1, X2, X3, S1, S2, A1, A2 ≥ 0
Initial Table – Phase I
Enter the variable X1 and the variable A1 leaves the base. The pivot element is 2
Enter the variable X2 and the variable A2 leaves the base. The pivot element is 5
The iterations of the first phase are finished and there is some possible solution to the problem. We eliminate the artificial variables and go to the second phase:
Initial Table – Phase II
Enter the variable S2 and the variable X2 leaves the base. The pivot element is 2/5
Enter the variable X3 and the variable S1 leaves the base. The pivot element is 3/2
The optimal solution is Z = -25/2
X1= 5/2, X2= 0, X3= 5/2, S1= 0, S2= 11/2
You must remember the objective of this tool is the learning of the simplex method and the application of the two-phase method, so the use that you can give it is only under your responsibility. Also, we are not responsible for any errors or inaccuracies in the results.
If you have questions about it or find an error in our application, we will appreciate if you can write to us on our contact page.