advertisement

Linear Programming C–1 Linear Programming A mathematical technique to help plan and make decisions relative to the trade-offs necessary to allocate resources Will find the minimum or maximum value of the objective Guarantees the optimal solution to the model formulated C–2 Requirements of an LP Problem 1. LP problems seek to maximize or minimize some quantity (usually profit or cost) expressed as an objective function 2. The presence of restrictions, or constraints, limits the degree to which we can pursue our objective C–3 Requirements of an LP Problem 3. There must be alternative courses of action to choose from 4. The objective and constraints in linear programming problems must be expressed in terms of linear equations or inequalities C–4 Formulating LP Problems The product-mix problem at Shader Electronics Two products 1. Shader Walkman, a portable CD/DVD player 2. Shader Watch-TV, a wristwatch-size Internet-connected color TV Determine the mix of products that will produce the maximum profit C–5 Formulating LP Problems Hours Required to Produce 1 Unit Department Electronic Assembly Profit per unit Walkman Watch-TVs (X1) (X2) 4 2 $7 3 1 $5 Available Hours This Week 240 100 Decision Variables: X1 = number of Walkmans to be produced X2 = number of Watch-TVs to be produced C–6 Formulating LP Problems Objective Function: Maximize Profit = $7X1 + $5X2 There are three types of constraints Upper limits where the amount used is ≤ the amount of a resource Lower limits where the amount used is ≥ the amount of the resource Equalities where the amount used is = the amount of the resource C–7 Formulating LP Problems First Constraint: Electronic time used is ≤ Electronic time available 4X1 + 3X2 ≤ 240 (hours of electronic time) Second Constraint: Assembly time used is ≤ Assembly time available 2X1 + 1X2 ≤ 100 (hours of assembly time) C–8 Graphical Solution Can be used when there are two decision variables 1. Plot the constraint equations at their limits by converting each equation to an equality 2. Identify the feasible solution space 3. Create an iso-profit line based on the objective function 4. Move this line outwards until the optimal point is identified C–9 Graphical Solution X2 100 – Number of Watch-TVs – 80 – Assembly (constraint B) – 60 – – 40 – Electronics (constraint A) – 20 – Feasible – |– 0 region | | 20 | | 40 | | 60 | | 80 | | 100 X1 Number of Walkmans C – 10 Graphical Solution X2 100 – Number of Watch-TVs – 80 – – 60 – – 40 – $210 = $7X1 + $5X2 (0, 42) – 20 – (30, 0) – |– 0 | | 20 | | 40 | | 60 | | 80 | | 100 X1 Number of Walkmans C – 11 Graphical Solution X2 100 – Number of Watch-TVs – $350 = $7X1 + $5X2 80 – $280 = $7X1 + $5X2 – 60 – $210 = $7X1 + $5X2 – 40 – – $420 = $7X1 + $5X2 20 – – |– 0 | | 20 | | 40 | | 60 | | 80 | | 100 X1 Number of Walkmans C – 12 Graphical Solution X2 100 – Number of Watch-TVs – Maximum profit line 80 – – 60 – Optimal solution point (X1 = 30, X2 = 40) – 40 – – $410 = $7X1 + $5X2 20 – – |– 0 | | 20 | | 40 | | 60 | | 80 | | 100 X1 Number of Walkmans C – 13 Corner-Point Method X2 100 – Number of Watch-TVs 2 – 80 – – 60 – – 3 40 – – 20 – – 1 |– 0 | | 20 | | 40 | 4 | 60 | | 80 | | 100 X1 Number of Walkmans C – 14 Solving Minimization Problems Formulated and solved in much the same way as maximization problems In the graphical approach an isocost line is used The objective is to move the isocost line inwards until it reaches the lowest cost corner point C – 15 Minimization Example X1 = number of tons of black-and-white chemical produced X2 = number of tons of color picture chemical produced Minimize total cost = 2,500X1 + 3,000X2 Subject to: X1 X2 X1 + X2 X1, X2 ≥ 30 tons of black-and-white chemical ≥ 20 tons of color chemical ≥ 60 tons total ≥ $0 nonnegativity requirements C – 16 Minimization Example Table B.9 X2 60 – X1 + X2 = 60 50 – Feasible region 40 – 30 – b 20 – a 10 – |– 0 X1 = 30 | 10 | 20 X2 = 20 | 30 | 40 | 50 | 60 X1 C – 17 Minimization Example Total cost at a = 2,500X1 + 3,000X2 = 2,500 (40) + 3,000(20) = $160,000 Total cost at b = 2,500X1 + 3,000X2 = 2,500 (30) + 3,000(30) = $165,000 Lowest total cost is at point a C – 18 LP Applications Production-Mix Example Department Product XJ201 XM897 TR29 BR788 Wiring Drilling .5 1.5 1.5 1.0 3 1 2 3 Assembly 2 4 1 2 Inspection .5 1.0 .5 .5 Unit Profit $ 9 $12 $15 $11 Department Capacity (in hours) Product Minimum Production Level Wiring Drilling Assembly Inspection 1,500 2,350 2,600 1,200 XJ201 XM897 TR29 BR788 150 100 300 400 C – 19 LP Applications X1 = number of units of XJ201 produced X2 = number of units of XM897 produced X3 = number of units of TR29 produced X4 = number of units of BR788 produced Maximize profit = 9X1 + 12X2 + 15X3 + 11X4 subject to .5X1 + 1.5X2 + 1.5X3 + 1X4 3X1 + 1X2 + 2X3 + 3X4 2X1 + 4X2 + 1X3 + 2X4 .5X1 + 1X2 + .5X3 + .5X4 X1 X2 X3 X4 ≤ 1,500 hours of wiring ≤ 2,350 hours of drilling ≤ 2,600 hours of assembly ≤ 1,200 hours of inspection ≥ 150 units of XJ201 ≥ 100 units of XM897 ≥ 300 units of TR29 ≥ 400 units of BR788 C – 20 The Simplex Method Real world problems are too complex to be solved using the graphical method The simplex method is an algorithm for solving more complex problems Developed by George Dantzig in the late 1940s Most computer-based LP packages use the simplex method C – 21 NLP in Facility Location • Consider an existing network with m facilities • It is desired to add n new facilities to the network • Let’s – (ai, bi) denote the coordinates of existing facility ith – (Xi, Yi) denote the coordinates of the to-befound new facility ith that minimize the total distribution cost C – 22 NLP in Facility Location (cont.) • Let’s – gij denote the load or flow of activity from a new facility ith to an existing facility jth – fij denote the load or flow of activity between new facilities ith and jth – cij denote the cost per unit travel between new facilities – dij denote the cost per unit travel between new facilities ith to an existing facility jth C – 23 NLP in Facility Location (cont.) • NLP Model c f | X n Minimize n i 1 j 1 n m ij ij i X j | | Yi Y j | d ij g ij | X i a j | | Yi b j | i 1 j 1 C – 24 Example of NLP Application • บริ ษทั หนึ่งมีศูนย์ บริ การ 4 แห่ ง และ Warehouse 1 แห่ ง ตั้งอย่ ทู ี่ จดุ Coordinate (X, Y) คือ (8,20),(8,10),(10,20),(16,30) และ (35,20) ตามลาดับ บริษทั ต้ องการสร้ าง Warehouse อีก 2 แห่ ง ซึ่งต้ องตั้งห่ างกันตาม แนวแกน Y และ X ไม่ น้อยกว่ า 5 หน่ วย ปริมาณงานระหว่ างนับเป็ น Trip ระหว่ าง Facilities มีดงั ตาราง และต้ นทุนการขนส่ งระหว่ าง Warehouse ทีส่ ร้ างใหม่ เท่ ากับ 5 ต่ อระยะทาง 1 หน่ วย และ ระหว่ าง Warehouse ทีส่ ร้ างใหม่ กบั Facilities เดิมเท่ ากับ10 ต่ อระยะทาง 1 หน่ วย จงกาหนดตาแหน่ งทีต่ ั้งของ Warehouse ใหม่ ทัง้ 2 แห่ ง C – 25 Example of NLP Application Load WH1 WH2 E1 7 3 E2 7 2 WH1 WH2 WH1 WH2 E3 5 4 E4 4 5 E5 2 2 2 1 C – 26 Transportation Models C – 27 Transportation Modeling An interactive procedure that finds the least costly means of moving products from a series of sources to a series of destinations Can be used to help resolve distribution and location decisions C – 28 Transportation Modeling A special class of linear programming Need to know 1. The origin points and the capacity or supply per period at each 2. The destination points and the demand per period at each 3. The cost of shipping one unit from each origin to each destination C – 29 Transportation Problem To From Albuquerque Boston Cleveland Des Moines $5 $4 $3 Evansville $8 $4 $3 Fort Lauderdale $9 $7 $5 C – 30 Transportation Problem Des Moines (100 units capacity) Albuquerque (300 units required) Cleveland (200 units required) Boston (200 units required) Evansville (300 units capacity) Fort Lauderdale (300 units capacity) C – 31 Transportation Matrix Figure C.2 To From Albuquerque $5 Des Moines Evansville Fort Lauderdale Warehouse requirement Boston 300 Cleveland $4 $3 $8 $4 $3 $9 $7 $5 200 Cost of shipping 1 unit from Fort Lauderdale factory to Boston warehouse 200 Factory capacity 100 300 300 Des Moines capacity constraint Cell representing a possible source-todestination shipping assignment (Evansville to Cleveland) 700 Cleveland warehouse demand Total demand and total supply C – 32 Northwest-Corner Rule Start in the upper left-hand cell (or northwest corner) of the table and allocate units to shipping routes as follows: 1. Exhaust the supply (factory capacity) of each row before moving down to the next row 2. Exhaust the (warehouse) requirements of each column before moving to the next column 3. Check to ensure that all supplies and demands are met C – 33 Northwest-Corner Rule 1. Assign 100 tubs from Des Moines to Albuquerque (exhausting Des Moines’s supply) 2. Assign 200 tubs from Evansville to Albuquerque (exhausting Albuquerque’s demand) 3. Assign 100 tubs from Evansville to Boston (exhausting Evansville’s supply) 4. Assign 100 tubs from Fort Lauderdale to Boston (exhausting Boston’s demand) 5. Assign 200 tubs from Fort Lauderdale to Cleveland (exhausting Cleveland’s demand and Fort Lauderdale’s supply) C – 34 Northwest-Corner Rule To From (D) Des Moines (E) Evansville (A) Albuquerque 100 200 Warehouse requirement 300 (C) Cleveland $5 $4 $3 $8 $4 $3 $9 (F) Fort Lauderdale (B) Boston 100 100 200 $7 200 200 $5 Factory capacity 100 300 300 700 Means that the firm is shipping 100 bathtubs from Fort Lauderdale to Boston C – 35 Northwest-Corner Rule Computed Shipping Cost Route From To D E E F F A A B B C Tubs Shipped Cost per Unit 100 200 100 100 200 $5 8 4 7 5 Total Cost $ 500 1,600 400 700 $1,000 Total: $4,200 This is a feasible solution but not necessarily the lowest cost alternative C – 36 Intuitive Lowest-Cost Method 1. Identify the cell with the lowest cost 2. Allocate as many units as possible to that cell without exceeding supply or demand; then cross out the row or column (or both) that is exhausted by this assignment 3. Find the cell with the lowest cost from the remaining cells 4. Repeat steps 2 and 3 until all units have been allocated C – 37 Intuitive Lowest-Cost Method To From (A) Albuquerque (D) Des Moines (E) Evansville (F) Fort Lauderdale Warehouse requirement 300 (B) Boston (C) Cleveland $5 $4 $8 $4 $3 $9 $7 $5 200 100 200 $3 Factory capacity 100 300 300 700 First, $3 is the lowest cost cell so ship 100 units from Des Moines to Cleveland and cross off the first row as Des Moines is satisfied C – 38 Intuitive Lowest-Cost Method To From (A) Albuquerque (D) Des Moines (E) Evansville (F) Fort Lauderdale Warehouse requirement 300 (B) Boston $5 $4 $8 $4 $9 $7 200 (C) Cleveland 100 100 $3 $3 $5 200 Factory capacity 100 300 300 700 Second, $3 is again the lowest cost cell so ship 100 units from Evansville to Cleveland and cross off column C as Cleveland is satisfied C – 39 Intuitive Lowest-Cost Method To From (A) Albuquerque (D) Des Moines (E) Evansville $5 $4 $8 $4 200 $9 (F) Fort Lauderdale Warehouse requirement (B) Boston 300 (C) Cleveland 100 100 $7 200 $3 $3 $5 200 Factory capacity 100 300 300 700 Third, $4 is the lowest cost cell so ship 200 units from Evansville to Boston and cross off column B and row E as Evansville and Boston are satisfied C – 40 Intuitive Lowest-Cost Method To From (A) Albuquerque (D) Des Moines (E) Evansville (F) Fort Lauderdale Warehouse requirement 300 300 (B) Boston $5 $4 $8 $4 200 $9 (C) Cleveland 100 100 $7 200 $3 $3 $5 200 Factory capacity 100 300 300 700 Finally, ship 300 units from Albuquerque to Fort Lauderdale as this is the only remaining cell to complete the allocations C – 41 Intuitive Lowest-Cost Method To From (A) Albuquerque (D) Des Moines (E) Evansville (F) Fort Lauderdale Warehouse requirement 300 300 (B) Boston $5 $4 $8 $4 200 $9 (C) Cleveland 100 100 $7 200 $3 $3 $5 200 Factory capacity 100 300 300 700 Total Cost = $3(100) + $3(100) + $4(200) + $9(300) = $4,100 C – 42 Intuitive Lowest-Cost Method To From (A) Albuquerque (B) Boston $5 This is Moines a feasible solution, (D) Des and an improvement over $8 the previous solution, but (E) Evansville not necessarily the lowest 200 cost alternative $9 (F) Fort Lauderdale Warehouse requirement 300 300 200 $4 $4 (C) Cleveland 100 100 $7 $3 $3 $5 200 Factory capacity 100 300 300 700 Total Cost = $3(100) + $3(100) + $4(200) + $9(300) = $4,100 C – 43