Title: Linear Programming
1Linear Programming
- We are to learn two topics today
- LP formulation
- determining LP solutions
- Graphical approach
- Simplex method will be taken up in next lecture
- Tutorial Questions Ch 2, 3,6,9,12,16,20
(to p2)
(to p38)
(to p61)
2LP formulation
- Note that Chapter 4 has presented 8 LP
formulations - Here, we pick up the following three examples for
discussions - Example 1 (Investment)
- Example 2 (Marketing)
- Example 3 (Transportation)
(to p3)
(to p17)
(to p30)
(to p1)
3Example 1 (Investment)
- Please refer to the handouts(p112)
- Spend 5 mins to read through them
- Question asked was to formulate its LP problem!
- Solution
(to p59)
(to p4)
4How to achieve it?
- From lecture 1, we know LP formulation involve
the following steps - Step 1 define decision variables
- Step 2 define the objective function
- Step 3 state all the resource constraints
- Step 4 define non-negativity constraints
- Overall LP formulation
(to p5)
(to p6)
(to p8)
(to p15)
(to p16)
(to p2)
5Step 1 define decision variables
- Question how much to invest in four alternative
choices - Let,
- x1 amount invested in municipal bonds ()
- x2 amount invested in certificates of deposit
() - x3 amount invested in treasury bills ()
- x4 amount invested in growth stock fund()
(to p4)
6Step 2 define the objective function
- Expected profits are
- 8.5 for x1 0.085x1,
- 5 for x2 0.05x2
- 6.5 for x3 0.065x3
- 13 for x4 0.13x4
- Thus, objective function is
(to p7)
7Objective function
- maximize Z 0.085x1 0.05x2 0.065 x3
0.130x4
(to p4)
8Step 3 state all the resource constraints
- Four constraints
- Not more than 20for x1
- X2 should not exceed total of other investments
- At least 30 spent for x2 and x3
- X2 and x3 should be greater than x1 and x4, by
ratio of at least 1.2 to 1 - Note total investment is 70,000
- All constraints are
(to p9)
(to p10)
(to p11)
(to p12)
(to p13)
(to p14)
(to p4)
9Not more than 20for x1
- Given that total investment is 70,000
- 20 of it 14,000
- Thus this constraint could be expressed as
-
- x1 ? 14,000
(to p8)
10X2 should not exceed total of other investments
- Total 4 investments, x1, x2, x3 and x4
- Thus, other investments would be
- x1, x3 and x4
- This constraint is then expressed as
- x2 ? x1 x3 x4
- Or
- x2 - x1 - x3- x4 ? 0
(to p8)
11At least 30 spent for x2 and x3
- That is,
- 30 of 70,000 21,000
- Or
- x2 x3 ? 21,000
(to p8)
12X2 and x3 should be greater than x1 and x4, by
ratio of at least 1.2 to 1
- That is
- x2 x3 ? 1.2(x1 x4)
- or
- -1.2x1 x2 x3 - 1.2 x4 ? 0
(to p8)
13total investment is 70,000
- That is,
- x1 x2 x3 x4 70,000
(to p8)
14Over constraints
- x1 ? 14,000
- x2 - x1 - x3- x4
? 0 - x2
x3 ? 21,000 - -1.2x1 x2 x3 - 1.2 x4 ? 0
- x1 x2 x3 x4
70,000
(to p8)
15Step 4 define non-negativity constraints
- That is,
- x1, x2, x3, x4 ? 0
(to p4)
16Overall LP formulation
- maximize Z 0.085x1 0.05x2 0.065 x3
0.130x4 - subject to
- x1 ? 14,000
- x2 - x1 - x3- x4 ? 0
- x2 x3 ? 21,000
- -1.2x1 x2 x3 - 1.2 x4 ? 0
- x1 x2 x3 x4 70,000
- x1, x2, x3, x4 ? 0
(at least 20 on x1)
(x2 spent not more than total investment)
(at least 20 on x2 and x3)
(x2x3 has at least 1.2 ratio to x1x4
(total investment is 70,000)
(to p2)
Note it is up to you if you like to arrange in
this format or let it be the way in according to
how constraints were stated!
17Example 2 (Marketing)
- Please read the handout (118)
- Read it for 5 mins and then try to formulate it!
- How to start?
- Again we following the four steps
(to p59)
(to p18)
184 procedural steps
- Step 1 define decision variables
- Step 2 define the objective function
- Step 3 state all the resource constraints
- Step 4 define non-negativity constraints
- Overall LP formulation
(to p19)
(to p20)
(to p22)
(to p28)
(to p29)
19Step 1 define decision variables
- Question how to achieve a max exposure to three
of possible media - Let
- x1 number of television commercials
- x2 number of radio commercials
- x3 number of newspaper aids
(to p18)
20Step 2 define the objective function
- Exposure are (refer to the attached table)
- 20,000 for x1
- 12,000 for x2
- 9,000 for x3
- Thus the objective function is
- maximize Z 20,000x1 12,000x2 9,000x3
(to p21)
(to p18)
21Audience exposure rate
(to p20)
22Step 3 state all the resource constraints
- We have the following resources
- Budget limit 100,000
- Television time for four commercials
- Radio time for 10 commercials
- Newspaper space for 7 ads
- Resources for no more than 15 commercials and/or
ads.
(to p)
(to p24)
(to p25)
(to p26)
(to p27)
(to p18)
23Budget limit 100,000
- All associated cost to each variables has a
budget of 100,000 - Thus,
- 15,000x1 6,000x 2 4,000x3 ? 100,000
(to p22)
24Television time for four commercials
- That is
- x1 ? 4 (max of 4 TV ads)
(to p22)
25Radio time for 10 commercials
- That is,
- x2 ? 10 (max of 10 radio ads)
(to p22)
26Newspaper space for 7 ads
- That is,
- x3 ? 7 (max of 7 newspaper ads)
(to p22)
27Resources for no more than 15 commercials and/or
ads
- That is
- x1 x2 x3 ? 15 (max of 15 ads can
- be subscribed)
(to p22)
28Step 4 define non-negativity constraints
(to p18)
29Overall LP formulation
- maximize Z 20,000x1 12,000x2 9,000x3
- subject to
- 15,000x1 6,000x 2 4,000x3 ? 100,000
-
x1 ? 4 - x2 ? 10
- x3 ? 7
- x1 x2 x3 ? 15
- x1, x2, x3 ? 0
(note it is advisable to include explanation
here!)
(to p2)
30Example 3 (Transportation)
- Please read the handout (121)
- Read it for 5 mins and then try to formulate it!
- How to start?
- Again we following the four steps
(to p60)
(to p31)
314 procedural steps
- Step 1 define decision variables
- Step 2 define the objective function
- Step 3 state all the resource constraints
- Step 4 define non-negativity constraints
- Overall LP formulation
(to p32)
(to p33)
(to p34)
(to p36)
(to p37)
32Step 1 define decision variables
- We are to determine all combination of shipping
from warehouse i to store j, i1,2,3jA,B,C - That is, xij, where i is warehouse, j is store or
- X1A no of TV shipped from warehouse I to A
store - X1B no of TV shipped from warehouse 1 to B
store - X1C no of TV shipped from warehouse 1 to C
store - X2A no of TV shipped from warehouse 2 to A
store - X2B no of TV shipped from warehouse 2 to B
store - X2C no of TV shipped from warehouse 2 to C
store - X3A no of TV shipped from warehouse 3 to A
store - X3B no of TV shipped from warehouse 3to B
store - X3C no of TV shipped from warehouse 3 to C
store - OR
- Xij no of TV shipped from warehouse i to j
store, i1,2,3jA,B,C
(to p31)
33Step 2 define the objective function
- Here, we attempt to min the shipping cost, i.e.
Cost
Minimize Z 16x1A 18x1B 11x1C 14x2A
12x2B 13x2C 13x3A
15x3B 17x3C
(to p31)
34Step 3 state all the resource constraints
Warehouse supply of televisions sets Retail
store demand for television sets
1- Cincinnati 300 A - New York 150
2- Atlanta 200 B - Dallas 250
3- Pittsburgh 200 C - Detroit 200
total 700
total 600 So, the resource constraints are
x1A x1B x1 ? 300 x2A x2B x2C ? 200
x3A x3B x3C ? 200 x1A x2A x3A 150
x1B x2B x3B 250 x1C x2C x3C 200
How to get these?
Note, how this Problem really looks Like?
(to p31)
(to p35)
35Transportation Problem
Total supply
300
200
200
700
150
250
200
Total demand
600
Note total supply is greater than total
demand. Thus, we set demand constraint to and
supply to lt
(to p34)
36Step 4 define non-negativity constraints
- That is,
- xij ? 0, i1,2,3 jA,B,C
(to p31)
37Overall LP formulation
- Minimize Z 16x1A 18x1B 11x1C 14x2A
12x2B 13x2C 13x3A 15x3B 17x3C - Subject to
- x1A x1B x1C ? 300
- x2A x2B x2C ? 200
- x3A x3B x3C ? 200
- x1A x2A x3A 150
- x1B x2B x3B 250
- x1C x2C x3C 200
- xij ? 0, i1,2,3 jA,B,C
(to p2)
38LP - Graphical approach
- Here, we now try to solve an LP formulation using
a graphical approach, that is - Plot all equations onto a graph and determine Z
values of decision variables that satisfying all
resource constraints - How it works?
- Types of LP solutions
(to p39)
(to p53)
39LP - Graphical approach
- Consider a simple LP problem
- maximize Z40x1 50x2
- subject to
- 1x1 2x2 ? 40 (e1)
- 4x2 3x2 ? 120 ..(e2)
- x1 ? 0 ...(e3)
- x2 ? 0 (e4)
Objective function
Resource Constraints
Solution steps of graphical approach
(to p40)
40Solution steps of graphical approach
- Step 1 take one resource constraint and treat it
as an equation and draw them onto a graph - Step 2 determine the region that satisfying the
inequality equation of step 1 - Step 3 repeat steps 1-2 for all resource
constraints - Step 4 super imposing objective function to
determine the solution set for decision variables
(to p41)
41Step 1
- Consider
- 1x1 2x2 ? 40 (1)
- And teating it as
- 1x1 2x2 40 (1)
- How to draw them ?
(to p42)
421x1 2x2 40
How to plot? Consider any points on x and y
axis in turn, then we have x10, x220 and
x20, x140
Step2 Where is 1x1 2x2 ? 40 ?
(to p43)
43Determine 1x1 2x2 ? 40
This region Is known as feasible region!
We take a point at (0,0) to check which side
satisfying this constraint!
(0,0)
At (0,0), 10 00 ? 40 ? Yes, then all points
on the side of (0,0) are feasible region Repeat
these steps for equation e2
(to p44)
44Constraint e2
(to p45)
When combine this to the one we obtained before,
then we have .
45Constraints e1 to e2
Interception point (x1,x2)(24,8)
(0,20)
(30,0)
(to p46)
When add e3 and e4, we have
46Common region of e1 to e4
Now, we proceed to Step 4, that is impose
Objective function Z onto this graph . How to
plot it?
(to p47)
47maximize Z40x1 50x2
To plot this equation Z, we can simply assign an
aribitrary number for Z, Say,
Z 800 Then 800 40x1
50x2 When x2 0, then x1 20 .. A plotting
point (20,0) When x1 0, then x2 16 .a
plotting point (0,16) When plotting it on the
graph, we would have .
(to p48)
Where is the optimal solution?
48Optimal solution
- The optimal solution is at the corner point of
the feasible region! - To obtain the optimal point, we use a ruler move
toward the right hand side and the last corner
point - Solution
(to p49)
For max problem if min then it is on the left
hand side
49Optimal point
This is the solution (x1,x2)(24,8)
(to p50)
Let check to see if it is the optimal
point/solution .
50Checking!
Optimal solution
X10 X2-0 Z0
(to p51)
More exercise! ..
51Another example
Consider Minimize Z 6x1 3x2 subject to
2x1 4x2 ? 16 . (e1) 4x1 3x2 ? 24
...(e2) x1 ? 0 ..(e3)
x2 ? 0 ..(e4)
(to p52)
Feasible region for constraints e1 to e4
52Resource constraints
Feasible region
And also x1 ? 0, x2 ? 0
2x1 4x2 ? 16
4x1 3x2 ? 24
Imposing inequalities
Note, Min Z is at the most left Hand side of the
Z function
Imposing function Z
(to p38)
53Types of LP solutions
- Two types of LP solution
- The solution the unique solution
- Multiple solutions
- Question
- Do all LP problems have a solution?
(to p54)
(to p55)
(to p56)
54The solution unique solution
- It is referred to .there is only one optimal
solution Z has satisfying all LP formulation .
i.e. only one (corner) point from the feasible
region
(to p53)
55Multiple solutions
- It refers to that we have more than one set of
solutions satisfying to the LP formulation. That
is, the optimal function Z lies onto one of
resource constraints that forms the feasible
region and that all points (x1,x2) on that
region are optimal solutions to the LP problem
For Max Z, all points between here are optimal
solutions
(to p53)
56LP solutions
- LP solution does not exit if our LP problems are
- Infeasible problems
- Unbound problems
(to p57)
(to p58)
(to p1)
57An Infeasible Problem
Every possible solution violates at least one
constraint maximize Z 5x1
3x2 subject to 4x1 2x2 ? 8
x1 ? 4 x2 ? 6 x1,
x2 ? 0
Here, we cannot find a region that has satisfying
all constraints, i.e. no feasible region!
(to p56)
58An Unbounded Problem
Value of objective function increases
indefinetly maximize Z 4x1
2x2 subject to x1 ? 4
x2 ? 2 x1, x2 ? 0
Note there is no bounded feasible region, thus
it cannot find Max Z. But it has solution if Z
is a Min problem! (Why?)
(to p56)
59(to p3)
(to p17)
60(to p30)
61(No Transcript)
62(No Transcript)
63(No Transcript)