Introduction To Linear Programming
Introduction To Linear Programming
A B Raju
Introduction - LP
LP is a problem solving approach to solve managerial problems
Introduction - LP
LP is a problem solving approach to solve managerial problems Has extensive uses in day to day business functions
Introduction - LP
LP is a problem solving approach to solve managerial problems Has extensive uses in day to day business functions A manufacturer trying to satisfy all the demand with minimum inventory
Introduction - LP
LP is a problem solving approach to solve managerial problems Has extensive uses in day to day business functions A manufacturer trying to satisfy all the demand with minimum inventory Financial analyst trying to maximise the ROI with best picks of stocks and bonds for his portfolio
Introduction - LP
LP is a problem solving approach to solve managerial problems Has extensive uses in day to day business functions
A manufacturer trying to satisfy all the demand with minimum inventory Financial analyst trying to maximise the ROI with best picks of stocks and bonds for his portfolio A marketing manager trying to optimise his media mix to maximise ad effectiveness with the given budget
Introduction - LP
LP is a problem solving approach to solve managerial problems Has extensive uses in day to day business functions
A manufacturer trying to satisfy all the demand with minimum inventory Financial analyst trying to maximise the ROI with best picks of stocks and bonds for his portfolio A marketing manager trying to optimise his media mix to maximise ad effectiveness with the given budget A logistics manager trying to minimise his overall cost of transportation for shipping goods from various warehouses to a customer for a given order
Introduction - LP
So many companies use LP for various purposes
Introduction - LP
So many companies use LP for various purposes Hanshin Expressway corporation uses LP for traffic control
Introduction - LP
So many companies use LP for various purposes Hanshin Expressway corporation uses LP for traffic control Marathon Oil uses LP for gasoline blending and to evaluate economics of new terminal / pipeline etc.,
Introduction - LP
So many companies use LP for various purposes Hanshin Expressway corporation uses LP for traffic control Marathon Oil uses LP for gasoline blending and to evaluate economics of new terminal / pipeline etc., Eastman Kodak uses LP for manufacturing products in its various plants across the world
Introduction - LP
So many companies use LP for various purposes Hanshin Expressway corporation uses LP for traffic control Marathon Oil uses LP for gasoline blending and to evaluate economics of new terminal / pipeline etc., Eastman Kodak uses LP for manufacturing products in its various plants across the world GE Capital uses LP for optimal lease structuring
Introduction - LP
Timber Harvesting Model at Meadwestvaco Corp. Co. is a major producer of premium paper for books, periodicals, commercial printing and business forms Produces pulp and lumber Designs and manufactures packaging systems Is a world leader in coated board and shipping containers
Introduction - LP
Timber Harvesting Model at Meadwestvaco Corp. Co. is a major producer of premium paper for books, periodicals, commercial printing and business forms Produces pulp and lumber Designs and manufactures packaging systems Is a world leader in coated board and shipping containers Co. uses LP for Timber harvesting plans are developed over long time horizons
Introduction - LP
Timber Harvesting Model at Meadwestvaco Corp.
Co. is a major producer of premium paper for books, periodicals, commercial printing and business forms Produces pulp and lumber Designs and manufactures packaging systems Is a world leader in coated board and shipping containers Co. uses LP for Timber harvesting plans are developed over long time horizons
Models shall consider wood market, mill pulpwood requirements, harvesting capacities and general forest management principles Model arrives at a optimal harvesting and purchasing schedule Various schedules reflect other assumptions concerning forest growth, wood availability and general economic conditions Various factors like timber prices & supplies and land holdings & forest growth
Introduction - LP
So in all LP problems we have An objective of either maximising or minimising a particular quantity Constraints are another prominent feature of every LP problem.
Introduction - LP
Par Inc. wanted to produce standard and deluxe golf bags which have the following operations as summarised below
Production time (hours Department Standard bag Deluxe bag Cutting & Dyeing 7/10 1 Sewing 5/6 Finishing 1 2/3 Inspection & packing 1/10 1/4
Introduction - LP
Total production hours available for the next 3 months in different departments are
Cutting & dyeing Sewing : Finishing : : 630 hours 600 hours 708 hours and : 135 hours
Introduction - LP
Problem is to be defined first properly for it to be solved. So the various steps are Describe objective Describe each constraint Define the decision variables
Introduction - LP
Problem is to be defined first properly for it to be solved. So the various steps are
Describe objective Describe each constraint Define the decision variables
Introduction - LP
Problem is to be defined first properly for it to be solved. So the various steps are
Describe objective Describe each constraint Define the decision variables
Introduction - LP
Problem is to be defined first properly for it to be solved. So the various steps are
Describe objective Describe each constraint Define the decision variables
Introduction - LP
Constraint 1:
Introduction - LP
Constraint 1: Total hours for cutting & dyeing are fixed i.e. 7/10 S+1D 630 Constraint 2: total no. of hours for sewing 1/2S + 5/6 D 600 Constraint 3: total no. of hours for finishing 1S + 2/3 D 708 Constraint 4 1/10 S + D 135 Any other constraints???
Introduction - LP
Constraint 1: Total hours for cutting & dyeing are fixed i.e. 7/10 S+1D 630 Constraint 2: total no. of hours for sewing 1/2S + 5/6 D 600 Constraint 3: total no. of hours for finishing 1S + 2/3 D 708 Constraint 4 1/10 S + D 135 Any other constraints??? Non-negativity constraints S, D 0
Introduction - LP
Mathematical statement/model of the Par Inc. problem is Max 10S + 9D subjected to 7/10 S+1D 630 Cutting & dyeing 1/2S + 5/6 D 600 Sewing 1S + 2/3 D 708 Finishing 1/10 S + D 135 Inspection & packing S, D 0
Introduction - LP
Mathematical statement/model of the Par Inc. problem is Max 10S + 9D subjected to 7/10 S+1D 630 1S + 2/3 D 708 S, D 0 Why the above problem is called Linear? Cutting & dyeing Finishing
Introduction - LP
Graphical solution procedure:
Introduction - LP
Graphical solution procedure: Graphical solution is possible only when two decision variables are involved
Introduction - LP
Graphical solution procedure: Graphical solution is possible only when two decision variables are involved Find out the solution points by on both axes keeping one variable 0 in the constraint equation assuming equality.
Introduction - LP
Graphical solution procedure: Graphical solution is possible only when two decision variables are involved Find out the solution points by on both axes keeping one variable 0 in the constraint equation assuming equality. A constraint line can be drawn using these two points
Introduction - LP
Graphical solution procedure:
Graphical solution is possible only when two decision variables are involved Find out the solution points by on both axes keeping one variable 0 in the constraint equation assuming equality. A constraint line can be drawn using these two points As the equation mentions , it is obvious that solution points falling below this line only will satisfy the equation.
Introduction - LP
Graphical solution procedure:
Graphical solution is possible only when two decision variables are involved Find out the solution points by on both axes keeping one variable 0 in the constraint equation assuming equality. A constraint line can be drawn using these two points As the equation mentions , it is obvious that solution points falling below this line only will satisfy the equation. So the all the four constraint lines can be constructed this way and they can drawn on one graph to see the solution area that satisfies all the constraints.
Introduction - LP
Graphical solution procedure:
Graphical solution is possible only when two decision variables are involved Find out the solution points by on both axes keeping one variable 0 in the constraint equation assuming equality. A constraint line can be drawn using these two points As the equation mentions , it is obvious that solution points falling below this line only will satisfy the equation. So the all the four constraint lines can be constructed this way and they can drawn on one graph to see the solution area that satisfies all the constraints. This solution area is called feasible region and all the points/solutions falling within this region are called feasible solutions.
Introduction - LP
Now we found the feasible solution area but what is the answer? The solution point which gives us the maximum profit contribution. On the boundary line, there are infinite number of points and hence trial and error method cannot be used to find out the solution. P = 10S + 9 D solving for D we will get D = 1/9 P -10/9S So from the regression equation like the above one, we can conclude -10/9 is the slope of the line and 1/9P is the D intercept
Introduction - LP
Using various values of P, we can draw the profit lines. As we move away from the origin, we get more profit and all the profit lines shall be parallel to each other as the slope is same Lets take examples of 1800, 3600 and 5400 profits and draw the lines. But we cannot go beyond feasible region as it is not acceptable because all constraints might not be fulfilled. As we draw the draw the parallel lines the optimum solution lies on the intersection of cutting&dyeing and finishing lines. By solving these two equations, we can find values of S and D
Introduction - LP
As observed, the optimal solution is the intersection of Cutting & Dyeing and Finishing constraint lines. So by solving these two constraint line equations 7/10 S+1D 630 and 1S + 2/3 D 708, we get D = 252 and S = 540 units. For this optimal solution the profit contribution can be obtained by substituting the values of S & D in the profit contribution equation 10S + 9D . So the profit contribution is $7668.
Introduction - LP
Slack Variables: Lets determine the production time required for producing the optimum solution quantities in various departments
Introduction - LP
Slack Variables: Often slack variables are added to linear programming problem to represent the slack or idle capacity. So using the slack variables the LP model can rewritten as Max 10S + 9D + 0S1 + 0S2 + 0S3 + 0S4 subjected to 7/10 S+1D + 1S1 = 630 Cutting & dyeing S + 5/6 D + 1S2 = 600 Sewing 1S + 2/3 D + 1S3 = 708Finishing 1/10 S + D + 1S4 = 135 Inspection & packing S, D, S1 , S2 , S3 , S4 0 LP when written as above with all constraints expressed as equalities, it is said to be written in Standard form
Introduction - LP
Extreme points and the optimal solution: Lets change the profit contribution of Standard bag to $5 from $10 without changing the constraints. Then only the profit function will change to 5S + 9D to be maximised and the optimal solution can be found out using the graphs again.
Introduction - LP
Extreme points and the optimal solution: Lets change the profit contribution of Standard bag to $5 from $10 without changing the constraints. Then only the profit function will change to 5S + 9D to be maximised and the optimal solution can be found out using the graphs again. Here we find when we draw the profit contribution lines, the optimal solution occurs at the intersection point of Cutting&Dyeing and Inspection & Packing constraint lines.
Introduction - LP
Extreme points and the optimal solution: Lets change the profit contribution of Standard bag to $5 from $10 without changing the constraints. Then only the profit function will change to 5S + 9D to be maximised and the optimal solution can be found out using the graphs again. Here we find when we draw the profit contribution lines, the optimal solution occurs at the intersection point of Cutting&Dyeing and Inspection & Packing constraint lines. By solving these two constraint equations, we get S=
Introduction - LP
Extreme points and the optimal solution: Lets change the profit contribution of Standard bag to $5 from $10 without changing the constraints. Then only the profit function will change to 5S + 9D to be maximised and the optimal solution can be found out using the graphs again. Here we find when we draw the profit contribution lines, the optimal solution occurs at the intersection point of Cutting&Dyeing and Inspection & Packing constraint lines. By solving these two constraint equations, we get S = 300 and D = 420 As profit contribution of S has reduced the quantity of production to be done also reduced.
Introduction - LP
So if we closely observe the optimal solutions lie on the intersection points or vertices.
Introduction - LP
So if we closely observe the optimal solutions lie on the intersection points or vertices. In LP terminology, the vertices are called extreme points
Introduction - LP
So if we closely observe the optimal solutions lie on the intersection points or vertices. In LP terminology, the vertices are called extreme points So while finding out an optimal solution, we need not evaluate all the feasible solution points.
Introduction - LP
So if we closely observe the optimal solutions lie on the intersection points or vertices. In LP terminology, the vertices are called extreme points So while finding out an optimal solution, we need not evaluate all the feasible solution points. We just have to consider only the feasible solutions that occur at extreme points.
Introduction - LP
So if we closely observe the optimal solutions lie on the intersection points or vertices. In LP terminology, the vertices are called extreme points So while finding out an optimal solution, we need not evaluate all the feasible solution points. We just have to consider only the feasible solutions that occur at extreme points. Here for Par Inc. problem, we have 5 extreme points and by evaluating these 5 points, we shall get the optimal solutions.
s.t.
x1
< 6
x1, x2 > 0
x1 < 6
(6, 0) x1
(0, 6
1/3)
0)
x1
(0, 8) x1 + x2 < 8
(8, 0) x1
x1 + x2 < 8 x1 < 6
x2
Feasible Region x1
x2
(0, 5)
(7, 0) x1
x2
x1
Determine the feasible region that satisfies all the constraints simultaneously..
Move parallel objective function lines toward larger objective function values without entirely leaving the feasible region.
Any feasible solution on the objective function line with the largest value is an optimal solution.
Standard form is attained by adding slack variables to "less than or equal to" constraints, and by subtracting surplus variables from "greater than or equal to" constraints.
Slack and surplus variables represent the difference between the left and right sides of the constraints.
Example 1
Standard Form Max 5x1 + 7x2 + 0s1 + 0s2 + 0s3
s.t.
x1 2x1 + 3x2 x1 + x2
+ s1
= + s2
6 = 19
+ s3 = 8
x1, x2 , s1 , s2 , s3 > 0
x2
4 Feasible Region 1
1 2 3 4 5 6
3 2
7 8 9 10
x1
Computer Solutions
Computer programs designed to solve LP problems are now widely available. Most large LP problems can be solved with just a few minutes of computer time. Small LP problems usually require only a few seconds. Linear programming solvers are now part of many spreadsheet packages, such as Microsoft Excel.
Reduced Cost
The reduced cost for a decision variable whose value is 0 in the optimal solution is the amount the variable's objective function coefficient would have to improve (increase for maximization problems, decrease for minimization problems) before this variable could assume a positive value. The reduced cost for a decision variable with a positive value is 0.
Constraints Final Shadow Constraint Allowable Allowable Cell Name Value Price R.H. Side Increase Decrease $B$13 #1 5 0 6 1E+30 1 $B$14 #2 19 2 19 5 1 $B$15 #3 8 1 8 0.333333333 1.666666667
x1
1 2 3 4 5 6
Graph the Objective Function Set the objective function equal to an arbitrary constant (say 20) and graph it. For 5x1 + 2x2 = 20, when x1 = 0, then x2 = 10; when x2= 0, then x1 = 4. Connect (4,0) and (0,10). Move the Objective Function Line Toward Optimality Move it in the direction which lowers its value (down), since we are minimizing, until it touches the last point of the feasible region, determined by the last two constraints.
x1
1 2 3 4 5 6
Min z = 5x1 + 2x2 4x1 - x2 > 12 x1 + x2 > 4 2x1 + 5x2 > 10 Optimal: x1 = 16/5 x2 = 4/5 x1
Amount Avail. 10 12 4
Feasible Region
The feasible region for a two-variable linear programming problem can be nonexistent, a single point, a line, a polygon, or an unbounded area. Any linear program falls in one of three categories: is infeasible has a unique optimal solution or alternate optimal solutions has an objective function that can be increased without bound A feasible region may be unbounded and yet there may be optimal solutions. This is common in minimization problems and is possible in maximization problems.
Special Cases
Alternative Optimal Solutions In the graphical method, if the objective function line is parallel to a boundary constraint in the direction of optimization, there are alternate optimal solutions, with all points on this line segment being optimal. Infeasibility A linear program which is overconstrained so that no point satisfies all the constraints is said to be infeasible. Unboundedness (See example on upcoming slide.)
2x1 + x2 > 8
3 4
x1
3x1 + 4x2
x1, x2 > 0
2.67
x1
Introduction - LP
Minimisation problem: M&D Chemicals produces 2 products A & B. Based on analysis, M&D management specified the following - Min. production of both A & B should be 350 gallons - One major customers order of 125 gallons of product A must be produced - Product A requires 2 hours of processing time and product B requires 1 hour per gallon - Total available hours in the next month are 600 - Production costs are $2 and $3 per gallon of product A B respectively. Find the minimum cost production schedule
Introduction - LP
Ans.: LP model for M&D problem can be written as follows Minimise 2A+3B subjected to A 125 demand for product A A + B 350 total production 2A + B 600 A, B 0 Draw the constraint lines on the graph using Product A on x axis and product B on y axis. Find out the feasible region. Find the extreme points i.e. vertices Find out the production cost using the formula 2A + 3B for various extreme points and the lowest is the right answer. processing time
Introduction LP
Surplus variable: In case of M&D problem, the solution is A = 250 and B = 100 As we see, we have produced 125 gallons (250-125) excess as opposed to the min. required quantity. This excess production in LP is called Surplus. So in LP any excess quantity corresponding to is referred to as surplus. So for a constraint with , surplus variable is subtracted.
Introduction - LP
So with the surplus variables, the LP for M&D looks like Min 2A + 3B + 0S1 + 0S2 + 0S3 subjected to A - S1 = 125 A + B - S2 = 350 2A + B + S3 = 600 A, B, S1, S2, S3 0
Introduction - LP
Solve the M&D problem using MS Excel