Strengths & Drawbacks of MILP, CP and Discrete-Event Simulation based Approaches for Large-Scale Scheduling Pedro M. Castro Assistant Researcher Laboratório Nacional de Energia e Geologia Lisboa, Portugal
Outline Basic concepts on scheduling Types of scheduling problems Classification of scheduling models Sequential facilities Network plants Approaches other than mathematical programming Constraint Programming Discrete-Event Simulation Full-space models & decomposition algorithms Hybrid models and solution approaches Different concepts or methods are effectively & efficiently combined Extensive testing through a case-study Automated Wet-etch Stations November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 2
Introduction Scheduling plays an important role in most manufacturing and service industries Pulp & Paper, Oil & Gas, Food & Beverages, Pharmaceuticals Type of decisions involved Define production tasks from customer orders Assign production tasks to resources (not only equipments) Sequence tasks (on a given resource) Determine starting and ending times of tasks Batching How many batches? What size? Demand (orders) A B C D E Batches A1 A2 A3 B1 B2 C1 D1 D2 E1 Batch-unit Assignment Where each batch is processed? U1 B1 B2 A3 A2 C1 D1 D2 November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 3 A1 E1 U2 Sequencing & Timing In what sequence are batches processed? A1 A2 A3 C1 D1 D2 B1 B2 E1 Maravelias et al. (2011)
Classification of scheduling problems (I) Structure of production facility Sequential Lot identity is kept throughout processing stages M 1 M 2 M 21 M 11 M 12 M 22 M 23 M K1 M K2 A B M 1 M 4 M 2 M 3 M 5 M 6 M 7 A Network (a) Single-stage (b) Multi-stage Mixing and splitting of materials is allowed B (c) Multi-purpose Maravelias et al. (2011) A Make B B 0.4 Make E E C Make D D 0.6 November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 4
Inventory (kg) Inventory (kg) Classification of scheduling problems (II) Production mode Batch, continuous or hybrid A Batch Task Characterized by: duration (h) B A Continuous Task Characterized by: processing rate (kg/h) B Fill Draw Fill & Draw Start of task End of task Time (h) Start of task Operation mode Short-term for highly variable demand Periodic (cyclic) for stable demand End of task Time (h) November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 5
Classification of scheduling problems (III) Type of operations Production but also material transfer (e.g. pipelines) Other aspects Storage policies Fixed capacity (shared or not), unlimited or no storage Changeovers Sequence-dependent (e.g. paints) or not November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 6
Classification of scheduling models Time representation 4 major concepts Discrete-time grid U2 T5 T6 Continuous-time with single grid U2 T5 T6 U1 T1 T2 T3 T4 U1 T1 T2 T3 T4 2 3 4 5 6 7 8 9 10 11 12 1 13 2 3 4 1 5 Immediate Precedence (through sequencing variables) General 1 Continuous-time with multiple grids 2 U2 T5 T6 U2 T5 T6 U1 T1 T2 T3 T4 U1 T1 T2 T3 T4 In generality: Single grid > discrete > multiple grids > precedence Solution quality function of # slots for time grid based models In # slots: Discrete > single grid > multiple grids 1 2 3 4 November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 7
Models for sequential facilities Precedence concept Méndez et al. 2001; Harjunkoski & Grossmann 2002; Gupta & Karimi 2003 Provide high quality solutions with limited computational resources Favored when preordering can be performed a priori (e.g. due dates) Set of binary variables for processing tasks can also be used for other discrete resources (e.g. transportation devices) Difficult to prove optimality Multiple time grids Pinto & Grossmann 1995; Castro & Grossmann 2005; Liu & Karimi 2007; Castro & Novais 2008 A few options available Tighter and computationally superior More difficult to understand P2 P3 P4 M0 M3 M4 M5 M7 M9 M10 M11 M15 M20 M35 M37 OUT P5 November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 8
Models for network facilities (I) Most complex arrangement May involve resource constraints other than equipment Linked to systematic methods for process representation State-Task Network (Kondili et al. 1993) Resource-Task Network (Pantelides, 1994) Bear in mind OPL Studio (Constraint Programming) similar to RTN Activities (tasks), resources (materials), unary resources (units) RTN process model feeds a timed automata model (Subbiah et al. 2011) November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 9 Process RTN Process Information + RTN Model T t R r v N v N R R R R t R r out t r T t R r in t r I i t i i r I i t i i r t i i r T t t i i r R R r t r R r end t r t r t r FP UT t UT CT CT, ) ( 1,,,, 1,,,,,, ) ( 1, 1, 1 0,???
Models for network facilities (II) Discrete-time Handled problems of industrial relevance (Glismann & Gruhn 2001; Castro et al. 2008-09; Wassick 2009) Simple, elegant and very tight MILP Easy integration with higher level planning Major drawback related to accuracy Continuous-time with single grid (Maravelias & Grossmann 2003,Castro et al. 2004; Sundaramoorthy & Karimi 2005) Most general High sensitivity to data makes it more appropriate for integration with lower level control layer Computationally inefficient Continuous-time with multiple grids (Ierapetritou & Floudas 1998; Susarla et al. 2010; Seid & Majozi 2011) Fewest # slots & better performance Issues have been raised related to generality U2 T5 T6 U1 Discrete-time grid T1 T2 T3 T4 2 3 4 5 6 7 8 9 10 11 12 1 13 U2 T5 T6 U1 U1 Continuous-time with single grid T1 T2 T3 T4 2 3 4 1 5 1 1 Continuous-time with multiple grids 2 U2 T5 T6 T1 T2 T3 T4 2 3 4 November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 10
Other solution approaches (I) Constraint Programming (CP) Not as broadly applied as mathematical programming Has specific scheduling constructs for easy model building and problem solving with constraint propagation (OPL Studio 3.7) Easy to develop specific search strategy for an efficient integrated approach (Zeballos & Méndez, 2010; Zeballos et al. 2011) Can be classified as precedence based, discrete-time Excels at makespan minimization Single variable in objective function No optimality gap being computed November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 11
Other solution approaches (II) Discrete-event simulation Heuristic, rule based approach Problem represented as a set of interlinked modules featuring algorithms for decision making Extremely useful for visualizing system behavior Generate feasible solutions for complex problems Cannot guarantee optimality November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 12
Problem definition Automated Wet-Etch Station (AWS) i Jobs NIS Input buffer C W C ZW ZW NIS Output W buffer m=1 m=2 m=3 m= M -1 m= M j=0 j=1 j=2 j=3 j=m j=m+1 Bath j Buffer C = Chemical Bath m j=1,3,5...m-1 W = Water Bath m j=2,4,6...m Input buffer j=0 Output buffer j=m+1 MIS Mixed-intermediate Storage NIS Non-intermediate Storage ZW Zero Wait Robot...... Job Sequence i1-i3-i2... robot schedule m3 j3 i1 i1 i1 i3 i2... Units m2 j2 m1 j1 i1 i1 i3 i3 Processing Time i3 i3 i2 Transfer Time... i2... Holding Time MK Time bath schedule Objective function: minimize makespan November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 16
Best MILP model (Castro et al. 2011) Hybrid in terms of time representation concept (Bhushan & Karimi, 2003) Multiple time grids for processing tasks Why is it a good approach? Single unit per stage» No uncertainty in # time slots to specify» Global optimality ensured with # slots= # wafer lots (no iterative search procedure) Lot sequence unchanged throughout stages due to storage policies General precedence for robot transfer tasks Why? Provides very good solutions in early nodes of the search» Often difficult to prove optimality (high integrality gap at termination) Alternative of a robot grid with too many time slots ( I M )» Resulted in a much worse computational performance November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 18
Unit m No big-m constraints for processing tasks Slot duration greater lot s processing time Difference in time in consecutive units equal to processing + transfer Ending time greater starting time + processing Starting time in next unit equal to ending time + transfer Exactly one lot per time slot Time of last slot in last unit lower than makespan ZW 1 T 1,1 i=1 1 T 2,1 i=2 1 T 3,1 i=3 do not hold lot past processing time LS Robot r 2 T 1,2 i=1 2 2 p 1,2 p 2,2 Te 1,2 T 2,2 Te 2,2 2 T 3,2 i=3 p 1,2 Te 3,2 can hold lot past processing time 1 2 1 2 1 2 Time November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 19
Robot assignment & sequencing constraints Binary variables W t,m,r assigns robot r to the transfer to unit m of the lot in slot t 4 sets of big-m constraints If same robot, lot i to m after transfer i to m+1 m m+1 m (i,t) T t,m m+1 m (i,t) (i',t+1) T t+1,m 2 transfers between processing of consecutive lots No overlap between transfer of any two lots to different units November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 20
One Robot Models Three alternative formulations ORM (current work) Hybrid time slots/general precedence model BK (Bhushan & Karimi, 2003) Hybrid model with slightly different sequencing variables AM (Aguirre & Méndez, 2010) Pure general precedence model New approach clearly better Only 6 problems can be solved to optimality BK better in smaller problems (P2-P4), in P4 by one order of magnitude (as tight as ORM) AM finds good feasible solutions in 4 cases where BK fails (P7, P9-P11) November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 22
Motivation Industry requires decision-making tools that generate good solutions with low computational effort Guaranteeing optimality looses importance Only a subset of the production goals are taken into account Implementing the solution as such often limited by dynamic nature of industrial environments Real life applications should take advantage of state-of-the art, full-space models Ability to handle almost all the features that may be encountered at a process plant Need for efficient decomposition approaches that keep number of decisions at a reasonable level Tunable parameters Specific AWS problem Full-space models only useful up to 12 lots in 12 units November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 24
MILP GAMS Arena MILP GAMS New scheduling algorithm Main components Heuristic approach Does not guarantee optimality Iterations J Lots/iteration NOS Neighborhood Search R-ORM Solves constrained versions of full-space models R-ORM & ORM Rescheduling through neighborhood search to approach optimality Schedule of transportation tasks first determined by Discrete-Event Simulation Ensures feasibility Best Sequence Processing Tasks (Neglecting Robot Availability) pos i Discrete Event Simulation (Considers Robot Availability) Feasible Solution (One Robot Problem) Sequence of Transfer Tasks slot t,m Tradeoff computational effort vs. solution quality achieved with tunable parameter NOS Number of lots per iteration Neighborhood Search ORM Best Solution (One Robot Problem) Full schedule November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 25
Neighborhood Search Systematic decomposition strategy Solves highly constrained versions of full-space model Keeps number of decisions at a reasonable level Also being called Solution polishing Local branching How does it work? Starts from a feasible solution Most binary variables are fixed Deciding which variables to free is the challenging part Knowledge about problem structure Example for R-ORM Acting solely on processing sequence j=0 j=1 j=2 j= J Random selection of variables NOS=3 Free assignments I1 I2 I3 I4 I5 I6 t=1 t=2 t=3 t=4 t=5 t=6 I j=1 ={I2,I3,I5} I1 I3 I5 I4 I2 I6 t=1 t=2 t=3 t=4 t=5 t=6 I j=2 ={I1,I3,I6} I6 I3 I5 I4 I2 I1 t=1 t=2 t=3 t=4 t=5 t=6... Position has changed I2 I3 I6 I1 I5 I4 t=1 t=2 t=3 t=4 t=5 t=6 November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 26
Neighborhood Search for ORM Two sets of interconnected binary variables Chemical and water baths processing sequence Robot transportation sequence Knowledge about problem structure needed to Free binaries of transportation tasks involving the lots being freed Allow transportation tasks of fixed lots to change position If one of the lots to be rescheduled is immediately before or after in current processing sequence Robot grid 1 2 3 4 5 6 7 8 9 NOS=2 j=0 I1,M1 I1,M2 I2,M1 I1,M3 I2,M2 I2,M3 I3,M1 I3,M2 I3,M3 I j=1 ={I1,I2} I3 remains the last lot to be processed but transfer of I3 to M1 may change position j=1 I2,M1 I2,M2 I1,M1 I2,M3 I1,M2 I3,M1 I1,M3 I3,M2 I3,M3 I j=2 ={I2,I3} Just one transportation task remains fixed j=2 I3,M1 I3,M2 I1,M1 I3,M3 I1,M2 I2,M1 I1,M3 I2,M2 I2,M3 November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 27
Discrete-Event Simulation Very attractive and powerful tool to model, analyze and evaluate the impact of different decisions Major advantages Representation of complex manufacturing processes Visualization of the dynamic behavior of its elements Arena Simulation Model of entire AWS process Set of operative rules and strategic decisions on each sub-model Internal robot logic to coordinate and effectively synchronize the transportation of jobs between consecutive baths (ensure feasibility) November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 28
Neighborhood search using R-ORM Starts with lexicographic sequence (LP) Major improvements when compared to initial schedule in <60 CPUs NOS=7 lots/iteration, 100 iterations Similar performance to full-space model up to 60 CPUs Best found solution => Arena Simulation Model November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 30
Discrete-Event Simulation model (Arena) Outcome from R-ORM is a lower bound Schedule may feature transfers occurring simultaneously Increase in makespan Solution quality rapidly degrades with # baths Advantage: Very low computational effort Indication of good the approach is! November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 31
Better than solution polishing! Neighborhood search using ORM Major improvements in solution quality with respect to initial schedule from Arena All problems solved in less than 30 min (NOS=2) NOS => solution quality & CPUs 10 different runs for each NOS value Significantly better solutions than CPLEX solution polishing after 60 CPUs1h With increase in problem size November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 32
Constraint Programming Approach Integrated approach with CP model & efficient domain-specific search strategy Competitive full-space approach Good quality solutions in 1-h CPU Less likely for solution to keep improving given additional computational time when compared to neighborhood search November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 33
Best found solution for largest problem November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 34
Search for the optimal solution Most improvements in first 20% of CPUs Reaching a plateau towards the end November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 35
Conclusions Wide variety of approaches for scheduling problems Mathematical programming, Constraint Programming, Discrete-Event Simulation, Heuristics, etc. A few alternative efficient models Good for academic research, bad for industrial problems Effective decomposition methods much needed Good quality solutions with few computational resources Tunable parameters for best tradeoff Critical to incorporate knowledge about problem structure Major improvements are possible Method Heuristic algorithm (A2 ) Bhushan & Karimi (2004) DES CP NS NOS=2 NOS=3 November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 36 Better NS (submitted) Makespan 478.6 529.9 443.4 428.2 410.7 396.8 Improvement (%) 0.0% -10.7% 7.4% 10.5% 14.2% 17.1%
Acknowledgments Carlos Méndez, Luis Zeballos, Adrián Aguirre Results & animations shown on this talk Sponsors Fundação para a Ciência e Tecnologia & Ministerio de Ciencia,Tecnología e Innovacion Productiva Bilateral cooperation agreement Argentina/Portugal (2010-2011) Luso-American & National Science Foundations 2011 Portugal U.S. Research Networks Program References Scope for Industrial Applications of Production Scheduling Models and Solution Methods. Review paper on scheduling. Multiple authors. To be submitted to CACE. Pedro M. Castro, Luis J. Zeballos and Carlos A. Méndez. Hybrid Time Slots Sequencing Model for a Class of Scheduling Problems. AIChE J. doi:10.1002/aic.12609. Adrián M. Aguirre, Carlos A. Méndez and Pedro M. Castro (2011). A Novel Optimization Method to Automated Wet-Etch Station Scheduling in Semiconductor Manufacturing Systems. Comp. Chem. Eng. 35, 2960-2972. Pedro M. Castro, Adrián M. Aguirre, Luis J. Zeballos and Carlos A. Méndez. (2011). Hybrid Mathematical Programming Discrete-Event Simulation Approach for Large-Scale Scheduling Problems. Ind. Eng. Chem. Res. 50, 10665-10680. Luis J. Zeballos, Pedro M. Castro and Carlos A. Méndez. (2011). An Integrated Constraint Programming Scheduling Approach for Automated Wet-Etch Stations in Semiconductor Manufacturing. Ind. Eng. Chem. Res. 50, 1705-1715. November 3, 2011 Pedro Castro, EWO Seminar, Carnegie Mellon University 37