Math 5531

Lecture 10 - LP (Revisited)

In this talk, we will learn how to solve an LP problem using Excel Spreadsheet through an example.

Gaspar’s Diet Problem:
Gaspar’s diet requires that all the food he eat come from one of the four "basic food groups": chocolate cake, ice cream, coca cola, and cheesecake). The daily nutrition requirement for Gaspar is: 1800 calories, 20 oz of chocolate, 30 oz of sugar, and 25 oz of fat. The nutritional content per unit of each food is shown in Table 1. Calories Chocolate (oz) Sugar (oz) Fat (oz) 1 piece of chocolate cake 1 scoop of ice cream 1 can of coca cola 1 piece of cheesecake 400 200 150 500 Table 1 The market prices of these food are: Price 1 piece of chocolate cake $2.50 1 scoop of ice cream 1 can of coca cola 1 piece of cheesecake $0.70 $0.85 $3.00 3 2 0 0 2 2 4 4 2 4 1 5

Formulate (and solve) a LP problem to give Gaspar a daily shopping list under his tight student’s budget.

LP Formulation
We can set up the following LP problem by letting x 1  number of pieces of chocolate cake x 2  number of scoops of ice cream x 3  number of cans of coca cola x 4  number of pieces of cheesecake

1

13 2375. 2.50 Required 1800 20 30 25 2 . 7x 2  0.00 20. 4.00 36.00 2 400 3 2 2 Ice Cream 4. Gaspar's Diet Problem Chocolate Cake Cost Calories Chocolate Sugar Fat 2 400 3 2 2 Ice Cream 0.00 32.00 0. which are the decision variables.7 200 2 2 4 Coca Cola 2. ($18. (calories to keep him alive) : 3x 1  2x 2 ≥ 20. x 2 .00 2 400 3 2 2 Ice Cream 10..50 is the corresponding cost) Gaspar's Diet Problem Cost Calories Chocolate Sugar Fat Chocolate Cake 4. : 400x 1  200x 2  150x 3  500x 4 ≥ 1800.00 0. Enter the formulas for the "total" columns after fill the decision variables with feasible values.min z  2. (oz of sugar to keep him smart) : 2x 1  4x 2  x 3  5x 4 ≥ 25. x 3 . x 4 ≥ 0. Gaspar's Diet Problem Cost Calories Chocolate Sugar Fat Chocolate Cake 0.  Set the target cell: total cost.00 42. 85x 3  3x 4 s.00 30.85 150 0 4 1 Cheesecake 3 500 0 4 5 Total Required 1800 20 30 25 Step 2.00 3 500 0 4 5 Total 18. (oz of chocolate to keep him happy) : 2x 1  2x 2  4x 3  4x 4 ≥ 30.00 0.85 150 0 4 1 Cheesecake 0. 5x 1  0. 2. Input all the parameters of the problem. t.85 150 0 4 1 Cheesecake 2.  Define "constraints".7 200 2 2 4 Coca Cola 2.7 200 2 2 4 Coca Cola 0.00 3 500 0 4 5 Total 9..  Now you are ready to hit "Solve". Open the "Solver Parameter" box under "tools" menu.  Define "changing cells". (oz of fat to keep him strong) : x 1 .00 Required 1800 20 30 25 Step 3. say 4.50 3700. Choose "min". don’t forget the "nonnegative constraints for the decision variables. Setup the LP spreadsheet Step 1.00 20.50 0.

party mix 11/26/2007 W. Too much calorie and fat!!! Explore the alternatives:  First we note that Gaspar is in the risk of gaining weight. and Maintenance Raw material shipping cost to each location.5 cans of coca cola per day. nothing else. AZ • Fresno.30 2000. NM • Flagstaff. Huang We have collected the following data: Property cost: Purchasing. UT 11/26/2007 W.85 150 150 0 4 1 Cheesecake 0..00 32.00 2 400 400 3 2 2 Ice Cream 7.00 0. CA • Tucson.00 0. BC is considering expanding market to the following candidate sites: • Yuma.00 Required 1800 2000 20 30 25 Wait a minute. George. We need to restrict his daily intake of calories with 2000. And hit the "solve".7 200 200 2 2 4 Coca Cola 4.The best diet plan for Gaspar is to have 10 scoops of ice cream and 2. Huang 1 The ingredient amount of each product is given.00 30. we have Gaspar's Diet Problem Cost Calories Calories Chocolate Sugar Fat Chocolate Cake 0. NV • St.13 a day. AZ • Las Vegas. We need to add another constraint.00 2000. AZ • Pomona.00 3 500 500 0 4 5 Total 8. this solution is not feasible! We need to start with a feasible solution. 2 3 .. regular chips 2.00 14. This will cost him $9. Building. green onion chips 3. CA • Santa Fe. Case Study: BestChip BestChip (BC) use • Corn • Wheat • Potato to produces 1.

