28
161 Linear Programming: Reading: “Note on Linear Programming” (ECON 4550 Coursepak, Page 7) and “Merton Truck Company” (ECON 4550 Coursepak, Page 19) Linear Programming – mathematical techniques used for solving constrained optimization problems in which the objective function and each of the constraints can be stated as linear functions of the choice variables In this context, the use of the word “programming” does not mean “writing code for a computer,” but rather simply is synonymous with “planning” or “optimization” (which was the meaning back in the 1940s, when these tools were first developed) General ingredients of a constrained optimization problem: 1. Decision Variables – the levels of various activities over which the decision maker has a choice 2. Objective Function – a mathematical function describing the desirability of all the different possible outcomes that could be realized (i.e., a measure of the desirability resulting from of all the different possible choices of the decision variables) 3. Constraints – restrictions on the acceptable choices of the decision variables by the decision maker

Linear Programming - Kennesaw State University

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

161
Linear Programming: Reading: “Note on Linear Programming” (ECON 4550 Coursepak, Page 7) and “Merton Truck Company” (ECON 4550 Coursepak, Page 19) Linear Programming – mathematical techniques used for solving constrained optimization problems in which the objective function and each of the constraints can be stated as linear functions of the choice variables • In this context, the use of the word “programming” does
not mean “writing code for a computer,” but rather simply is synonymous with “planning” or “optimization” (which was the meaning back in the 1940s, when these tools were first developed)
General ingredients of a constrained optimization problem:
1. Decision Variables – the levels of various activities over which the decision maker has a choice
2. Objective Function – a mathematical function describing the desirability of all the different possible outcomes that could be realized (i.e., a measure of the desirability resulting from of all the different possible choices of the decision variables)
3. Constraints – restrictions on the acceptable choices of the decision variables by the decision maker
162
Examples of a Constrained Optimization Problem: • suppose a firm produces output (denoted by q ) by hiring two
different inputs (denoted by 1x and 2x ) according to the production function ),( 21 xxF
• the inputs are hired in competitive factor markets, at constant per unit prices of 1w and 2w respectively
• the firm wants to produce some target level of output (denoted q ) as inexpensively as possible
We can frame this as a Constrained Optimization Problem with
1. Decision Variables of: 1x and 2x 2. an Objective Function of: 2211 xwxw + 3. a Constraint of: qxxF ≥),( 21
Q: Is this a constrained optimization problem which “fits the
mold of Linear Programming”? A: It depends upon the functional form of ),( 21 xxF …
recall, for Linear Programming we need the objective function to be a linear function of the choice variables (which 2211 xwxw + clearly is)
we also need the constraints to be linear functions of the choice variables => whether this is the case depends upon the functional form of qxxF ≥),( 21
If qxxF ≥),( 21 is such that the constraint of qxxF ≥),( 21 is a linear constraint, then we can apply Linear Programming; if not, then we would have to use different optimization techniques
163
To see that our objective function is indeed linear, let’s illustrate it graphically… • helpful to draw the objective function for varying realized
values of production costs (e.g., 24c , 36c , 60c , and 84c )
• note: the slope of each isocost curve is simply


w w
• so, again, the Objective Function for this problem is clearly linear
• the goal of the firm is to Minimize Production Costs => they want to be on the isocost line closest to the origin, while still producing the target level of output
Q: Which combinations of 1x and 2x satisfy the constraint of
producing at least our desired target level of output? A: To illustrate these pairs graphically, we need to assume a
functional form of ),( 21 xxF .
1x 0
0
“ 84c isocost line” Combinations of the two inputs which cost exactly $8,400 dollars 2x
“ 60c isocost line” Combinations of the two inputs which cost exactly $6,000 dollars
“ 24c isocost line” Combinations of the two inputs which cost exactly $2,400 dollars
164
(i) Perfect Substitutes (e.g., 1x is “units of male labor” and 2x is “units of female labor”) => 2121 ),( xxxxF += => the
constraint becomes qxx ≥+ 21 => feasible set is: (ii) Perfect Complements (e.g., 1x is “workers” and 2x is
“shovels”) => },min{),( 2121 xxxxF = => the constraint of qxx ≥},min{ 21 actually becomes a dual restriction of qx ≥1
and qx ≥2 => feasible set is:
1x 0
applicable
Programming is applicable Region in
which “both restrictions” are satisfied
165
2121 10),( xxxxF = => qxx ≥2110 ) => feasible set is:
In this case, the tools of Linear Programming cannot be applied (since the problem does not fit the assumptions of the Linear Programming specification) => different techniques would have to be used (techniques which are beyond the scope of our present discussion)
1x 0
Linear Programming is NOT applicable
166
Example 1 – Insulation Production (Coursepak, Page 7):
An insulation plant makes two types of insulation called “Type B” and “Type R.” Both types of insulation are produced using the same machine. The machine can produce any mix of output, as long as the total weight is no more than 70 tons per day. Insulation leaves the plant in trucks; the loading facilities can handle up to 30 trucks per day. One truckload of “Type B” insulation weighs 1.4 tons; one truckload of “Type R” weighs 2.8 tons. Each truck can carry “Type B” insulation, “Type R” insulation, or any mixture thereof. The insulation contains a flame retarding agent which is presently in short supply; the plant can obtain at most 65 canisters of the agent per day. One truckload of (finished) “Type B” insulation requires an input of three canisters of the agent, but one truckload of “Type R” insulation requires only one canister.
Carla Linton, the plant manager, has calculated that, at current prices, the contribution from each truckload of “Type B” is $950 and of “Type R” is $1,200. There appears to be no difficulty in selling the entire output of the plant, no matter what production mix is selected. 1. Specify the objective function of the plant manager. 2. State equations for all of the constraints facing the plant
manager. 3. Formally state the Linear Programming problem. 4. Graphically illustrate the “feasible set” of the decision
variables. 5. Determine the solution to this Linear Programming problem.
167
1. Specify the objective function of the plant manager. • First recognize that the decision variables can be thought of
as “the number of truckloads of ‘Type B’ insulation” (denoted B ) and “the number of truckloads of ‘Type R’ insulation” (denoted R ) Often, we have some flexibility in “how we specify the
problem” => we could have thought of our decision variables as “tons of ‘Type B’ insulation” and “tons of ‘Type R’ insulation”
In this case, there is no “right” or “wrong” approach => either specification will give the correct insights (so long as we are consistent throughout the analysis)
• Thus, the objective is to maximize contribution, which is equal to: RB 200,1950 +
2. State equations for all of the constraints facing the plant
manager. • The plant manager faces several restrictions on her choice (i) “…can produce any mix of output, as long as the total
weight is no more than 70 tons per day…One truckload of “Type B” insulation weighs 1.4 tons; one truckload of “Type R” weighs 2.8 tons.” => 70)8.2()4.1( ≤+ RB
(ii) “…loading facilities can handle up to 30 trucks per day” => 30≤+ RB
(iii) “…can obtain at most 65 canisters of the (flame retarding) agent per day. One truckload of (finished) “Type B” insulation requires an input of three canisters of the agent, but one truckload of “Type R” insulation requires only one canister.” => 653 ≤+ RB
(iv) implicit assumptions of 0≥B and 0≥R
168
3. Formally state the Linear Programming problem. • The plant manager faces the Linear Programming problem
of: Maximize RB 200,1950 + Subject to:
70)8.2()4.1( ≤+ RB 30≤+ RB 653 ≤+ RB
0≥B and 0≥R
4. Graphically illustrate the “feasible set” of the decision
variables.
70 8.2 4.1
50
• (ii) 30≤+ RB => 30)1( +−≤ BR • (iii) 653 ≤+ RB => 65)3( +−≤ BR
(?) What does the picture look like when we draw all three
constraints in the same graph? • the “horizontal intercepts” can be ranked from smallest
to largest as “blue < red < green”… • the “vertical intercepts” can be ranked from smallest to
largest as “green < red < blue”…
B 0
30
30
65/3=21.6666…
But, which of the two following cases do we have?
or To figure this out, we can start by determining the co-ordinates of the intersection of “blue” and “green”… • at this intersection 25)5.( +−= BR and 65)3( +−= BR must
both be satisfied simultaneously • 25)5.(65)3( +−=+− BB B)5.2(40 = 165.2
40 ==B • From which it follows 1765)16)(3(25)16)(5.( =+−=+−=R
And then figure out if this point is “above” or “below” “red”… • recall, the equation for “red” is 30)1( +−= BR • thus, if 16=B , then 1430)16)(1( =+−=R • since 1714 < it follows that “red” passes below the point of
intersection between “blue” and “green” (i.e., the correct picture is the one above on the left)
From here we can determine the point of intersection between… • “red” and “green” as: 25)5.(30)1( +−=+− BB 5)5(. =B 10=B and 20=R
• “red” and “blue” as: 65)3(30)1( +−=+− BB 352 =B 5.17=B and 5.12=R
B 0
0
R
171
Thus, the feasible set is: Note that if we instead had… …then the constraint corresponding to “red” would be redundant Redundant Constraint – a constraint is redundant if the restriction imposed by the constraint is satisfied at all combinations of the choice variables collectively satisfying all of the other constraints
B 0 0
R
172
note: it is mathematically possible for the “feasible set” to be “empty” (in which case the problem cannot be solved)
• for example, suppose we had constraints of 1. 501 ≥x (“blue”) 2. 402 ≥x (“yellow”) 3. 7021 ≤+ xx (“red”)
No points for which all three constraints are satisfied! “Feasible Set” is an “Empty Set”! • When we have more than two choice variables (in which
case it is not so easy to graphically illustrate the “feasible set”), then this possibility is not so easy to detect
2x
5. Determine the solution to this Linear Programming problem.
• From the graphical illustration of the feasible set, it follows that the solution must be (for a linear objective function with any arbitrary slope) at one of the four “corner points”
(i) Vertical Intercept is optimal (if “orange” is flatter than
“green”) (ii) Intersection of “green” and “red” is optimal (if “orange”
is steeper than “green” but flatter than “red”)
B 0 0
R
174
(iii) Intersection of “red” and “blue” is optimal (if “orange” is steeper than “red” but flatter than “blue”)
(iv) Horizontal Intercept is optimal (if “orange” is steeper
than “blue”)
R
175
• Recall, the objective function of this firm is RB 200,1950 + • Setting RBv 200,1950 += and solving for R , we obtain
vBR 200,1 1
+ −
=
• From here we can easily see that the slope of the objective
function is equal to
− 24 19
200,1 950
• Recall, the slope of “green” is ( )2 1− , the slope of “red” is
1− , and the slope of “blue” is 3− • Thus, the objective function is steeper than “green” but
flatter than “red” => the solution to the problem is 10* =B and 20* =R
• At the solution the value of the objective function is:
)20(200,1)10(950 + 000,24500,9 +=
176
Note: • mathematically, it is possible to have “multiple solutions” • for example, if slope of “orange” had been exactly equal to
slope of “red”... • then any point along “red” would be best => multiple
solutions (each yielding the same maximal value of the objective function)
B 0 0
R
177
Further Insights on the Solution: Slack – a measure of the amount of each available scarce resource that remains unused at the solution to the linear programming problem • Again, observe that for the problem above, the solution
occurs at the intersection of “red” and “green”
Thus, the constraints illustrated by “green” (i.e., the “machine constraint” of 70)8.2()4.1( ≤+ RB ) and “red” (i.e., the “loading constraint” of 30≤+ RB ) are both binding => there is “zero slack” for the associated scarce resources at the solution => these two inputs are the “bottlenecks” in the operation
• However, the constraint illustrated by “blue” (i.e., the “flame retarding agent constraint” of 653 ≤+ BR ) is NOT BINDING => at the optimal solution, the firm is not using all of the available “flame retarding agent” More precisely, they are only using 50)10(320 =+ units
of the “flame retarding agent” Slack of “15” (i.e., 155065 =− , difference between the
available amount and the amount used) for this resource The amount of available flame retarding agent could
decrease to 50 units without altering the solution
B 0 0
178
(?) How much would this firm value “additional loading capacity”? That is, what if the “loading constraint” (of 30≤+ RB )
could be altered by increasing the value of the term on the right-hand side? By how much would the firm value such an increase?
Visually: • As “loading capacity” is increased… some points that were not initially feasible are now
feasible (illustrated by the “purple shaded area”) the intersection of “green” and “red” move down
(“southeast”) along the “green” line so long as the increase in machine capacity is sufficiently
small, the solution still occurs at the intersection of “green” and “red” => the new optimal choice is as illustrated above
note: this occurs along an “orange” line that is further from the origin => value of the objective function at the solution is indeed larger
B 0 0
179
Shadow Price – the benefit of increasing the available amount of a scarce resource, measured by the resulting increase in the value of the objective function at the solution to the linear programming problem Algebraically: • state the “loading constraint” in more general terms as:
LRB ≤+ => LBR +−≤ • note, the intersection of “red” and “green” now occurs at:
252 1 +−=+− BLB => 252
1 −= LB => 502 −= LB and ( ) LLLR −=+−−= 50502
• so long as the increase in loading capacity is sufficiently small, the solution is now 502* −= LB and LR −= 50* => the value of the objective function at the solution is now
( ) ( )LLv −+−= 50200,1502950* LL 200,1000,60500,47900,1 −+−=
500,12700 += L • thus, as L is increased, *v (i.e., the optimal value of the
objective function) increases by 700* =dL dv
• the “shadow price” of “loading capacity” is $700 => the
firm would be willing to pay up to $700 to increase “loading capacity” from 30 up to 31
180
Note: in the discussion above we assumed that L was “sufficiently small”… if loading capacity becomes “too big,” then we eventually
have… …in which case the solution is at the intersection of
“green” and “blue” • this “cutoff” value of L is the unique value for which all three
constraints intersect at the same point for “general L ,” the intersection between “red” and
“green” occurs at 502 −= LB recall, the intersection between “green” and “blue” occurs
at 16=B thus, the previous discussion applies only if
16502 ≤−L 662 ≤L 33≤L
But, at this point we can also see that the feasible set (and therefore the solution) is qualitatively different if L is “too small”…
B 0 0
R
181
For “very small L ” we would have… …in which case the solution is at the vertical intercept of “red” this will occur for values of L smaller than the unique
value for which the intersection of “red” and “green” occurs at 0=B
that is, for 5020 −≤ L
502 ≤L 25≤L
Thus, the Shadow Price of $700 for Loading Capacity is valid for (all other factors fixed) 3325 ≤≤ L • since we are starting with a value of 30=L , we say that the Lower Range for Loading Capacity is equal to 5 Upper Range for Loading Capacity is equal to 3
Lower Range – maximum decrease in the available amount of a scarce resource for which the calculated shadow price is valid Upper Range – maximum increase in the available amount of a scarce resource for which the calculated shadow price is valid
B 0 0
Similarly, for “machine capacity” Algebraically: • state the “machine constraint” in more general terms as:
MRB ≤+ )8.2()4.1( => MBR 8.2 1
2 1 +−≤
• note, the intersection of “red” and “green” now occurs at: MBB 8.2
1 2 130 +−=+− => MB 8.2
1 2 1 30 −=
=> 4.160 MB −= and ( ) 306030 4.14.1 −=−−= MMR • so long as the increase in machine capacity is sufficiently
small, the solution is now 4.1 * 60 MB −= and 304.1
* −= MR => the value of the objective function at the solution is now
( ) ( )30200,160950* 4.14.1 −+−= MMv 000,36000,57 4.1
200,1 4.1
950 −+−= MM M4.1
250000,21 += • thus, as M is increased, *v (i.e., the optimal value of the
objective function) increases by 57.1784.1 250* ≈=dM
dv • the “shadow price” of “machine capacity” is $178.57 =>
the firm would be willing to pay up to $178.57 to increase “machine capacity” from 70 up to 71
Further, it can be shown that • the Lower Range for Machine Capacity is 10.50 • the Upper Range for Machine Capacity is 14.00
183
(?) What about the Shadow Price for the “flame retarding agent”?
(A) Start by using “economic intuition”… • recall the definition of “Shadow Price” (benefit of
increasing the available amount of a scarce resource, measured by the resulting increase in the value of the objective function at the solution to the linear programming problem)
• the constraint on the “flame retarding agent” was NOT BINDING => at the solution, the firm was not using all of the available units of this input
• thus, the solution would not change if the available amount of “flame retarding agent” were increased => Shadow Price is equal to zero
• further, it follows that the Upper Range for this Shadow Price is infinity (i.e., the shadow price will still equal zero even as the available amount of the “flame retarding agent” is increased to infinity)
Recognize that in general: • if Slack is equal to zero, then Shadow Price will be positive • if Slack is positive, then Shadow Price is equal to zero
184
Analysis of more complex problems… • If there are more than two choice variables, then it is not
possible to graphically illustrate the feasible set with ease. However, the problem could still be solved by the same general approach as what we did above… Identify all of the “corner points” of the feasible set Evaluate the objective function at each “corner point” Select the point that maximizes (or minimizes) the
value of the objective function • In practice, such higher order Linear Programming
problems are usually most easily solved by computer programs which employ a procedure called the “simplex method” The late mathematician George Dantzig (who, along
with Leonid Kantorovich and John von Neumann, essentially created the subfield of Linear Programming) developed this algorithmic procedure for solving Linear Programming problems of any size
185
“Merton Truck Company”: (Page 19 of Coursepak) • Choose levels of production for two different types of trucks:
=1x (units of Model 101) and =2x (units of Model 102) • Constraints of:
Engine Assembly constraint: 000,42 21 ≤+ xx Metal Stamping constraint: 000,622 21 ≤+ xx Model 101 Assembly constraint: 000,52 1 ≤x Model 102 Assembly constraint: 500,43 2 ≤x
• Objective: maximize contribution Per Unit Costs for Model 101 of:
(materials) + (labor) + (variable overhead) = $24,000 + $4,000 + $8,000 = $36,000 Per Unit Revenue for Model 101 of $39,000 Per Unit Costs for Model 102 of:
(materials)+(labor)+(variable overhead) = $20,000 + $4,500 + $8,500 = $33,000 Per Unit Revenue for Model 102 of $38,000
• Thus, the Objective Function is:
21 000,5000,3 xxv +=
186
Questions: 1a. Find the best product mix for Merton. 1b. Determine the Shadow Price of engine assembly capacity. 1d. Determine the Upper Range for the shadow price of engine assembly
capacity determined in (1b). 2. Merton’s production manager suggests purchasing Model 101 or Model 102
engines form an outside supplier in order to relieve the capacity problem in the engine assembly department. If Merton decides to pursue this alternative, it will be effectively “renting” capacity: furnishing the necessary materials and engine components, and reimbursing the outside supplier for labor and overhead. Should the company adopt this alternative? If so, what is the maximum rent it should be willing to pay for a machine-hour of engine assembly capacity? What is the maximum number of machine hours it should rent?
1a. Note that the constraints can be expressed as
000,212 1
2 +≤ − xx , 000,312 +−≤ xx , 500,21 ≤x , and 500,12 ≤x => the feasible set can be illustrated as:
• Slope of “green” is 2
1− ; slope of “blue” is 1− . • Slope of the objective function ( 21 000,5000,3 xxv += ) is 5
3−
000,2
000,2
000,3
000,1
2x
500,2
500,1
187
Optimal output combination is 000,2* 1 =x and 000,1*
2 =x 1b. To determine the Shadow Price of “engine assembly
capacity,” start by stating the Engine Assembly constraint in more general terms as Exx ≤+ 21 2 => 212
1 2
Exx +≤ − • from here, solve for the point of intersection between
“green” and “blue” as: 000,31212
1 +−=+− xx E 212
1 000,3 Ex −= Ex −= 000,61 and 000,32 −= Ex
• at this point, the value of the objective function is )000,3(000,5)000,6(000,3* −+−= EEv
E000,2000,000,3 += • thus, the Shadow Price for engine assembly capacity is
equal to 000,2* =dE dv
1d. As “engine assembly capacity” is increased, “green” shifts
outward… • the solution is still at the intersection of “green” and “blue”
until “green” shifts out beyond the intersection of “blue” and “purple”
• the intersection of “blue” and “purple” occurs at 000,3500,1 1 +−= x => 500,11 =x
• thus, the solution is still at the intersection of “green” and “blue” so long as 500,1000,6 ≥− E 500,4≤E
• starting at 000,4=E , the value of E could increase by 500 and the Shadow Price of 2,000 still applies (i.e., the Upper Range for the Shadow Price is 500)
188