You are on page 1of 63

Outline

• Recall: Product Mix Problem


• Basic Definitions
• Graphical Solution Method
• Minimization Problem
• Convexity and Corner Points
• Corner-Point Method
• Linear Programming and Solvers

1
LP Example: Product Mix Problem
Product mix problem assumes that we can sell
anything that we make at the given market
price:
(A) Our problem is to determine how much of each
product should be made during a time period
(B) In order to maximize profit
(C) Using the resources that we have available for the
time period

2
Product Mix Problem

Hours Required
to Produce 1 Unit
X-pods BlueBerrys Available Hours
Department (x1) (x2) This Week
Electronic 4 3 240
Assembly 2 1 100
Profit per unit $7 $5

Decision Variables:
x1 = number of X-pods to be produced
x2 = number of BlueBerrys to be produced
3
Formulation

Objective Function:
Maximize z = 7x1 + 5x2 (Profit )
Subject to:
(C1) First Constraint: 4x1 + 3x2 ≤ 240

(C2) Second Constraint: 2x1 + 1x2 ≤ 100

(C3) Third Constraint: x1 ≥ 0

(C4) Fourth Constraint: x2 ≥ 0 4


Recall: Linear Programming Models

Maximize or Minimize z = f (x)


subject to : x ∈ F ⊂ ℜ n
Decision
Criterion Vector

Objective Function
Membership Rules are Is a
Defined by a System of Linear Function
Linear Equations and/or
Inequalities

5
Comparison

Maximize z = 7x1 + 5x2 Maximize z = f ( x )


Subject to: 4x1 + 3x2 ≤ 240 subject to : x ∈ F ⊂ ℜn
2x1 + 1x2 ≤ 100
x1 ≥ 0
x2 ≥ 0

6
Basic Definitions
• Solution: x
– A solution represents a decision
• Feasible Solution:
– A solution satisfy all constraints
• Feasible Region (Feasible Set): F
– The set of all feasible solutions
• Objective function: f( . )
– The function to measure the performance of a
solution
• Objective Value (z)
– The output value of the objective function
7
Basic Definitions
• Optimal Value: z*
– The optimized objective value
– The best objective value subject to all constraint
limits
– Maximized objective value for maximization
problem
– Minimized objective value for minimization
problem
• Optimal Solution (x*)
– The feasible solution with optimal value
• Corner point (Extreme point)
– The corner point of the feasible region
8
Product Mix Problem Example:
• Feasible Region: ⎧ 4 x1 + 3x2 ≤ 240⎫
⎪ ⎪
⎪ 2 x1 + 1x2 ≤ 100 ⎪
F = ⎨( x1 , x2 ) ⎬
⎪ x1 ≥ 0 ⎪
⎪⎩ x2 ≥ 0 ⎪⎭

• Feasible Solution: x = ( x1 , x2 ) ∈ F

• Objective Value: z = f ( x ) = 7 x1 + 5 x2

9
Product Mix Problem Example:

• Optimal Value: z = max f ( x )


*

subject to x ∈ F

• Optimal Solution: x ∈F
*

such that f ( x ) = z
* *

10
Summit? Optimum?

Where is the summit? Where is optimal


solution x* ?
What is the height of What is the optimal
summit? value z*?

11
Graphical Solution Method

Can be used when there are only TWO


decision variables
1. Plot the constraints at their boundaries by
converting each inequality to an equation
2. Identify the feasible region
3. Create an iso-profit (iso-cost) line based on the
objective function
4. Move this line outwards (inwards) until the
optimal solution is identified

12
Plot Constraints

4x1 + 3x2 ≤ 240


x2
Electronics (C1)
100 –

Number of BlueBerrys

80 –

60 –

40 –
– 4x1 + 3x2 = 240
20 –

|– | | | | | | | | | | x1
Figure B.3 0 20 40 60 80 100
13
Number of X-pods
Plot Constraints

x2 2x1 + 1x2 ≤ 100


Assembly (C2 )
100 –

Number of BlueBerrys

80 – 2x1 + 1x2 = 100



60 –

40 –

20 –

|– | | | | | | | | | | x1
0 20 40 60 80 100
14
Number of X-pods
Plot Constraints

x2

x1 ≥ 0 100 –

Number of BlueBerrys

80 –

60 –

40 –

x2 ≥ 0
20 –

|– | | | | | | | | | | x1
0 20 40 60 80 100
15
Number of X-pods
Feasible Region

x2

x1 ≥ 0 100 –

