An Integrated OR/CP Method for Plannng and Schedulng John Hooer Carnege Mellon Unversty IT Unversty of Copenhagen June 2005
The Problem Allocate tass to facltes. Schedule tass assgned to each faclty. Subect to deadlnes. Facltes may run at dfferent speeds and ncur dfferent costs. Cumulatve schedulng Several tass may run smultaneously on a faclty. But total resource consumpton must never eceed lmt. 2
Approach In practce problem s often solved by gve-and-tae. If schedule doesn t wor schedulers telephone planners and as for a dfferent allocaton Repeat untl everyone can lve wth the soluton. Benders decomposton s a mathematcal formalzaton of ths process. Plannng s the master problem. Schedulng s the subproblem. Telephone calls are Benders cuts. Use logc-based Benders. Classcal Benders requres that the subproblem be a lnear or nonlnear programmng problem. 3
Approach Decomposton permts hybrd soluton: Apply MIP to plannng master problem. MIP s generally better at resource allocaton. Apply CP to schedulng subproblem. CP s generally better at schedulng. 4
Prevous Wor 995 JH & Yan Apply logc-based Benders to crcut verfcaton. Better than BDDs when crcut contans error. 995 2000 JH Formulate general logc-based Benders. Specalzed Benders cuts must be desgned for each problem class. Branch-and-chec proposed. 200 Jan & Grossmann Apply logc-based Benders to multple-machne schedulng usng CP/MIP. Substantal speedup. But easy problem for Benders approach 5
200 Thorstensson Apply branch and chec to CP/MIP. -2 orders of magntude speedup on multple machne schedulng 2002 Tmpe Apply logc-based Benders to polypropylene batch processng at BASF. Solved prevously nsoluble problem n 0 mn. 2003 JH Ottosson Apply logc-based Benders to IP and SAT. Potentally useful for stochastc IP. Substantal advantage when subproblem decouples nto 20 or more scenaros. 2004 Cambazard et al. Apply logc-based Benders mn conflct cuts to real-tme tas allocaton & schedulng. CP solves both master and subproblem. 6
2004 JH Apply logc-based Benders to mn cost and mn maespan plannng & cumulatve schedulng problems. 00 to 000 tmes faster than CP MIP 2005 JH Mn total tardness mn number of late obs. At least 0 tmes faster for mn tardness much better solutons. 00 to 000 tmes faster for mn number of late obs. 7
ogc-based Benders Decomposton mn subect to f C y y D y D y Basc dea: Search over values of n master problem. For each eamned solve subproblem for y. mn z Master Problem Subproblem subect to z z B D y all D y mn y subect to C y D y Benders cuts for all teratons f y y Soluton of master problem 8
ogc-based Benders Decomposton mn Subproblem subect to f C y y y D y Soluton of subproblem dual s a proof that cost can be no less than the optmal cost when s.t. B Subproblem dual ma v C v R y P P f Q y We use the same proof schema to derve a vald lower bound B for any. z B Benders cut a type of nogood forces master problem to loo at a value of other than to get a lower cost. v 9
Applyng Benders to Plannng & Schedulng Decompose problem nto assgnment resource-constraned assgn tass schedulng to facltes schedule tass on each faclty Use logc-based Benders to ln these. Solve: master problem wth MIP -- good at resource allocaton subproblem wth Constrant Programmng -- good at schedulng We wll use Benders cuts that requre no nformaton from the CP soluton process. 0
Notaton p processng tme of tas on faclty c resource consumpton of tas on faclty C resources avalable on faclty C tas c Faclty Faclty 2 tas 4 tas 5 C 2 c 22 tas 3 tas 2 p p 22 Total resource consumpton C at all tmes.
Obectve functons Mnmze cost g y faclty assgned to tas Fed cost of assgnng tas to faclty y Mnmze maespan ma { t p y } Start tme of tas 2
Obectve functons y Mnmze no. late tass δ p δ α f α > 0 0 otherwse t d Due date for tas Mnmze tardness p y d { } α ma 0 α t 3
mn subect to Mnmze cost: MIP Model f tas starts at tme pont t on faclty t N t t t t t g t t p t t ' 0 0 < t ' {0} t all all all c t t t ' wth wth Tas starts at one tme on one faclty Tass underway at tme t consume C n C all t resources t d > N p < p t Tass observe tme wndows 4
5 p d t C y c y p y t g y y all 0 all cumulatve subect to mn Mnmze Cost: CP Model Observe tme wndows Observe resource lmt on each faclty y faclty assgned to tas start tmes of tass assgned to faclty
Mnmze Cost: ogc-based Benders C mn subect to Master Problem: Assgn tass to facltes tas d g d p c all Benders cuts tas 4 tas 5 C d d all all dstnct Relaaton of subproblem: Area d r of tass due before d must ft before d. d 6
Subproblem: Schedule tass assgned to each faclty Solve by constrant programmng soluton of master problem cumulatve 0 t d t p c C all et J h set of tass assgned to faclty n teraton h. If subproblem s nfeasble soluton of subproblem dual s a proof that not all tass n J h can be assgned to faclty. Ths provdes the bass for a smple Benders cut. 7
mn subect to Master Problem wth Benders Cuts Solve by MIP d c J d h all p r C d all {0} Benders cuts all all dstnct h d 8
C Mnmze Maespan: ogc-based Benders Master Problem: Assgn tass to facltes mn subect to M maespan all M p C Benders cuts c all act vty actvty 4 actvty 5 Relaaton of subproblem: Area of tass provdes lower bound on maespan. 9
Subproblem: Schedule tass assgned to each faclty Solve by constrant programmng mn M subect to M t 0 t d d cumulatve t p c all all C all et J h set of tass assgned to machne n teraton h. We get a Benders cut even when subproblem s feasble. 20
The Benders cut s based on: emma. If we remove tass s from a faclty the mnmum maespan on that faclty s reduced by at most s p ma d s s { d } mn { } Assumng all deadnes d are the same we get the Benders cut * M M h p J h Mn maespan on faclty n last teraton 2
M Why does ths wor? Assume all deadlnes are the same. Add tass s sequentally at end of optmal schedule for other tass Case I: resultng schedule meets deadlne Optmal maespan for tass s m Optmal maespan for all tass * Mˆ M ˆ s M p Feasble maespan for all tass tass s m tas tas s s s M ˆ * p M M d * ˆ p Deadlne for all tass 22
Case II: resultng schedule eceeds deadlne Optmal maespan for tass s m Optmal maespan for all tass * Mˆ M ˆ s M p Maespan no longer feasble tass s m tas tas s M s Deadlne for all tass * * d and M ˆ p > d M ˆ M p d s 23
mn subect to Master Problem: Assgn tass to facltes Assume all deadlnes are the same Solve by MIP M M M C M {0} all * h p J c all p Relaaton all h Benders cuts Maespan on faclty n teraton h 24
Mnmze Number of ate Jobs: ogc-based Benders mn s.t. Master Problem: Assgn tass to facltes C d ma Benders cuts d d all c d p 0 { p } all d all Number of late tass Relaaton of subproblem: Dvde ecess area of tass by longest processng tme. all dstnct d 25
Benders cuts To etract some dual nformaton re-solve the schedulng subproblem a few tmes wth some tass removed. Use greedy algorthm to dentfy 0 J h et a set of tass that can be ontly removed from J h faclty wthout reducng mn number of late tass a set of tass that can be ontly removed wthout reducng mn no of late tass more than Ths yelds Benders cuts: * h * h * h J * h h \ J 0 h J h \ J h all h all h 26
Mnmze Tardness: ogc-based Benders Master Problem: Assgn tass to facltes mn s.t. T T T T p c C d d second relaaton of Benders cuts all T 0 tardness all d all all subproblem Relaaton of subproblem dstnct d 27
Second relaaton of subproblem emma. Consder a mn tardness problem that schedules tass n on faclty where d d n. The mn tardness T* s bounded below by n where p π c d π C and π s a permutaton of n such that p π c π p π c π n n 28
Idea of proof For a permutaton σ of n let σ σ where σ p π c d π σ C n et σ 0 σ 0 n be order of obs n any optmal soluton so that t and mn tardness s T* t σ 0 σ 0 n Consder bubble sort on σ 0 σ 0 n to obtan n. et σ 0 σ S be resultng sequence of permutatons so that σ s σ s dffer by a swap and σ s. 29
30 Now we have T S s s * 0 σ σ σ σ snce c p C t π π n s s s s s n s s s s s 2 2 σ σ σ σ σ σ σ σ σ σ swap and So 0 B A b a b A A a s s s s s s σ σ σ σ σ σ snce A a B b
3 From the lemma we can wrte the relaaton n T where d c p C π π π To lnearze ths we wrte n T and M d c p C π π π d c p C M π π where
Benders cuts To etract some dual nformaton re-solve the schedulng subproblem a few tmes wth some tass removed. 0 J h et {tass that can be ndvdually removed wthout reducng mn tardness} 0 T h mn tardness f all tass n are removed smultaneously 0 J h Ths yelds Benders cuts: T T T T 0 h * h T T 0 h * h J J h h \ J 0 h all h all h 32
Computatonal Results Random problems on 2 3 4 facltes. Facltes run at dfferent speeds. All release tmes 0. Mn cost and maespan problems: all tass have same deadlne. Tardness problems: random due date parameters set so that a few tass tend to be late. No precedence or other sde constrants. Maes problem harder. Implement wth OP Studo CPEX for MIP. IOG Scheduler for CP. Use AssgnAlternatves & SetTmes. 33
Mn cost 2 facltes Computaton tme n seconds Average of 5 nstances shown Jobs MIP* CP Benders 0.9 0.4 0.09 2 99 2.2 0.06 4 44 79 0.04 6 3605 5. 8 7200 7.0 20 85 22 674 At least one problem n the 5 eceeded 7200 sec 2 hours 34
Mn cost 3 facltes Computaton tme n seconds Average of 5 nstances shown Tass MIP* CP Benders 0 0.9 0.3 0.37 2 797 2.6 0.55 4 4 35 0.34 6 678* 929 4.5 8 7200 5 20 2.9 22 23 24 53 *CPEX ran out of memory on or more problems. At least one problem n the 5 eceeded 7200 sec 2 hours 35
Mn cost 4 facltes Computaton tme n seconds Average of 5 nstances shown Jobs MIP* CP Benders 0 2.0 0.0 0.6 2 7.2.4 4.0 4 58 72 2.8 6 906* 344 0.8 8 6343 5.2 20 2.6 22 22 24 4 26 76 *CPEX ran out of memory on or more problems. At least one problem n the 5 eceeded 7200 sec 2 hours 36
Mn maespan 2 facltes Average of 5 nstances shown Jobs MIP CP Benders 0 3.4 0.8 0.08 2 2 4.0 0.39 4 2572 299 7.8 6 5974 3737 30 8 7200 46 20 2656 At least one problem n the 5 eceeded 7200 sec 2 hours 37
Mn maespan 3 facltes Average of 5 nstances shown Jobs MIP CP Benders 0 3.9 0.9 0.06 2 2 7.5 0.3 4 524 98 0.7 6 76 444 6.5 8 469 7200 3.3 20 34 22 3084 At least one problem n the 5 eceeded 7200 sec 2 hours 38
Mn maespan 4 facltes Average of 5 nstances shown Jobs MIP CP Benders 0.0 0.07 0.09 2 5.0.9 0.09 4 24 524 0.8 6 35 3898 0.9 8 393 7200 4 20 25 22 472 24 3 At least one problem n the 5 eceeded 7200 sec 2 hours 39
Scalng up the Benders Method Average of 5 nstances shown Tass Facltes Mn cost sec Mn maespan sec 0 2 0. 0.2 5 3 0.7.6 20 4 50 3 25 5 2.9 23 30 6 4.8 3373 35 7 28 6404 40 8 792 7200 At least one problem n the 5 eceeded 7200 sec 2 hours 40
Bounds Provded by Benders Mn maespan problems unsolved after 2 hours Tass Facltes Best soluton value ower bound 30 6 3 2 35 7 0 35 7 5 3 40 8 4 40 8 5 2 40 8 6 3 40 8 0 9 40 8 3 4
Mn number of late tass 3 facltes Smaller problems Tass Tme sec CP MIP Benders Mn late tass 0 0. 0.5 0. 2.5 0.5 0.2 0.3 0.5 0.3 2 0.2 0.4 0.9 3.7 3.4 3.0 3 2 0.0 0.7 0. 0 0.0 0.7 0.2 0 0.0 0.6 0. 3.2.4 0.2.6.7 0.3 4 092 5.8 0.5 382 8.0 0.7 265 3.2 0.7 2 85 2.6.3 2 5228 35 665 3 6 304 2.7 0.5 0 error 3 0.2 30 22 0.4 4925 29 2.7 2 9 5.7 24 4 42
Mn number of late tass 3 facltes arger problems For 6 tass: average tme rato MIP/Benders 295 Tass Tme sec MIP Benders Best soluton MIP Benders 8 2.0 0. 0 0 8.0 0.2 867 8.5 6.3.4 2 2 577 3.4 2 2 20 97 0.4 0 0 >7200 2.3 29 5.0 >7200 2 2 843 66 3 3 22 6.3 0 0 >7200 3.7 >7200 49 3 2 >7200 3453 5 2 >7200 >7200 6 6 24 25 0.8 0 0 >7200 8 0 >7200 62 2 0 >7200 24 3 >7200 234 2 Boldface optmalty proved 43
Mn tardness 3 facltes Smaller problems Tass Tme sec CP MIP Benders Mn tardness 0 3 4.7 2.8 0. 6.4.6 0.4 6.4.6 6 4.6 32 4. 7 8. 33 22 24 2 4.7 0.7 0.2 0 4 0.6 0. 0 25 0.7 0.2 9 5 2.4 9 37 25 2 5 4 838 7.0 6. 759 34 3.7 2 783 45 9 5 >7200 73 40 9 >7200 >7200 3296 26 6 >7200 9.4 0 >7200 46 2. 0 >7200 52 4.2 4 >7200 05 56 20 >7200 3424 765 3 44
Mn tardness 3 facltes arger problems For 6 tass: average tme rato MIP/Benders 25 Tass Tme sec MIP Benders Best soluton MIP Benders 8 87 4.0 0 0 5 8. 3 3 46 53 5 5 256 54 >7200 46 4 4 20 05 0 0 44 6 39 28 4 4 442 305 8 8 >7200 >7200 75 75 22 6 20 0 0 584 36 2 2 >7200 >7200 20 40 >7200 >7200 62 46 >7200 >7200 375 28 24 0 66 0 0 >7200 53 20 0 >7200 72 57 0 >7200 >7200 20 5 >7200 >7200 25 7 Boldface optmalty proved 45
Future Research Implement branch-and-chec for Benders problem. Eplot dual nformaton from the subproblem soluton process e.g. edge fndng. Eplore other problem classes. Mn maespan cost wth release dates Integrated long- and short-term schedulng Vehcle routng SAT subproblem s renamable Horn Stochastc IP 46