You are on page 1of 36

Linear Programming and Graphical Method

Dinesh Kumar
What is Linear Programming ?
 Linear Programming (LP) problems are optimization
problems in which the objective function and the
constraints are linear.

 Programming is term used for ‘planning’ (planning war


time operations).
Linear Programming Problem (LPP)

 A LPP is an optimization problem for which:


 We attempt to maximize or minimize a linear function of
decision variables.

 The values of the decision variables must satisfy a set of


constraints.
LP - Problem Formulation
 Identify the decision variables.

 Identify the objective function.

 Identify the constraints.

 Add any implicit constraints such as non-negative


constraints.
Important LPP theorems

 Theorem 1: The feasible space constitutes a convex set.


Convex Set
Important LPP theorems

 Theorem 2: The optimal solution is an extreme point (usually a


corner point or Vertex) within the feasible solution.

 A feasible solution is an extreme point, if it cannot be written


as convex combination of other feasible solution.

 A convex combination is  X1 + (1-) X2 (where  < 1)


Important LPP theorems

 Theorem 3: There are finite number of extreme points.


Simplex Algorithm
 Simplex algorithm developed by George Dantzig is a
frequently used algorithm for solving linear programming
problems (LPP).

 Simplex is a N dimensional polytope. For an LPP, the feasible


region is a convex polytope.
Simplex Algorithm
LP Terminology
Feasible and Bounded Solution
 A linear programming problem is said to be feasible if
the constraint set is not empty; otherwise it is said to be
infeasible.

 A feasible maximum (or minimum) problem is said to


be unbounded if the objective function can assume
arbitrarily large positive (or negative) values at feasible
vectors; otherwise, it is said to be bounded.
Basic and Non-basic variable
 Decision Variables with nonzero values in the optimal solution
are called basic variables.
 Decision Variables of zero values in the optimal solution are
called non-basic variables.

Final Reduced Objective Allowable Allowable

Cell Name Value Cost Coefficient Increase Decrease

$A$2 Cars 350 0 Basic Variable

$B$2 Trucks 125 0 Basic Variable

$C$2 Vans 0 -375 Non-Basic Variable

Reduced Cost for Basic Variable = 0

Reduced Cost for Non-basic variable ≠ 0


Slack and Surplus Variable
 Amount of unused resource is called the slack variable
(difference between available resource and used resource).
 The excess contribution in a constraint is called the surplus
variable (the difference between the final value of the constraint
and the constraint RHS).
Final Shadow Constraint
Cell Name Value Price R.H. Side
$A$5 Constraints 12000 112.5 12000 Slack = 0
$A$6 Constraints 10000 50 10000 Slack = 0
$A$7 Constraints 22000 0 14000 Surplus = 8000
$A$8 Constraints 350 0 500 Slack = 150
$A$9 Constraints 125 0 200 Slack = 75

Shadow Price is non-zero only when the slack/surplus = 0. That is when


the constraint is binding.
Binding and Non-binding Constraints
 A constraint is said to be binding if changing it also
changes the objective function (at optimal solution
LHS=RHS). That is the slack/surplus variable value is
0.

 Constraints for which LHS ≠ RHS at the optimal


solution are non-binding constraints. Non-binding
constraints that do not affect optimal solution when
their RHS are changed (within the range).
Shadow Price (Marginal Value)
 Shadow price for a constraint is the change in the objective
function value per unit change in the RHS of constraint
value.

 Shadow price is the rate at which the optimal objective value of


the problem would change in response to a change in the
available resource (corresponding to a constraint).

 Comparison of shadow prices for each constraints provides


insights into allocation of additional resources.
Reduced Cost

 For a maximization problem, reduced cost is the amount by


which the objective function reduces when the non-basic
variable is increased to one from zero.

 For a minimization problem, reduced cost is the amount by


which the objective function will increase when a non-basic
variable is increased to one from zero.

 Reduced cost is the amount by which the contribution of a


variable (to the objective) should improve before it becomes
profitable in a maximization problem.
Manvi Motors - Reduced Cost

Final Reduced Objective Allowable Allowable


Cell Name Value Cost Coefficient Increase Decrease
$A$2 Cars 350 0 3500 9000 600
$B$2 Trucks 125 0 5000 2000 857.1428571
$C$2 Vans 0 -375 4000 375 1E+30

Reduced cost for Van is -375, that is, if one van is made then the profit will
decrease by 375 dollars. The current contribution of van to objective function
is 4000, so, it should be at least 4375 before Manvi motors can make a van.

Value of resource consumed by Van:

30 hours in Fabrication so value of resource is 30 x 112.5 = 3375

30 hours in Fabrication so value of resource is 20 x 50 = 1000

So, total value of resource consumed by Van is 3375 + 1000 = 4375

Contribution of Van to the objective function is 4000.


Graphical Solution to Two Variable LPP
Graphical Solution Steps
 Step 1: Graph the feasible region.

 Step 2: Draw an isoprofit/isocost line.

 Step 3: Move the isoprofit line (isocost line) in the direction of


increasing objective function. The last point in the feasible
region that contacts an isoprofit line is an optimal solution to the
LP.
Manvi Motors - Example

Objective
Maximize Z = 3500  C + 5000  T
20  C + 40  T  12000
25  C + 10  T  10000
45  C + 50  T  14000
C  500, T  200
C, T  0
Finding the Feasible Region
20C + 40 T <= 12000 (Fabrication Constraint)

Points (600, 0) and (0, 300) lie on the 20C + 40T = 12000

25C + 10 T <= 10000 (Assembly Constraint)

Points (400, 0) and (0, 1000) lie on the 25C + 10T = 10000

45C + 50 T >= 14000

Points (311.11, 0) and (0, 280) lie on the 45C + 50T = 14000
20C + 40T  12000

T  200

C  500

D
C Optimal Solution
Cars
E

B
45C + 50T  14000 25C + 10T  10000
A

O
Isoprofit line
Trucks
Corner Point Solutions
 The point of intersection of constraints (vertex) are called
corner point solutions.

 The corner points of the feasible region are called corner


point feasible (CPF) solution.
20C + 40T  12000

T  200

C  500

D
C
Cars
E

B
45C + 50T  14000 25C + 10T  10000
A

O
Isoprofit line
Trucks
Optimal Solution
 Optimal solution to a LP is a corner point feasible solution.

 Simplex algorithm developed by George Dantzig moves


from one corner point to another in search of an optimal
solution.
20C + 40T  12000

T  200

C  500

D
C
Cars
E

B
45C + 50T 14000 25C + 10T  10000
A

O
Isoprofit line
Trucks
Solution to Manvi Motors

 In the graph, the optimal solution is given by corner point


labelled C. The point C satisfied the following equations:

 20C + 40T = 12000


 25C + 10T = 10000

 Solving above two equations we get:

 C = 350, T = 125
20C + 40T  12000

T  200

C  500

D
C
Cars
E

B
45C + 50T  14000 25C + 10T  10000
A

O
Isoprofit line
Trucks
Recommended Readings
 F S Hillier and G J Liberman, “Introduction to
Operations Research”, McGraw Hill, 2009.

 W L Winston, “Operations Research: Applications and


Algorithms”, International Thompson Publishing, 2009.

You might also like