Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Linear Programming

Similar presentations


Presentation on theme: "Introduction to Linear Programming"— Presentation transcript:

1 Introduction to Linear Programming
Chapter 2 Introduction to Linear Programming

2 Learning Objectives Formulate a maximization problem
Use graphical solution procedure Identify feasible solution space Define extreme points and optimal solution Formulate a minimization problem. Set up standard form of an LP problem

3 Introduction Many decisions focus on the best way to achieve the objectives of business subject to the restrictions Restrictions take the form of limited resources One objective of firms is to maximize profit or to minimize cost Linear Programming is to optimize the usage of limited resources Derives its name from the functional relationships that are linear and the solution consists of mathematical steps, that is, a program

4 Construction of LP Model
Formulation of model that represents the problem, and then solve it Three steps in applying LP technique First, problem must be identified Second, problem must be formulated Third, model must be solved

5 Model Formulation Consists of certain components
Components include decision variables, objective function, and constraints Decision variables represent levels of activity Objective function describes objective of firm Consists of either maximizing or minimizing some value Constraints are linear relationships of decision variable Represent restrictions placed on firm

6 Example Chairs and table from two resources—labor and wood
Labor is 40 hrs/day and wood is 120/lb Each chair requires 1 hr of labor and 4 lb wood A table requires 2 hrs of labor and 3 lb of wood Profit: chair $40/unit and table $50/unit Determine number of chairs and tables to produce each day in order to maximize profit Formulate a linear programming model

7 Decision Variables Two decision variables Represented symbolically
x1 = number of chairs to produce x2 = number of tables to produce

8 Objective Function Objective is to maximize total profit
Sum of profits gained from each chair and table Profit derived from chairs is $40x1 Profit derived from tables is $50x2 Total profit, Z, can be expressed as $40x1 +50x2 “maximize” refers to maximize total profit: maximize Z = $40x1 + 50x2

9 Model Constraints Two resources: labor and wood—both are limited
Each chair needs one hr of labor Labor used for chairs is 1x1 hrs Each table requires 2 hrs of labor Labor used for tables 2x2 hrs Total labor is the sum of the labor used:1x1 + 2 x2 Labor is limited to 40 hrs per day Labor constraint: 1x1 +2x2 ≤40 hours “≤“ is employed because 40 hrs of labor is a maximum Means that it is possible to have idle, or excess capacity

10 Model Constraints-Cont.
Wood constraint is formulated in same way Each chair requires 4 lb of wood, 4x1 lb; each table requires 3 lb of wood, 3 x2 Wood constraint: 4x1 + 3 x2 ≤ 120 Ib Final restriction: produce either zero or a positive value Referred to as nonnegativity, x1 ≥0, x2 ≥ 0

11 Complete LP Model Complete LP model Maximize Z = 40X1+50X2
subject to: 1X1+2X2 ≤ 40 hrs 4X1+3X2 ≤ 120 lb X1,X2 ≥ 0 Results in numerical values for x1 and x2

12 Feasible Solution Consider x1 = 5 chairs and x2 = 10 tables
Substitute this solution into each constraint 1(5)+2(10)≤40, or 25<40 and 4(5)+3(10)≤ 20, or 50 <120 Since neither one of the constraints is violated, solution is feasible Substituting in objective function: Z=40(5) + 50(10)=$700 Not know if $700 is the maximum profit

13 Infeasible Solution x1 =10 chairs and x2 = 20 tables
Results Z= $40(10)+50(20)=$1,400 Infeasible: violates labor constraint Maximize Z without violating constraints Optimal solution can be found using graphical solution approach

14 Graphical Solution Provides a picture of how a solution is obtained
Limited to only two decision variables For three decision variables: cumbersome Useful: gives a "picture" of how a solution is derived Also provides how computer and mathematical solution approaches work

