Lecture 18 - Final Review 2

Lecture 18 - Final Review 2 - 540:311 DETERMINISTIC MODELS...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 540:311 DETERMINISTIC MODELS IN OPERATIONS RESEARCH Lecture 18: Final Review 2 Prof. W. Art Chaovalitwongse Topics •  Ch. 4: Simplex Method •  Ch. 5: Sensi@vity Analysis –  Graphical Sensi@vity Analysis –  LINDO Sensi@vity Analysis (including 100% rule) •  Ch. 6: Matrix Nota@on –  Simplex Method –  Sensi@vity Analysis –  Duality •  Ch. 8: Network Models –  Shortest Path Problem –  Maximum Flow Problem –  Minimum Spanning Tree Problem –  Min Cost Network Flow •  Ch. 9: Integer Programming –  Modeling –  Branch and Bound 6.5 – Finding the Dual of an LP max z = c1x1+ c2x2 +…+ cnxn s.t. Normal max problem a11x1 + a12x2 + … + a1nxn ≤ b1 a21x1 + a22x2 + … + a2nxn ≤ b2 It s dual … … … … am1x1 + am2x2 + … + amnxn ≤ bm xj ≥ 0 (j = 1, 2, …,n) min w = b1y1+ b2y2 +…+ bmym s.t. Normal min problem It s dual a11y1 + a12y2 + … + am1ym ≥ c1 a21y1 + a22y2 + … + am2ym ≥ c2 … … … … a1ny1 + a2ny2 + …+ amnym ≥ cn yi ≥ 0 (i = 1, 2, …,m) Recall 4.3 – max LPs The Dakota Furniture company manufactures desk, tables, and chairs. The manufacturer of each type of furniture requires lumber and two types of skilled labor: finishing and carpentry. The amount of each resource needed to make each type of furniture is given in the table below. Resource Desk Table Chair Lumber 8 board ft 6 board ft 1 board ft Finishing hours 4 hours 2 hours 1.5 hours Carpentry hours 2 hours 1.5 hours 0.5 hours   At present, 48 board feet of lumber, 20 finishing hours, 8 carpentry hours are available. A desk sells for $60, a table for $30, and a chair for $ 20.   Dakota believes that demand for desks and chairs is unlimited, but at most 5 tables can be sold.   Since the available resources have already been purchased, Dakota wants to maximize total revenue. Recall 4.3 – max LPs Define: x1 = number of desks produced x2 = number of tables produced x3 = number of chairs produced. The LP is: max z = 60x1 + 30x2 + 20x3 s.t. 8x1 + 6x2 + x3 ≤ 48 4x1 + 2x2 + 1.5x3 ≤ 20 2x1 + 1.5x2 + 0.5x3 ≤ 8 x2 ≤5 x1, x2, x3 ≥ 0 (lumber constraint) (finishing constraint) (carpentry constraint) (table demand constraint) 6.5 – Economic InterpretaLon of the Dual Problem •  InterpreLng the Dual of a the Dakota (Max) Problem The primal is: max z = 60x1 + 30x2 + 20x3 s.t. 8x1 + 4x1 + 6x2 + x3 ≤ 48 2x2 + 1.5x3 ≤ 20 2x1 + 1.5x2 + 0.5x3 ≤ 8 (Lumber constraint) (Finishing constraint) (Carpentry constraint) x1, x2, x3 ≥ 0 The dual is: min w = 48y1 + 20y2 + 8y3 s.t. 8y1 + 2y3 ≥ 60 (Desk constraint) 2y2 + 1.5y3 ≥ 30 (Table constraint) y1 + 1.5y2 + 0.5y3 ≥ 20 (Chair constraint) 6y1 + 4y2 + y1, y2, y3 ≥ 0 6.5 – Economic InterpretaLon of the Dual Problem The first dual constraint is associated with desks, the second with tables, and the third with chairs. Decision variable y1 is associated with lumber, y2 with finishing hours, and y3 with carpentry hours. Suppose an entrepreneur wants to purchase all of Dakota s resources. The entrepreneur must determine the price he or she is willing to pay for a unit of each of Dakota s resources. To determine these prices we define: y1 = price paid for 1 boards ft of lumber y2 = price paid for 1 finishing hour y3 = price paid for 1 carpentry hour The resource prices y1, y2, and y3 should be determined by solving the Dakota dual. 6.5 – Economic InterpretaLon of the Dual Problem The dual is: min w = 48 y1 + 20y2 +8y3 s.t. 8y1 + 2y3 ≥ 60 (Desk constraint) 2y2 + 1.5y3 ≥ 30 (Table constraint) y1 + 1.5y2 + 0.5y3 ≥ 20 (Chair constraint) 6y1 + 4y2 + y1, y2, y3 ≥ 0 Relevant information about the Dakota problem dual is shown below. Resource Lumber Finishing Carpentry Selling Price Desk Table 8 board ft 6 board ft 4 hours 2 hours 2 hours 1.5 hours $60 $30 Chair 1 board ft 1.5 hours 0.5 hours $20 Availability 48 boards ft 20 hours 8 hours 8.2 Shortest Path Problems Assume that each arc in the network has a length associated with it. Suppose we start with a par@cular node. The problem of finding the shortest path from node 1 to any other node in the network is called a shortest path problem. 2 4 4 2 2 1 1 2 3 4 6 2 3 3 5 Consider a network G = (N, A) in which there is an origin node s and a destination node t. Notation: n = |N|, m = |A| RepresenLng the Shortest Path Problem as an LP 2 4 4 2 2 1 s 1 2 3 4 t 2 3 3 Out-Flow = In-Flow for i ≠ s or t. (intermediate nodes) 5 min 2xs2 + 4xs3 + 1x23 + 4x24 + 2x25 + 3x35 + 2x4t + 3x54 + 2x5t min Σi Σj cij xij s.t s.t. xs2 + xs3 =1 -xs2 + x23 + x24 + x25 = 0 -xs3 - x23 + x35 = 0 -x24 - x54 + x4t = 0 -x25 – x35 + x54 + x5t = 0 -x4t - x5t = -1 0 ≤ xij ≤ 1 for all (i,j) Σj xsj =1 Σj xij – Σj xji =0 for each i ≠ s or t - Σi xit = -1 0 ≤ xij ≤ 1 for all (i,j) Dijkstra s Algorithm for the Shortest Path Problem 2 4 4 2 2 1 1 2 3 4 6 2 3 3 5 Exercise: find the shortest path from node 1 to all other nodes. Keep track of distances using labels, d(i) and each node s immediate predecessor, pred(i). d(1)= 0, pred(1)=0; d(2) = 2, pred(2)=1 Find the other distances, in order of increasing distance from node 1. A Key Step in Shortest Path Algorithms •  Let d( ) denote a vector of temporary distance labels. •  d(j) is the length of some path from the origin node 1 to node j. Procedure Update(i) for each (i,j) ∈ A(i) do if d(j) > d(i) + cij then d(j) : = d(i) + cij and pred(j) : = i; Path P 1 62 i 10 78 j Up to this point, the best path from 1 to j has length 78 But P, (i,j) is a path from 1 to j of length 72. 72 Dijkstra s Algorithm Initialize distances. begin d(s) : = 0 and pred(s) : = 0; d(j) : = ∞ for each j ∈ N ‐ {s}; LIST : = {s}; while LIST ≠ φ do begin let d(i) : = min {d(j) : j ∈ LIST}; remove node i from LIST; update(i) if d(j) decreases, place j in LIST end end LIST = set of temporary nodes Select the node i on LIST with minimum distance label, and then update(i) Scan the arcs out of i, and update d( ), pred( ), and d(4) = ∞ 6 LIST \ pred(4) = 2 An Example \ d(2) = ∞ 2 pred(2) = 1 2 d(1) = 0 pred(1) = 0 1 2 4 2 1 2 3 4 2 3 3 The End 4 3 d(6) = ∞ 6 \ pred(6) = 5 6 5 5 \ \\ d(3) = ∞ 4 3 d(5) = ∞ 4 pred(3) = 1 2 pred(5) = 2 \ LIST = {1, 2, 3, 4, 5, 6} \\\\\\ Find the node i on Find the node i on Initialize the LIST with and LIST with distances minimum distance. minimum distance. LIST. The Output from Dijkstra s Algorithm Toach nodeshortest E find the has 2 path from node j, one incoming trace back from the arc (except for node to the source. 6 4 2 the source) 4 2 2 0 1 1 2 3 2 4 3 3 5 6 6 4 3 Dijkstra provides a shortest path from node 1 to all other nodes. It provides a shortest path tree. Note that this tree is an out-tree. Car (or machine) replacement example: •  Let’s assume that we have just purchased a new car (or machine) for $12,000 at @me 0. •  The cost of maintaining the car during a year depends on the age of the car at the beginning of the year. •  To avoid the high maintenance cost associated with an older car, we may trade in the car and purchase a new car. •  Assume at any @me it costs $12,000 to purchase a new car •  Our goal is to minimize the net cost incurred during the next five years. Age of Annual Age of Car Trade-in Price Car (Years) Maintenance cost (Years) 0 $2,000 1 $7,000 1 $4,000 2 $6,000 2 $5,000 3 $2,000 3 $9,000 4 $1,000 4 $12,000 5 $0 Let s formulate this problem as a shortest path problem. •  Our network will have six nodes. •  Node i is the beginning of year i and for i<j, an arc (i,j) corresponds to purchasing a new car at the beginning of year i and keeping it un@l the beginning of year j. •  The length of arc (i,j) (call it cij) is the total net cost incurred from year i to j. cij = maintenance cost incurred during years i,i+1,…,j‐1 +cost of purchasing a car at the beginning of year i ‐trade‐in value received at the beginning of year j. c12=2+12‐7=7 c15=2+4+5+9+12‐1=31 c24=2+4+12‐6=12 c34=2+12‐7=7 c45=2+12‐7=7 c13=2+4+12‐6=12 c13=2+4+5+9+12+12‐0=44 c25=2+4+5+12‐2=21 c35=2+4+12‐6=12 c46=2+4+12‐6=12 c14=2+4+5+12‐2=21 c23=2+12‐7=7 c26=2+4+5+9+12‐1=31 c36=2+4+5+12‐2=21 c56=2+12‐7=7 Network for minimizing car costs From the figure below we can see that both path 1-3-5-6 and 1-2-4-6 will give us the shortest path with a value of 31. Dijkstra s Algorithm: Min {node j s current temporaty label, node j s permanent label + c(i,j)} 44 31 21 12 1 7 2 31 21 12 7 3 7 4 5 7 12 12 21 7 6 8.3 Maximum Flow Problems •  Many situa@ons can be modeled by a network in which the arcs may be thought of as having a capacity that limits the quan@ty of a product that may be shipped through the arc. •  It is ogen desired to transport the maximum amount of flow from a star@ng point (called the source) to a terminal point (called the sink). •  Such problems are called maximum flow problems. •  Directed Graph G = (N, A). –  Source s –  Sink t s –  Capacities uij on arc (i,j) –  Maximize the flow out of s, subject to •  Flow out of i = Flow into i, for i ≠ s or t. 10, ? 1 8,? 1,? 6, ? 2 t 10,? Represen@ng the Max Flow as an LP 10, 9 1 1,1 s 6, 6 2 max v s.t xs1 + xs2 t 10,7 max =v -xs1 + x12 + x1t = 0 -xs2 - x12 + x2t = 0 -x1t - x2t Flow out of i - Flow into i = 0 for i ≠ s or t. 8,8 = -v 0 ≤ xij ≤ uij for all (i,j) s.t. v Σj xsj Σj xij – Σj xji =v =0 for each i ≠ s or t s.t. - Σi xit = -v 0 ≤ xij ≤ uij for all (i,j) An example for maximum flow problem Sunco Oil wants to ship the maximum possible amount of oil (per hour) via pipeline from node so to node si as shown in the figure below. Arc (so,1) 2 1 3 4 2 3 si 2 1 (1,2) 3 4 (3,si) 1 (2,si) so 3 (1,3) 3 2 (so,2) a0 Capacity 2 The various arcs represent pipelines of different diameters. The maximum number of barrels of oil that can be pumped through each arc is shown in the table above (also called arc capacity). For reasons that will become clear soon, an ar@ficial arc called a0 is added from the sink to the source. To formulate an LP about this problem first we should determine the decision variable. Xij = Millions of barrels of oil per hour that will pass through arc(i,j) of pipeline. For a flow to be feasible it needs to be in the following range: 0 <= flow through each arc <= arc capacity And Flow into node i = Flow out from node i Let X0 be the flow through the ar@ficial arc, the conserva@on of flow implies that X0 = total amount of oil entering the sink. Thus, Sunco s goal is to maximize X0. Max Z= X0 S.t. Xso,1<=2 Xso,2<=3 X12<=3 X2,si<=2 X13<=4 X3,si<=1 X0=Xso,1+Xso,2 Xso,1=X12+X13 Xso,2+X12=X2,si X13+X3,si X3,si+X2,si=X0 Xij>=0 (Arc Capacity constraints) (Node so flow constraints) (Node 1 flow constraints) (Node 2 flow constraints) (Node 3 flow constraints) (Node si flow constraints) One op@mal solu@on to this LP is Z=3, Xso,1=2, X13=1, X12=1, Xso,2=1, X3,si=1, X2,si=2, Xo=3. (1)3 so (2)2 1 (1)3 (1)4 2 3 (2)2 (1)1 si Ford‐Fulkerson Method •  Step 1: Find a feasible flow (sekng each arc s flow to 0) •  Step 2: Using the labeling procedure, try to label the sink. If the sink cannot be labeled, then the current feasible flow is a maximum flow; if the sink is labeled, then go to Step 3. •  Step 3: Using the method previously described, adjust the feasible flow and increase the flow from the source to the sink. Return to Step 2. (0)3 so (0)2 1 2 (0)3 3 (0)4 si (0)2 (0)1 Label sink with chain (so,1)-(1,2)-(2,si): Increase the flow by min {2,3,2} = 2 (0)3 so (2)2 1 (2)3 (0)4 2 si (2)2 (0)1 3 Label sink with chain (so,2)-(2,1)-(1,3)-(3,si): Increase the flow by min {3,3,4,1} = 1 (1)3 so (2)2 1 (1)3 (1)4 2 3 (2)2 (1)1 si 8.5 Minimum Cost Network Flow Problems The transporta@on, assignment, transshipment, shortest path, maximum flow, and CPM problems are all special cases of minimum cost network flow problems (MCNFP). To define MCNFP, let xij = number of units of flow sent from node i to node j through arc(i,j) bi = net supply (outflow-inflow) at node i cij = cost of transporting 1 unit of flow from node i to node j via arc(i,j) Lij = lower bound of flow through arc(i,j) (if there is no lower bound, let Lij=0) Uij = upper bound of flow through arc(i,j) (if there is no upper bound, let Uij=∞) Supply point 1 min ∑c X ij Demand point 1 1 3 2 4 Supply point 2 Demand point 2 ij allarcs s.t.∑ Xij − ∑ Xki = bi j (for each node i in the network) k Lij ≤ Xij ≤ Uij (for each arc (i,j) in the network) Problem 3 •  Fordco produces cars in Detroit and Dallas. –  Detriot can produce as many as 6,500 cars at the cost of $2,000/car –  Dallas can product as many as 6,000 cars at the cost of $1,800/car •  Cars must be shipped to 3 ci@es: –  City 1 must receive 5,000 cars –  City 2 must receive 4,000 cars –  City 3 must receive 3,000 cars •  At most 2,200 cars may be sent form a given plant to a given city. From\To City 1 City 2 City 3 Detroit 800 600 300 Dallas 500 200 200 Problem 5 (p. 455) •  Oilco has oil fields in San Diego (SD) and Los Angeles (LA). –  SD can produce 500,000 barrels per day –  LA can produce 400,000 barrels per day. •  Crude oil must be sent to a refinery either in Dallas or Houston –  Dallas refinery cost is $700/100,000 barrels –  Houston s refinery cost is $900/100,000 barrels •  Refined oil is shipped to customers in Chicago (CH) and New York (NY). –  CH requires 400,000 barrels per day –  NY requires 300,000 barrels per day. •  The cost of shipping 100,000 barrels of oil (refined and crude) between ci@es are: From\To Dallas Houston NY CH LA 300 110 ‐ ‐ SD 420 100 ‐ ‐ Dallas ‐ ‐ 450 550 Houston ‐ ‐ 470 530 What if each refinery has capacity of 500,000 barrels/day Find the shortest path from node 1 to node 6 Set b(s) = 1, b(t) = -1 0 2 0 4 4 2 2 1 b(1) = 1 1 2 3 4 6 b(6) = -1 2 3 0 3 5 0 The optimal flow is to send one unit of flow along 1-2-5-6. This transformation works so long as there are no negative cost cycles in G. (What if there are negative cost cycles?) Find the Maximum Flow from s to t 1 10, 8 8,7 1,1 s 6, 5 2 b(i) = 0 for all i; t 10,6 add arc (t,s) with a cost of -1 and large capacity. The cost of every other arc is 0. 13 The optimal solution in the corresponding minimum cost flow problem will send as much flow in (t,s) as possible. 31 8.6 Minimum Spanning Tree Problems •  Suppose that each arc (i,j) in a network has a length associated with it and it represents a way of connec@ng node i to node j. –  For example, if each node in a network represents a computer in a computer network, arc(i,j) might represent an underground cable that connects computer i to computer j. •  In many applica@ons, we want to determine the set of arcs in a network that connect all nodes such that the sum of the length of the arcs is minimized. –  Clearly, such a group of arcs contain no loop. –  Minimum Spanning Tree Example: The State University campus has five computers. •  The distances between computers are given in the figure below. •  What is the minimum length of cable required to interconnect the computers? •  Note that if two computers are not connected this is because of underground rock forma@ons. 1 1 2 2 6 5 4 4 5 2 2 4 3 3 Finding the minimum spanning tree. •  IteraLon 1: Following the MST algorithm discussed before, we arbitrarily choose node 1 to begin. • The closest node is node 2. • Now C={1,2}, Ć={3,4,5}, and arc(1,2) will be in the minimum spanning tree. 1 1 2 2 6 5 4 4 5 2 2 4 3 3 •  IteraLon 2: Node 5 is closest to C. • Since node 5 is 2 blocks from node 1 and node 2, we may include either arc(2,5) or arc(1,5) in the minimum spanning tree. • We arbitrarily choose to include arc(2,5). Then C={1,2,5} and Ć={3,4}. 1 1 2 2 6 5 4 4 5 2 2 4 3 3 •  IteraLon 3: Since node 3 is 2 blocks from node 5, we may include arc(5,3) in the minimum spanning tree. Now C={1,2,5,3} and Ć={4}. 1 1 2 2 6 5 4 4 5 2 2 4 3 3 •  IteraLon 4: Node 5 is the closest node to node 4. Thus, we add arc(5,4) to the minimum spanning tree. We now have a minimum spanning tree consis@ng of arcs(1,2), (2,5), (5,3), and (5,4). The length of the minimum spanning tree is 1+2+2+4=9 blocks. 1 1 2 2 6 5 4 4 5 2 2 4 3 3 Another Simple Algorithm to Find MST •  Sort all the arcs in the network based on their costs in an ascending order. •  Star@ng from the top of the list (minimum), add the arc in the network if it does not create a cycle and remove it from the list. –  If the arc creates a cycle, remove it from the list and go to the next arc •  Keep adding the arcs un@l all the nodes are connected (a spanning tree is found). Arc Cost 1 5 4 4 5 2 3 3 (1,5) 2 (2,5) 2 2 (2,3) 4 1 (3,5) 2 2 2 6 (1,2) 1 3 (1,3) 4 (4,5) 4 (3,4) 5 (1,4) 6 Capital Budgeting Example: Suppose we have 6 projects. Let Yi be binary variables set to 1 if project i is invested in, and the interactions are as follows:   Project 3 can only be done if project 2 is also done   We must invest in at least one of the first three projects   Only one of projects 2, 4 and 6 can be done   Exactly two of the last four projects must be invested in, but we do not care which ones Capital Budgeting (Cont) Project 3 can only be done if 2 is also done – Add constraint: y3 ≤ y2 We must invest in at least one of the first three projects – Add constraint: y1 + y2 + y3 ≥ 1 Only one of projects 2, 4 and 6 can be done – Add constraint: y2 + y4 + y6 ≤ 1 Exactly two of the last four projects must be invested in, but we do not care which ones – Add constraint: y3 + y4 + y5 + y6 = 2 Formulation with 0/1 (Binary) Variables PROJi = Indicator for Project i = 1 accept Project i 0 reject Project i 1. Mutually Exclusive Constraints Example: Can t select both Project 1 and Project 3 PROJ1 + PROJ3 = 1 2. Co requisite Projects Constraint Example: Project 1 and Project 2 have to be selected together PROJ1 = PROJ2 or PROJ1 - PROJ2 = 0 3. Prerequisite Projects Constraint Example: Project 4 cannot be done unless Project 2 is done PROJ2 ≥ PROJ4 or PROJ2 - PROJ4 ≥ 0 4. K out of N Projects Constraint Example: Must Choose at least one of Projects 5, 6, 7 PROJ5 + PROJ6 + PROJ7 ≥ 1 Integer Programming Formulations Fixed-Charge Problems Suppose activity i incurs a fixed charge if undertaken at any positive level. Let x = Level of activity i i y= i 1 if activity i is undertaken at positive level 0 if x i (x < 0) i =0 Then a constraint of the form X i < M i Y i must be added to the formulation. Here, M i must be large enough to ensure that X i will be less than or equal to M i . Integer Programming Formulations (Cont) Either-Or Constraint Suppose we want to ensure that at least one of the following two constraints (and possibly both) are satisfied. f (x1 x 2 ,..., x n ) ≤ 0 g (x1 , x 2 ,..., x n ) ≤ 0 (26) (27) Adding the following two constraints to the formulation will ensure that at least one of (26) and (27) is satisfied: f (x1 x 2 ,..., x n ) ≤ My (26’) g (x1 , x 2 ,..., x n ) ≤ M (1 − y ) (27’) In (26’) and (27’), y is a 0-1 variables, and M is a number chosen large enough to ensure that f (x1 , x 2 ,..., x n ) ≤ M and g (x1 , x 2 ,..., x n ) ≤ M (1 − y ) ≤ M are satisfied for all values of x1 , x 2 ,..., x n that satisfy the other constraints in the problem. Integer Programming Formulations (Cont) Either-Or Constraint Example: suppose that the problem is either to satisfy 5x + 2y ≤ 10 → 5x + 2y – 10 ≤ 0 OR 3x - 4y ≤ 24 → 3x - 4y – 24 ≤ 0 – Let z = 0 if the first constraint is to hold and z = 1 if the second one is to hold – Let M be a large enough number that any likely combination of x and y would satisfy 5x + 2y < M and 3x - 4y < M Add constraints: 5x + 2y - 10 ≤ Mz 3x - 4y - 24 ≤ M(1-z) Branch‐and‐Bound Branch‐and‐bound methods implicitly enumerate all possible solu@ons to an IP. By solving a single subproblem, many possible solu@ons may be eliminated from considera@on. Subproblems are generated by branching on an appropriately chosen frac@onal‐valued variable . Assume decision variable xi has its a frac@onal value between the integers k and k+1. Then the two newly generated subproblems are •  New Subproblem 1: Old subproblem + Constraint xi ≤ k •  New Subproblem 2: Old subproblem + Constraint xi ≥ k+1 Brach‐and‐Bound: Key Ideas 1.  2.  Solve the linear program at the node Eliminate the subtree (fathom it) if –  The subproblem is infeasible. –  The solu@on is integer (there is no need to go further) •  If this solu@on has a beter z‐value than any previously obtained feasible solu@on in the IP, than it becomes a candidate soluLon. •  Its z‐value becomes the current lower bound (LB) on the op@mal z‐value for the IP. –  The op@mal z‐value for the subproblem cannot be as good as the best available solu@on (current LB), so it may be eliminated from considera@on. Branch and Bound Example z = max 4x1 − x2 X2 7 x1 − 2 x2 ≤ 14 x2 ≤ 3 2 x1 − 2 x2 ≤ 3 2 x ∈ Z+ z = 59/7 ( x1, x2 ) = ( X1 20 ,3) 7 Branch and Bound Example 20 ,3) •  Bounding: solve linear programming relaxation: ( x1, x2 ) = ( 7 •  Branching: divide into 2 subproblems: upper = 59/7 lower = − ∞ x1 ≤ 2 X2 x1 ≤ 2, x1 ≥ 3 x1 ≤ 2 x1 ≥ 3 x1 ≥ 3 X1 Branch and Bound Example •  Node selection: select left node •  Bounding: solve linear programming relaxation: •  Branching: divide into 2 subproblems: upper = 59/7 x1 ≤ 2 X2 1 ( x1, x2 ) = (2, ) 2 x2 = 0, x2 ≥ 1 x1 ≤ 2 x1 ≥ 3 x1 ≥ 3 upper = 15/2 x2 = 0 x2 ≥ 1 x2 ≥ 1 x2 = 0 X1 Branch and Bound Example •  •  Node selection: select (highest) right node Bounding: solve linear programming relaxation: infeasible •  Node is thus pruned by infeasibility upper = 59/7 x1 ≤ 2 x1 ≥ 3 infeasible upper = 15/2 x2 = 0 X2 x1 ≤ 2 x1 ≥ 3 x2 ≥ 1 x2 ≥ 1 x2 = 0 X1 Branch and Bound Example •  Node selection: select (lowest) right node •  Bounding: solve linear programming relaxation: •  Node is thus pruned by optimality upper = 59/7 x1 ≤ 2 x1 ≤ 2 x1 ≥ 3 x1 ≥ 3 infeasible upper = 15/2 x2 = 0 X2 ( x1, x2 ) = (2,1) x2 ≥ 1 Upper = lower = 7 x2 ≥ 1 x2 = 0 X1 Branch and Bound Example •  Node selection: select (lowest) left node •  Bounding: solve linear programming relaxation: •  Solution is 6, because 6<7 node is pruned by bound upper = 59/7 x1 ≤ 2 upper = 6 x1 ≤ 2 x1 ≥ 3 x1 ≥ 3 infeasible upper = 15/2 x2 = 0 X2 3 ( x1, x2 ) = ( ,0) 2 x2 ≥ 1 Upper = lower = 7 x2 ≥ 1 x2 = 0 X1 How to do it by hand Max z = 4 x1 + 3 x2 s.t. 2 x1 + 3 x2 <= 9 3 x1 + 2 x2 <= 13 x1 >= 0, x2 >= 0, x1, x2 integer X1 X2 S1 S2 1 0.000 0.000 0.200 1.200 17.400 2 X2 0.000 1.000 0.600 ‐0.400 0.200 3 X1 1.000 0.000 ‐0.400 0.600 4.200 X1 = 4.2, X2 = 0.2, Z = 17.4 ‐> Branch on X1 Add x1 <= 4 X1 X2 S1 S2 S3 1 0.000 0.000 1.000 0.000 2.000 17.000 2 X2 0.000 1.000 0.333 0.000 ‐0.667 0.333 3 S2 0.000 0.000 ‐0.667 1.000 ‐1.667 0.333 4 X1 1.000 0.000 0.000 0.000 1.000 4.000 Add x1 >= 5 X1 X2 S1 S2 E1 1 0.000 ‐3.000 0.000 0.000 ‐4.000 20.000 2 S1 0.000 3.000 1.000 0.000 2.000 ‐1.000 3 S2 0.000 2.000 0.000 1.000 3.000 ‐2.000 4 X1 1.000 0.000 0.000 0.000 ‐1.000 5.000 5 E1 0.000 5.000 0.000 0.000 5.000 ‐3.000 Add x2 <= 0 X1 X2 S1 S2 S3 S4 1 0.000 0.000 0.000 0.000 4.000 3.000 16.000 2 S1 0.000 0.000 1.000 0.000 ‐2.000 ‐3.000 1.000 3 S2 0.000 0.000 0.000 1.000 ‐3.000 ‐2.000 1.000 4 X1 1.000 0.000 0.000 0.000 1.000 0.000 4.000 5 X2 0.000 1.000 0.000 0.000 0.000 1.000 0.000 Add x2 >= 1 X1 X2 S1 S2 S3 E1 1 0.000 0.000 2.000 0.000 0.000 3.000 15.000 2 S3 0.000 0.000 ‐0.500 0.000 1.000 ‐1.500 1.000 3 S2 0.000 0.000 ‐1.500 1.000 0.000 ‐2.500 2.000 4 X1 1.000 0.000 0.500 0.000 0.000 1.500 3.000 5 X2 0.000 1.000 0.000 0.000 0.000 ‐1.000 1.000 Branch‐and‐Bound Tree Z = 1 7 .4 X 1 = 4 .2 X 2 = 0 .2 X 1< = 4 X 1> = 5 Z = 17 X 1 = 4 X 2 = 0 .3 3 3 X 2< = 0 Z = 16 X 1 = 4 X 2 = 0 Z = 1 7 .4 X 1 = 4 .2 X 2 = 0 .2 X 2< = 0 Z = 1 7 .3 3 3 X 1 = 4 .3 3 3 X 2 = 0 In fe a s ib le X 2> = 1 Z = 15 X 1 = 3 X 2 = 1 X 2> = 1 X 1< = 4 Z = 16 X 1 = 4 X 2 = 0 Z = 15 X 1 = 3 X 2 = 1 X 1> = 5 In fe a s ib le ...
View Full Document

This note was uploaded on 09/20/2011 for the course ENG 300 taught by Professor Albin during the Fall '11 term at Rutgers.

Ask a homework question - tutors are online