0% found this document useful (0 votes)
9 views

2200 RMC A Summary of Linear Programming Complete

This document provides a summary of linear programming, including: - The components and characteristics of a linear programming model - How to graphically solve a linear programming problem with two decision variables - An example linear programming problem for a company called RMC - How sensitivity analysis can determine how sensitive the optimal solution is to changes in objective function coefficients or right-hand side constraint values

Uploaded by

nmh.vet4322
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

2200 RMC A Summary of Linear Programming Complete

This document provides a summary of linear programming, including: - The components and characteristics of a linear programming model - How to graphically solve a linear programming problem with two decision variables - An example linear programming problem for a company called RMC - How sensitivity analysis can determine how sensitive the optimal solution is to changes in objective function coefficients or right-hand side constraint values

Uploaded by

nmh.vet4322
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

lOMoARcPSD|14290832

2200 RMC A Summary of Linear Programming Complete

Business Data Analysis (University of Windsor)

Studocu is not sponsored or endorsed by any college or university


Downloaded by nader elkhouly ([email protected])
lOMoARcPSD|14290832

A Summary of Linear Programming

The following linear programming model was developed for problem 14 in chapter 2 (the RMC
problem).

Max 40F + 30S


s.t.
.4F + .5S ≤ 20
.2S ≤ 5
.6F + .3S ≤ 21
F,S ≥ 0

It is a linear programming model because:

 The objective of the model is to maximize some benefit or minimize some cost by
finding the optimal values of the decision variables.
 There is an objective function which expresses this benefit or this cost.
 There are one or more constraints which limit our ability to achieve infinite benefits or
zero costs.
 The objective function and each of the constraints are expressed as linear functions of
the decision variables.
 The decision variables are non-negative and continuous.

To find the optimal solution, graphically (only applies if there are two decision variables):

 Each constraint is drawn as if it were an equality resulting in a straight line (e.g. .4F + .5S
≤ 20 is drawn as if it were .4F + .5S = 20). Once the line is drawn, we determine which
side of the line represents the inequality portion of the constraint.
 After all constraints are drawn and the inequality portion is determined for each, the
region which satisfies all constraints is determined (feasible region).
 Then the objective function is set equal to some value and its line is drawn for that
value. Comparing this line with the feasible region, it is determined whether the value
of the objective function can be improved (i.e. if parts of the feasible region exist on
both sides of this line) or cannot be attained (i.e. when no part of this line is in the
feasible region). If it can be improved, we shift this line (parallel to the original line) in
the appropriate direction until any further shift would cause the objective function to
leave the feasible region. At that point where the line is about to leave the feasible
region, we have found our optimal solution. If the value of the objective function cannot
be attained because the line is totally outside the feasible region, we shift the line in the
appropriate direction until it is shifted to a point where the objective function touches
the feasible region. At that point we have found our optimal solution. This point must
occur at the intersection of at least two, but usually only two, constraints. These
constraints are called binding because they limit our ability to improve on the solution.
The constraints that don’t intersect at that point are called non-binding.
 Once this point has been determined, we determine the values of the two decision
variables by solving two simultaneous equations (i.e. the equations which express the
lines that intersect at that point)

The following graph for the RMC problem looks like:

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

80
75
70
65
60
55
solvent base (tons)

50
45
40
35
30
25
20
15
10
5
0
0 5 10 15 20 25 30 35 40 45 50 55 60

fuel additive (tons)

The dashed line represents the objective function at the optimal solution. The line cannot be
further shifted to the right (i.e. profit cannot be increased) without leaving the feasible region.

From this graph, we see that the optimal solution occurs at the intersection of the material
1(blue line) and the material 3 (burgundy line) constraints. Solving these two simultaneous
equations:

.4F + .5S = 20 → 1.2F + 1.5S = 60


.6F + .3S = 21 → 1.2F + 0.6S = 42
0F + 0.9S = 18 → S = 20

.4F + .5S = 20 → .4F + .5(20) = 20 → .4F = 10 → F = 25

and, objective function, profit = 40(25) + 30(20) = $1600

Graphically, it should be easy to visualize that the optimal solution must occur at one of the
extreme points (points at which at least two constraints intersect, including the non-negative
constraints, and which are on the boundaries of the feasible region).

Using Excel and Solver, the model is entered on a spreadsheet and the solution is determined as
follows:

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

Fuel Additive Solvent Base


amount produced 25 20
Profit/ton $40 $30
Amount Amount
Available Used
Material 1 0.4 0.5 20 20
Material 2 0.2 5 4
Material 3 0.6 0.3 21 21

