Tutorial: Operations Research in Constraint Programming John Hooker Carnegie Mellon University May 2009 Revised June 2009 CPAIOR tutorial May 2009 Slide 1
Motivation • Benders decomposition allows us to apply CP and OR to different parts of the problem. • It searches over values of certain variables that, when fixed, result in a much simpler subproblem . • The search learns from past experience by accumulating Benders cuts (a form of nogood). • The technique can be generalized far beyond the original OR conception. • Generalized Benders methods have resulted in the greatest speedups achieved by combining CP and OR. CPAIOR tutorial May 2009 Slide 313
Benders Decomposition in the Abstract When x is fixed to some Benders decomposition value, the resulting can be applied to subproblem is much problems of the form easier: min f x y ( , ) min f x y ( , ) …perhaps S x y ( , ) S x y ( , ) because it decouples into x D , y D y D ∈ ∈ ∈ x y y smaller problems. For example, suppose x assigns jobs to machines, and y schedules the jobs on the machines. When x is fixed, the problem decouples into a separate scheduling subproblem for each machine. CPAIOR tutorial May 2009 Slide 314
Benders Decomposition We will search over assignments to x . This is the master problem . k min f x ( , ) y In iteration k we assume x = x k and get optimal k S x ( , ) y value v k and solve the subproblem y D ∈ y v B 1 ( ) x We generate a Benders cut (a type of nogood) ≥ k + that satisfies B k+1 ( x k ) = v k . Cost in the original problem The Benders cut says that if we set x = x k again, the resulting cost v will be at least v k . To do better than v k , we must try something else. It also says that any other x will result in a cost of at least B k+1 ( x ), perhaps due to some similarity between x and x k . CPAIOR tutorial May 2009 Slide 315
Benders Decomposition We will search over assignments to x . This is the master problem . k min f x ( , ) y In iteration k we assume x = x k and get optimal k S x ( , ) y value v k and solve the subproblem y D ∈ y v B 1 ( ) x We generate a Benders cut (a type of nogood) ≥ k + that satisfies B k+1 ( x ) = v k . Cost in the original problem We add the Benders cut to the master problem, which becomes min v Benders cuts v B x ( ), i 1 , , k 1 ≥ = + i generated so far x D ∈ x CPAIOR tutorial May 2009 Slide 316
Benders Decomposition min v to get the next We now solve the v B x ( ), i 1 , , k 1 ≥ = + trial value x k+1 . i master problem x D ∈ x The master problem is a relaxation of the original problem, and its optimal value is a lower bound on the optimal value of the original problem. The subproblem is a restriction, and its optimal value is an upper bound . The process continues until the bounds meet. The Benders cuts partially define the projection of the feasible set onto x . We hope not too many cuts are needed to find the optimum. CPAIOR tutorial May 2009 Slide 317
Classical Benders Decomposition The classical method and the subproblem applies to problems whose dual is is an LP of the form ( ) k k max f x ( ) b g x ( ) min f x ( ) cy + λ − + k min f x ( ) cy + g x ( ) Ay b + ≥ k A c Ay b g x ( ) ( ) λ ≤ ≥ − λ x D , y 0 ∈ ≥ 0 y 0 λ ≥ ≥ x Let λ k solve the dual. By strong duality, B k+1 ( x ) = f ( x ) + λ k ( b − g ( x )) is the tightest lower bound on the optimal value v of the original problem when x = x k . λ k remains feasible in the dual . So by Even for other values of x , λ λ λ weak duality, B k+1 ( x ) remains a lower bound on v . CPAIOR tutorial May 2009 Slide 318
Classical Benders So the master problem becomes min v min v i v f x ( ) ( b g x ( )), i 1 , , k 1 ≥ + λ − = + v B x ( ), i 1 , , k 1 ≥ = + i x D ∈ x D ∈ x x In most applications the master problem is • an MILP • a nonlinear programming problem (NLP), or • a mixed integer/nonlinear programming problem (MINLP). CPAIOR tutorial May 2009 Slide 319
Example: Machine Scheduling • Assign 5 jobs to 2 machines (A and B), and schedule the machines assigned to each machine within time windows. • The objective is to minimize makespan . Time lapse between start of first job and end of last job. • Assign the jobs in the master problem , to be solved by MILP . • Schedule the jobs in the subproblem , to be solved by CP . CPAIOR tutorial May 2009 Slide 320
Machine Scheduling Job Data Once jobs are assigned, we can minimize overall makespan by minimizing makespan on each machine individually. So the subproblem decouples. Machine A Machine B CPAIOR tutorial May 2009 Slide 321
Machine Scheduling Job Data Once jobs are assigned, we can minimize overall makespan by minimizing makespan on each machine individually. So the subproblem decouples. Minimum makespan schedule for jobs 1, 2, 3, 5 on machine A CPAIOR tutorial May 2009 Slide 322
Machine Scheduling The problem is Start time of job j min M M s p , all j ≥ + Time windows j x j j r s d p , all j ≤ ≤ − Jobs cannot overlap j j j x j j ( ) disjunctive ( s x i ),( p x i ) , all i = = j j ij j CPAIOR tutorial May 2009 Slide 323
Machine Scheduling The problem is Start time of job j min M M s p , all j ≥ + Time windows j x j j r s d p , all j ≤ ≤ − Jobs cannot overlap j j j x j j ( ) disjunctive ( s x i ),( p x i ) , all i = = j j ij j For a fixed assignment the subproblem on each machine i is x min M M s p , all with j x i ≥ + = j x j j j r s d p , all with j x i ≤ ≤ − = j j j x j j j ( ) disjunctive ( s x i ),( p x i ) = = CPAIOR tutorial j j ij j May 2009 Slide 324
Benders cuts Suppose we assign jobs 1,2,3,5 to machine A in iteration k . We can prove that 10 is the optimal makespan by proving that the schedule is infeasible with makespan 9. Edge finding derives infeasibility by reasoning only with jobs 2,3,5. So these jobs alone create a minimum makespan of 10. So we have a Benders cut 10 if x x x A = = = = 2 3 4 v B ( ) x ≥ k + 1 0 otherwise CPAIOR tutorial May 2009 Slide 325
Benders cuts We want the master problem to be an MILP, which is good for assignment problems. So we write the Benders cut 10 if x x x A = = = = 2 3 4 v B ( ) x ≥ k 1 + 0 otherwise ( ) v 10 x x x 2 Using 0-1 variables: ≥ + + − A 2 A 3 A 5 v 0 = 1 if job 5 is ≥ assigned to machine A CPAIOR tutorial May 2009 Slide 326
Master problem The master problem is an MILP: min v Constraints derived from time windows 5 p x 10, etc. ≤ Aj Aj j 1 = Constraints derived from release times 5 p x 10, etc. ≤ Bj Bj j 1 = 5 5 v p x , v 2 p x , etc., i A B , ≥ ≥ + = ij ij ij ij j = 1 j = 3 v 10( x x x 2) ≥ + + − A 2 A 3 A 5 v 8 x ≥ Benders cut from machine A B 4 { } x 0,1 ∈ Benders cut from machine B ij CPAIOR tutorial May 2009 Slide 327
Stronger Benders cuts If all release times are the same, we can strengthen the Benders cuts. We are now using the cut v M x J 1 ≥ − + ik ij ik j J ∈ ik Min makespan Set of jobs on machine i assigned to in iteration k machine i in iteration k A stronger cut provides a useful bound even if only some of the jobs in J ik are assigned to machine i : v M (1 x ) p ≥ − − ik ij ij j J ∈ ik These results can be generalized to cumulative scheduling. CPAIOR tutorial May 2009 Slide 328
CPAIOR tutorial May 2009 Slide 329
Recommend
More recommend