🔍
Linear Programming - Shadow Price, Slack/Surplus calculations - YouTube
Channel: Joshua Emmanuel
[0]
Welcome
In this video, I’ll be solving this LP model
[4]
graphically, calculating the surplus values
for the constraints, calculating shadow or
[9]
dual prices, and stating the all-integer solution
for the problem.
[13]
For constraint 1, when x1 = 0, x2 = 6, and
when x2 = 0, x1 = 3.
[21]
For constraint 2, when x1 = 0, x2 = 4, and
when x2 = 0, x1 = 4.
[28]
For constraint 3, when x1 = 0, x2 = 2, and
when x2 = 0, x1 = 10.
[35]
Here is the line for constraint 1, for constraint
2, and for constraint 3.
[40]
Since they’re all “greater than” constraints,
the feasible region will be in the right upper
[46]
side here.
[47]
And the candidates for the optimal solution
will be these 4 extreme or corner points.
[52]
Because points 2 and 3 are pretty close together,
I want to be a little careful and investigate
[57]
every single point.
[59]
The co-ordinates at point 1 are (0, 6) and
(10, 0) at point 4.
[64]
We can also see here that they are (2, 2)
at point 2.
[67]
For point 3, we can solve the 2 lines simultaneously.
[71]
Multiplying the first equation by 2 and subtracting
from the second, we have x2 = 1.5, and x1
[79]
= 2.5.
[80]
Plugging these points into the objective function,
we see that point 1 provides the minimum value
[85]
of the objective function.
[87]
So the optimal solution occurs at point 1
with x1 = 0, and x2 = 6.
[92]
And the optimal objective function value is
6.
[96]
Now for standard form, since these are all
“greater than” constraints,
[100]
we introduce surplus variables for the 3 constraints
by subtracting s1, s2, and s3 from the left
[106]
side, and changing the inequalities to equalities.
[110]
Substituting the optimal solution, we have
surplus values s1 = 0, s2 = 2, and s3 = 40.
[118]
As a result, only constraint 1 is binding
because it has a surplus value of 0.
[124]
And on the graph we can see that, of the 3
constraints, only constraint 1 touches the
[128]
optimal solution point.
[130]
Let’s now calculate the shadow prices for
the constraints.
[134]
Shadow price here is defined as the amount
of change in the optimal objective function
[138]
value per unit increase in the right hand
side of a constraint.
[142]
So for the first constraint, we want to increase
this right hand side, from 6 to 7, and then
[147]
determine the amount of change in the objective
function value as a result.
[152]
Recall that the optimal solution occurs here,
at the intersection of these 2 lines.
[158]
So the binding lines are x1=0, and 2x1+x2=6.
[164]
When calculating shadow prices for a constraint
graphically, we increase the right side of
[169]
the constraint by 1 and solve its equation
simultaneously with the equation of a binding
[175]
constraint.
[176]
So for constraint 1, we increase it’s RHS
to 7, and solve it with simultaneously with
[181]
x1 = 0.
[183]
Since x1 = 0, x2 = 7.
[186]
So the new objective function value is 7.
[188]
We then subtract the old objective function
value from the new one to obtain a shadow
[193]
price of 1.
[194]
For constraint 2, a unit increase in the right
hand side gives 5.
[198]
And solving it with the x1 = 0 gives x2 = 5.
[202]
So we have a new objective function value
here of 5, and the shadow price is 5 minus
[207]
6 which gives -1.
[208]
But wait a minute, we stated a moment ago
that the second constraint is not binding.
[214]
Then by definition, it should have a 0 shadow
price.
[218]
That is, if a constraint is not binding, it
will have a slack or surplus greater than
[222]
0, and should also have a 0 shadow price.
[226]
So something must be wrong here.
[228]
The shadow price should be 0.
[230]
Let’s take a look at the graph to see where
the problem lies.
[234]
If we increase the right side of this constraint
by 1, we have this new feasible region.
[239]
The point (0, 5) occurs here which is outside
the feasible region.
[243]
Therefore, it cannot be a new optimal point.
[247]
In essence, the optimal solution remains here
at (0, 6).
[250]
Note that if you have solved it simultaneously
with the first constraint here which is also
[255]
binding, your solution will be (1, 4) here
with an objective value of 9, which is also
[262]
not optimal.
[263]
Therefore, the optimal solution remains at
0, 6 and the objective function value has
[267]
not changed.
[269]
So the shadow price for constraint 2 is still
0.
[272]
Consequently, we don’t need to bother calculating
the shadow price for constraint 3.
[277]
It is also not a binding constraint, so it
will have a shadow price of 0 as well.
[281]
We can see here that constraint 1 is binding.
[284]
It has a non-zero shadow price and a surplus
of 0 while constraints 2 and 3 are non-binding
[290]
with 0 shadow prices and non-zero surplus
values.
[294]
Now if x1 and x2 are required to be integers,
then the feasible region is a collection of
[300]
dots.
[301]
Since the optimal solution we obtained earlier,
which we now call LP relaxation solution,
[306]
is already integer, then it is also the optimal
solution to this integer problem.
[312]
And that concludes this video.
[313]
Thanks for watching.
Most Recent Videos:
You can go back to the homepage right here: Homepage





