Unit 6
Unit 6
1 3
Basic Z x1 x2 s1 s2 r.h.s.
z 1 2 1 0 0 0
s1 0 1 1 1 0 10
s2 0 1 1 0 1 2
2 4
Example (SEHS4648) Example (SEHS4648)
5 7
6 8
(SEHS4648) Preparatory step for the initial tableau (SEHS4648)
Basic Z x1 x2 s1 s2 a1 r.h.s.
Big M Method:
Form the Modified Problem z 1 2 1 0 0 M 0
If any problem constraints have negative constants on the right side, multiply s1 0 1 1 1 0 0 10
both sides by -1 to obtain a constraint with a nonnegative constant.
s2 0 1 1 0 1 1 2
Remember to reverse the direction of the inequality if the constraint is an
inequality.
The initial simplex tableau from our example does not satisfy
Introduce a slack variable the requirement that all variables are nonnegative since the
Introduce a surplus variable and an artificial variable solution is not feasible (s2 = -2).
constraint.
Introduce an artificial variable
To use the simplex method, we must first use row operations to
transform the tableau into the one that satisfies all initial
For each artificial variable aj , add Maj to the maximization objective
Maj minimization objective function. simplex tableau requirements.
Use the same constant M for all artificial variables. We need to replace s2 by choosing a1 as a basic variable and
thus to adjust numbers in the a1 column before starting simplex
9
method. This is not the pivot column in simplex method. 11
x1 + x2 s2 + a 1 =2 s1 0 1 1 1 0 0 10
s2 0 1 1 0 1 1 2
x1, x2, s1, s2, a1 > 0
Basic Z x1 x2 s1 s2 a1 r.h.s.
Then, the initial simplex tableau for the modified problem.
z 1 M 2 M 1 0 M 0 -2M
Basic Z x1 x2 s1 s2 a1 r.h.s.
s1 0 1 1 1 0 0 10
z 1 2 1 0 0 M 0
a1 0 1 1 0 1 1 2
s1 0 1 1 1 0 0 10
Initial solution: Non-basic variables: x1 = x2 = s2 = 0
s2 0 1 1 0 1 1 2
Basic variables: s1= 10, a1 = 2
10 The solution is now feasible. 12
First step for the simplex method (SEHS4648) Second step for the simplex method (SEHS4648)
s2 z 1 0 0 3/2 1/2 M 14
Basic z x1 x2 s1 a1 r.h.s. ratio
z 1 2 1 0 M 0 x1 0 1 0 1/2 1/2 4
a1 0 1 1 0 1 1 2
The top row coefficients are all nonnegative and the artificial
variables is a non-basic variable, we have the optimal solution:
In this example, M 2 and M are positive, and M 1 is
negative. The first pivot column is column 2 and the first pivot Optimal solution: Non-basic variables: s1 = s2 = a1 = 0
row is row 2. Basic variables: x1 = 4, x2 = 6
13 15
First step for the simplex method (SEHS4648) Summary steps for example (SEHS4648)
Basic Z x1 x2 s1 s2 a1 r.h.s.
Basic Z x1 x2 s1 s2 a1 r.h.s. Preparation
z 1 2 1 0 0 M 0
z 1 2 1 0 M 0 step
s1 0 1 1 1 0 0 10
(optional)
s1 0 1 1 1 0 0 10 s2 0 1 1 0 1 1 2
Basic Z x1 x2 s1 s2 a1 r.h.s.
Basic Z x1 x2 s1 s2 a1 r.h.s. ratio
z 1 - 0 -1 M +1
z 1 - 0 -1 M +1 s1 0 2* 0 1 1 -1 8
s1 0 2 0 1 1 -1 8 x2 0 -1 1 0 -1 1 2
x2 0 -1 1 0 -1 1 2 Basic Z x1 x2 s1 s2 a1 r.h.s.
z 1 0 0 3/2 1/2 M 14
x1 0 1 0 1/2 1/2 4
14 16
x2 0 0 1 1/2 1/2 1/2 6
First step for the simplex method
Example (SEHS4648) (SEHS4648)
Minimize z = 2x1 + 5x2 The selection of the leaving (basic) variable is the most negative coefficient, and the
entering (non-basic) variable is having the smallest positive ratio.
subject to 3x1 + x2 < 10
x1 + 2x2 > 10 In this example, we choose x2 to become basic in the first iteration.
x1, x2 > 0
17 19
subject to 3x1 + x2 + s1 = 10
Z 1 -0.5 0 0 2.5 M-2.5 -25
5
s1 0 2.5 0 1 0.5 -0.5 5 2.5
2
x1 + 2x2 s2 + a1 = 10
x2 0 0.5 1 0 -0.5 0.5 5 5
0.5
10
x1, x2 , s1 , s2 , a1 > 0
Basic Z x1 x2 s1 s2 a1 r.h.s.
Z 1 2 5 0 0 M 0 Now, we choose x1 to become basic variable in the second iteration.
s1 0 3 1 1 0 0 10
s2 0 1 2 0 -1 1 10 When checking the ratio, we choose the slack variable s1 to become non-basic variable.
Basic Z x1 x2 s1 s2 a1 r.h.s.
Z 1 2 M M 0 M 0 -10M
s1 0 3 1 1 0 0 10
a1 0 1 2 0 -1 1 10 18 20
Second step for the simplex method (SEHS4648) Big M Method: Summary (SEHS4648)
Basic Z x1 x2 s1 s2 a1 r.h.s. 1. Form the preliminary simplex tableau for the modified problem.
Basic Z x1 x2 s1 s2 a1 r.h.s.
3. Solve the modified problem by applying the simplex method to the initial
Z 1 0 0 0.2 2.6 M-2.6 -24 simplex tableau found in the second step.
Basic Z x1 x2 s1 s2 a1 r.h.s.
Z 1 0 0 0.2 2.6 M-2.6 -24
x1 0 1 0 0.4 0.2 -0.2 2
22 24
x2 0 0 1 -0.2 -0.6 0.6 4
Harrison electric company (SEHS4648) Integer Solution to Harrison Electric Co. (SEHS4648)
IP formulation
X1 = number of chandeliers to be produced
X2 = number of ceiling fans to be produced
25 27
X2
6
Graphical solution (SEHS4648) Branch and bound method (SEHS4648)
The branch and bound method begins with the solution to the relaxation of the
integer LP problem.
5
6X1 + 5X2 30 If these variables are integer valued, this solution must also be the solution to
the integer problem.
4
+ means possible integer solution If these variables are not integer valued, the feasible region is divided by adding
constraints restricting the value of one of the variables that was not integer
valued.
3 + Optimal LP Solution
(X1 = 3.75, X2 = 1.5, Profit = $35.25) The divided feasible region results in subproblems that are then solved. Bounds
on the value of the objective function are found and used to help determine
which subproblems can be eliminated from consideration and when the optimal
2 + + + solution has been found.
0
29 X1 31
1 2 3 4 5 6
(SEHS4648)
X2 (SEHS4648)
6
Divide the problem into 2 subproblems Graphical solution of subproblem B
Pick X1 (you can also pick X2) and divide the problem into 2 subproblems by 5
restricting the value of X1 (thus to make it to be an integer). 6X1 + 5X2 30
As X1 =3.75, the integer value of X1 should be either:
4 or greater than 4 (X1
3 or less than 3 (X1 4
+ possible integer solution
Subproblem A
3 X1 3 (add this new constraint)
Maximize profit = $7X1 + $6X2 +
Subject to: 2X1 + 3X2
6X1 + 5X2 Optimal solution (see next slide): Optimal solution
X1 X1 = 4, X2 = 1.2, profit = $35.20 2 + + + (X1 = 3, X2 = 2, Profit = $33)
Subproblem B
Maximize profit = $7X1 + $6X2
Subject to: 2X1 + 3X2
Solve subproblem B by yourself 1 + + + + 2X1 + 3X2 12
6X1 + 5X2 Optimal solution:
X1 X1 = 3, X2 = 2 profit = $ 33
7X1 + 6X2 = 21 (isoprofit line)
0
30 X1 32
1 2 3 4 5 6
Divide the problem into 2 subproblems (SEHS4648) (SEHS4648)
We stop the search of the subproblem B branch because it has an all-integer feasible Divide subproblem A into subproblems C & D
solution. Subproblem A is now branched into 2 new subproblems C & D.
As X2=1.2, the integer value of X2 should be either:
2 or greater than 2 (X2 or
The profit value of $33 becomes the new lower bound. This is because this profit value 1 or less than 1 (X2 .
is greater than the initial lower bound of $27 (which is also a feasible integer solution). Subproblem C adds the constraint of X2
Subproblem D adds the constraint of X2
Subproblem C
IMPORTANT: lower bound is replaced ONLY IF a feasible integer solution with a Solve subproblem C by yourself
higher total profit is found. Maximize profit = $7X1 + $6X2
Subject to: 2X1 + 3X2
6X1 + 5X2
There is no feasible solution, so this
That means the current best integer solution is X1=3, X2=2, profit=$33. This solution is X1 branch is terminated. See next slide
better than the initial solution due to a higher profit is obtained ($33 vs. $27). X2
Subproblem D
-integer solution (X2=1.2). Maximize profit = $7X1 + $6X2
The 2nd upper bound takes on the value $35.20 (subproblem A:$35.20 vs. subproblem Subject to: 2X1 + 3X2
B:$33), replacing $35.25 from the 1st node. X1 = 4.17, X2 = 1, profit = $35.16
6X1 + 5X2
This non-integer solution yields a new
X1
upper bound of $35.16, replacing $35.20
IMPORTANT: the largest profit value of the subproblems is selected as the new X2
upper bound in EVERY iteration.
1
33
as this constraint is part of subproblem A 35
1 + + + + X2 1 E 3 X1 Integer 34 4 1
35 35
2X1 + 3X2 12 F 3 X1 Integer 35 5 0
Third branching: subproblems E & F (SEHS4648) Steps in branch & bound (SEHS4648)
6. Check branches. New upper bound is the maximum value of objective function
at all final nodes. If upper bound equals lower bound, stop; if not, go to step 3.
45
(SEHS4648)
Reference:
46