integer linear programming modeling
play

Integer Linear Programming Modeling Marco Chiarandini Department - PowerPoint PPT Presentation

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


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

  2. Outline 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Problems 3. More on Modeling Graph Problems Modeling Tricks 4. Formulations Uncapacited Facility Location Alternative Formulations 2

  3. Outline 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Problems 3. More on Modeling Graph Problems Modeling Tricks 4. Formulations Uncapacited Facility Location Alternative Formulations 3

  4. Discrete Optimization • Often we 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... 4

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

  6. Recall: • Z set of integers • Z + set of positive integer • Z + 0 set of nonnegative integers ( { 0 } ∪ Z + ) • N 0 set of natural numbers, ie, nonnegative integers { 0 , 1 , 2 , 3 , 4 , ... } 6

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

  8. Rounding 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 Note: rounding x 1 , x 2 ∈ Z + does not help in the example above! 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) 8

  9. Cutting Planes max x 1 + 4 x 2 x 1 + 6 x 2 ≤ 18 ≤ 3 x 1 x 1 , x 2 ≥ 0 x 1 , x 2 integers x 2 x 1 = 3 x 1 + 6 x 2 = 18 x 1 + x 2 = 5 x 1 x 1 + 4 x 2 = 2 9

  10. Branch and Bound 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 10

  11. 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 11

  12. 4 . 8 −∞ x 1 ≤ 1 x 1 ≥ 2 4 . 5 2 x 1 = 2 x 2 = 0 −∞ 2 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 12

  13. Outline 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Problems 3. More on Modeling Graph Problems Modeling Tricks 4. Formulations Uncapacited Facility Location Alternative Formulations 13

  14. Mathematical Programming: Modeling • Find out exactly what the decision maker 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 and Known Parameters corresponding to given data. • Formulate Objective Function computing the benefit/cost • Formulate mathematical Constraints indicating the interplay between the different variables. 14

  15. How to “build” a constraint • 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 both of 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 15

  16. Outline 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Problems 3. More on Modeling Graph Problems Modeling Tricks 4. Formulations Uncapacited Facility Location Alternative Formulations 16

  17. The Assignment Problem Problem Common application: Assignees are being assigned to perform tasks . Suppose we have n persons and n jobs 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. 17

  18. The Assignment Problem Model 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 18

  19. The Assignment Problem Model 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 19

  20. Outline 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Problems 3. More on Modeling Graph Problems Modeling Tricks 4. Formulations Uncapacited Facility Location Alternative Formulations 20

  21. The Knapsack Problem Problem .. Input: Given a set of n items, each with a value v i and weight w i ( i = 1 , . . . , n ) Task: determine the number of each items 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 and 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. 21

  22. The Knapsack Problem 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 22

  23. Outline 1. Integer Programming 2. Modeling Assignment Problem Knapsack Problem Set Problems 3. More on Modeling Graph Problems Modeling Tricks 4. Formulations Uncapacited Facility Location Alternative Formulations 23

  24. Set Covering Problem Given: a set of regions, a set of possible construction locations for emergency centers, regions that can be served in less than 8 minutes, cost of installing an emergency center in each location. Task: decide where to install a set of emergency centers such that the total cost is minimized and all regions are safely served As a COP : M = { 1 , . . . , m } regions, N = { 1 , . . . , n } centers, S j ⊆ M regions serviced by j ∈ N in 8 min.     � � c j | min S j = M T ⊆ N   j ∈ T j ∈ T regions: M = { 1 , . . . , 5 } centers: N = { 1 , . . . , 6 } cost of centers: c j = 1 ∀ j = 1 , . . . , 6 coverages: S 1 = ( 1 , 2 ) , S 2 = ( 1 , 3 , 5 ) , S 3 = ( 2 , 4 , 5 ) , S 4 = ( 3 ) , S 5 = ( 1 ) , S 6 = ( 4 , 5 ) 24

  25. Example • regions: M = { 1 , . . . , 5 } centers: N = { 1 , . . . , 6 } cost of centers: c j = 1 ∀ j = 1 , . . . , 6 coverages: S 1 = ( 1 , 2 ) , S 2 = ( 1 , 3 , 5 ) , S 3 = ( 2 , 4 , 5 ) , S 4 = ( 3 ) , S 5 = ( 1 ) , S 6 = ( 4 , 5 ) • x 1 x 2 x 3 x 4 x 5 x 6 S 1 S 2 S 3 S 4 S 5 S 6 1 1 1 0 0 1 0   2 1 0 1 0 0 0 A =   3 0 1 0 1 0 0     4 0 0 1 0 0 1   5 0 1 1 0 0 1 25

  26. 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. Set covering Set packing Set partitioning cover each of M at least once cover as many of M without cover exactly once each element of M overlap 1. min, ≥ 1. max, ≤ 1. max or min, = 2. all RHS terms are 1 2. all RHS terms are 1 2. all RHS terms are 1 3. all matrix elements are 1 3. all matrix elements are 1 3. all matrix elements are 1 min c T x max c T x max c T x A x ≥ 1 A x ≤ 1 A x = 1 x ∈ B n x ∈ B n x ∈ B n Generalization: RHS ≥ 1 Application examples: • Aircrew scheduling: M : legs to cover, N : rosters • Vehicle routing: M : customers, N : routes 27

  28. A good written example of how to present a model: [from G. Desaulniers, J. Desrosiers, Y. Dumas, M.M. Solomon and F. Soumis. Daily Aircraft Routing and Scheduling. Management Science, 1997, 43(6), 841-855]

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend