Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Introduction to Linear Programming Source: 1. Operations Research: Applications & Algorithms, 4th edition, by Wayne L. Winston 2. Jim Orlin PowerPoint.

Similar presentations


Presentation on theme: "1 Introduction to Linear Programming Source: 1. Operations Research: Applications & Algorithms, 4th edition, by Wayne L. Winston 2. Jim Orlin PowerPoint."— Presentation transcript:

1 1 Introduction to Linear Programming Source: 1. Operations Research: Applications & Algorithms, 4th edition, by Wayne L. Winston 2. Jim Orlin PowerPoint presentation

2 2 What Is a Linear Programming Problem? Each soldier built: Sell for $27 and uses $10 worth of raw materials. Increase Giapetto’s variable labor/overhead costs by $14. Requires 2 hours of finishing labor. Requires 1 hour of carpentry labor. Each train built: Sell for $21 and used $9 worth of raw materials. Increases Giapetto’s variable labor/overhead costs by $10. Requires 1 hour of finishing labor. Requires 1 hour of carpentry labor. Example Giapetto’s, Inc., manufactures wooden soldiers and trains.

3 3 What Is a Linear Programming Problem? Each week Giapetto can obtain: All needed raw material. Only 100 finishing hours. Only 80 carpentry hours. Also: Demand for the trains is unlimited. At most 40 soldiers are bought each week. Giapetto wants to maximize weekly profit (revenues – expenses). Formulate a mathematical model of Giapetto’s situation that can be used maximize weekly profit.

4 4 What Is a Linear Programming Problem? The Giapetto solution model incorporates the characteristics shared by all linear programming problems. Decision Variables x 1 = number of soldiers produced each week x 2 = number of trains produced each week Objective Function In any linear programming model, the decision maker wants to maximize (usually revenue or profit) or minimize (usually costs) some function of the decision variables. This function to maximized or minimized is called the objective function. For the Giapetto problem, fixed costs are do not depend upon the the values of x1 or x2.

5 5 What Is a Linear Programming Problem? Giapetto’s weekly profit can be expressed in terms of the decision variables x 1 and x 2 : Weekly profit = weekly revenue – weekly raw material costs – the weekly variable costs Weekly revenue = 27x 1 + 21x 2 Weekly raw material costs = 10x 1 + 9x 2 Weekly variable costs = 14x 1 + 10x 2 Weekly profit = (27x 1 + 21x 2 ) – (10x 1 + 9x 2 ) – (14x 1 + 10x 2 ) = 3x 1 + 2x 2

6 6 What Is a Linear Programming Problem? Giapetto’s objective is to chose x 1 and x 2 to maximize 3x 1 + 2x 2. We use the variable z to denote the objective function value of any LP. Giapetto’s objective function is: Maximize z = 3x 1 + 2x 2 “Maximize” will be abbreviated by max and “minimize” by min. The coefficient of an objective function variable is called an objective function coefficient.

7 7 What Is a Linear Programming Problem? Constraints: As x 1 and x 2 increase, Giapetto’s objective function grows larger. For Giapetto, the values of x 1 and x 2 are limited by the following three restrictions (often called constraints): Constraint 1 Each week, no more than 100 hours of finishing time may be used. Constraint 2 Each week, no more than 80 hours of carpentry time may be used. Constraint 3 Because of limited demand, at most 40 soldiers should be produced. These three constraints can be expressed mathematically by the following equations: Constraint 1: 2 x 1 + x 2 ≤ 100 Constraint 2: x 1 + x 2 ≤ 80 Constraint 3: x 1 ≤ 40

8 8 What Is a Linear Programming Problem? For the Giapetto problem model, combining the sign restrictions x1 ≥ 0 and x2 ≥ 0 with the objective function and constraints yields the following optimization model: Max z = 3x 1 + 2x 2 (objective function) Subject to (s.t.) 2 x 1 + x 2 ≤ 100(finishing constraint) x 1 + x 2 ≤ 80(carpentry constraint) x 1 ≤ 40(constraint on demand for soldiers) x 1 ≥ 0(sign restriction) x 2 ≥ 0(sign restriction)

9 9 What Is a Linear Programming Problem? Concepts of linear function and linear inequality: Linear Function: A function f(x 1, x 2, …, x n of x 1, x 2, …, x n is a linear function if and only if for some set of constants, c 1, c 2, …, c n, f(x 1, x 2, …, x n ) = c 1 x 1 + c 2 x 2 + … + c n x n. For example, f(x 1,x 2 ) = 2x 1 + x 2 is a linear function of x 1 and x 2, but f(x 1,x 2 ) = (x 1 ) 2 x 2 is not a linear function of x 1 and x 2. For any linear function f(x 1, x 2, …, x n ) and any number b, the inequalities inequality f(x 1, x 2, …, x n )  b and f(x 1, x 2, …, x n )  b are linear inequalities.

10 10 What Is a Linear Programming Problem? 1.Attempt to maximize (or minimize) a linear function (called the objective function) of the decision variables. 2.The values of the decision variables must satisfy a set of constraints. Each constraint must be a linear equation or inequality. 3.A sign restriction is associated with each variable. For each variable x i, the sign restriction specifies either that x i must be nonnegative (x i ≥ 0) or that x i may be unrestricted in sign. A linear programming problem (LP) is an optimization problem for which we do the following:

11 11 What Is a Linear Programming Problem? Proportionality and Additive Assumptions The objective function for an LP must be a linear function of the decision variables has two implications: 1. The contribution of the objective function from each decision variable is proportional to the value of the decision variable. For example, the contribution to the objective function for 4 soldiers is exactly fours times the contribution of 1 soldier. 2. The contribution to the objective function for any variable is independent of the other decision variables. For example, no matter what the value of x 2, the manufacture of x 1 soldiers will always contribute 3x 1 dollars to the objective function.

12 12 What Is a Linear Programming Problem? 1.The contribution of each variable to the left-hand side of each constraint is proportional to the value of the variable. For example, it takes exactly 3 times as many finishing hours to manufacture 3 soldiers as it does 1 soldier. 2. The contribution of a variable to the left-hand side of each constraint is independent of the values of the variable. For example, no matter what the value of x 1, the manufacture of x 2 trains uses x 2 finishing hours and x 2 carpentry hours Each LP constraint must be a linear inequality or linear equation has two implications:

13 13 What Is a Linear Programming Problem? Divisibility Assumption The divisibility assumption requires that each decision variable be permitted to assume fractional values. For example, this assumption implies it is acceptable to produce a fractional number of trains. The Giapetto LP does not satisfy the divisibility assumption since a fractional soldier or train cannot be produced. The use of integer programming methods necessary to address the solution to this problem. The Certainty Assumption The certainty assumption is that each parameter (objective function coefficients, right-hand side, and technological coefficients) are known with certainty.

14 14 What Is a Linear Programming Problem? Feasible Region and Optimal Solution x 1 = 40 and x 2 = 20 are in the feasible region since they satisfy all the Giapetto constraints. On the other hand, x 1 = 15, x 2 = 70 is not in the feasible region because this point does not satisfy the carpentry constraint [15 + 70 is > 80]. Giapetto Constraints 2 x 1 + x 2 ≤ 100 (finishing constraint) x 1 + x 2 ≤ 80 (carpentry constraint) x 1 ≤ 40 (demand constraint) x 1 ≥ 0 (sign restriction) x 2 ≥ 0 (sign restriction) The feasible region of an LP is the set of all points satisfying all the LP’s constraints and sign restrictions.

15 15 What Is a Linear Programming Problem? For a maximization problem, an optimal solution to an LP is a point in the feasible region with the largest objective function value. Similarly, for a minimization problem, an optimal solution is a point in the feasible region with the smallest objective function value. Most LPs have only one optimal solution. However, some LPs have no optimal solution, and some LPs have an infinite number of solutions. The optimal solution to the Giapetto LP is x 1 = 20 and x 2 = 60. This solution yields an objective function value of: z = 3x 1 + 2x 2 = 3(20) + 2(60) = $180 When we say x 1 = 20 and x 2 = 60 is the optimal solution, we are saying that no point in the feasible region has an objective function value (profit) exceeding 180.

16 16 More Linear Programming Models

17 17 個案研究: 超級穀物公司廣告組合問題  目標:設計公司新產品「美好的一天」促銷活動。  三種最有效果的廣告媒體如下: 每週六早上兒童節目的電視廣告。 食品及家庭相關雜誌的廣告。 星期日報紙副刊的廣告。  此問題的限制資源為: 廣告預算( 400 萬美元) 規劃預算( 100 萬美元) 5 則電視商業廣告  目標為測量每一項目的預估曝光量。 如何廣告「美好的一天」在此三種媒體的呈現? 問題

18 18 成本及曝光量資料 500,000600,0001,300,000 預估曝光量 40,00030,00090,000 規劃預算 $100,000$150,000$300,000 廣告預算 每則週日廣告每則雜誌廣告每則電視廣告成本類型 成本 表 4.1

19 19 試算表模式 BCDEFGH 3 電視廣告雜誌廣告副刊廣告 4 每種廣告曝光量 1,300600500 5 ( 千單位 ) 6 預算 可用 7 每種廣告成本 ( 千美元 ) 花費 預算 8 廣告預算 3001501004,000≤ 9 規劃預算 9030401,000≤ 10 11 總曝光量 12 電視廣告雜誌廣告副刊廣告 ( 千單位 ) 13 廣告量 02010 17,000 14 ≤ 15 最多電視廣告時段數 5 圖 4.1

20 20 代數模式 令 TV = 電視廣告時段數量 M = 雜誌廣告的數量 SS = 週日副刊廣告的數量 最大化曝光量 = 1,300TV + 600M + 500SS 受限於 廣告預算: 300TV + 150M + 100SS ≤ 4,000 ( 千美元 ) 規劃預算: 90TV + 30M + 30SS ≤ 1,000 ( 千美元 ) 可用的電視時段數: TV ≤ 5 且 TV ≥ 0 M ≥ 0 SS ≥ 0

21 21 久大公司資本預算問題  久大發展公司主要投資於商業不動產。  目前有機會參與三項大型營建專案: 建造高層辦公大樓 建造飯店 建造購物中心  每一項專案皆要參與的夥伴在不同時點進行投資,除了需立即 支付的金額外,另外在接下來的一、二及三年各需投資固定的 金額。 久大應如何盡可能投資部分或全部的專案? 問題

22 22 久大發展公司對於各計畫的財務資料 投資資本要求 (單位:百萬) 年辦公大樓飯店購物中心 0$40$80$90 1 60 80 50 2 90 80 20 3 10 70 60 淨現值 $45$70$50 表 4.2

23 23 試算表模式 BCDEFGH 3 辦公大樓飯店購物中心 4 淨現值 457050 5 ( 百萬美元 ) 累積 6 資本可用 7 所需資本累積(百萬美元)支出 資本 8 目前 40809025≤ 9 第 1 年底 10016014044.76≤45 10 第 2 年底 19024016060.58≤65 11 第 3 年底 20031022080≤ 12 14 辦公大樓飯店購物中心 ( 百萬美元 ) 15 參與股份 0.00%16.50%13.11% 6500.00 圖 4.2

24 24 代數模式 令 OB = 辦公大樓的參與股份 H = 飯店的參與股份 SC = 購物中心的參與股份 最大化 NPV = 45OB + 70H + 50SC 受限於 目前總投資金額: 40OB + 80H + 90SC ≤ 25 ( 百萬美元 ) 1 年內總投資金額: 100OB + 160H + 140SC ≤ 45 ( 百萬美元 ) 2 年內總投資金額: 190OB + 240H + 160SC ≤ 65 ( 百萬美元 ) 3 年內總投資金額: 200OB + 310H + 220SC ≤ 80 ( 百萬美元 ) 且 OB ≥ 0 H ≥ 0 SC ≥ 0

25 25 聯盟航空人員排班  聯盟航空準備增加中樞機場的航班,所以需要雇用更多額 外的客服人員。  每位客服人員八小時為一輪班,核准的五個輪班班次為: 第 1 輪班: 6:00 AM ~ 2:00 PM 第 2 輪班: 8:00 AM ~ 4:00 PM 第 3 輪班: 中午 ~ 8:00 PM 第 4 輪班: 4:00 PM ~ 午夜 第 5 輪班: 10:00 PM ~ 6:00 AM 每一輪班班次需要多少客服人員? 問題

26 26 排班問題的摘要 每個輪班時間區域 時間區域 12345 每工作時段所需 的輪班人員 6 AM ~ 8 AM ˇ 48 8 AM ~ 10 AM ˇˇ 79 10 AM ~ 中午 ˇˇ 65 中午 ~ 2 PM ˇˇˇ 87 2 PM ~ 4 PM ˇˇ 64 4 PM ~ 6 PM ˇˇ 73 6 PM ~ 8 PM ˇˇ 82 8 PM ~ 10 PM ˇ 43 10 PM ~ 午夜 ˇˇ 52 午夜 ~ 6 AM ˇ 15 每位客服人員 的每日津貼 $170$160$175$180$195 表 4.4

27 27 試算表模式 BCDEFGHIJ 3 6am-2pm8am-4pm 中午 -8pm4pm- 午夜 10pm-6am 4 時段 5 每一輪班成 本 $170$160$175$180$195 6 總最低 7 輪班時段 (1=yes,0=no) 人數 需求 86am-8am1000048≥ 98am-10am1100079≥ 1010am- 12pm1100079≥65 1112pm-2pm11100118≥87 122pm-4pm0110070≥64 134pm-6pm0011082≥73 146pm-8pm0011082≥ 158pm-10pm0001043≥ 1610pm-12am0001158≥52 1712am-6am0000115≥ 18 19 6am-2pm8am-4pm 中午 -8pm4pm- 午夜 10pm-6am 20 時段 總成本 21 員工人數 4831394315 $30,610 圖 4.3

28 28代數模式 令 S i = 輪班班次的人數( i = 1 至 5 ) 最小化 成本 = $170S 1 + $160S 2 + $175S 3 + $180S 4 + $195S 5 受限於 6am ~ 8am 的總客服人數: S 1 ≥ 48 8am ~ 10am 的總客服人數: S 1 + S 2 ≥ 79 10am ~ 12pm 的總客服人數: S 1 + S 2 ≥ 65 12pm ~ 2pm 的總客服人數: S 1 + S 2 + S 3 ≥ 87 2pm ~ 4pm 的總客服人數: S 2 + S 3 ≥ 64 4pm ~ 6pm 的總客服人數: S 3 + S 4 ≥ 73 6pm ~ 8pm 的總客服人數: S 3 + S 4 ≥ 82 8pm ~ 10pm 的總客服人數: S 4 ≥ 43 10pm ~ 12am 的總客服人數: S 4 + S 5 ≥ 52 12am ~ 6am 的總客服人數: S 5 ≥ 15 且 S i ≥ 0 ( i = 1 至 5 )

29 29 大 M 公司配銷網路問題  大 M 公司在二間工廠生產不同種類的重機械,產 品之一為旋盤車床。  目前已獲得三位客戶對旋盤車床的下個月訂單。 每間工廠應各配送多少車床給每位客戶? 問題

30 30 大 M 公司配銷網路問題的相關資料 每台車床運送成本 運送至顧客 1 顧客 2 顧客 3 由輸出量 工廠 1 $700$900$800 12 台車床 工廠 2 800900700 15 台車床 訂購量 10 台車床 8 台車床 9 台車床 表 4.5

31 31 大 M 公司之配銷網路 台車床 圖 4.4

32 32 大 M 公司試算表模式 BCDEFGH 3 運送成本 4 ( 每台車床 ) 客戶 1 客戶 2 客戶 3 5 工廠 1 $700$900$800 6 工廠 2 $800$900$700 7 8 總 9 運送 10 運送單位客戶 1 客戶 2 客戶 3 數量 輸出量 11 工廠 1 102012= 工廠 2 06915= 13 客戶需求數量 1089 14 === 總成本 15 訂購量 1089 $20,500 圖 4.5

33 33 大 M 公司代數模式 令 S ij = 從 i 到 j 運送車床的數量( i = F1, F2 ; j = C1, C2, C3 ) 最小化 成本 = $700S F1-C1 + $900S F1-C2 + $800S F1-C3 + $800S F2-C1 + $900S F2-C2 + $700S F2-C3 受限於 工廠 1 : S F1-C1 + S F1-C2 + S F1-C3 = 12 工廠 2 : S F2-C1 + S F2-C2 + S F2-C3 = 15 客戶 1 : S F1-C1 + S F2-C1 = 10 客戶 2 : S F1-C2 + S F2-C2 = 8 客戶 3 : S F1-C3 + S F2-C3 = 9 且 S ij ≥ 0 ( i = F1, F2 ; j = C1, C2, C3 )

34 34 繼續超級穀物公司個案研究  大衛和克萊兒推斷試算表模式應納入一些額外的考量並進行 修正。  因此他們鎖定二個目標族群--兒童與兒童父母。  二個新目標: 廣告至少 500 萬名兒童收看。 廣告至少讓 500 萬名兒童父母收看 。  而且,有 1,490,000 美元的年度餘額可皆配到折價券的支出 。

35 35 廣告組合問題的效益與定量需求的資料 每個目標族群的收看人數(百萬人) $1,490,000$120,000$40,0000 折價金額 要求的總 折價金額每則週日廣告每則雜誌廣告每則電視商業廣告 要求 每種廣告媒體對於折價金額的貢獻度 50.2 0.5 兒童父母 500.11.2 兒童 最少可接 受人數每則週日廣告每則雜誌廣告每則電視商業廣告 目標族群 表 4.6 表 4.7

36 36 超級穀物公司試算表模式 圖 4.6 BCDEFGH 3 電視廣告雜誌廣告副刊廣告 4 每種廣告曝光量 1,300600500 5 ( 千單位 ) 6 每種廣告成本 ( 千元 ) 預算花費 可用預算 7 廣告預算 3001501003,775≤4,000 8 規劃預算 9030401,000≤ 9 1010 每種廣告媒體所吸引人數 ( 百萬人 ) 總收看人數 最少可接受人數 1 兒童 1.20.105≥5 1212 兒童的父母 0.50.2 5.85≥5 1313 1414 電視廣告雜誌廣告副刊廣告總折價金額 要求的總折價金額 1515 每種廣告媒體折價金額 0401201,490= 1616 ( 千美元 ) 1717 總曝光量 1818 電視廣告雜誌廣告副刊廣告 ( 千單位 ) 1919 廣告量 3147.75 16,175 2020 ≤ 2121 最多電視廣告時段數 5

37 37 超級穀物公司代數模式 令 TV = 電視廣告時段數量 M = 雜誌廣告的數量 SS = 週日副刊廣告的數量 最大化 曝光量 = 1,300TV + 600M + 500SS 受限於 廣告預算: 300TV + 150M + 100SS ≤ 4,000 ( 千美元 ) 規劃預算: 90TV + 30M + 30SS ≤ 1,000 ( 千美元 ) 已用電視時段: TV ≤ 5 總兒童收看人數: 1.2TV + 0.1M ≥ 5 ( 百萬 ) 總父母收看人數: 0.5TV + 0.2M + 0.2SS ≥ 5 ( 百萬 ) 總折價金額: 40M + 120SS = 1,490 ( 千美元 ) 且 TV ≥ 0 M ≥ 0 SS ≥ 0

38 38 函數限制式類型 資源配置問題 & 混合 型問題 針對每種資源, 已用數量 ≤ 可用數量 LHS ≤ RHS 資源限制式 配銷網路問題 & 混合 型問題 針對某些數量, 供應的數量 = 需求的數量 LHS = RHS 定量需求限制式 成本效益取捨問題 & 混合型問題 針對每種效益, 達成程度 ≥ 可接受程度 LHS ≥ RHS 效益限制式 使用範圍解釋格式 * 類型 * LHS = 左邊( SUMPRODUCT 函數) RHS = 右邊(常數) 表 4.8

39 39 節約公司回收固體廢棄物 節約公司經營一家回收中心,主要蒐集四種不同類型 的固體廢棄物,經過處理後再進行混合(處理與混合 為二種不同程序),最後變成可販賣的產品。 產品依據混合的材料可分成 A 、 B 、 C 三種不同的等級。 如何以四種不同類型的固體廢棄物,生產三種等級不 同的產品? 問題

40 40 節約公司的產品資訊 等級規格每磅混合費用每磅的售價 A 材料 1 :不超過全部的 30% 材料 2 :不少於全部的 40% 材料 3 :不超過全部的 50% 材料 4 : 等於全部的 20% $3.00$8.50 B 材料 1 :不超過全部的 50% 材料 2 :不少於全部的 10% 材料 4 :等於全部的 10% 2.507.00 C 材料 1 :不超過全部的 70% 2.005.50 表 4.9

41 41 節約公司固體廢棄物的材料資料 材料 每週可得數量 (磅)每磅處理成本額外限制 13,000$3.00 1. 針對每種材料,每週 至少蒐集及處理一半的 量。 2. 每週 30,000 美元的經 費應使用於處理材料。 22,0006.00 34,0004.00 41,0005.00 表 4.10

42 42 BCDEFGHIJKLM 3 A級A級 B級B級 C級C級 4 單位混合成本 $3.00$2.50$2.00 總處理成本 $30,000 5 單位賣價 $8.50$7.00$5.50 = 6 單位利潤 $5.50$4.50$3.50 可用經費 $30,000 7 8 9 材料配置 單位 全部 10 ( 每種產品等級所使用的材料磅數 ) 處理 最少需 處理 可用 11 A級A級 B級B級 C級C級 成本 處理數量 數量 12 材料 1 412.32,587.70 $3 1,500<=3,000<=3,000 13 材料 2 859.6517.50 $6 1,000<=1,377<=2,000 14 材料 3 447.41,552.60 $4 2,000<=2,000<=4,000 15 材料 4 429.8517.50 $5 500<=947<=1,000 16 生產總量 2,149.15,175.40 17 18 混合規格 混合比例 19 A 級, 材料 1 412.3<=644.7430% A級A級 20 總利潤 $35,110 A 級, 材料 2 859.6>=859.640% A級A級 21 A 級, 材料 3 447.4<=1,074.650% A級A級 22 A 級, 材料 4 429.8= 20% A級A級 23 24 B 級, 材料 1 2,587.7<=2,587.750% B級B級 25 B 級, 材料 2 517.5>=517.510% B級B級 26 B 級, 材料 4 517.5= 10% B級B級 27 28 C 級, 材料 1 0.0<=0.070% C級C級節約公司試算表模式

43 43 節約公司代數模式 令 x ij = 每磅材料 j 每週分配到產品 i 的數量 (i = A, B, C ; j = 1, 2, 3, 4) 最大化 利潤 = 5.5(x A1 + x A2 + x A3 + x A4 ) + 4.5(x B1 + x B2 + x B3 + x B4 ) + 3.5(x C1 + x C2 + x C3 + x C4 ) 受限於 組合規格: x A1 ≤ 0.3 (x A1 + x A2 + x A3 + x A4 ) x A2 ≥ 0.4 (x A1 + x A2 + x A3 + x A4 ) x A3 ≤ 0.5 (x A1 + x A2 + x A3 + x A4 ) x A4 = 0.2 (x A1 + x A2 + x A3 + x A4 ) x B1 ≤ 0.5 (x B1 + x B2 + x B3 + x B4 ) x B2 ≥ 0.1 (x B1 + x B2 + x B3 + x B4 ) x B4 = 0.1 (x B1 + x B2 + x B3 + x B4 ) x C1 ≤ 0.7 (x C1 + x C2 + x C3 + x C4 ) 可用材料: x A1 + x B1 + x C1 ≤ 3,000 x A2 + x B2 + x C2 ≤ 2,000 x A3 + x B3 + x C3 ≤ 4,000 x A4 + x B4 + x C4 ≤ 1,000 處理數量限制: x A1 + x B1 + x C1 ≥ 1,500 x A2 + x B2 + x C2 ≥ 1,000 x A3 + x B3 + x C3 ≥ 2,000 x A4 + x B4 + x C4 ≥ 500 處理成本限制: 3(x A1 + x B1 + x C1 ) + 6(x A2 + x B2 + x C2 ) + 4(x A3 + x B3 + x C3 ) + 5(x A4 + x B4 + x C4 ) = 30,000 且 x ij ≥ 0 (i = A, B, C ; j = 1, 2, 3, 4)

44 44 Scheduling Postal Workers Each postal worker works for 5 consecutive days, followed by 2 days off, repeated weekly. Minimize the number of postal workers (for the time being, we will permit fractional workers on each day.)

45 45 Formulating as an LP Select the decision variables –Let x 1 be the number of workers who start working on Monday, and work till Friday –Let x 2 be the number of workers who start on Tuesday … –Let x 3, x 4, …, x 7 be defined similarly.

46 46 The linear program Minimizez = x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 subject to x 1 + x 4 + x 5 + x 6 + x 7  17 x 1 + x 2 + x 5 + x 6 + x 7  13 x 1 + x 2 + x 3 + x 6 + x 7  15 x 1 + x 2 + x 3 + x 4 + x 7  19 x 1 + x 2 + x 3 + x 4 + x 5  14 x 2 + x 3 + x 4 + x 5 + x 6  16 x 3 + x 4 + x 5 + x 6 + x 7  11 x j  0 for j = 1 to 7

47 47 Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7 subject to x 1 + x 4 + x 5 + x 6 + x 7 - s 1 = 17 x 1 + x 2 + x 5 + x 6 + x 7 - s 2 = 13 x 1 + x 2 + x 3 + x 6 + x 7 - s 3 = 15 x 1 + x 2 + x 3 + x 4 + x 7 - s 4 = 19 x 1 + x 2 + x 3 + x 4 + x 5 - s 5 = 14 x 2 + x 3 + x 4 + x 5 + x 6 - s 6 = 16 x 3 + x 4 + x 5 + x 6 + x 7 - s 7 = 11 x j  0, s j  0 for j = 1 to 7

48 48 A non-linear objective that often can be made linear. Suppose that one wants to minimize the maximum of the slacks, that is minimize z = max (s 1, s 2, …, s 7 ). This is a non-linear objective. But we can transform it, so the problem becomes an LP.

49 49 Minimize z z  s j for j = 1 to 7. subject to x 1 + x 4 + x 5 + x 6 + x 7 - s 1 = 17 x 1 + x 2 + x 5 + x 6 + x 7 - s 2 = 13 x 1 + x 2 + x 3 + x 6 + x 7 - s 3 = 15 x 1 + x 2 + x 3 + x 4 + x 7 - s 4 = 19 x 1 + x 2 + x 3 + x 4 + x 5 - s 5 = 14 x 2 + x 3 + x 4 + x 5 + x 6 - s 6 = 16 x 3 + x 4 + x 5 + x 6 + x 7 - s 7 = 11 x j  0, s j  0 for j = 1 to 7 The new constraint ensures that z  max (s 1, …, s 7 ) The objective ensures that z = s j for some j.

50 50 Non-linear objective that often can be made linear. Suppose that the “goal” is to have d j workers on day j. Let y j be the number of workers on day j. Suppose that the objective is minimize  i | y j – d j | This is a non-linear objective. But we can transform it, so the problem becomes an LP.

51 51 Minimize  j z j z j  y j - d j for j = 1 to 7. subject to x 1 + x 4 + x 5 + x 6 + x 7 = y 1 x 1 + x 2 + x 5 + x 6 + x 7 = y 2 x 1 + x 2 + x 3 + x 6 + x 7 = y 3 x 1 + x 2 + x 3 + x 4 + x 7 = y 4 x 1 + x 2 + x 3 + x 4 + x 5 - = y 5 x 2 + x 3 + x 4 + x 5 + x 6 = y 6 x 3 + x 4 + x 5 + x 6 + x 7 = y 7 x j  0, y j  0 for j = 1 to 7 The new constraints ensure that z j  | y j – d j | for each j. The objective ensures that z j = | y j – d j | for each j. z j  d j - y j for j = 1 to 7.

52 52 A ratio constraint : Suppose that we need to ensure that at least 30% of the workers have Sunday off. How do we model this? (x 1 + x 2 )/x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 .3 (x 1 + x 2 ) .3 x 1 +.3 x 2 +.3 x 3 +.3 x 4 +.3 x 5 +.3 x 6 +.3 x 7 -.7 x 1 -.7 x 2 +.3 x 3 +.3 x 4 +.3 x 5 +.3 x 6 +.3 x 7 <= 0

53 53 Cost per Ounce and Dietary Requirements for Diet Problem

54 54 Example 4-2 Diet Problem

55 55 Example 4-3 Blending Problem Formulate the appropriate model for the following blending problem: The sugar content of three juices— orange, banana, and pineapple—is 10, 15, and 20 percent, respectively. How many quarts of each must be mixed together to achieve one gallon (four quarts) that has a sugar content of at least 17 percent to minimize cost? The cost per quart is 20 cents for orange juice, 30 cents for banana juice, and 40 cents for pineapple juice. Solution Variable definitions O = quantity of orange juice in quarts B = quantity of banana juice in quarts P = quantity of pineapple juice in quarts

56 56 Example 4-5 Media Selection The Long Last Appliance Sales Company is in the business of selling appliances such as microwave ovens, traditional ovens, refrigerators, dishwashers, washers, dryers, and the like. The company has stores in the greater Chicagoland area and has a monthly advertising budget of $90,000. Among its options are radio advertising, advertising in the cable TV channels, newspaper advertising, and direct-mail advertising. A 30-second advertising spot on the local cable channel costs $1,800, a 30-second radio ad costs $350, a half-page ad in the local newspaper costs $700, and a single mailing of direct-mail insertion for the entire region costs $1,200 per mailing. The number of potential buying customers reached per advertising medium usage is as follows: Radio 7,000 TV 50,000 Newspaper 18,000 Direct mail 34,000 Due to company restrictions and availability of media, the maximum number of usages of each medium is limited to the following: Radio 35 TV 25 Newspaper 30 Direct mail 18

57 57 Example 4-5 (cont ’ d) The management of the company has met and decided that in order to ensure a balanced utilization of different types of media and to portray a positive image of the company, at least 10 percent of the advertisements must be on TV. No more than 40 percent of the advertisements must be on radio. The cost of advertising allocated to TV and direct mail cannot exceed 60 percent of the total advertising budget. What is the optimal allocation of the budget among the four media? What is the total maximum audience contact?

58 58 Example 4-5 (cont ’ d)

59 59 Marketing Research Stages of marketing research study development: –Design study. –Conduct marketing survey. –Analyze data and obtain results. –Make recommendations based on the results.

60 60 Example 4-6 Market Research Market Facts Inc. is a marketing research firm that works with client companies to determine consumer reaction toward various products and services. A client company requested that Market Facts investigate the consumer reaction to a recently developed electronic device. Market Facts and the client company agreed that a combination of telephone interviews and direct-mail questionnaires would be used to obtain the information from different type of households. The households are divided into six categories: 1.Households containing a single person under 40 years old and without children under 18 years of age. 2.Households containing married people under 40 years old and without children under 18 years of age. 3.Households containing single parents with children under 18 years of age. 4.Households containing married families with children under 18 years of age. 5.Households containing single people over 40 years old without children under 18 years of age. 6.Households containing married people over 40 years old without children under 18 years of age.

61 61 Example 4-6 (cont ’ d) Restrictions 1.At least 60 percent of the phone interviews must be conducted at households with children. 2.At least 50 percent of the direct-mail questionnaires must be mailed to households with children. 3.No more than 30 percent of the phone interviews and mail-in questionnaires must be conducted at households with single people. 4.At least 25 percent of the phone interviews and mail-in questionnaires must be conducted at households that contain married couples.

62 62 Example 4-6 (cont ’ d) Problem formulation

63 63 Example 4-6 (cont ’ d) Problem solution

64 64 Financial Applications Planning Problems for Banks –Linear programming can be very beneficial in banking decisions. –Financial planning: bankers must decide how a bank wants to allocate its funds among the various types of loans and investment securities. –Portfolio management: decisions are based on maximizing annual rate of return subject to state and federal regulations, and bank policies and restrictions.

65 65 Example 4-7 Financial Planning First American Bank issues five types of loans. In addition, to diversify its portfolio, and to minimize risk, the bank invests in risk-free securities. The loans and the risk-free securities with their annual rate of return are given in Table 4-3. Table 4-3 Rates of Return for Financial Planning Problem Type of Loan or SecurityAnnual Rate of Return (%) Home mortgage (first) 6 Home mortgage (second) 8 Commercial loan 11 Automobile loan 9 Home improvement loan 10 Risk-free securities 4

66 66 Example 4-7 Financial Planning (cont ’ d) The bank’s objective is to maximize the annual rate of return on investments subject to the following policies, restrictions, and regulations: 1.The bank has $90 million in available funds. 2.Risk-free securities must contain at least 10 percent of the total funds available for investments. 3.Home improvement loans cannot exceed $8,000,000. 4.The investment in mortgage loans must be at least 60 percent of all the funds invested in loans. 5.The investment in first mortgage loans must be at least twice as much as the investment in second mortgage loans. 6.Home improvement loans cannot exceed 40 percent of the funds invested in first mortgage loans. 7.Automobile loans and home improvement loans together may not exceed the commercial loans. 8.Commercial loans cannot exceed 50 percent of the total funds invested in mortgage loans.

67 67 Example 4-7 Financial Planning (cont ’ d)

68 68 Example 4-7 Financial Planning (cont ’ d)

69 69 Example 4-8 Portfolio Selection A conservative investor has $100,000 to invest. The investor has decided to use three vehicles for generating income: municipal bonds, a certificate of deposit (CD), and a money market account. After reading a financial newsletter, the investor has also identified several additional restrictions on the investments: 1.No more than 40 percent of the investment should be in bonds. 2.The proportion allocated to the money market account should be at least double the amount in the CD. The annual return will be 8 percent for bonds, 9 percent for the CD, and 7 percent for the money market account. Assume the entire amount will be invested. Formulate the LP model for this problem, ignoring any transaction costs and the potential for different investment lives. Assume that the investor wants to maximize the total annual return.

70 70 Example 4-8 Portfolio Selection (cont ’ d)

71 71 Production Applications Linear programming in production management in manufacturing: –Multiperiod production scheduling –Workforce scheduling –Make-or-buy decisions.

72 72 Example 4-9 Multiperiod Production Scheduling Morton and Monson Inc. is a small manufacturer of parts for the aerospace industry. The production capacity for the next four months is given as follows: Production Capacity in Units MonthRegular Production Overtime Production January 3,000500 February 2,000400 March 3,000600 April 3,500800 The regular cost of production is $500 per unit and the cost of overtime production is $150 per unit in addition to the regular cost of production. The company can utilize inventories to reduce fluctuations in production, but carrying one unit of inventory costs the company $40 per unit per month. Currently there are no units in inventory. However, the company wants to maintain a minimum safety stock of 100 units of inventory during the months of January, February, and March. The estimated demand for the next four months is as follows: Month January February March April Demand 2,8003,0003,5003,000

73 73 Example 4-9 Multiperiod Production Scheduling (cont ’ d) Continued on next slide.

74 74 Example 4-9 Multiperiod Production Scheduling (cont ’ d)

75 75 Example 4-9 Multiperiod Production Scheduling (cont ’ d)

76 76 Radiation Therapy Overview High doses of radiation (energy/unit mass) can kill cells and/or prevent them from growing and dividing –True for cancer cells and normal cells Radiation is attractive because the repair mechanisms for cancer cells is less efficient than for normal cells

77 77 Conventional Radiotherapy Relative Intensity of Dose Delivered

78 78 Conventional Radiotherapy Relative Intensity of Dose Delivered

79 79 Conventional Radiotherapy In conventional radiotherapy –3 to 7 beams of radiation –radiation oncologist and physicist work together to determine a set of beam angles and beam intensities –determined by manual “ trial-and-error ” process

80 80 Goal: maximize the dose to the tumor while minimizing dose to the critical area Critical Area Tumor area With a small number of beams, it is difficult to achieve these goals.

81 81 Tomotherapy: a diagram

82 82 Radiation Therapy: Problem Statement For a given tumor and given critical areas For a given set of possible beamlet origins and angles Determine the weight of each beamlet such that: –dosage over the tumor area will be at least a target level  L. –dosage over the critical area will be at most a target level  U.

83 83 Display of radiation levels

84 84 Linear Programming Model First, discretize the space –Divide up region into a 2D (or 3D) grid of pixels

85 85 More on the LP Create the beamlet data for each of p = 1,..., n possible beamlets. D p is the matrix of unit doses delivered by beam p. = unit dose delivered to pixel (i,j) by beamlet p

86 86 Linear Program Decision variables w = (w 1,..., w p ) w p = intensity weight assigned to beamlet p for p = 1 to n; D ij = dosage delivered to pixel (i,j)

87 87 An LP model minimize In an example reported in the paper, there were more than 63,000 variables, and more than 94,000 constraints (excluding upper/lower bounds) took 4 minutes to solve.

88 88 What to do if there is no feasible solution Use penalties: e.g., D ij   L – y ij and then penalize y in the objective. Consider non-linear penalties (e.g., quadratic) Consider costs that depend on damage rather than on radiation Develop target doses and penalize deviation from the target

89 89 Optimal Solution for the LP

90 90 An Optimal Solution to an NLP

91 91 Homework

92 92 Example 4-10 Workforce Scheduling

93 93 Example 4-11 Make-or-Buy Decisions

94 94 Example 4-12 Agriculture Applications A farm owner in Des Moines, Iowa, is interested in determining how to divide the farmland among four different types of crops. The farmer owns two farms in separate locations and has decided to plant the following four types of crops in these farms: corn, wheat, bean, and cotton. The first farm consists of 1,450 acres of land, while the second farm consists of 850 acres of land. Any of the four crops may be planted on either farm. However, after a survey of the land, based on the characteristics of the farmlands, Table 4-7 shows the maximum acreage restrictions the farmer has placed for each crop.

95 95

96 96

97 97

98 98


Download ppt "1 Introduction to Linear Programming Source: 1. Operations Research: Applications & Algorithms, 4th edition, by Wayne L. Winston 2. Jim Orlin PowerPoint."

Similar presentations


Ads by Google