2x1 + 1x2 ≤ 100
Number of BlueBerrys

80 – Assembly (C2)

60 –

40 – 4x1 + 3x2 ≤ 240
– Electronics (C1)
Feasible
20 –
region

|– | | | | | | | | | | x1
0 20 40 60 80 100
16
Number of X-pods
x2 ≥ 0
Plot Iso-Profit Line

Choose a possible value for the objective function

E.X. z =Assembly
$210 =(constraint
7x1 + 5x B) 2

Solve for the axis intercepts of the objection


function and plot the line
Electronics (constraint A)
x1=0 Î x2 = 42 Î (x1,x2) = (0, 42)
Feasible
region

x2=0 Î x1 = 30 Î (x1,x2) = (30, 0)

17
Plot Iso-Profit Line

x2

100 –
– (0, 42)
Number of BlueBerrys

80 –

60 –
$210 = $7x1 + $5x2

40 –

20 – (30, 0)

|– | | | | | | | | | | x1
0 20 40 60 80 100
18
Number of X-pods
Move Iso-Profit Line Outwards

x2
$420 = z = $7x1 + $5x2
100 –
– $350 = z = $7x1 + $5x2
Number of BlueBerrys

80 –

$280 = z = $7x1 + $5x2
60 –
$210 = z = $7x1 + $5x2

40 –

20 –

|– | | | | | | | | | | x1
0 20 40 60 80 100
19
Number of X-pods
Graphical Solution

x2

100 –
– Maximum profit line
Number of BlueBerrys

80 –

60 –
Optimal solution

x* = (x1*, x2*) = (30, 40)
40 –

Optimal value
20 –
z* = $410 = $7x1* + $5x2*

|– | | | | | | | | | | x1
0 20 40 60 80 100
20
Number of X-pods
Solving Minimization Problems
• Formulated and solved in much the same way
as maximization problems

• In the graphical approach, an iso-cost line is


used

• The objective is to move the iso-cost line


inwards until it reaches the lowest cost corner
point

21
Minimization Example

• Godak produces two types of film developing


chemical:
– black-and-white at production cost of $2500 per ton
– color at production cost of $3000 per ton

• Orders received for this week are:


30 tons of black-and-white chemical
20 tons of color chemical

• For each week, they must produce 60 or more tons


of chemical in total to meet economical scale
• Determine production plan to minimize cost
22
Minimization Example
x1 = number of tons of black-and-white chemical
produced
x2 = number of tons of color chemical produced

Formulation:

Minimize z =2500x1+3000x2 (total cost )

Subject to:
x1 ≥ 30 tons of black-and-white chemical
x2 ≥ 20 tons of color chemical
x1 + x2 ≥ 60 tons total
x1, x2 ≥ 0 nonnegativity requirements
23
Minimization Example

iso-cost
x2

60 – x1 + x2 = 60

50 –
Feasible
40 – region

30 –
B

20 –
A
x1 = 30
10 – x2 = 20

|– | | | | | |
x1
0 10 20 30 40 50 60 24
Minimization Example

Total cost at A = 2,500x1 + 3,000x2


= 2,500 (40) + 3,000(20)
= $160,000

Total cost at B = 2,500x1 + 3,000x2


= 2,500 (30) + 3,000(30)
= $165,000

Lowest total cost is at point A

25
Actually…
• Maximization and minimization problem are
identical:
Min z = Max (− z )

Minimize z = 2,500x1+3,000x2 (total cost )


Maximize -z = -2,500x1 - 3,000x2 (negative total cost )

Subject to:
x1 ≥ 30 tons of black-and-white chemical
x2 ≥ 20 tons of color chemical
x1 + x2 ≥ 60 tons total
x1, x2 ≥ 0 nonnegativity requirements
26
They are the same…

Maximize z = 7x1 + 5x2 Minimize -z = -7x1 - 5x2

Subject to: Subject to:

4x1 + 3x2 ≤ 240 4x1 + 3x2 ≤ 240


2x1 + 1x2 ≤ 100 -2x1 - 1x2 ≥ -100
x1 ≥ 0 x1 ≥ 0
x2 ≥ 0 x2 ≥ 0

27
Always Unique?
• Always unique optimal value?
Î YES!
The “BEST” objective value z* we can achieve
is unique

• Always unique optimal solution?


ÎNo!
Sometimes it may NOT have unique optimal
solution x*