15 1st Step in Graphical Solution
Recall the model Formulated as Maximize Z = 40X1+50X2 s.t. 1X1+2X2 ≤ 40 hours 4X1+3X2 ≤ 120 lb X1,X2 ≥ 0 Only positive quadrant is valid First step: plot constraints Treat them as equations Does not reflect entire constraint 3X1+4X2=120 X1+2X2=40

16 Feasible Solution Area
Shading two reflected areas produces an area referred to as feasible solution area Some points will result in maximum profit Next is to locate this point 3X1+4X2=120 X1+2X2=40 Feasible region

17 Optimal Solution Point
Select a level of profit Z=$800=50 x1 +40 x2 Every point will result in a profit of $800 Consider Z=$1,200 Increase Z=$1,600 Outside feasible area 3X1+4X2=120 Z=1200 Z=1600 Z=800 X1+2X2=40 Feasible region

18 Optimal Solution Point-Cont.
Profit increases it moves away from origin Maximum is at point where objective function line is farthest from the origin and is touching a point in feasible area B--optimal solution B

19 Extreme Points Third step: solve for x1 and x2
Points on boundary called extreme points Optimal solution will always occur at an extreme point Possible solution points A, B, and C Optimal solution--point B A B C

20 Finding Optimal Point Point B can be found by solving two equations (x1=24 & x2 =8, Z =$1,360) Optimal solution can also be found by testing each of the three points X1=0 chairs X2=20 tables Z=$ 1000 A X1=24 chairs X2=8 tables Z=$ 1360 B X1=30 chairs X2=0 tables Z=$ 1200 C

21 Graphical Solution Steps
Steps are as follows Plot all model constraints as equations Indicate feasible solution area Determine corner points; then, find the solution values at each point Substitute these values into objective function

22 Minimization Problem Two LP problems, a maximization and a minimization Minimization is formulated in the same way, except for a few minor differences Show how to formulate a minimization problem

23 A Minimization Problem
Razi makes fertilizer from two ingredients Ingredients A and B provide different amounts of potassium and nitrogen A provides 2 ounces of potassium and 4 ounces of nitrogen, whereas ingredient B provides 3 ounces of nitrogen and 4 ounces of potassium A and B cost $6 and $3 per pound How many pounds of each ingredient to put into a bag of fertilizer to meet minimum requirements of 16 ounces of potassium and 24 ounces of nitrogen while minimizing cost Formulate a LP model

24 Decision Variables and Objective Function
Two decision variables representing the number of lbs of each ingredient x1=lb of ingredient 1 x2=lb of ingredient 2 Objective: minimize total purchase cost of ingredients Expressed Min Z = 6 x1 + 3 x2

25 Model Constraints Requirements for nitrogen and potassium represent the constraints Each bag must meet a minimum requirement of nitrogen and potassium Constraint for potassium: 2x1 +4x2 ≥16 Rather than a “≤” , this requires a “≥” Because potassium content is a minimum requirement Amount cannot be less than 16 oz Constraint for nitrogen: 4x1 +3x2 ≥ 24 oz Nonnegativity constraints indicate that negative amount of ingredients cannot be purchased

26 Equality Sign Shown two types of LP signs “≤” and “≥”
Third type is an “=“ Specifies a requirement that must be exact Suppose requirement was exactly 4 x1 + 3 x2 = 24 ounces

27 Complete Model Complete model Min Z = 6 x1 + 3 x2 S.t. 2 x1 + 4 x2 ≥16
x1 and x2 ≥ 0

28 Graphical Solution First, graph the equations
Next, indicate feasible solution area Third step, locate the optimal point Optimal solution is located at one of the extreme points A, B, or C A Feasible area B C

29 Moving Objective Function
Last point that touches feasible area is A Point A is the closest point (x1 =0 and x2 =8) Z=$24 A X1=0 X2=8 Z=24 Feasible area B Z=6X1-3X2 C

30 Limitation of Graphical Solution
Learned how a LP model is formulated and how a solution can be derived Graphing provides valuable insight into LP Limited to only two decision variables Will show how LP problems can be solved using computer software packages