total profit $1,600.00

This solution is also summarized on an available Answer Report:

Name Final Value


total profit $1,600.00

Name Final Value


amount produced fuel additive 25
amount produced solvent base 20

Name Cell Value Status Slack


material 1 used 20 Binding 0
material 2 used 4 Not Binding 1
material 3 used 21 Binding 0

This answer report not only replicates what is on the original spreadsheet, it also includes the
status of each constraint and its slack or surplus (although the report labels both slacks and
surpluses as slacks)

A slack is simply the difference between the RHS and the LHS (i.e. RHS – LHS) for a ≤ constraint.

A surplus is simply the difference between the LHS and the RHS (i.e. LHS – RHS) for a
≥ constraint.

By defining slacks and surpluses in this way, each will have a non-negative value. If the value is
zero, the LHS = RHS and the constraint is binding as stated under the “Status” column.

(The “Cell Value” column indicates the LHS’s of the model’s constraints.)

Not only are we interested in the optimal solution, we are also interested in how sensitive the
solution is to changes in the model. More specifically, sensitivity analysis looks at two issues:

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

 How sensitive the solution is to changes in the value of one of the objective function
coefficients. More specifically, it answers the following question: “If all other objective
function coefficients are held constant and no other changes are made to the model, by
how much can we change a specific objective function coefficient without changing the
optimal values of the decision variables?”. The answer gives us the range of optimality
for that specific coefficient.

 How sensitive is the solution to changes in the RHS of one of the constraints? More
specifically, its answers the following questions: “If the rest of the model does not
change, what would be the change in the value of the objective function for a 1-unit
increase in the RHS of a specific constraint?”, and, “By how many units can we change
the RHS and still have that change per unit apply?”. The answer to the first question is
either referred to as a dual value or a shadow price. Both are defined as a change in the
value of the objective function for a 1-unit increase in the RHS. The answer to the
second question can be referred to as the range of feasibility.

Range of Optimality

Since the slope of a line aX + bY = c is –a/b, changing one of the coefficients (either a or b) will
change the slope of the line. Graphically, we saw that changing one of the coefficients in the
objective function will not change the optimal solution as long as the slope of the objective
function remains between the slopes of the binding constraints. (note: This only applies if the
slopes of the binding constraints are either both non-negative or both non-positive.)

Looking at the binding constraints (as equalities) in the RMC example,

.4F + .5S = 20 (material 1)


.6F + .3S = 21 (material 3)

The slope of material 1 is -.4/.5 or -0.8 and the slope of material 3 is -.6/.3 or -2.0. Currently the
slope of the objective function is -40/30 or -1.33….

So as long as the slope of the objective function remains between -2.0 and -0.8, there will be no
change in the optimal values of the decision variables.

range of optimality for the fuel additive

To find this range, we keep the coefficient of the solvent base at 30, change the coefficient of the
fuel additive from 40 to a symbol, c1, and find a range for c1 such that the slope of the objective
function remains between -2.0 and -0.8.

This statement says that as long as the profit contribution per ton of solvent base remains at $30
and there are no changes to the rest of the model, the optimal amounts of fuel additive and
solvent base remain at 25 and 20, respectively, as long as the profit contribution per ton of fuel
additive is at least $24 and no more than $60, or, as long as it doesn’t decrease by more than
$16 or increase by more than $20.
range of optimality for the solvent base

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

To find this range, we keep the coefficient of the fuel additive at 40, change the coefficient of the
solvent base from 30 to a symbol, c2, and find a range for c2 such that the slope of the objective
function remains between -2.0 and -0.8.

This statement says that as long as the profit contribution per ton of fuel additive remains at $40
and there are no changes to the rest of the model, the optimal amounts of fuel additive and
solvent base remain at 25 and 20, respectively, as long as the profit contribution per ton of
solvent base is at least $20 and no more than $50, or, as long as it doesn’t decrease by more
than $10 or increase by more than $20.

These same answers appear in the first table of the Sensitivity Report:

Adjustable Cells
Final Reduced Objective Allowable Allowable
Name Value Cost Coefficient Increase Decrease
amount produced fuel additive 25 0 40 20 16
amount produced solvent base 20 0 30 20 10

To show why exceeding the allowable increases or allowable decreases result in a new optimal
solution, the following two graphs were created by changing the objective coefficient for the fuel
additive. The first graph illustrates what happens to the optimal solution when the objective
function coefficient is increased by more than 20 (it was increased by 30 so that the change in
the optimal solution can be easily observed on the graph) and the second graph illustrates what
happens to the optimal solution when the objective function coefficient is decreased by more
than 16 (to see the effect, it was decreased by 25).