28
How many optimal solutions?
• Infeasible:
– No optimal solution exists
– Feasible set (region) is empty
• Unique:
– Unique optimal solution
– The optimal solution must be at some corner (extreme
point)
• Multiple (alternative):
– Infinite number of optimal solutions
– Optimal solutions must be on a boundary line
– Two adjacent corners are optimal solutions
• Unbounded:
– Infinite number of optimal solutions
– The optimal value is unbounded (arbitrarily large or small)
– The feasible region must be unbounded 29
Infeasible Example

Objective Function:
Maximize z = $7x1 + $5x2 (Profit )

(C1) First Constraint: 4x1 + 3x2 ≥ 240

(C2) Second Constraint: 4x1 + 3x2 ≤ 100

(C3) Third Constraint: x1 ≥ 0

(C4) Fourth Constraint: x2 ≥ 0 30


Empty Feasible Region

x2
INFEASIBLE
F=Ø
100 –

Number of BlueBerrys

80 –

60 –
– 4x1 + 3x2 ≤ 100
40 –
– 4x1 + 3x2 ≥ 240
20 –

|– | | | | | | | | | | x1
Figure B.3 0 20 40 60 80 100
31
Number of X-pods
Unique Optimal Solution Example

Objective Function:
Maximize z = $7x1 + $5x2 (Profit )

(C1) First Constraint: 4x1 + 3x2 ≤ 240

(C2) Second Constraint: 2x1 + 1x2 ≤ 100

(C3) Third Constraint: x1 ≥ 0

(C4) Fourth Constraint: x2 ≥ 0 32


Unique Optimal Solution

x2

100 –
– Maximum profit line
Number of BlueBerrys

80 –

60 –
Optimal solution

x* = (x1* x2*) = (30, 40)
40 –

Optimal value
20 –
z* = $410 = $7x1* + $5x2*

|– | | | | | | | | | | x1
0 20 40 60 80 100
33
Number of X-pods
Multiple Optimal Solution Example

Objective Function:
Maximize z = $8X1 + $6X2 (Profit )

(C1) First Constraint: 4X1 + 3X2 ≤ 240

(C2) Second Constraint: 2X1 + 1X2 ≤ 100

(C3) Third Constraint: X1 ≥ 0

(C4) Fourth Constraint: X2 ≥ 0 34


Infinite number of optimal solutions

X2

100 – Optimal solution


– x* = (x1* x2*)= (0, 80)
Number of BlueBerrys

80 – Maximum profit line


– z* = $480 = $8x1* + $6x2*
60 –
Optimal solution
– x* = (x1* x2*) = (30, 40)
40 –

20 –

|– | | | | | | | | | | X1
0 20 40 60 80 100
35
Number of X-pods
Unbounded Example

Objective Function:
Maximize z = $7X1 + $5X2 (Profit )

(C1) First Constraint: 3X2 ≤ 240


(C3) Third Constraint: X1 ≥ 0

(C4) Fourth Constraint: X2 ≥ 0

36
Unbounded

X2

100 –
iso profit lines

Number of BlueBerrys

80 –

60 –

40 –

20 –

|– | | | | | | | | | | X1
0 20 40 60 80 100
37
Number of X-pods
Unbounded Feasible Region
with Bounded Obj Value
Objective Function:
Minimize z = $7X1 + $5X2 (Profit )

(C1) First Constraint: 3X2 ≤ 240


(C3) Third Constraint: X1 ≥ 0

(C4) Fourth Constraint: X2 ≥ 0

38
Unbounded Feasible Region
with Bounded Obj Value

X2

100 –
iso cost lines

Number of BlueBerrys

80 –

60 –

40 –

20 –

|– | | | | | | | | | | X1
0 20 40 60 80 100
39
Number of X-pods
True or False
(TRUE ) z unbounded Æ F unbounded
If the objective value is unbounded,
then the feasible region must be unbounded.
(TRUE ) F bounded Æ z bounded
If the feasible region is bounded,
then the objective value must be bounded.
(FALSE) F unbounded Æ z unbounded
If the feasible region is unbounded,
then the objective value must be unbounded.
(FALSE) z bounded Æ F bounded
If the objective value is bounded,
then the feasible region must be bounded. 40
Graphical Solution Method
• Advantage:
– intuitive and straightforward

• Disadvantage:
– time consuming
– Inaccuracy
– good for only 2 variables

• Any better method?

41
Convex Feasible Region in LP
• What do we observe from LP’s feasible
regions?
– Each constraint represents a half plane in 2-
dimensional space
– Each constraint represents a half space in high-
dimensional space
– Feasible region is the intersection of all half-
spaces (half-planes)

