Transcript Chapter 2
Chapter 2 Linear Programming: Fundamentals Linear Programming (LP) • Linear programming is a optimization model with an objective and a set of constraints. • LP is a model for restricted decision making. An Application Example Resource Requirements Labor Clay Products (hr/unit) (lb/unit) Bowl 1 4 Mug 2 3 Resource 40 hours 120 lb Available Profit ($/unit) 40 50 Find how many bowls and mugs should be produced to maximize the profit. LP Components • Decision variables - their values are to be found in the solution. • One linear objective function. • Linear constraints - reflect limitations. A Linear Program Max S.T. 7X1 + 4X2 3X1 + X2 <= 580 2X1 + 5X2 <= 720 X1 >= 20 X2 <= 100 X1, X2 >= 0 Format of a Linear Program • No variable is in denominator. • At most one term for each variable. • Variable terms are at left, constant terms are at right (called right-handside, RHS). • Align columns of inequality signs, variable terms, and constants. • Put non-negative constraints in at last. Solution • A solution is a set of values each for a variable. • A feasible solution satisfies all constraints. • An infeasible solution violates at least one constraint. • The optimal solution is a feasible solution that meets the objective. LP Solution Methods • Trial-and-Error (brute force) • Graphic Method (Won’t work if more than 2 variables) • Simplex Method (Elegant, but time-taking if by hand) • Computerized simplex method (We’ll use it programmed in QM) Process of Solving a Problem By Using LP Step 1. Formulate the problem into a linear program (by us) Step 2. Solving the linear program (by computer) Step 3. Understanding the result and sensitivity analysis (by us / computer) LP Formulation • Before using QM to solve a problem, we must first formulate the problem into a linear program, which is a description of the problem in terms of LP. • Therefore, the process of formulating a problem in LP is a process of describing the problem by using an objective function and a couple of constraints. LP Example 1, p.32-33 Resource Requirements Labor Clay Products (hr/unit) (lb/unit) Bowl 1 4 Mug 2 3 Resource 40 hours 120 lb Available Profit ($/unit) 40 50 Find how many bowls and mugs should be produced to maximize the profit. Steps for LP Formulating • Define variables unambiguously. • Describe the objective function by using the variables. • Describing restrictions one at a time by using the variables, which form constraints. LP Example 2 p.47-49 Brand Super-gro Crop-quick Minimum requirements Chemical Contribution Nitrogen Phosphate (lb/bag) (lb/bag) 2 4 4 3 16 Cost ($/bag) 6 3 24 How many bags of each brand should be purchased in order to minimize the total cost? Irregular LP Problems • A regular LP has one optimal solution. • Irregular cases: – Multiple optimal solutions – Infeasible problem – Unbounded problem Chapter 3 Linear Programming: Sensitivity Analysis Sensitivity Analysis (SA) • SA is the analysis of the effect of parameter changes on the optimal solution. • SA is conducted after the optimal solution is obtained. Shadow Price (Dual Value) • A shadow price is associated with a constraint in the solution. In a product-mix problem • as in example of ‘bowls and mugs’, a shadow price means: – the marginal value of a resource, i.e., – the contribution of an additional unit of a resource to the objective function value, i.e., – The highest “price” the company would be willing to pay for one additional unit of a resource. What Is “Dual”? • Each linear program has another LP associated with it. They are called a pair of primal and dual. • The dual LP is the “transposition” of the primal LP. • Primal and dual have equal optimal objective function values. • The solution of the dual is the shadow prices of the primal, and vice versa. More General on Shadow Price: • The shadow price of a constraint shows how much the objective function value would be better off if there were one unit increase on the RHS of the constraint. • A shadow price can be negative, which shows a negative contribution (i.e., worse off) to the objective function value by an additional unit of RHS of the constraint. S.A. on RHS • Sensitivity range for a RHS value is the range over which the RHS value can change without changing the current shadow price. • Sensitivity range for a RHS value is also the range over which the RHS value can change without changing the non-zero variable mix in the solution. S.A. on Objective Coefficients • Sensitivity range for an objective coefficient is the range over which the objective coefficient can change without changing the current optimal solution. S.A. on other changes • To see sensitivities on following changes, one must solve the changed LP again: – Changing constraint coefficients – Adding a new constraint – Adding a new variable Why doing S.A.? • LP is used for decision making on something in the future. • Rarely does a manager know all of the parameters exactly. Many parameters are inaccurate “estimates” when a model is formed and solved. • We want to see to what extent the optimal solution is stable to the inaccurate parameters. Sensitive or In-sensitive? • Do we want a model more sensitive or less sensitive to the inaccuracies (changes) of parameters in it ? • Answer: Less sensitive. • Why? – An optimal solution that is insensitive to inaccuracies of parameters is more likely valid in the real world situation. Chapter 4 Linear Programming: Modeling Examples LP Modeling • To model a decision making problem with LP: – Understand the problem thoroughly; – Identify the variables and objective; – Describe the problem in terms of the variables, objective function, and constraints. Examples Covered: • • • • • Product mix Investment Marketing Blend (?) Transportation (?) A product Mix Example. p.112 Work hour Space taken Cost($)/dozen Profit($)/dozen no more than Sweatshirts T-shirts Printing on Printing on Printing on Printing on front side both sides front side both sides 0.1/dozen 0.25/dozen 0.08/dozen 0.21/dozen 3 std. 3 std. 1 std. 1std. boxes/dozen boxes/dozen box/dozen box/dozen 36 48 25 35 90 125 45 65 500 dozen 500 dozen Capacity available 72 hours 1200 std. boxes $25,000 How many of each of four products should be produced so that the total profit is maximized ? An Investment Example. p.120-122 Annual Return municipal bonds 8.50% Investment Alternatives treasury growth stock CDs bills fund 5.00% 6.50% 13.00% * Municipal bonds <= 20%. * CDs <= sum of other three. * (Treasury bills + CDs) >= 30%. * (Treasury bills + CDs) / (municipal bonds + stock fund) >= 1.2/1. * Total amount of investment is up to $70,000. How much should be put in each of the four investment alternatives so that the total return is maximized ? A Marketing Example. p.126-127 Types of Advertising television radio newspaper commercials commercials ads Exposures (people / ad) Cost $ limits on number of ads limits on total number of ads Total budget limit 20,000 12,000 9,000 15,000 6,000 4,000 <=4 <=10 <=7 <=15 $100,000 How many ads of each type should be used so that the total exposure is maximized ? A Blend Example, p.133-135 How mnay barrels of each grade of motor oil (made of three componets) should be produced to maximize total profit? Component 1 Component 2 Component 3 Selling Price Minimum Super Grade >=50% <=30% ---- $23 3,000 barrels Premium Grade >=40% ---- <=25% $20 3,000 barrels Extra Grade >=60% >=10% ---- $18 3,000 barrels Barrels Available 4,500 2,700 3,500 Cost $/barrel $12 $10 $14