Linear Programming: Presented by Paul Moore
Linear Programming: Presented by Paul Moore
Linear Programming
Presented by Paul Moore
What is Linear Programming?
What is Linear Programming?
Say you own a 500 square acre farm. On
this farm you can grow wheat, barley, corn or
some combination of the 3. You have a limited
supply of fertilizer and pesticide, both of which
are needed (in different quantities) for each crop
grown. Let’s say wheat sells at $7 a bushel,
barley is $3, and corn is $3.50.
2 Groups of Equations:
- Objective Equation (profit equation)
- Constraints (minimum constraints, resource constraints…)
Constraints:
5x + 2y ≤ 60
Corner Point Principle
Which point is optimal?
• Any point in feasible region will ( 0, 30 )
( 0, 0 )
Therefore the optimal solution would be
to produce 0 skateboards and 30 dolls
Quick Practice
A clothing company has 100 yards of cloth and produces shirts (x units) and
vests (y units). Shirts require 10 units and have profit value of $5, while
vests require 4 units and have profit value of $4.
What is the optimal production solution?
Step 1 & 2: Steps 3 & 4:
Identify Components & Mixture Chart Feasible Region & Corner Points
1. Resources – Cloth (100) ( 0, 25 )
2. Products – Shirts & Vests
3. Recipes – Shirts (10), Vests (4)
4. Profits – Shirts ($5), Vests ($4)
5. Objective – Maximize profit
( 10, 0 )
( 0, 0 )
( 6, 10 )
( 3, 10 )
Great Job!
Simplex Method
• Real world problems not as simple as previous examples
• Some involve millions of “corner points” in feasible region
– Would take fast computers days to compute.
B1 (8) 8 9 3
B2 (1) 15 1 12
B3 (2) 1 3 5
B2 15 1 12 1 Rim Conditions
1 3 5
B3 2
B2 15 1 12
value by s 1
3. Eliminate row or
1 3 5
column associated B3 2
with s
Breads needed 3 7 1 11
(demand):
Transportation Problem
New Tableau:
Stores
1. Locate highest,
S2 S3 Breads made
leftmost cell and fill (supply):
with smallest rim 9 3
value B1 5
2. Decrement other rim Bakeries
B2 1 12
value by s 1
3. Eliminate row or
3 5
column associated B3 2
with s
4. Repeat Breads needed 7 1 11
(demand):
Transportation Problem
Tableau:
Stores
1. Locate highest,
S2 S3 Breads made
leftmost cell and fill (supply):
with smallest rim 9 3
value B1 5
5
2. Decrement other rim Bakeries
B2 1 12
value by s 1
3. Eliminate row or
3 5
column associated B3 2
with s
4. Repeat Breads needed 2
7 1 11
(demand):
Transportation Problem
Tableau:
Stores
1. Locate highest,
S2 S3 Breads made
leftmost cell and fill (supply):
with smallest rim 1 12
value B2
1 1
2. Decrement other rim Bakeries 3 5
value by s B3
2
3. Eliminate row or
column associated Breads needed 11
(demand): 2
1 1
with s
4. Repeat
Transportation Problem
Tableau:
Stores
1. Locate highest, S2 S3 Breads made
leftmost cell and fill (supply):
with smallest rim
Bakeries
B3 3 5
value 1 2
1
2. Decrement other rim
value by s Breads needed 11
(demand): 1 1
3. Eliminate row or
column associated
with s
4. Repeat
Transportation Problem
Tableau:
Store
s
1. Locate highest,
S3 Breads made
leftmost cell and fill (supply):
with smallest rim
Bakeries
B3 5
value 1 1
2. Decrement other rim
value by s 1
1
Breads needed 11
3. Eliminate row or (demand):
column associated
with s
4. Repeat
Transportation Problem
Final Tableau:
Stores
S1 S2 S3 Breads made
(supply):
8 9 3
B1 8
3 5
Bakeries
B2 15 1 12
1 1
1 3 5
B3 2
1 1
Breads needed 3 7 1 11
(demand):
Problems with Northwest Corner Rule?
• Only gives a feasible solution, not an optimal solution
B2 15 1 12
1 1 So the cost of this move is:
+3–9+3–5=-8
1 3 5
B3 2
1 1 Want moves to have negative
+ -
value (decreasing cost)
Breads needed 3 7 1 11
(demand):
Improving Feasible Solution
• Indicator Value – for a cell (not filled in) is the cost
change associated with increasing or decreasing the
amounts shipped in a circuit of cells starting at this empty
cell.
Stores
One example would be the
S1 S2 S3 Breads made indicator value of (B1, S3). By
(supply): increasing (B1, S3), we must
8 9 3 decrease (B1, S2), decrease
B1 8
3 4 1 (B3, S3), and increase (B3, S2).
Bakeries
B2 15 1 12
1 1 So the cost of this move is:
+3–9+3–5=-8
1 3 5
B3 2
2 Want moves to have negative
value (decreasing cost)
Breads needed 3 7 1 11
(demand):
Improving Feasible Solution
Stores
Next, we can look cell (B3, S1)
S1 S2 S3 Breads made and its indicator value:
(supply):
8 9 3
B1 8
3 4 1 + 1 – 3 + 9 – 8 = -1
- +
Bakeries
B2 15 1 12
1 A negative value, so the move
1
should be performed.
1 3 5
B3 2
2 Since the minimum of the filled
+ -
numbers in the cell with a
Breads needed 3 7 1 11 negative label is 2, then we can
(demand): make this move twice
Improving Feasible Solution
Stores
S1 S2 S3 Breads made
By examining all other indicator
(supply):
values for remaining empty
8 9 3
B1 8 cells, we find that they all yield
1 6 1
a positive cost change.
Bakeries
B2 15 1 12
1 1 This means we have found an
optimal solution.
1 3 5
B3 2
2
Breads needed 3 7 1 11
(demand):
Applications
• Aviation fuel
• Store management
• Planning airline routes
• Scheduling work crews
• Energy efficiency
• Telecommunications
• Chex Mix
Discussion
• Any other applications of linear
programming?