80
75
70
65
60
55
solvent base (tons)

50
45
40
35
30
25
20
15
10
5
0
0 5 10 15 20 25 30 35 40 45 50 55 60

fuel additive (tons)

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

80
75
70
65
60
55
solvent base (tons)

50
45
40
35
30
25
20
15
10
5
0
0 5 10 15 20 25 30 35 40 45 50 55 60

fuel additive (tons)

From the first graph, we see that increasing the coefficient by more than 20 results in a new
optimal solution of 35 tons of fuel additive and 0 tons of solvent base.

From the second graph, and a little math, we see that decreasing the coefficient by more than 16
results in a new optimal solution of 18.75 tons of fuel additive and 25 tons of solvent base.

If we had increased the coefficient by exactly 20 or decreased it by exactly 16, there would be
alternate optima, i.e. more than one solution with the same maximum optimal solution. The
following graph shows that when the coefficient of the fuel additive is increased by exactly 20,
not only is the original optimal solution still optimal, so is the solution of 35 tons of fuel additive
and 0 tons of solvent base and so are any solutions along the material 1 line (and the objective
function line) between those two extreme point solutions. Each of these solutions would give us
a maximum profit contribution of $2100 (determined by Solver).

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

80
75
70
65
60
55
solvent base (tons)

50
45
40
35
30
25
20
15
10
5
0
0 5 10 15 20 25 30 35 40 45 50 55 60
fuel additive (tons)

This table also includes a “Reduced Cost” column. This column is only useful for a decision
variable whose optimal value is currently zero. It tells us what change is necessary in the value
of that decision variable’s objective function in order for its optimal value to be no longer zero.

Shadow Prices and Range of Feasibility

shadow price

The shadow price answers the question “If the rest of the model does not change, what would
be the change in the value of the objective function for a 1-unit increase in the RHS of a specific
constraint?” To answer this question mathematically, we increase by 1 unit the RHS of the
constraint whose shadow price we want to determine, we find the new optimal values of the
decision variables, we calculate the new value of the objective function and we determine the
shadow price by taking the difference between the new value of the objective function and the
original value of the objective function.

Increasing the amount of material 1 available by 1 ton, we solve for the new optimal solution:

.4F + .5S = 21 → 1.2F + 1.5S = 63


.6F + .3S = 21 → 1.2F + 0.6S = 42
0F + 0.9S = 21 → S = 23.33…

.6F + .3S = 21 → .6F + .3(23.333) = 21 → .6F = 14 → F = 23.33…

and, objective function, profit = 40(23.33) + 30(23.33) = $1633.33…

and, the shadow price = 1633.33… - 1600 = 33.33 (approximately)

Solving for the shadow price using Solver,

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

Fuel Additive Solvent Base


amount produced 23.33333334 23.33333333
Profit/ton $40 $30
Amount Amount
Available Used
Material 1 0.4 0.5 21 21
Material 2 0.2 5 4.666667
Material 3 0.6 0.3 21 21

total profit $1,633.33

we see that the new profit is indeed $33.33… more than the original profit and that material 1
and material 3 constraints are still binding. (Warning: If there was a change in which constraints
were binding, the difference between the new value of the objective function and the original
value of the objective function as determined by Solver would not equal the shadow price.)

Increasing the amount of material 2 available by 1 ton, would not affect which constraints were
binding and, thus, the optimal solution would remain the same resulting in a shadow price of 0
for the material 2 constraint.

To complete this analysis, the shadow price of the material 3 constraint:

4F + .5S = 20 → 1.2F + 1.5S = 60


.6F + .3S = 22 → 1.2F + 0.6S = 44
0F + 0.9S = 16 → S = 17.77…

.4F + .5S = 20 → .4F + .5(17.77…) = 20 → .4F = 11.11…→ F = 27.77…

and, objective function, profit = 40(27.77…) + 30(17.77…) = $1644.44…

and, the shadow price = 1644.44… - 1600 = 44.44 (approximately)

In summary, a 1 ton increase in the availability of material 1 increases profit by $33.33…, a 1 ton
increase in the availability of material 2 increases profit by $0.00, and, a 1 ton increase in the
availability of material 3 increases profit by $44.44…, assuming only one of these increases
occurs and assuming, in each specific case, that the original binding constraints are still binding
after the increase of 1 unit. Conversely, a 1 ton decrease in one of the materials would cause the
opposite effect on profits (a drop in profits of $33.33…, a drop in profits of $0.00, or, a drop in
profits of $44.44…).

