1 / 42

Integer Linear Programming

Integer Linear Programming. When you need discrete solutions. Discrete Variables. Linear programming allows us to solve large scale network problems. It gives answers in terms of continuous variables

mary
Download Presentation

Integer Linear Programming

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. Integer Linear Programming When you need discrete solutions

  2. Discrete Variables • Linear programming allows us to solve large scale network problems. It gives answers in terms of continuous variables • However, there are many situations where we need solutions to network problems which are not allowed to fall in a continuous range

  3. Design Problem • For example, if we are designing a network, we need to decide whether to place a link between two particular nodes • In this case a decision is either “yes” or “no”. We could represent this as a variable which had only two possible values, 0 or 1

  4. Routing, Set-up Problems • A route could be represented by a logical variable which is 1 if a link is in the route, and 0 otherwise • The cost of using a link could include a “set-up” cost which would not be paid if the link was not used at all

  5. Modular Equipment • Equipment, such as switches, have to be bought with quantised traffic capacity • For example, a switch could have capacity equal to 100, 200,…400 Gbps, but it might be impossible to purchase anything between these numbers

  6. No Separate Method • No separate technique has been developed to solve this type of problem • The best solutions adapt the techniques of linear programming and look for discrete solutions in the vicinity of the continuous solution

  7. LP with Discrete Variables • Only discrete values allowed

  8. Branch and Bound • The most popular and successful method of obtaining discrete solutions today is called “branch and bound” • This method relies on our being able to solve a LP problem by the simplex method

  9. Branch and Bound • The first step is to solve the problem as a LP problem, using the simplex method • This will, in general produce solutions with variables in a continuous range • We take one of these variables and constrain it to take the allowed value below its current one

  10. Branch and Bound • This defines a new problem which can also be solved by the simplex method • However, it is also possible that the allowed value above the LP solution gives a better cost function • Therefore we should also try this constraint

  11. Simple Example • Maximise z = x1+x2 with constraints • x1 + 3x2 ≤ 3 • 3x1 + x2 ≤ 6 • x1, x2 integers ≥ 0 • (This example comes from Eiselt and Sandblom)

  12. Simple Example • The optimal solution to the LP problem is • x1 = 1.875 • x2 = 0.375 • z = 2.25 • We will choose x2 to constrain so that x2 ≤ 0

  13. Simple Example • The new solution is • x1 = 2 • x2 = 0 • z = 2 • We still need to try solving with constraint x2 ≥ 0

  14. Simple Example • The new solution is • x1 = 0 • x2 = 1 • z = 1 • Both of these solutions have given us integral values of x1 also • We choose the first solution because it has a higher z

  15. Branching Tree • We do not need to explore any more values in the region • We can illustrate what we have just done with a “branching tree” x1 = 1.875 x2 = 0.375 z = 2.25 x2≥ 1 x2≤ 0 x1 = 0 x2 = 1 z = 1 x1 = 2 x2 = 0 z = 2

  16. More Branching • In general we are not able to find suitable solutions after so few trials • The procedure may need to proceed through several branches • We now consider a more complicated example, also from Eiselt and Sandblom

  17. Example 2 • Maximise z = 4x1 + 6x2 + 10x3 • such that • 2x1 + x2 + 2x3 ≤ 13 • 3x1 – 2x2 – 4x3 ≥ 7 • x1, x2, x3 are integers ≥ 0 • We will branch left (down) on the non-integer with the lowest subscript

  18. x1 = 45/7, x2 = 34/7, x3 = 0, z1 = 402/7 n1 x1 ≤ 4 x1 ≥ 5 x1 = 4, x2 = 21/2, x3 = 0, z2 = 31 n2 x2 ≥ 3 x2 ≤ 2 x1 = 4, x2 = 2, x3 = 1/4, z3 = 301/2 n3 x3 ≤ 0 x3 ≥ 1 x1 = 4, x2 = 2, x3 = 0, z4 = 28 n4

  19. Moving down the Tree • In this tree, node n1 is the LP solution, and represents an upper bound on the objective function • As we move through nodes n2, n3 and n4, we add more and more constraints on the variables • As we move down, z never increases

  20. Bound • Node n4 is the first node we have found with all integer variables • Therefore, 28 is a lower bound on the solution • When we reach such a solution, we have reached a “bound” in the branch and bound technique

  21. Other Branches • We have not yet explored all the possibilities near the LP solution • We now backtrack and explore some of the possibilities in the right hand branches • The next slide shows some of the results

  22. x1 = 45/7, x2 = 34/7, x3 = 0, z1 = 402/7 n1 x1 ≤ 4 x1 ≥ 5 x1 = 4, x2 = 21/2, x3 = 0, z2 = 31 x1 = 5, x2 = 3, x3 = 0, z5 = 38 n2 n5 x2 ≥ 3 x2 ≤ 2 x1 = 4, x2 = 2, x3 = 1/4, z3 = 301/2 n6 No feasible solution n3 x3 ≤ 0 x3 ≥ 1 x1 = 4, x2 = 2, x3 = 0, z4 = 28 x1 = 4, x2 = 1/2, x3 = 1, z7 = 29 n4 n7

  23. Further Branching • Node n5 has an all-integer solution, so we do not branch any further from this node • Node n6 does not have any feasible solutions: so no further branches • Node n7 does allow further branches

  24. Fathoming • Notice that z5 = 38, and z7 = 29 • If we had evaluated node n5 before n7, we need not have proceeded any further, since it would be impossible for z7 to be more than z3, which is 301/2 • This is called “fathoming”

  25. Binary Tree • The structure of solutions is called a “binary tree”. Every node in the tree represents a problem which must be solved by the simplex method • To reduce computing time, we try to keep the number of nodes in the tree as small as possible

  26. Depth First Strategy • The “depth first” strategy takes the left hand branch until the tree can be “pruned” • Then it backtracks to the last node where it could take another branch (to the right) • Then it continues with left branches

  27. Breadth First Strategy • The “breadth first” strategy evaluates all nodes at level 2 before going to examine all nodes at level 3 and so on • On the average, it has been found that “depth first” strategies are faster than “breadth first” strategies

  28. Routing Problem • The capacity on each link in the network below is 10 Gbps • The three traffic flows, f1, f3 and f5 to node 4 from nodes 1, 3 and 5 have to choose one of the routes shown in the sketch 1 2 3 4 5 6

  29. Routing Problem • The traffic must be distributed so that the following cost function is minimised • uk = utilisation in link k • dk = length of link k

  30. Routing Problem • Let us introduce three variables, x1, x3 and x5 to indicate that the upper route is chosen when xj = 1, and the lower route is chosen when xj = 0 • Let us also name the nine links l1 to l9 as shown in the next slide • Assume traffic in both directions

  31. Numbered Links 2 1 2 1 3 5 4 6 4 3 7 9 5 6 8

  32. For link 1 For link 2 For link 3 For link 4 For link 5 For link 7 For links 8 and 9 x3f3 ≤ 10 x1f1 + x3f3 ≤ 10 x1f1 + x3f3 + x5f5 ≤ 10 (1-x1)f1 ≤ 10 x5f5 ≤ 10 (1-x3)f3 ≤ 10 (1-x1)f1 + (1-x3)f3 + (1-x5)f5 ≤ 10 Constraints

  33. Cost Function • x1, x3, x5 ≥ 0 • Cost function is • = (x3f3d1 + (x1f1 + x3f3 )d2 +…+ ((1-x1)f1 + (1-x3)f3 + (1-x5)f5 )d9)/10 • This is a linear combination of x1, x3 and x5 • This states the problem in a form which can be solved using LP

  34. Integer Linear Programming • The first solution will give fractional values for x1, x3 and x5 • Since we need these variables to be either 1 or zero, we select one arbitrarily (say x1) and solve again for x1 ≤ 0, and so we start the process of integer linear programming

  35. Discrete Solution • Ultimately, we will get to the best possible solution with all three variables equal to either 1 or zero • This will then be the “best” way of distributing the routes in this network, for the set of flows f1, f3, f5

  36. Realistic Problem • This was a problem with a reduced number of flows in a small network • A more realistic statement of the problem would have included flows from every node to every other node (6*5/2 = 15 flows) • We also allowed only two routes per flow

  37. Increasing Complexity • As the network load changes, it will be more efficient to consider several routes for each flow • If we had four possible routes for one flow, we would then need a more complicated way to select the route to be used (see Lecture 6)

  38. Single Route? • It is generally found that it is better to select a single route for each flow in networks with more than about 20 nodes • Below this number it is often best to split the traffic between at least two routes for a single flow

  39. Small Network • This means that we could run the network better if we allowed x1, x3 and x5 to take fractional values • Then the first LP solution we had would be optimal for our small network, as long as 0 ≤ xi ≤ 1 for all i

  40. OSPF • Note that OSPF allows multiple routes through a network

More Related