1 / 56

Modeling with Linear Programming and Graphical Solution

Modeling with Linear Programming and Graphical Solution. Steps in formulating Linear Programming (LP) Models. Understand the problem. Identify the decision variables State the objective function as a linear combination of the decision variables.

kelii
Download Presentation

Modeling with Linear Programming and Graphical Solution

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modeling with Linear ProgrammingandGraphical Solution

  2. Steps in formulating Linear Programming (LP) Models • Understand the problem. • Identify the decision variables • State the objective function as a linear combination of the decision variables. • State the constraints as linear combinations of the decision variables. • Identify any upper or lower bounds on the decision variables.

  3. LP Model Formulation: A Maximization Example 1 – Product mix problem - Beaver Creek Pottery Company (1 of 4) Beaver Creek Pottery Company employs skilled artisans to produce clay bowls and mugs. The two resources used by the company are special pottery clay and skilled labor. Given these limited resources, the company desires to know how many bowls and mugs to produce each day in order to maximize profit. This is generally referred to as a product mix problem.

  4. LP Model Formulation A Maximization Example 1 (2 of 4) • Product mix problem - Beaver Creek Pottery Company • How many bowls and mugs should be produced to maximize profits given labor and materials constraints? • Resource Availability: 40 hrs of labor per day (labor constraint) 120 lbs of clay (material constraint)

  5. LP Model Formulation A Maximization Example 1 (3 of 4) Resource 40 hrs of labor per day Availability: 120 lbs of clay Decision x1 = number of bowls to produce per day Variables: x2 = number of mugs to produce per day Objective Maximize Z = $40x1 + $50x2 Function: Where Z = profit per day Resource 1x1 + 2x2 40 hours of labor Constraints: 4x1 + 3x2 120 pounds of clay Non-Negativity x1  0; x2  0 Constraints:

  6. LP Model Formulation A Maximization Example 1 (4 of 4) Complete Linear Programming Model: Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0

  7. Feasible Solutions A feasible solution does not violate any of the constraints: Example: x1 = 5 bowls x2 = 10 mugs Z = $40x1 + $50x2 = $700 Labor constraint check: 1(5) + 2(10) = 25 ≤ 40 hours Clay constraint check: 4(5) + 3(10) = 70 ≤ 120 pounds

  8. Infeasible Solutions An infeasible solution violates at least one of the constraints: Example: x1 = 10 bowls x2 = 20 mugs Z = $40x1 + $50x2 = $1400 Labor constraint check: 1(10) + 2(20) = 50 > 40 hours

  9. Example 2 of LP Problem - Blue Ridge Hot Tubs Blue Ridge Hot Tubs produces two types of hot tubs: Aqua-Spas & Hydro-Luxes. Aqua-Spa Hydro-Lux Pumps 1 1 Labor 9 hours 6 hours Tubing 12 feet 16 feet Unit Profit $350 $300 There are 200 pumps, 1566 hours of labor, and 2880 feet of tubing available.

  10. Formulating LP Model: Blue Ridge Hot Tubs 1. Understand the problem 2. Identify the decision variables X1=number of Aqua-Spas to produce X2=number of Hydro-Luxes to produce 3. State the objective function as a linear combination of the decision variables. MAX: 350X1 + 300X2 4.State the constraints as linear combinations of the decision variables 1X1 + 1X2 <= 200 } pumps 9X1 + 6X2 <= 1566 } labor 12X1 + 16X2 <= 2880 } tubing 5. Identify any upper or lower bounds on the decision variables. X1 >= 0 , X2 >= 0

  11. Summary of the LP Model for Blue Ridge Hot Tubs MAX Z = 350X1 + 300X2 S.T. 1X1 + 1X2 <= 200 9X1 + 6X2 <= 1566 12X1 + 16X2 <= 2880 X1 >= 0 X2 >= 0

  12. Example 3:Wershon Suit Company • Jackets Slacks Available • Profit, $/unit 10 15 • Material, • Square yards2 5 50 • Person Hours 4 2 36 How many jackets and slacks should be produced ?

  13. Example 3:Wershon Suit Company • Type of Objective Function • Maximize Profit • Variable Definition • J = number of jackets produced / week • S = number of slacks produced / week

  14. Example 3:Wershon Suit Company Max Z = $34 J + $40 S Such that 2 J + 5 S  50 (Material) 4 J + 2 S  36 (sewing) J , S 0 (Nonnegativity)

  15. Example 4: Product Mix Problem TJ’s, Inc., makes 2 nut mixes for sale to grocery chains in the states. The 2 mixes, referred to as the Regular Mix and the Deluxe Mix, are made by mixing different percentages of 3 types of nuts. In preparation for the fall season, TJ’s has just purchased 6000 pounds of almonds, 6000 pounds of pecans, and 7500 pounds of walnuts. The Regular Mix consists of 30% almonds, 20% pecans, and 50% walnuts. The Deluxe Mix consists of 35% of almonds, 30% pecans, and 35% walnuts. TJ’s accountant has analyzed the cost of packaging materials, sales price per pound, and other factors and has determined that the profit contribution per pound is $1.65 for the Regular Mix and $2.00 for the Deluxe Mix. TJ’s is committed to using the available nuts to maximize total profit contribution over the fall season.

  16. Example 4: Product Mix Problem Let R = amount of regular mix (pounds) D = amount of deluxe mix (pounds) Max z = 1.65R + 2.00D (Total profit) s.t. 0.3R + 0.35D  6000 (Availability with 0.2R + 0.3D  6000 ingredient 0.5R + 0.35D  7500 specifications) R, D  0 (Nonnegativity)

  17. Example 5: Transportation Problem • A product is to be shipped in the amounts al, a2, ..., amfrom m shipping origins and received in amounts bl, b2, ..., bnat each of n shipping destinations. • The cost of shipping a unit from the ith origin to the jthdestination is known for all combinations of origins and destinations. • The problem is to determine the amount to be shipped from each origin to each destination such that the total cost of transportation is a minimum.

  18. Transportation Problem – Example 5 The Zephyr Television Company ships televisions from three warehouses to three retail stores on a monthly basis. Each warehouse has a fixed supply per month, and each store has a fixed demand per month. The manufacturer wants to know the number of television sets to ship from each warehouse to each store in order to minimize the total cost of transportation.

  19. Demand & Supply Each warehouse has the following supply of televisions available for shipment each month: Warehouse Supply (sets) 1. Cincinnati 300 2. Atlanta 200 3. Pittsburgh 200 700 Each retail store has the following monthly demand for television sets: Store Demand (sets) A. New York 150 B. Dallas 250 C. Detroit 200 600

  20. Cost Matrix Costs of transporting television sets from the warehouses to the retail stores vary as a result of differences in modes of transportation and distances. The shipping cost per television set for each route is as follows: To Store From Warehouse A B C 1 $16 $18 $11 2 14 12 13 3 13 15 17

  21. Model Development The model for this problem consists of nine decision variables, representing the number of television sets transported from each of the three warehouses to each of the three stores: xij = number of television sets shipped from warehouse i to store j where i = 1, 2, 3, and j = A, B, C The objective function of the television manufacturer is to minimize the total transportation costs for all shipments. Thus, the objective function is the sum of the individual shipping costs from each warehouse to each store: minimize Z = $16x1A + 18x1B + 11x1C + 14x2A + 12x2B + 13x2C + 13x3A + 15x3B + 17x3C In a "balanced" transportation model, supply equals demand such that all constraints are equalities; in an "unbalanced" transportation model, supply does not equal demand, and one set of constraints is ≤.

  22. Constraints Supply Constraints x1A + x1B + x1C ≤ 300 x2A + x2B + x2C ≤ 200 x3A + x3B + x3C ≤ 200 Demand Constraints x1A + x2A + x3A = 150 x1B + x2B + x3B = 250 x1C + x2C + x3C = 200

  23. Model Summary minimize Z = $16x1A + 18x1B + 11x1C + 14x2A + 12x2B + 13x2C + 13x3A + 15x3B + 17x3C subject to The transportation model can also be optimally solved by Linear Programming

  24. Time # Officers Required Shift Shift Time 12am-4am 5 1 12am-8am 4am-8am 7 2 4am-noon 8am-noon 15 3 8am-4pm noon-4pm 7 4 noon-8pm 4pm-8pm 12 5 4pm-12am 8pm-12am 9 6 8pm-4am Example 6: Scheduling Problem The personnel manager must schedule a security force in order to satisfy staffing requirements shown below. Each worker has an eight hour shift and there are six such shifts each day. The starting and ending time for each of the 6 shifts is also given below. The personnel manager wants to determine how many people need to work each shift in order to minimize the total number of officers employed while satisfying the staffing requirements.

  25. Example 6: Scheduling Problem Let xi = number of officers who work on shifti, i = 1, ..., 6 Min z = x1 + x2 + x3 + x4 + x5 + x6 (Total number of officers employed) s.t. x6 + x1 5 (12am-4am) x1 + x2 7 (4am-8am) x2 + x3 15 (8am-noon) x3 + x4 7 (noon-4pm) x4 + x5 12 (4pm-8pm) x5 + x6 9 (8pm-12am) xi 0, i = 1, ..., 6 (Nonnegativity)

  26. Example 7: An Investment Example Kathleen Allen, an individual investor, has $70,000 to divide among several investments. The alternative investments are municipal bonds with an 8.5% annual return, certificates of deposit with a 5% return, treasury bills with a 6.5% return, and a growth stock fund with a 13% annual return. The investments are all evaluated after 1 year. Kathleen wants to know how much to invest in each alternative in order to maximize the return. The following guidelines have been established for diversifying the investments and lessening the risk perceived by the investor: 1. No more than 20% of the total investment should be in municipal bonds. 2. The amount invested in certificates of deposit should not exceed the amount invested in the other three alternatives. 3. At least 30% of the investment should be in treasury bills and certificates of deposit. 4. To be safe, more should be invested in CDs and treasury bills than in municipal bonds and the growth stock fund, by a ratio of at least 1.2 to 1. Kathleen wants to invest the entire $70,000.

  27. An Investment Example - Model Decision Variables: 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 The Objective Function: Maximize Z = $0.085x1 + 0.05x2 + 0.065x3 + 0.130x4 Constraints: x1 ≤$14,000 Model Summary x2 ≤x1 + x3 + x4 x2 + x3 ≥$21,000 [(x2 + x3)/(x1 + x4)] ≥1.2 x1 + x2 + x3 + x4 = $70,000

  28. Linear Programming (LP) General Description • Problem: to determine decision variables • Objective: to maximize or minimize an objective function • Restrictions: represented by constraints • Solution methods: graphical, simplex, computer

  29. General Form of a Linear Programming (LP) Problem MAX (or MIN): c1X1 + c2X2 + … + cnXn Subject to a11X1 + a12X2 + … + a1nXn b1 : ak1X1 + ak2X2 + … + aknXn ≥bk : am1X1 + am2X2 + … + amnXn = bm X1 , X2 ……Xn ≥ 0 Note: If all the functions in the model are linear, the problem is a Linear Programming (LP) problem

  30. Graphical Solution of LP Models • Graphical solution is limited to linear programming models containing only two decision variables. • Graphical methods provide visualization of how a solution for a linear programming problem is obtained.

  31. Example 1 – Product mix problem - Beaver Creek Pottery Company Complete Linear Programming Model: Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0

  32. Coordinate Axes Graphical Solution of Maximization Model (1 of 11) X2 is mugs Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 X1 is bowls Figure: Coordinates for graphical analysis

  33. Labor Constraint Graphical Solution of Maximization Model (2 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure: Graph of labor constraint

  34. Labor Constraint Area Graphical Solution of Maximization Model (3 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure: Labor constraint area

  35. Clay Constraint Area Graphical Solution of Maximization Model (4 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure: Theconstraint area for clay

  36. Both Constraints Graphical Solution of Maximization Model (5 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure: Graph of both model constraints

  37. Feasible Solution Area Graphical Solution of Maximization Model (6 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure: The feasible solution area

  38. Objective Function Solution = $800 Graphical Solution of Maximization Model (7 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure: Objective function line for Z = $800

  39. Alternative Objective Function Solution Lines Graphical Solution of Maximization Model (8 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure: Alternative objective function lines for profits Z of $800, $1,200, and $1,600

  40. Optimal Solution Graphical Solution of Maximization Model (9 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure: Identification of optimal solution point

  41. Optimal Solution Coordinates Graphical Solution of Maximization Model (10 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure: Optimal solution coordinates

  42. Extreme (Corner) Point Solutions Graphical Solution of Maximization Model (11 of 11) Maximize Z = $40x1 + $50x2 subject to: 1x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 The optimal solution of a maximization problem is at the extreme point farthest to the origin. Figure: Solutions at all corner points

  43. Slack Variables • Standard form requires that all constraints be in the form of equations (equalities). • A slack variable is added to a  constraint to convert it to an equation (=). • A slack variable typically represents an unused resource. • A slack variable contributes nothing to the objective function value.

  44. Linear Programming Model: Standard Form Max 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 Figure: Solutions at points A, B, and C with slack

  45. LP Model Formulation – Minimization (1 of 6) • 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 ?

  46. LP Model Formulation – Minimization (2 of 6) 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 (non-negativity constraint)

  47. Constraint Graph – Minimization (3 of 6) Minimize Z = $6x1 + $3x2 subject to: 2x1 + 4x2  16 4x2 + 3x2  24 x1, x2  0 Figure: Constraint lines for fertilizer model

  48. Feasible Region– Minimization (4 of 6) Minimize Z = $6x1 + $3x2 subject to: 2x1 + 4x2  16 4x2 + 3x2  24 x1, x2  0 Figure: Feasible solution area

  49. Graphical Solutions – Minimization (5 of 6) Minimize Z = $6x1 + $3x2 + 0s1 + 0s2 subject to: 2x1 + 4x2 – s1= 16 4x2 + 3x2 – s2 = 24 x1, x2, s1, s2 0 The optimal solution of a minimization problem is at the extreme point closest to the origin. Figure: Graph of the fertilizer example

  50. Surplus Variables – Minimization (6 of 6) • 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. • A surplus variable contributes nothing to the calculated value of the objective function. • Subtracting surplus variables in the farmer problem constraints: 2x1 + 4x2 - s1 = 16 (nitrogen) 4x1 + 3x2 - s2 = 24 (phosphate)

More Related