If the value of the objective function can change or remain the same by increasing or decreasing
the RHS of a particular constraint by 1 unit, what would be the effect on the value of the
objective function if the RHS is changed by some other amount?

range of feasibility

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

The range of feasibility answers the question “By how many units can we change the RHS and
still have that the shadow price apply per unit?” Looking at the graph when 1 more ton of
material 1 becomes available,

80
75
70
65 we see
60 that the
55
optimal
solvent base (tons)

50
solution
45
40
still
35 occurs at
30 the
25
20
15
10
5
0
0 5 10 15 20 25 30 35 40 45 50 55 60
fuel additive (tons)

intersection of the material 1 and the material 3 constraint. The shadow price applies only as
long as the optimal solution still occurs at the intersection of the original two binding
constraints.

Suppose we can increase the available amount of material 1 by 2 tons. Looking at the following
graph,

80
75
70
65
60
55
solvent base (tons)

50
45
40
35
30
25
20
15
10
5
0
0 5 10 15 20 25 30 35 40 45 50 55 60
fuel additive (tons)

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

we can now see that the material 1 constraint is no longer binding. The new binding constraints
are material 2 and material 3 and the new optimal solution is now indicated in the following
Solver solution.

Fuel Additive Solvent Base


amount produced 22.5 25
Profit/ton $40 $30
Amount Amount
Available Used
Material 1 0.4 0.5 22 21.5
Material 2 0.2 5 5
Material 3 0.6 0.3 21 21

total profit $1,650.00

The 1 additional ton only added $16.66… to the total profit instead of $33.33… for the first
additional ton, showing that the original shadow price did not apply for that extra additional ton.
But, when does the shadow price stop applying? Graphically, it stops applying when the
constraint for material 1, passes through the intersection of material 2 and material 3. To find
this value of material 1, we solve for the optimal values of the fuel additive and solvent base at
the intersection of material 2 and material 3, substitute those values into the material 1
constraint and calculate its new RHS.

.2S = 5 → S = 25

.6F + .3S = 21 → .6F + .3(25) = 21 → .6F = 13.5 → F = 22.5

and,

.4F + .5S = .4(22.5) + .5(25) = 21.5 (amount of material 1 used at this new optimal solution)

Thus, the shadow price of $33.33… applies for each ton of material 1 up to an additional 1.5 tons
(21.5 – 20).

When we decrease the amount of material, when does the shadow price stop applying?

Looking at the graph,

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

80
75
70
65
60
55
solvent base (tons)

50
45
40
35
30
25
20
15
10
5
0
0 5 10 15 20 25 30 35 40 45 50 55 60

fuel additive (tons)

it stops applying when the material 1 constraint passes through the intersection of the material
3 constraint and the constraint which says that the amount of solvent base must be non-
negative. At this point, the graph indicates that the optimal solution would be 35 tons of fuel
additive and 0 tons of solvent base. Plugging those two values into the material 1 constraint,

4F + .5S = .4(35) + .5(0) = 14

we see that the shadow price of $33.33… applies for each ton of material 1 up to a decrease of 6
tons (14 – 20). That is, the profit drops by $33.33… for each lost ton up to a total loss of 6 tons.

The following Solver table indicates these findings (shadow price and allowable increases and
decreases) as well as the findings for the other two constraints.

constraints
Final Shadow Constraint Allowable Allowable
Name Value Price R.H. Side Increase Decrease
material 1 used 20 33.333333 20 1.5 6
material 2 used 4 0 5 infinity 1
material 3 used 21 44.444444 21 9 2.25

You will notice that any increase in material 2 will not change the optimal solution (shadow price
= 0, allowable increase = infinity). This result should be obvious since we are not using all of the
material 2 that is currently available (we only using 4 of the 5 tons available). Thus, getting more
tons simply means that we are not using more tons. You will also notice that the allowable
decrease for the material 2 constraint is 1 ton, which so happens to be the amount of material 2
that we are currently not using. What this is telling us is that until we get rid of the slack
associated with the material 2 constraint, the original two binding constraints remain binding. If
we get rid of more than 1 ton of material 2, the material 2 constraint becomes binding and thus
the shadow price of 0 will no longer apply.

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

From the above table, the shadow price of $44.44… for the material 3 constraint applies per ton
as long as the increase is no greater than 2.25 tons and as long as the decrease is no greater
than 9 tons.

The question now arises: “If we can get hold of 1 or more additional tons of any of these
materials, how much should we be willing to pay for these additional tons (assuming that we can
get hold of additional tons of only one material)?”

