integer linear programming modeling
play

Integer Linear Programming Modeling Marco Chiarandini Department - PowerPoint PPT Presentation

DM545 Linear and Integer Programming Lecture 8 Integer Linear Programming Modeling Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Integer Programming Outline Modeling 1. Integer


  1. DM545 Linear and Integer Programming Lecture 8 Integer Linear Programming Modeling Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark

  2. Integer Programming Outline Modeling 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Covering Graph Problems 2

  3. Integer Programming LP: Rational Solutions Modeling ◮ A precise analysis of running time for an algorithm includes the number of bit operations together with number of arithmetic operations ◮ Strongly polynomial algorithms: the running time of the algorithm is independent on the number of bit operations. Eg: same running time for input numbers with 10 bits as for inputs with a million bits. ◮ No strongly polynomial-time algorithm for LP is known. ◮ Running time depends on the sizes of numbers. We have to restrict attention to rational instances when analyzing the running time of algorithms and assume they are coded in binary. Theorem Optimal feasible solutions to LP problems are always rational as long as all coefficient and constants are rational. Proof: derives from the fact that in the simplex we only perform multiplications, divisions and sums of rational numbers 3

  4. Integer Programming Outline Modeling 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Covering Graph Problems 4

  5. Integer Programming Discrete Optimization Modeling ◮ Often need to deal with integral inseparable quantities. ◮ Sometimes rounding can go. ◮ Other times rounding not feasible: eg, presence of a bus on a line is 0.3... 5

  6. Integer Programming Integer Linear Programming Modeling Linear Objective The world is not linear: OR is the art Linear Constraints and science of obtaining bad answers but! integer variables to questions to which otherwise worse answers would be given max c T x + h T y max c T x Ax + Gy ≤ b max c T x max c T x Ax ≤ b x ≥ 0 Ax ≤ b x ≥ 0 Ax ≤ b y ≥ 0 x ∈ { 0 , 1 } n x ≥ 0 x integer y integer Linear Binary Integer Integer (Linear) Mixed Integer Programming Program (BIP) Programming (ILP) (Linear) (LP) 0/1 Integer Programming Programming (MILP) max f ( x ) Non-linear Programming g ( x ) ≤ b (NLP) x ≥ 0 6

  7. Integer Programming Modeling Recall: ◮ Z set of integers ◮ Z + set of positive integer ◮ Z + 0 set of nonnegative integers ( { 0 } ∪ Z + ) 7

  8. Integer Programming Combinatorial Optimization Problems Modeling Definition (Combinatorial Optimization Problem (COP)) Given: Finite set N = { 1 , . . . , n } of objects, weights c j ∀ j ∈ N , F a collection of feasible subsets of N Find a minimum weight feasible subset:     � min c j | S ∈ F S ⊆ N   j ∈ S Many COP can be modelled as IP or BIP. � 1 if j ∈ S Typically: incidence vector of S , x S ∈ R n : x S j = 0 otherwise 8

  9. Integer Programming Rounding Modeling 3 x 1 − 2 x 2 + 4 x 2 max 100 x 1 + 64 x 2 50 x 1 + 31 x 2 ≤ 250 3 x 1 − 2 x 2 ≥ − 4 x 1 , x 2 ∈ Z + LP optimum ( 376 / 193 , 950 / 193 ) IP optimum ( 5 , 0 ) x 1 x 1 + 0 . 64 x 2 − 4 50 x 1 + 31 x 2 − 250 � feasible region convex but not continuous: Now the optimum can be on the border (vertices) but also internal. Possible way: solve the relaxed problem. ◮ If solution is integer, done. ◮ If solution is rational (never irrational) try rounding to the nearest integers (but may exit feasibility region) if in R 2 then 2 2 possible roundings (up or down) if in R n then 2 n possible roundings (up or down) Note: rounding does not help in the example above 9

  10. Integer Programming Cutting Planes Modeling max x 1 + 4 x 2 x 1 + 6 x 2 ≤ 18 x 1 ≤ 3 x 1 , x 2 ≥ 0 x 1 , x 2 integer x 2 x 1 = 3 x 1 + 6 x 2 = 18 x 1 + x 2 = 5 x 1 x 1 + 4 x 2 = 2 10

  11. Integer Programming Branch and Bound Modeling max x 1 + 2 x 2 x 1 + 4 x 2 ≤ 8 4 x 1 + x 2 ≤ 8 x 1 , x 2 ≥ 0 , integer x 2 x 1 + 4 x 2 = 8 x 1 x 1 + 2 x 2 = 1 4 x 1 + x 2 = 8 11

  12. Integer Programming Modeling 4 . 8 x 1 ≤ 1 x 1 ≥ 2 x 2 x 2 x 1 = 1 x 1 + 4 x 2 = 8 x 1 + 4 x 2 = 8 x 1 x 1 x 1 + 2 x 2 = 1 x 1 + 2 x 2 = 1 4 x 1 + x 2 = 8 4 x 1 + x 2 = 8 12

  13. Integer Programming Modeling 4 . 8 −∞ x 2 ≤ 1 x 1 ≥ 2 x 1 = 2 4 . 5 5 x 2 = 0 5 −∞ x 2 ≤ 1 x 2 ≥ 2 x 1 = 1 x 1 = 0 3 4 x 2 = 1 3 4 x 2 = 2 x 2 x 2 x 1 + 4 x 2 = 8 x 1 + 4 x 2 = 8 x 1 x 1 x 1 + 2 x 2 = 1 x 1 + 2 x 2 = 1 4 x 1 + x 2 = 8 4 x 1 + x 2 = 8 13

  14. Integer Programming Outline Modeling 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Covering Graph Problems 14

  15. Integer Programming Mathematical Programming: Modeling Modeling ◮ Find out exactly what the decision makes needs to know: ◮ which investment? ◮ which product mix? ◮ which job j should a person i do? ◮ Define Decision Variables of suitable type (continuous, integer valued, binary) corresponding to the needs ◮ Formulate Objective Function computing the benefit/cost ◮ Formulate mathematical Constraints indicating the interplay between the different variables. 15

  16. Integer Programming How to “build” a constraint Modeling ◮ Formulate relationship between the variables in plain words ◮ Then formulate your sentences using logical connectives and, or, not, implies ◮ Finally convert the logical statement to a mathematical constraint. Example ◮ “The power plant must not work in two neighbouring time periods” ◮ on/off is modelled using binary integer variables ◮ x i = 1 or x i = 0 ◮ x i = 1 implies ⇒ x i + 1 = 0 ◮ x i + x i + 1 ≤ 1 16

  17. Integer Programming Outline Modeling 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Covering Graph Problems 17

  18. Integer Programming The Assignment Problem Modeling The problem .. The assignment problem is a well known optimization problem where assignees are being assigned to perform tasks . Assigning people to jobs is a common application of the assignment problem. Suppose we have n people and n jobs, and that each person has a certain proficiency at each job. Formulate a mathematical model that can be used to find an assignment that maximizes the total proficiency. 18

  19. Integer Programming The Assignment Problem Modeling Decision Variables: � 1 if person i is assigned job j x ij = for i , j = 1 , 2 , . . . , n 0 otherwise, Objective Function: n n � � max ρ ij x ij i = 1 j = 1 where ρ ij is person i ’s proficiency at job j 19

  20. Integer Programming The Assignment Problem Modeling Constraints: Each person is assigned one job: n � x ij = 1 for all i j = 1 e.g. for person 1 we get x 11 + x 12 + x 13 + · · · + x 1 n = 1 Each job is assigned to one person: n � x ij = 1 for all j i = 1 e.g. for job 1 we get x 11 + x 21 + x 31 + · · · + x n 1 = 1 20

  21. Integer Programming Outline Modeling 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Covering Graph Problems 21

  22. Integer Programming The Knapsack Problem Modeling The problem .. Given a set of n items, each with a value v i and weight w i ( i = 1 , . . . , n ) , one must determine the number of each item to include in a collection so that the total weight is less than a given limit, W , and the total value is as large as possible. The “knapsack” name derives from the problem faced by someone who is constrained by a fixed-size knapsack and must fill it with the most useful items. Assuming we can take at most one of any item, that � i w i > W , formulate a mathematical model to determine which items give the largest value. Model used, eg, in capital budgeting, project selection, etc. 22

  23. Integer Programming The Knapsack Problem Modeling Decision Variables: � 1 if item i is taken x i = for i = 1 , 2 . . . , n 0 otherwise, Objective Function: n � max v i x i i = 1 Constraints: Knapsack capacity restriction: n � w i x i ≤ W i = 1 23

  24. Integer Programming Outline Modeling 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Covering Graph Problems 24

  25. Integer Programming Set Covering Modeling Given: a number of regions, a number of centers, regions that can be served in less than 8 minutes, cost of installing an emergency center. Task: Where to install a set of emergency centers such that the total cost is minimized and all regions safely served? As a COP : M = { 1 , . . . , m } regions, N { 1 , . . . , n } centers, S j ⊆ M regions serviced by j     � � min c j | S j = M T ∈ N   j ∈ T j ∈ T 25

  26. Integer Programming Modeling As a BIP: Variables: x ∈ B n , x j = 1 if center j is selected, 0 otherwise Objective: n � min c j x j j = 1 Constraints: � 1 ◮ incidence matrix: a ij = 0 ◮ � n j = 1 a ij x j ≥ 1 26

  27. Integer Programming Modeling Example ◮ M = { 1 , . . . , 5 } , N = { 1 , . . . , 6 } , c j = 1 ∀ j = 1 , . . . , 6 S 1 = ( 1 , 2 ) , S 2 = ( 1 , 3 , 5 ) , S 3 = ( 2 , 4 , 5 ) , S 4 = ( 3 ) , S 5 = ( 1 ) , S 6 = ( 4 , 5 ) ◮   1 1 0 0 1 0 1 0 1 0 0 0     A = 0 1 0 1 0 0     0 0 1 0 0 1   0 1 1 0 0 1 27

Recommend


More recommend