620 likes | 943 Views
Part I: Linear Programming Model Formulation and Graphical Solution. Model Formulation A Maximization Model Example Graphical Solutions of Linear Programming Models A Minimization Model Example Irregular Types of Linear Programming Models Characteristics of Linear Programming Problems.
E N D
Part I: Linear Programming Model Formulation and Graphical Solution • Model Formulation • A Maximization Model Example • Graphical Solutions of Linear Programming Models • A Minimization Model Example • Irregular Types of Linear Programming Models • Characteristics of Linear Programming Problems QP5013 – LINEAR PRORAMMING
Linear Programming - An Overview • Objectives of business firms frequently include maximizing profit or minimizing costs. • Linear programming is an analysis technique in which linear algebraic relationships represent a firm’s decisions given a business objective and resource constraints. • Steps in application: 1- Identify problem as solvable by linear programming. 2- Formulate a mathematical model of the unstructured problem. 3- Solve the model. QP5013 – LINEAR PRORAMMING
Model Components and Formulation • Decision variables: mathematical symbols representing levels of activity of a firm. • Objective function: a linear mathematical relationship describing an objective of the firm, in terms of decision variables, that is maximized or minimized • Constraints: restrictions placed on the firm by the operating environment stated in linear relationships of the decision variables. • Parameters: numerical coefficients and constants used in the objective function and constraint equations. QP5013 – LINEAR PRORAMMING
A Maximization Model Example (1 of 2)Problem Definition • Product mix problem - Beaver Creek Pottery Company • How many bowls and mugs should be produced to maximize profits given labor and materials constraints? • Product resource requirements and unit profit: QP5013 – LINEAR PRORAMMING
A Maximization Model Example (2 of 2) Resource availability: 40 hours of labor per day 120 pounds of clay Decision Variables: x1=number of bowls to produce/day x2= number of mugs to produce/day Objective function maximize Z = $40x1 + 50x2 where Z= profit per day Resource Constraints: 1x1 + 2x2 40 hours of labor 4x1 + 3x2 120 pounds of clay Non-negativity Constraints: x10; x2 0 Complete Linear Programming Model: maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 4x2 + 3x2 120 x1, x2 0 QP5013 – LINEAR PRORAMMING
Feasible/Infeasible Solutions • A feasible solution does not violate any of the constraints: Example x1= 5 bowls x2= 10 mugs Z = $40 x1 + 50x2= $700 Labor constraint check: 1(5) + 2(10) = 25 < 40 hours, within constraint Clay constraint check: 4(5) + 3(10) = 70 < 120 pounds, within constraint • An infeasible solution violates at least one of the constraints: Example x1 = 10 bowls x2 = 20 mugs Z = $1400 Labor constraint check: 1(10) + 2(20) = 50 > 40 hours, violates constraint QP5013 – LINEAR PRORAMMING
Graphical Solution of Linear Programming Models • Graphical solution is limited to linear programming models containing only two decision variables. (Can be used with three variables but only with great difficulty.) • Graphical methods provide visualization of how a solution for a linear programming problem is obtained. QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Coordinate Axes maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 Coordinates for graphical analysis QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Labor Constraint maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 Graph of the labor constraint line QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Labor Constraint Area maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 The labor constraint area QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Clay Constraint Area maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 The constraint area for clay QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Both Constraints maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 Graph of both model Constraints QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Feasible Solution Area maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 The feasible solution area constraints QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Objective Function = $800 Z= $800 = $40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 Objective function line for Z 5 $800 QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Alternative Objective Functions Z=$800, $1200, $1600 = $40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 Alternative objective function lines for profits, Z, of $800, $1,200, and $1,600 QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Optimal Solution Z= $800 =$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 Identification of optimal solution point QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Optimal Solution Coordinates maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 Optimal solution coordinates QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Corner Point Solutions maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 Solutions at all corner points QP5013 – LINEAR PRORAMMING
Graphical Solution of a Maximization Model Optimal Solution for New Objective Function maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 The optimal solution with Z 5 70x1 1 20x2 QP5013 – LINEAR PRORAMMING
Slack Variables • Standard form requires that all constraints be in the form of equations. • A slack variable is added to a constraint to convert it to an equation (=). • A slack variable represents unused resources. • A slack variable contributes nothing to the objective function value. QP5013 – LINEAR PRORAMMING
Complete Linear Programming Model in Standard Form maximize Z=$40x1 + 50x2 + 0s1 + 0s2 subject to 1x1 + 2x2 + s1 = 40 4x2 + 3x2 + s2 = 120 x1,x2,s1,s2 = 0 where x1 = number of bowls x2 = number of mugs s1, s2 are slack variables Solutions at points A, B, and C with slack QP5013 – LINEAR PRORAMMING
A Minimization Model ExampleProblem Definition • Two brands of fertilizer available - Super-gro, Crop-quick. • Field requires at least 16 pounds of nitrogen and 24 pounds of phosphate. • Super-gro costs $6 per bag, Crop-quick $3 per bag. • Problem : How much of each brand to purchase to minimize total cost of fertilizer given following data ? QP5013 – LINEAR PRORAMMING
A Minimization Model Example Model Construction Decision variables x1 = bags of Super-gro x2 = bags of Crop-quick The objective function: minimize Z = $6x1 + 3x2 where $6x1 = cost of bags of Super-gro 3x2 = cost of bags of Crop-quick Model constraints: 2x1 + 4x2 16 lb (nitrogen constraint) 4x1 + 3x2 24 lb (phosphate constraint) x1, x2 0 (nonnegativity constraint) QP5013 – LINEAR PRORAMMING
A Minimization Model ExampleComplete Model Formulation and Constraint Graph Complete model formulation: minimize Z = $6x1 + 3x2 subject to 2x1 + 4x2 16 lb of nitrogen 4x1 + 3x2 24 lb of phosphate x1, x2 0 QP5013 – LINEAR PRORAMMING
A Minimization Model ExampleFeasible Solution Area minimize Z = $6x1 + 3x2 subject to 2x1 + 4x2 16 lb of nitrogen 4x1 + 3x2 24 lb of phosphate x1, x2 0 Feasible solution area QP5013 – LINEAR PRORAMMING
A Minimization Model Example Optimal Solution Point minimize Z = $6x1 + 3x2 subject to 2x1 + 4x2 16 lb of nitrogen 4x1 + 3x2 24 lb of phosphate x1, x2 0 The optimal solution point QP5013 – LINEAR PRORAMMING
A Minimization Model Example Surplus Variables • A surplus variable is subtracted from a constraint to convert it to an equation (=). • A surplus variable represents an excess above a constraint requirement level. • Surplus variables contribute nothing to the calculated value of the objective function. • Subtracting slack variables in the farmer problem constraints: 2x1 + 4x2 - s1 = 16 (nitrogen) 4x1 + 3x2 - s2 = 24 (phosphate) QP5013 – LINEAR PRORAMMING
A Minimization Model Example Graphical Solutions minimize Z = $6x1 + 3x2 + 0s1 + 0s2 subject to 2x1 + 4x2 - s1 = 16 4x1 + 3x2 - s2 = 24 x1, x2, s1, s2 = 0 Graph of the fertilizer example QP5013 – LINEAR PRORAMMING
Irregular Types of Linear Programming Problems • For some linear programming models, the general rules do not apply. • Special types of problems include those with: 1. Multiple optimal solutions 2. Infeasible solutions 3. Unbounded solutions QP5013 – LINEAR PRORAMMING
Multiple Optimal Solutions Objective function is parallel to a constraint line: maximize Z=$40x1 + 30x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 where x1 = number of bowls x2 = number of mugs Graph of the Beaver Creek Pottery Company example with multiple optimal solutions QP5013 – LINEAR PRORAMMING
An Infeasible Problem Every possible solution violates at least one constraint: maximize Z = 5x1 + 3x2 subject to 4x1 + 2x2 8 x1 4 x2 6 x1, x2 0 Graph of an infeasible problem QP5013 – LINEAR PRORAMMING
An Unbounded Problem Value of objective function increases indefinitely: maximize Z = 4x1 + 2x2 subject to x1 4 x2 2 x1, x2 0 An unbounded problem QP5013 – LINEAR PRORAMMING
Characteristics of Linear Programming Problems • A linear programming problem requires a decision - a choice amongst alternative courses of action. • The decision is represented in the model by decision variables. • The problem encompasses a goal, expressed as an objective function, that the decision maker wants to achieve. • Constraints exist that limit the extent of achievement of the objective. • The objective and constraints must be definable by linear mathematical functional relationships. QP5013 – LINEAR PRORAMMING
Properties of Linear Programming Models • Proportionality - The rate of change (slope) of the objective function and constraint equations is constant. • Additivity - Terms in the objective function and constraint equations must be additive. • Divisability -Decision variables can take on any fractional value and are therefore continuous as opposed to integer in nature. • Certainty - Values of all the model parameters are assumed to be known with certainty (non-probabilistic). QP5013 – LINEAR PRORAMMING
Example Problem No. 1 Problem Statement - Hot dog mixture in 1000-pound batches. - Two ingredients, chicken ($3/lb) and beef ($5/lb), - Recipe requirements: at least 500 pounds of chicken at least 200 pounds of beef. - Ratio of chicken to beef must be at least 2 to 1. - Determine optimal mixture of ingredients that will minimize costs. QP5013 – LINEAR PRORAMMING
Example Problem No. 1 Solution Step 1: Identify decision variables. x1 = lb of chicken x2 = lb of beef Step 2: Formulate the objective function. minimize Z = $3x1 + 5x2 where Z = cost per 1,000-lb batch $3x1 = cost of chicken 5x2 = cost of beef QP5013 – LINEAR PRORAMMING
Example Problem No.1 Solution (continued) Step 3: Establish Model Constraints x1 + x2 = 1,000 lb x1 500 lb of chicken x2 200 lb of beef x1/x2 2/1 or x1 - 2x2 0 x1,x2 0 The model: minimize Z = $3x1 + 5x2 subject to x1 + x2 = 1,000 lb x1 50 x2 200 x1 - 2x2 0 x1,x2 0 QP5013 – LINEAR PRORAMMING
Example Problem No.2 Solve the following model graphically: maximize Z = 4x1 + 5x2 subject to x1 + 2x2 10 6x1 + 6x2 36 x1 4 x1,x2 0 Step 1: Plot the constraint s as equations: The constraint equations QP5013 – LINEAR PRORAMMING
Example Problem No.2 maximize Z = 4x1 + 5x2 subject to x1 + 2x2 1 6x1 + 6x2 36 x1 4 x1,x2 0 Step 2: Determine the feasible solution area: The feasible solution space and extreme points QP5013 – LINEAR PRORAMMING
Example Problem No.2 maximize Z = 4x1 + 5x2 subject to x1 + 2x2 10 6x1 + 6x2 36 x1 4 x1,x2 0 Steps 3 and 4: Determine the solution points and optimal solution. Optimal solution point QP5013 – LINEAR PRORAMMING
Part II: Linear Programming Modeling Examples • A Product Mix Example • A Diet Example • An Investment Example • A Marketing Example • A Transportation Example • A Blend Example • A Multiperiod Scheduling Example • A Data Envelopment Analysis Example QP5013 – LINEAR PRORAMMING
Product Mix ExampleProblem Definition - Four-product T-shirt/sweatshirt manufacturing company. - Must complete production within 72 hours - Truck capacity = 1,200 standard sized boxes. - Standard size box holds12 T-shirts. - One-dozen sweatshirts box is three times size of standard box. - $25,000 available for a production run. - 500 dozen blank T-shirts and sweatshirts in stock. - How many dozens (boxes) of each type of shirt to produce? QP5013 – LINEAR PRORAMMING
Product Mix ExampleData QP5013 – LINEAR PRORAMMING
Product Mix ExampleModel Construction Decision variables: x1 = sweatshirts, front printing x2 = sweatshirts, back and front printing x3 = T-shirts, front printing x4 = T-shirts, back and front printing Objective function: maximize Z = $90x1 + 125x2 + 45x3 + 65x4 Model constraints: 0.10x1 + 0.25x2+ 0.08x3 + 0.21x4 72 hr 3x1 + 3x2 + x3 + x4 1,200 boxes $36x1 + 48x2 + 25x3 + 35x4 $25,000 x1 + x2 500 dozen sweatshirts x3 + x4 500 dozen T-shirts QP5013 – LINEAR PRORAMMING
Product Mix ExampleComputer Solution with QM for Windows maximize Z = $90x1 + 125x2 + 45x3 + 65x4 subject to: 0.10x1 + 0.25x2+ 0.08x3 + 0.21x4 72 3x1 + 3x2 + x3 + x4 1,200 boxes $36x1 + 48x2 + 25x3 + 35x4 $25,000 x1 + x2 500 dozed sweatshirts x3 + x4 500 dozen T-shirts x1, x2, x3, x4 0 QP5013 – LINEAR PRORAMMING
Product Mix Example Computer Solution with QM for Windows (continued) maximize Z = $90x1 + 125x2 + 45x3 + 65x4 subject to: 0.10x1 + 0.25x2+ 0.08x3 + 0.21x4 72 3x1 + 3x2 + x3 + x4 1,200 boxes $36x1 + 48x2 + 25x3 + 35x4 $25,000 x1 + x2 500 dozed sweatshirts x3 + x4 500 dozen T-shirts x1, x2, x3, x4 0 QP5013 – LINEAR PRORAMMING
Diet ExampleData and Problem Definition Breakfast to include at least 420 calaries, 5 milligrams of iron, 400 milligrams of calcium, 20 grams of protein, 12 grams of fiber, and must have no more than 20 grams of fat and 30 milligrams of cholesterol. QP5013 – LINEAR PRORAMMING
Diet ExampleModel Construction: Decision Variables x1 = cups of bran cereal x2 = cups of dry cereal x3 = cups of oatmeal x4 = cups of oat bran x5 = eggs x6 = slices of bacon x7 = oranges x8 = cups of milk x9 = cups of orange juice x10 = slices of wheat toast QP5013 – LINEAR PRORAMMING
Diet ExampleModel Summary minimize Z =0.18x1 + 0.22x2 + 0.10x3 + 0.12x4 + 0.10x5 + 0.09x6+ 0.40x7 + 0.16x8 + 0.50x9 0.07x10 subject to 90x1 + 110x2 + 100x3 + 90x4 + 75x5 + 35x6 + 65x7 + 100x8 + 120x9 + 65x10 420 2x2 + 2x3 + 2x4 + 5x5 + 3x6 + 4x8 + x10 20 270x5 + 8x6 + 12x8 30 6x1 + 4x2 + 2x3 + 3x4+ x5 + x7 + x10 5 20x1 + 48x2 + 12x3 + 8x4+ 30x5 + 52x7 + 250x8 + 3x9 + 26x10 400 3x1 + 4x2 + 5x3 + 6x4 + 7x5 + 2x6 + x7+ 9x8+ x9 + 3x10 20 5x1 + 2x2 + 3x3 + 4x4+ x7 + 3x10 12 xi 0 QP5013 – LINEAR PRORAMMING
An Investment ExampleModel Summary maximize Z = $0.085x1 + 0.05x2 + 0.065 x3+ 0.130x4 subject to x1 14,000 x2 - x1 - x3- x4 0 x2 + x3 21,000 -1.2x1 + x2 + x3 - 1.2 x4 0 x1 + x2 + x3 + x4 = 70,000 x1, x2, x3, x4 0 where x1 = amount invested in municipal bonds ($) x2 = amount invested in certificates of deposit ($) x3 = amount invested in treasury bills ($) x4 = amount invested in growth stock fund($) QP5013 – LINEAR PRORAMMING