If should be obvious that we would not be willing to pay anything for an additional ton of
material 2 since we are not using the amount of material 2 that is currently available. What
about material 1 and material 3?

Before we can answer this question for either of these two materials, we need to know whether
the original cost of these materials were included in the objective function coefficients. Material
1 costs would not be included if we paid for all 20 tons of material 1 whether we used all of this
material or not. Material 3 costs would not be included if we paid for all 21 tons of material 3
whether we used all of this material or not. When total costs are not affected by our decisions
these are called sunk costs and these costs are not included in the coefficients in the objective
function. If we only paid for the material 1 we actually used, these costs would be included in
the objective function coefficients. If we only paid for the material 3 we actually used, these
costs would be included in the objective function coefficients. When total costs are affected by
our decisions, these costs are called relevant costs and are included in the coefficients in the
objective function.

Suppose we originally paid $3 per ton for material 1, $10 per ton for material 2 and $5 per ton
for material 3. If we paid for all 20, 5 and 21 tons, respectively, this sunk cost would not be
included in the total profit of $1600 or this total profit is calculated assuming that we are paying
nothing for these materials. So, the actual profit would be $1600 less the cost of the material,
or, it would be $1600 – $215 or $1385. So, when we obtain 1 additional ton of material 1, the
new profit of $1633.33… also assumes that we are paying nothing for this additional ton. So,
how much would we be willing to pay for this additional ton?

If we earn an additional $33.33… for this additional ton assuming we are paying nothing for it,
we would breakeven if we paid $33.33… for this ton. Thus, to make additional profit, we would
be willing to pay something less than $33.33… for this additional ton, and we would be willing to
pay that for each ton up to an additional 1.5 tons. (Beyond, the additional 1.5 tons, we don’t
know how our profit will change simply by looking at the sensitivity analysis.)

Similarly, if we could obtain 1 additional ton of material 3, the shadow price tells us that the
profit would increase by $44.44… assuming we are paying nothing for that additional ton.
Therefore, to be better off with the purchase of this additional ton, we should be willing to pay
somewhat less than $44.44… for this additional ton and for all tons up to an additional 9 tons.
Again, these figures only apply if we can purchase only one of these materials.

Conversely, if someone wants to buy some our material, we should be willing to sell each ton of
material 1 for more than $33.33… up to a total of 6 tons, or, sell each ton of material 3 for more
than $44.44… up to a total of 2.25 tons. In either case, we would be better off selling the
material.

Downloaded by nader elkhouly ([email protected])


lOMoARcPSD|14290832

But, suppose we only paid for the material we actually used. In material 1’s case, the original
profit takes into account that we are paying $3 per ton of material 1 and, thus, the new profit or
the shadow price also assumes that we are paying $3 for an additional ton. So, we are making
an additional $33.33… assuming we are already paying $3 for that additional ton. Therefore, to
breakeven, we would be paying $33.33… plus $3 or $36.33… for that ton. Therefore, to be better
off, we would be willing to pay somewhat less than $36.33… for each ton up to an additional 1.5
tons.

In material 3’s case, the original profit takes into account that we are paying $5 per ton of
material 3 and, thus, the new profit or the shadow price also assumes that we are paying $5 for
an additional ton. So, our shadow price tells us that we are making an additional $44.44…
assuming we are already paying $5 for that additional ton. Therefore, to breakeven, we would
be paying $44.44… plus $5 or $49.44… for that ton. Therefore, to be better off, we would be
willing to pay somewhat less than $49.44… for each ton up to an additional 9 tons.

In summary, we learned how to:

 solve a two-decision variable model graphically


 calculate slacks and surpluses
 calculate and interpret objective coefficient ranges
 calculate and interpret shadow prices
 interpret ranges of feasibility

Some concluding observations:

 If removing a constraint does not affect the feasible region, that constraint is called a
redundant constraint and there is a temptation to exclude that constraint from your
model. Do not exclude it. If you exclude it and your model changes, that redundant
constraint may no longer be redundant and your solution to your model may not be
optimal.
 If your model results in an infinitely large benefit or an infinitely small cost, this
condition is called unboundedness and is most likely due to an incorrect model which
would have to be corrected.
 If your model results in infeasibility or no feasible solution, it may be due to an incorrect
model or that you are asking for the impossible. In either case, the model would have to
be modified.
 Increasing the RHS of a ≤ constraint allows for more flexibility and, thus, the new optimal
solution can be no worse than the original solution. Conversely, increasing the RHS of a
≥ constraint allows for less flexibility and, thus, the new optimal solution can be no
better than the original solution.

Downloaded by nader elkhouly ([email protected])

You might also like