Optimization techniques (lecture 3 and 4)
Optimization techniques (lecture 3 and 4)
What if it was a
maximization
problem?
Linear Programming
Graphical solution of LP problems
• Example 2 (continues):
If this problem was a maximization, the answer is quite different, because:
For example, take a point within the feasible region along x1-axis, that is larger than point
C ( 6, 0 ), such as D ( 12, 0 ).
Evaluate the objective function at both C ( 6, 0 ), and D ( 12, 0 ).
You will notice that
(ZD( 12, 0 )=48) > (ZC( 6, 0 )=24)
This means that as the values of X1 goes to ∞, the obj. function Z (x1,0) can be
increased/maximized with no bounds (we refer to this as the unbounded solution)
Unbounded solution: The solution occurs when the value of the decision variables may be
increased indefinitely without violating any of the constraints
Linear Programming
Graphical solution of LP problems
• Example 2 (continues):
Similarly, take a point within the feasible region along x2-axis, that is larger than point
A ( 0, 12 ), such as E ( 0, 24 ).
Evaluate the objective function at both A ( 0, 12 ), and E ( 0, 24 ).
You will notice that
(ZE( 0, 24 )=144) > (ZA( 0, 12 )=72)
This means that as the values of X2 goes to ∞, the obj. function Z (0, x2) can be
increased/maximized with no bounds (we refer to this as the unbounded solution)
Unbounded solution: The solution occurs when the value of the decision variables may be
increased indefinitely without violating any of the constraints
Linear Programming
Graphical solution of LP problems
• Example 3:
A manufacturing firm produces two machine parts using lathes, milling machines, and
grinding machines. The different machining times required for each part, the machining
times available on different machines, and the profit on each machine part are given in the
following table.
Linear Programming
Graphical solution of LP problems
• Example 3:
Linear Programming
Graphical solution of LP problems
• Example 3 (Continues):
Solution
Linear Programming
Graphical solution of LP problems
• Example 4 (continues):
Linear Programming
Graphical solution of LP problems
• Example 4 (continues):
Linear Programming
Solution of LP problems by Simplex table
• Solution procedure:
1. Transform every inequality into an equation. Add slack variables for the “≤” inequalities
and subtract slack variables for the “≥” inequalities.
For example:
• 𝑿≤𝟒 𝑿 + 𝑺𝟏 = 𝟒
• 𝒀≤𝟔 Y+𝑺𝟐 = 𝟔
• 𝟑𝑿 + 𝟐𝒀 ≤ 𝟏𝟖 𝟑𝑿 + 𝟐𝒀 + 𝑺𝟑 = 𝟏𝟖
Linear Programming
Solution of LP problems by Simplex table
• Solution procedure:
All variables
RHS (CRHS) Ratio (Cratio)
Basic x y s1 s2 s3
Maximize: Z-3x-5y=0 z -3 -5 0 0 0 0
𝑋 + 𝑆1 = 4 s1 1 0 1 0 0 4
𝑌 + 𝑆2 = 6 s2 0 1 0 1 0 6
3𝑋 + 2𝑌 + 𝑆3 = 18 s3 3 2 0 0 1 18
Linear Programming
Solution of LP problems by Simplex table
• Solution procedure:
Entering CE
All variables
Basic RHS (CRHS) Ratio (CRatio)
x y s1 s2 s3
z -3 -5 0 0 0 0
Exiting Cext s1 1 0 1 0 0 4
s2 0 1 0 1 0 6 6 Minimum positive ratio
s3 3 2 0 0 1 18 9
Linear Programming
Solution of LP problems by Simplex table
• Solution procedure:
6. The pivot element is the intersection of CE and Cext
(Notice that “S2” has been removed from the basic variable list and replaced by “y”)
7. Divide Cext by the value of the pivot to turn the pivot value into 1
(Note: In this example P is already equal 1 so we do not need to perform step 7)
Entering CE
All variables
Basic RHS (CRHS) Ratio (CRatio)
x y s1 s2 s3
z -3 -5 0 0 0 0
Exiting Cext s1 1 0 1 0 0 4
y 0 1 0 1 0 6 6 Minimum positive ratio
s3 3 2 0 0 1 18 9
Pivot (P)
Linear Programming
Solution of LP problems by Simplex table
• Solution procedure:
8. Use gauss elimination procedure to turn all the elements, within CE , above and below
the pivot into zeros as follows
i. Multiply Cext by 5 and add it to the row of the objective function.
ii. Multiply Cext by -2 and add it to the row of S3.
iii. In this example the intersection of CE and the row of S1 is already zero so we do
not need to change it
All variables Row of
Basic RHS (CRHS) Ratio (CRatio)
x y s1 s2 s3 Objective
z -3 -5 0 0 0 0 function
Exiting Cext s1 1 0 1 0 0 4
y 0 1 0 1 0 6 6 Row S3
s3 3 2 0 0 1 18 9
Pivot (P)
Linear Programming
Solution of LP problems by Simplex table
• Solution procedure:
Notice the following
The objective function increased to 30>>>>
this means that the first iteration provided a better solution that could maximize
the objective function
9. Now, the second iteration starts by selecting the new CE that has the largest negative
value
All variables
Basic RHS (CRHS) Ratio (CRatio)
x y s1 s2 s3
z -3 0 0 5 0 30
s1 1 0 1 0 0 4
y 0 1 0 1 0 6
s3 3 0 0 -2 1 6
z 0 0 1 -3 0 0 -2 -4 -4
x5 -1.667 0 6.67 3.33 1 0 -1.33 8.33333333 1.25 min
z 0 -1 0 0 1 8 -8
x3 0 2.5 1 0 -0.75 6 2.4 min