Simplex Method Calculator
Simplex Method Calculator
Simplex Method Calculator
Clear ► ▼ ▲
1 x1 + 2 x2 ≥ 3
3 x1 + 3 x2 ≥ 5
2 x1 + 5 x2 ≥ 6
x1 ≥ 0 x 2 ≥ 0
Solve
Problem:
F = 100 x1 + 340 x2
subject to the constraints:
x1 + 2 x2 ≥ 3
3 x1 + 3 x2 ≥ 5
2 x1 + 5 x2 ≥ 6
x1 ≥ 0 x2 ≥ 0
Solution:
x1 + 2 x2 ≥ 3
3 x1 + 3 x2 ≥ 5
2 x1 + 5 x2 ≥ 6
x1 + 2 x2 - S1 = 3
3 x1 + 3 x2 - S2 = 5
2 x1 + 5 x2 - S3 = 6
S1 ≥ 0, S2 ≥ 0, S3 ≥ 0. The entered variables S1, S2, S3, are called slack variables.
3. Finding the initial basis and the value of the function F which corresponds to the found initial basis.
What is a basis?
A variable is called a basic variable for an equation if it enters into this equation with a coefficient of one and does not enter into other
equations system (provided that there is a non-negative number on the right side of the equation).
If each equation has a basic variable, then they say that the system has a basis.
Variables that are not basic are called non-basic.
x1 + 2 x2 - S1 = 3
3 x1 + 3 x2 - S2 = 5
2 x1 + 5 x2 - S3 = 6
There is not a basis in our system. We cannot begin to solve our problem.
We need to find it. To do this, we will solve an auxiliary problem.
If there is not a basic variable in the equation, add an artificial variable to it.
x1 + 2 x2 - S1 + R1 = 3
3 x1 + 3 x2 - S2 + R2 = 5
2 x1 + 5 x2 - S3 + R3 = 6
W = ( 3 - x1 - 2 x2 + S1 ) + R2 + R3 = 3 - x1 -2 x2 + S1 + R2 + R3
W = 3 - x1 -2 x2 + S1 + ( 5 - 3 x1 - 3 x2 + S2 ) + R3 = 8 -4 x1 -5 x2 + S1 + S2 + R3
W = 8 -4 x1 -5 x2 + S1 + S2 + ( 6 - 2 x1 - 5 x2 + S3 ) = 14 -6 x1 -10 x2 + S1 + S2 + S3
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see system)
Function W contains only non-basic variables. Therefore, the value of the function W for this basis can be found in the mind.
x1 = 0 x2 = 0 S1 = 0 S2 = 0 S3 = 0
=> W = 14
R1 = 3 R 2 = 5 R 3 = 6
Step №1
x1 x2 S1 S2 S3 R1 R2 R3 const. Θ
1 2 -1 0 0 1 0 0 3 3 : 2 = 1,5
3 3 0 -1 0 0 1 0 5 5 : 3 ≈ 1,667
2 5 0 0 -1 0 0 1 6 6 : 5 = 1,2
-6 -10 1 1 1 0 0 0 W - 14
1 2 -1 0 0 1 0 0 3
3 3 0 -1 0 0 1 0 5
-6 -10 1 1 1 0 0 0 W - 14
-2 0 1 1 -1 0 0 2 W-2
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see table)
Function W contains only non-basic variables. Therefore, the value of the function W for this basis can be found in the mind. (see the
highlighted row in the table)
x1 = 0 S1 = 0 S2 = 0 S3 = 0 R3 = 0
=> W - 2 = 0 => W = 2
x2 = 6/5 R1 = 3/5 R2 = 7/5
Step №2
x1 x2 S1 S2 S3 R1 R2 R3 const. Θ
1/5 0 -1 0 2/5 1 0 -2/5 3/5 3/5 : 1/5 = 3
-2 0 1 1 -1 0 0 2 W-2
-2 0 1 1 -1 0 0 2 W-2
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see table)
Function W contains only non-basic variables. Therefore, the value of the function W for this basis can be found in the mind. (see the
highlighted row in the table)
S1 = 0 S 2 = 0 S 3 = 0 R 2 = 0 R 3 = 0
=> W - 4/9 = 0 => W = 4/9
x1 = 7/9 x2 = 8/9 R1 = 4/9
Step №3
x1 x2 S1 S2 S3 R1 R2 R3 const. Θ
0 0 0 0 0 1 1 1 W-0
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see table)
Function W contains only non-basic variables. Therefore, the value of the function W for this basis can be found in the mind. (see the
highlighted row in the table)
S1 = 0 S 2 = 0 R 1 = 0 R 2 = 0 R 3 = 0
=> W - 0 = 0 => W = 0
x1 = 1/3 x2 = 4/3 S3 = 4/3
There are not any negative coefficients in the highlighted row. Therefore, the minimum value of the function W was found.
The basis was found without artificial variables.
The columns corresponding to artificial variables can be deleted.
As a result, our system has the form:
- 3 S1 + 1/3 S2 + S3 = 4/3
x1 + S1 - 2/3 S2 = 1/3
x2 - S1 + 1/3 S2 = 4/3
F = 100 x1 + 340 x2
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see system)
Function F contains only non-basic variables. Therefore, the value of the function F for this basis can be found in the mind.
S1 = 0 S 2 = 0
=> F = 1460/3
x1 = 1/3 x2 = 4/3 S3 = 4/3
The initial basis was found. The value of the function F corresponding to the initial basis was found.
Step №1
x1 x2 S1 S2 S3 const. Θ
1 0 1 -2/3 0 1/3
0 0 -9 1 3 4
1 0 1 -2/3 0 1/3
0 1 -1 1/3 0 4/3
0 0 -9 1 3 4
1 0 -5 0 2 3
0 1 2 0 -1 0
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see table)
Function F contains only non-basic variables. Therefore, the value of the function F for this basis can be found in the mind. (see the
highlighted row in the table)
S1 = 0 S 3 = 0
=> F - 300 = 0 => F = 300
x1 = 3 x2 = 0 S2 = 4
Step №2
x1 x2 S1 S2 S3 const. Θ
0 0 -9 1 3 4
1 0 -5 0 2 3
0 1 2 0 -1 0 0:2=0
0 0 -9 1 3 4
1 0 -5 0 2 3
0 1/2 1 0 -1/2 0
0 9/2 0 1 -3/2 4
1 5/2 0 0 -1/2 3
0 1/2 1 0 -1/2 0
0 90 0 0 50 F - 300
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see table)
Function F contains only non-basic variables. Therefore, the value of the function F for this basis can be found in the mind. (see the
highlighted row in the table)
x2 = 0 S3 = 0
=> F - 300 = 0 => F = 300
x1 = 3 S1 = 0 S2 = 4
There are not any negative coefficients in the highlighted row. Therefore, the minimum value of the function F was found.
Result:
x1 = 3 x2 = 0
Fmin = 300
© 2010-2022