31 Slack Variable Graphical does not provide all the information
Need to transform the model into standard form Necessary for interpretation of LP solutions Recall the maximization example Solution occurred at an extreme point Constraints must all be in the form of equations “=“ Procedure for transforming “≤” constraints into “=“ Achieved by adding a new variable, called a slack variable

32 Addition of Slack Variable
Model constraints x1 + 2x2 ≤ 40 hr of labor 4x1 + 3x2 ≤120 lb of wood Addition of s1 and s2 to the constraint results x1 + 2x2 + s1 = 40 hrs of labor 4 x1 + 3x2 + s2 = 120 Ib of wood s1 and s2 will make the left-hand side=right-hand side Represent amount of unused labor and amount of unused wood Slack variables represent amount of unused resources

33 Slack Variables in Objective Function
Objective function represents the profit gained from the production of chairs and tables What do slack variables s1 and s2 contribute? Contribute nothing to profit because they represent unused resources Write objective function max Z = $40x1 + $50x2 +0s1 + 0s2 Slack variables can have only nonnegative values x1, x2, s1, and s2 ≥ 0

34 Complete Model in Standard Form
Standard form with slack variables Max Z=$40x1+50x2+0s1+0s2 s.t. x1+2x2+s1=40 4x1 +3x2+s2=120 x1, x2, s1, s2 ≥ 0 Shows slack variables at each point X1=0 chairs X2=20 tables Z=$ 1000 S1=0 S2=60 A X1=24 chairs X2=8 tables Z=$ 1360 S1=0 S2=0 X1=30 chairs X2=0 tables Z=$ 1200 S1=10 S2=0 B C

35 Converting ≥ Constraints
“≥” cannot be converted to equations by adding slack variables Subtract a surplus variable Slack variable reflects unused resources Surplus variable reflects the excess above a minimum resource requirement level Surplus variable is represented symbolically by s Nitrogen constraint, 2x1+4x2 - s1=16 Extra amount of nitrogen above the minimum requirement of 16 ounces Contributes nothing to the overall cost of the model Will not affect the purchase cost

36 Standard Form of Minimization Problem
Standard form LP model min Z = $6x1+3x2+0s1+0s2 s.t. 2x1+4x2 –s1=16 4x1+3x2 – s2=24 x1, x2, s1, s2 ≥ 0 Requires variables on left side and numerical values to the right of inequality or equality sign Necessary condition to input problems into computer programs

37 A Simple LP Model A company produces two types of house paints, interior and exterior. Two basic raw materials, A and B, are used to manufacture the paints.The maximum availability of A is 6 tons a day and 8 tons a day for B. The daily requirements of the raw materials per ton of interior and exterior paints are as follows Tons of Row Material per Ton of Paint Exterior Interior Max availability Raw Material A 1 2 6 Raw Material B 8

38 Another Simple LP Model
A company produces two types of house paints, interior and exterior Two basic raw materials, A and B, are used to manufacture the paints The maximum availability of A is 6 tons a day and 8 tons a day for B The daily requirements of the raw materials per ton of interior and exterior paints are as follows Tons of Row Material per Ton of Paint Exterior Interior Max. availability Raw Material A 1 2 6 Raw Material B 8

39 Example-Cont. The sales manager has stated that the daily demand for interior paint cannot exceed exterior paint by more than 1 ton She/he has also stated that the maximum demand for interior paint is limited to 2 tons per day The selling price is $3000/ton for exterior and $2000/ton for interior paint How much interior and exterior paints should the company produce daily to maximize gross income?

40 Decision Variables Determining the amounts (in tons) of interior and exterior paints to be produced x1= tons produced daily of exterior paint x2= tons produced daily of interior paint

41 Objective Function The gross income from selling x1 tons is 3x1 (in $1000) The gross income from selling x2 tons is 2x2 (in $1000) Total gross income = 3x1+2x2, or Z = 3x1+2x2

42 Constraints Constraints impose restrictions on the usage of resources. Three types of restrictions in this example: The usage restriction The demand restriction Nonnegativity restriction

