Title: Linear Programming
1Linear Programming
last topic of the semester
- What is linear programming (LP)?
- Not about computer programming
- Programming means planning
- Linear refers to the nature of the mathematical
relationships involved, i.e., all relationships
are defined by lines
So linear programming is about planning, or
making decisions, when the mathematical
relationships are linear
2Linear Programming (contd)
- What sets LP apart from other topics weve
discussed? - There is no probability in LP it is
deterministic - There is a definitive way to judge the best
decision (based on your model) - It actually tells you the best decision (based on
your model) - More than any other topic so far, LP is about you
making good models of business situations
3Linear Programming (contd)
A little history
LP was first recognized and solved by George
Dantzig using the simplex method in 1947 at the
Pentagon based on his planning during WWII LP was
not really useful at the time because computers
were too slow it took until 1955 before benefits
were realized Since then, the use of LP has grown
tremendously along with the growth of computers
All sorts of industries (manufacturing,
financial, service, health, etc.) now use LP to
plan their operations
4First Example
The furniture company you work for manufactures
two types of beds
Bed A Bed B
Profit 20 45
Wood 12 units 12 units
Metal 6 units 10 units
Your company currently has 1200 and 700 units of
wood and metal available, respectively
Producing how many of each bed yields the most
profit, assuming sufficient demand?
5First Example (contd)
The furniture company you work for manufactures
two specific collections of bedroom furniture
Your company currently has 1200 and 700 units of
wood and metal available, respectively
Producing how many of each bed yields the most
profit, assuming sufficient demand?
Bed A Bed B
Profit 20 45
Wood 12 units 12 units
Metal 6 units 10 units
maximize 20A 45B subject to 12A 12B ?
1200 6A 10B ? 700
A ? 0, B ? 0
A produced of Bed A B produced of Bed B
6LP Definitions
Decision Variables
- The quantities that are unknown but we wish to
determine - All other quantities in the situation depend on
the decision variables (e.g., profit, resources
used) - Every linear program has decision variables, and
they must be identified ASAP in the modeling
process
Objective Function
- The quantity that we would like to maximize or
minimize (e.g., profit or cost) - Written as a linear expression of the decision
variables
7LP Definitions (contd)
Constraints
- The limitations imposed on the decision variables
- Written as a linear expression of decision
variables that is ?, , or ? some number that
some number is called the right-hand side
Nonnegativity Constraints
- Special constraints that say the decision
variables must be restricted to taking on
nonnegative values (0 or positive, not negative) - A very natural constraint that occurs in most LP
problems - Since nonnegativity constraints are very common,
we will assume them unless otherwise stated
8First Example in Excel
(see Excel)
- I strongly suggest to setup your LP in Excel like
I have - Top left section has decision variables in
columns (colored cells) - Bottom left section has objective function and
constraints in columns that match the decision
variables, plus right-hand sides for constraints - Bottom right section has actual results for
decision variables (colored cells), lined up with
objective function and constraints use the
SUMPRODUCT Excel command to do these calculations - All labels in the same places
9First Example in Excel (contd)
- Then go to Tools gt Solver and fill in information
- Target Cell the colored cell that contains
actual objective function - Max or Min depending on how you want to optimize
- By Changing Cells array of colored decision
variables - Subject to the Constraints the colored cells ?,
, or ? the corresponding rhs, as appropriate
constraints can be done in groups or one-by-one - Options gt Assume Linear Model check this box
- Options gt Assume Non-Negative check this box
- Then click Solve and save Answer Report
10Bank Cashy
Bank Cashy has only two types of assets, loans
(X) and investments (Y). A total of 700 million
is to be allocated between X and Y. Bank Cashy
wishes its loans to equal at least 300 million
and its investments to be at least 30 of the
total of X Y. The bank earns 12 on its loans
and 14 on its investments. Formulate the LP to
maximize earnings, and then setup and solve the
model in Excel
(see whiteboard and Excel)
11Bank Cashy (contd)
This model brings up an important point
For your Excel model, it is necessary to transfer
each of your constraints to a standard form
all the decision variables on one side
Y ? 0.3 ( X Y )
12Some Other Things to Watch Out For
- When solver finishes, it gives you one of three
messages - Solver found a solution. (good!)
- Solver could not find a feasible solution.
(bad) - The Set Cells values do not converge. (bad)
When either of the last two occur, most likely
something is wrong with your model. Double-check
it for errors!
13Transportation LP Problems
A transportation LP problem is a special type of
LP that involves the transportation of goods from
supply nodes to demand nodes
Decision vars are the arrows how much Si gives
to Dj
cij is the cost of shipping one unit from Si to Dj
Objective is to minimize total cost of meeting
all demands
14Transportation LP Problems (contd)
min c11x11 c12x12 c13x13 c14x14 c21x21
c22x22 c23x23 c24x24 c31x31 c32x32
c33x33 c34x34 c41x41 c42x42 c43x43
c44x44 s.t. x11 x12 x13 x14 ? s1 x21 x22
x23 x24 ? s2 x31 x32 x33 x34 ? s3 x11
x21 x31 ? d1 x12 x22 x32 ? d2 x13 x23
x33 ? d3 x14 x24 x34 ? d4 (nonnegativity)
Supply constraints
Demand constraints
Note Feasible only if total supply exceeds total
demand!
15Pluckett Company
The J.F. Pluckett Company manufactures furnaces
at three different plants and sells these
furnaces at four different sales outlets. The
number of furnaces constructed at each plant is
10, 15, and 11. Company policy requires that nine
furnaces per week be sent to each sales outlet.
The problem is to determine a shipping schedule
for the furnaces (from plants to outlets) that
minimizes total transportation costs. The
transportation cost for shipping a single furnace
from each of the three plants to each of the four
outlets is shown here (in dollars).
Find the shipping schedule that minimizes costs
per week.
Outlet Outlet Outlet Outlet
Plant 1 2 3 4 Supply
1 40 70 30 20 10
2 90 60 10 80 15
3 100 30 70 60 11
Demand 9 9 9 9
(see whiteboard and Excel)
16Pluckett Company (contd)
This problem brings up another good point
Even if your hand-written model doesnt include
every decision variable in each constraint, your
Excel model has to. Those missing variables
will just have a 0 in Excel
17Refrigerators
Two models of GE side-by-side refrigerators are
produced at the GE plant in Bloomington Model A
and Model B. No more than 100 of these two models
can be produced (i.e., the sum of A and B cannon
exceed 100). Company policy is to produce at
least as many of Model A as Model B. You are
given the following information.
Model A Model B
Selling price 1,200 1,400
Cost of materials 400 500
Cost of labor 300 300
Per-unit overhead 100 150
Formulate and solve an LP to maximize profit.
(see whiteboard and Excel)
18Fertilizer
The Grow-Tall Fertilizer Company is considering
mixing its four current fertilizer products in
various amounts to form a new fertilizer with
some desired properties. The current products are
Product Product Product Product
1 2 3 4
Potash 40 6 1 10
Nitrogen 2 20 4 6
Phosphate 5 3 30 15
Companys cost per pound 0.30 0.60 0.15 0.20
(The remaining percentage of each product is a
neutral base.) The new fertilizer should be a
minimum 11 composed of each of the three main
ingredients, but should meet these requirements
at minimum cost. Formulate and solve an LP to
determine how the four current products should be
combined to form the new product. (see
whiteboard and Excel)