ÎThe feasible regions for any LP must be a


convex set
42
Intersection of Three Half-Planes

43
Convexity and Corner Points
Definition:
• A set S of points is convex set if the line
segment jointing any pair of points in S is
wholly contained in S

• Are they convex sets? Where are corner


(extreme) points?

44
Corner Points in LP
• The feasible region for any LP must be a
convex set

• The feasible region for any LP only has finite


number of corner points

• One corner point must be optimal solution


if the LP is bounded

ÎCorner-point method
45
Recall: Product Mix Formulation

Objective Function:
Maximize z = $7x1 + $5x2 (Profit )

(C1) First Constraint: 4x1 + 3x2 ≤ 240

(C2) Second Constraint: 2x1 + 1x2 ≤ 100

(C3) Third Constraint: x1 ≥ 0

(C4) Fourth Constraint: x2 ≥ 0 46


Corner-Point Method

Point 1 : Intersection of C3 and C4


X2
Point 2 : Intersection of C3 and C1
100 – Point 3 : Intersection of C1 and C2
2 – Point 4 : Intersection of C2 and C4
Number of BlueBerrys

80 –

60 –

3
40 –

20 –

|– | | | | | | | | | | X1
1
0 20 40 60 80 100
4 47
Number of X-pods
Corner-Point Method

; Some corner point must be the optimal solution


if the LP is bounded
; Find the objective value at each corner point and
choose the corner with best objective value

Point 1 : (X1 = 0, X2 = 0) Profit $7(0) + $5(0) = $0


Point 2 : (X1 = 0, X2 = 80) Profit $7(0) + $5(80) = $400

Point 4 : (X1 = 50, X2 = 0) Profit $7(50) + $5(0) = $350

48
How to find a corner?

Solve for the intersection of two constraints


(C1 and C2)
4X1 + 3X2 ≤ 240 (electronics time)
2X1 + 1X2 ≤ 100 (assembly time)

4X1 + 3X2 = 240 4X1 + 3(40) = 240


- 4X1 - 2X2 = -200 4X1 + 120 = 240
+ 1X2 = 40 X1 = 30

49
Actually…

Solve for the intersection of two boundary lines (C1


and C2)

4X1 + 3X2 = 240 (boundary of electronics time)


2X1 + 1X2 = 100 (boundary of assembly time)

4X1 + 3X2 = 240 4X1 + 3(40) = 240


- 4X1 - 2X2 = -200 4X1 + 120 = 240
+ 1X2 = 40 X1 = 30

50
Corner-Point Method

; Some corner point must be the optimal solution


if the LP is bounded
; Find the objective value at each corner point and
choose the corner with best objective value

Point 1 : (X1 = 0, X2 = 0) Profit $7(0) + $5(0) = $0


Point 2 : (X1 = 0, X2 = 80) Profit $7(0) + $5(80) = $400

Point 3 : (X1 = 30, X2 = 40) Profit $7(30) + $5(40) = $410


Point 4 : (X1 = 50, X2 = 0) Profit $7(50) + $5(0) = $350
51
Corner-Point Method

x2

100 –
– the corner with the highest profit
Number of BlueBerrys

80 –

60 –
Optimal solution

x* = (x1* x2*) = (30, 40)
40 –

Optimal value
20 –
z* = $410 = $7x1* + $5x2*

|– | | | | | | | | | | x1
0 20 40 60 80 100
52
Number of X-pods
Corner-Point Method and Simplex Method
Given a LP problem:

• Corner-point method searches among all


corner points of the feasible region for the
optimal solution

• Simplex method also searches among all


corner points of the feasible region for the
optimal solution in a systematic way

53
More Methods to Solve LP
• Graphical method, corner-point method,
simplex method, EXCEL, LINDO, CPLEX,
etc.

54
EXCEL

• See textbook Section 4.17

• Also see our supplementary readings

55
EXCEL Problem Setting

56
EXCEL SOLVER

57
EXCEL Solver Options

58
EXCEL Answer Report

59
LINDO

• Software package (CD-ROM, PC-Windows


version) is attached with our textbook

• See textbook Section 4.9 (page 158) and


Appendixes A, B, C (page 217).

• Very similar to CPLEX LP format

60
LINDO

61
LINDO

62
CPLEX

• See supplementary readings


• Available in ISE computer labs
• Server version, up to 50 users at a time
• Two model input formats: LP and MPS
• CPLEX LP format is very similar to LINDO

63

You might also like