43 The Usage Restriction (Usage of raw material by both paints) 
(maximum raw material availability) For raw material A x1+2x2  6 For raw material B 2x1+x2  8 Exterior x1 Interior x2 Max availability Material A 1 2 6 Material B 8

44 Demand and Nonnegativity Restrictions
Demand restriction 1. Interior paint (x2) cannot exceed exterior paint (x1) by more than 1 ton/day x2- x1  1 2. Maximum demand for interior paint is limited to 2 tons per day; or x2 2 Nonnegativity restriction Amount produced of each paint cannot be negative x1 and x2 0

45 Complete Model Max Z = 3x1+2x2 s.t. x1+2x2  6 (1) 2x1+x2  8 (2)

46 Feasible Solution Feasible Solution
The values of the variables x1 and x2 are said to have a feasible solution if they satisfy all the constraints of the model Example: x1=1, x2=2; … solution x1=0, x2=3; … solution

47 Graphical Solution Plot the feasible space which satisfies all the constraints simultaneously The nonnegativity restrictions (x1 and x2 0) confine all the feasible values to the first quadrant Set all () by (=) for each constraint, yielding a straight-line equation Plot each line on the (x1 , x2) plane The feasible space is indicated by the direction of the arrow on the associated straight line

48 Solution Space--ABCDEF
5 x2>0 2x1+x2<8 -x1+x2<1 2 3 x1+2x2<6 x2<2 4 x1>0 1 6

49 Optimum Solution Point
The optimum solution point can be determined by observing the direction in which the objective function 3x1+2x2 increases Move the revenue line “uphill” to the point where any further increases in revenue would result an infeasible solution X2 optimum point x1=10/3 x2=4/3 z=38/3 E D C F B A X1

50 Determination of Optimum Point
Point C is the intersection of line (1) and (2) x1+2x2=6 2x1+x2=8 x1=10/3, x2=4/3 Value of the objective function Z=3 (3 1/3)+ 2 (1 1/3)=38/3 ($1000)

51 Corner (Extreme) Points
Point A,B,C,D,E, and F are called corner points (corner-point feasible) The optimal solution always occurs at one of the feasible corner (or extreme) points of the solution space E D C F B A

52 Standard Form of the LP Model
Z= value overall measure of performance xj=level of activity j(for j=1,..n) cj =increase in Z that would result from each unit increase in level of activity j bi= amount of resources i that is available for allocation to activities (for i=1,2, .. m) Max Z= c1x1+c2x2+ … cnxn a11x1+a12x2+...+a1n xn  b1 a21x1+a22x2+...+a2n xn  b2 . am1x1+am2x2+...+amn xn  bm x1,x2,x3 ,… , xn0

53 Class Problem A meat packing company produces a hot dog mixture in 1000-pound batches containing chicken and beef. The cost per pound of each of these ingredients is as follows: Ingredient Cost/lb Chicken $ Beef $5 Each batch has the following recipe requirements: A: At least 500 pounds of chicken B: At least 200 pounds of beef the ratio of chicken to beef must be at least 2 to 1. The company wants to the optimal mixture of ingredients that minimize cost. Formulate the problem.

54 Complete Model Identify the decision variables
Formulate the obj fcn as Min z=… +… Establish model constraints as

55 Summary Provided you with a good start in LP modeling
Learned how to formulate two simple LP models, a maximization and a minimization problem Showed how to use the graphical approach to find optimal solution point and how to put a linear programming model in the standard format

56 HW Assignments Problem set 2.1A: prob. 2. Problem Set 2.2A: Prob. 5, 11 and 12 Problem set 2.2B: prob. 4. Problem set 3.1A: prob. 1 and prob. 2. Problem set 3.6A: Problem 2. Problem set 3.6B: Problem 3. Problem set 2.3D: Problem 3. These problems can be solved using either by Solver or TORA.


Download ppt "Introduction to Linear Programming"

Similar presentations


Ads by Google