Huang 6 11/26/2007 W. NM Flagstaff. Salt Lake City 2. Los Angeles Harm’s Path. YZCO. Albuquerque 3. we ignore many other detailed information. NY St. which is $0.15 per ton-mile. Harm’s Path. AJ Stores. including: • property and income tax difference between states. Salt Lake City YZCO. AZ Las Vegas. Sun Quest. All demand must be met. and states: i 1 2 3 4 5 6 7 8 Plant in Yuma. when opened. the company does not want to locate plants in more than two states.000 tons of product (mixed) per year. products. Jones. George. 11/26/2007 W. Tucson l 1 2 3 ingredients Corn Wheat Potato k 1 2 3 Product Regular chips Green onion chips Party mix States AZ CA NM NV UT We define the following decision variables: 4 . San Diego Sun Quest. Tucson Also we know: Demand of each customer for each product. Huang 5 BC manager wants to know: • which of the candidate sites should be open for production? • which customers should each opened site serve? Objective if to minimize the total cost. can produce 20. Phenix AJ Stores. CA Santa Fe. Phoenix 4. customers. Huang Other constraints:  each plant. AZ Pomona. ingredients.BC has six major customers: 1. • the method of financing the site purchasing. Shipping cost depends on the distance and tonnage. 4 11/26/2007 W. Los Angeles 6. Huang Additional constraint: For consolidation reason. Albuquerque Square Q. UT s 1 2 3 4 5 j 1 2 3 4 5 6 Customer & Location Jones. AZ Fresno. San Diego 5. 3 11/26/2007 W. For simplicity reason. LP (or ILP) formulation: Number the plants. CA Tueson. Square Q.

69 $68.39 $51.20 $4. y i  1.45 $48. Distances Yuma Fresno Tucson Pomona Santa Fe Flagstaff Las Vegas St.19 $0.51 $74.35 j=2 $96.46 $61.74 $52. 5 .92 $21.03 $90.41 $127.63 $38.19 j=5 $42.33 $33.63 $43.03 $83.62 $82.13 j=6 $36.66 $116.65 j=3 $27.20 $69.19 $50.  s  1.43  d kj  demand in tons of product k from customer j.96 $60.92 $86. 000  c ij  cost to ship 1 ton of final products from plant i to customer j.12 $93.15 $131.x ijk  tons of product k sent from plant i to customer j. We also define the following intermediate variables:  f i  fixed cost associated with opening plant i.95 $77. 0 otherwise.51 $113.00 $69.96 $45.83 $122. 000 7 155.14 $65.15 times the mile distance) Cij i=1 i=2 i=3 i=4 i=5 i=6 i=7 i=8 j=1 $106.49 $74. 2 646 917 497 760 63 326 574 604 Phoenix S.09 j=4 $25. 000 5 150. 000 2 130.89 $88. 000 3 140.85 $17.84 $99. 000 6 170.86 $17. 000 8 115. George SL City 1 712 818 779 661 626 519 420 302 Albuq.69 $78.26 $73. 0 otherwise. if plant i is open for production.97 $9.24 $106. Diego 3 4 186 172 592 350 116 412 345 114 526 877 144 495 288 338 434 455 LA 5 282 222 488 29 848 466 271 388 Tucson 6 242 708 460 558 260 404 550 1 2 3 4 5 6 7 8 Unit shipping cost from Plants i to Customers j ($0.89 $137.82 $62. i fi 1 125. if states s is used. 000 4 160.62 $58.93 $40.

t : ∑ x ijk ≥ d kj . : y 2  y 4 ≤ 10 1 . : ∑  s ≤ 2. (Demands need to be met) (Plant capacity constraints) (State AZ is counted) (State CA is counted) (State NM is counted) (State NV is counted) (State UT is counted) (No more than 2 states are used) : ∑ ∑ x ijk ≤ 20000y i . . 8. . 6. . r lk k1 k2 k3 l1 l2 l3 70 30 20 20 15 50 10 55 30 We now have the following mixed ILP model min z  Location purchasing cost  Shipping for Products  Shipping for Raw Materials  8 8 6 3 8 3 3 6 ∑ f i y i  ∑ ∑ c ij ∑ x ijk  ∑ ∑ m il ∑ ∑ r lk x ijk . . . 2. i1 6 3 j1 k1 j  1. 3 i  1. k  1.d kj k2 j1 j2 j3 j4 j5 j6 900 1100 800 1200 1400 1000 k  1 1300 1400 1200 1900 1900 1500 k  3 1700 1700 1800 2200 2300 1400  m il  cost in dollars of sending 1 ton of raw material l to plant i. s1 5 This model has 8  5  13 0-1 integer variables and 8  6  3  144 nonnegative continuous variables. . i1 8 i1 j1 k1 i1 l1 k1 j1 s. : y 8 ≤ 10 5 . : y 1  y 3  y 6 ≤ 10 1 . : y 7 ≤ 10 5 . 2. 2. : y 5 ≤ 10 3 . 6 . . . m il l1 l2 l3 i1 i2 i3 i4 i5 i6 i7 i8 10 5 16 12 8 11 9 10 15 11 7 14 8 14 10 10 12 11 13 12 9 14 15 8  r lk  percentage of product k that is raw material l.

Sign up to vote on this title
UsefulNot useful