Scheduling heuristics based on tasks time windows for APS systems Maria T. M. Rodrigues,, Luis Gimeno, Marcosiris Amorim, Richard E. Montesco School of Chemical Engineering School of Electrical and Computer Engineering State University of Campinas UNICAMP, C.P. 6101, 13083-970 Campinas, S.P., Brasil Abstract Advanced Planning and Scheduling systems (APS) are intensively utilized in the industry, namely because they allow generating and analyzing planning scenarios very quickly. They are not well suited for make-to-order situations since due dates are not considered hard constraints to be fulfilled. Processing time windows allow to take into account due dates in the development of APS enhanced heuristics. Keywords: planning, scheduling heuristics, time windows, APS 1. Introduction Advanced Planning and Scheduling Systems (APS) have been introduced several years ago mainly to provide factory planners with tools that allow a detailed analysis of the feasibility and impact of different planning scenarios on the plant. This is accomplished by detailed scheduling of the tasks to be processed according to the planning output. APS can contain planning tools or they can import planned tasks from an external planning system; anyway planned tasks are input data to the APS representing processing needs to fulfill specific or expected demands, stocks replenishment, etc. Detailed scheduling of planned tasks allow to analyze how the planning scenario will be implemented in the plant in terms of delivery dates, utilization of resources and other metrics. In this way different planning scenarios can be compared allowing for example to evaluate the impact of additional demands requested by demand planners. Generally different scheduling techniques are provided. Inherent to APS is the ability to provide quick answers to the scheduling problem so that comparison of planning scenarios can be done in an adequate time scale to interact with demand planning systems. In spite of increasing computer power this speed specification forces to utilize scheduling heuristics with limited capabilities that can fail to deal with complex problems. In general scheduling techniques utilized in APS are constructive heuristics (Kirchmier, 1998). The Gantt chart is obtained by successive time allocation of tasks following a pre-determined ordering introduced by the user. This simulation approach has an important characteristic: it allows taking into account many of the constraints in the Author to whom correspondence should be addressed: maite@desq.feq.unicamp.br
recipe and the plant such as mass precedence among tasks, working patterns, equipment units setups, shared cumulative resources, etc. The main problem is the need of a predetermined ordering to deal with the tasks, which, of course, can have a large impact on the scheduling decision. Tasks ordering is introduced in the form of priorities that can be modified by the user which implies restarting the scheduling procedure, but the point is that tasks ordering can be a non trivial problem in itself in complex problems. Complex scheduling problems often arise in situations where contention for finite capacity resources like equipment units, utilities or manpower is high. In these situations defining an ordering in which tasks will be allocated in the Gantt chart is the same as defining the ordering in which tasks will utilize those resources which obviously has a large impact in the scheduling result. For instance one of the optimization mathematical programming approaches to the scheduling problem is to define binary variables which represent the ordering between each two tasks assigned to a shared resource. This work presents some scheduling heuristics intended to avoid the utilization of a predetermined ordering. This objective is attained through the utilization of the concepts of tasks time windows and equipment units demand. Both concepts have been utilized in the Constrained Based Search Scheduling - CBS literature. In section 2 these concepts are introduced and section 3 discusses the scheduling heuristics developed. 2. Tasks time windows. A task time window is a time interval whose limits determine when the task can be processed so that it defines a domain for the task starting time. It starts at the task earliest starting time est and ends at the task latest finishing time lft. CBS algorithms start with a time window defined for each task to be processed and utilize a tree search procedure to obtain a scheduling solution. Decisions in the search tree can be ordering decisions between pair of tasks assigned to the same equipment unit. Such ordering decisions can have consequences on both tasks domains through est increases and/or lft reductions. These modifications can in turn modify time windows for other tasks through constraints propagation. Constraints propagation basically enforce on tasks time windows limits, the constraints imposed by mass precedence between tasks, intermediate storage limits and finite capacity resources. Tasks time windows can be obtained in the planning phase from products demand due dates and raw materials time availability. The exploding procedure that determines the needs of intermediate products to fulfill a specific demand, can be also used to determine the latest finish time of each task so that demand due dates can be satisfied. In a similar way earliest starting times can be obtained from raw materials time availability through a mass balance procedure. Figure 2 at the left side shows time windows for a batch plant example represented by the state task network in Figure 1. End products demand and tasks assignment are given in Tables 1 and 2, raw materials are available totally at t = 1. The planning system (Rodrigues et al. 2000) determines the number of batches of each task necessary to fulfill end products demand shown in Figure 2 and batches time windows.
FeedA FeedB FeedC 4hr A1 1hr A2 3hr A3 2hr TA1 TA2 TA3 TA4 20 ZW 20 UIS 50 FIS(50) 20 ProA 3hr B1 2hr B2 1hr ProB TB1 TB2 TB3 40 ZW 40 FIS(50) 15 2hr C1 3hr C2 2hr C3 3hr C4 1hr TC1 TC2 TC3 TC4 TC5 40 ZW 40 FIS(100) 15 UIS 15 ZW 15 ProC Figure 1. State task network with tasks processing times and batchsizes and intermediate storage conditions Table 1. Tasks assignment unit task unit task P1 TA1,TC1 P5 TB2,TC2 P2 TA2,TA4 P6 TB3,TC3 P3 TB1 P7 TA3,TC5 P4 TB1,TC4 Table 2. Products demand product mass duedate ProA 100 32 ProA 90 56 ProB 270 32 ProC 75 56 Figure 2. Batches time windows and equipment units aggregated demand Figure 2 at the right side shows the load imposed on equipment units by batches time windows using the concept of aggregated demand presented in (Sadeh, 1991). Equipment unit aggregated demand is obtained adding up the batches individual demand. Batch individual demand is a discrete time function defined over a discrete set
of time intervals spanning the batch time window. On each time interval the load value is the probability that this time interval be occupied by the batch. The example considered shows a high load in unit P1 where ten batches of TA1 and two batches of TC1 are assigned; total processing time is 44 hr. and the allowed time spanned by the time windows is 45 hr. Constraints propagation on the initial time windows leads to large reductions, namely increases in est for TC1 batches, whose initial time windows start at t = 1 when raw materials are available. Zero wait condition on intermediate state A1 between tasks TA1 and TA2 also reduces drastically time windows for TA2 batches. 3. Scheduling heuristics using time windows. 3.1. EST and LST heuristics. These scheduling heuristics allocate one batch at a time at its earliest starting time or latest starting time respectively. After each allocation constraints propagation procedures update batches time windows. In order to choose one batch at each step a rolling horizon is utilized; this rolling horizon in the EST case starts at the minimum est among the batches not yet scheduled and its duration is equal to the maximum batch processing time. All the batches with time windows starting inside the rolling horizon are candidates. The batch chosen is the batch with the maximum individual demand. The result obtained is shown in Figure 3. To allocate 85 batches including constraints propagation time spent is 7 sec. (1.3 GHz). This figure also shows the initial time windows showing that batches allocation is not always made at the initial est because constraints propagation has increased some of them when the batch was allocated. Figure 3. Solution of example using EST heuristic.
Figure 3 shows that a feasible solution, a solution where all the batches are allocated inside its respective time windows, is possible. One can ask if a feasible solution such that one could be found by the type of heuristics available in commercial APS systems. For example to utilize an heuristic with allocation at the earliest time using a priority list it would be not a simple matter to establish such a priority list: Figure 3 shows in different equipment units a mixture of batches of different tasks. Establishing a priority list in terms of tasks instead of batches leads to solutions where always some batches have to be scheduled later than its lst so that end products would have delays. 3.2. Limited search heuristic. Figure 4 at the left shows a situation with lower load on equipment units because due dates for all the end products demand have been changed to t = 100 which leads to larger time windows. Lower contention for shared equipment units imposes lower constraints on time windows so that there are not small time windows as in the preceding example. Constraints propagation has merely imposed mass balance constraints, for example the pattern in est for batches of tasks TA3 and TA4 due to its batchsizes: 50 and 20 respectively. Due to the large time windows many scheduling solutions are possible and the user will be likely interested in adding supplementary specifications, for example a time separation in the manufacture of the three products. In a situation like this probably establishing some priority list in terms of tasks will allow obtaining feasible solutions but the time windows approach allows to introduce easily those kind of supplementary specifications. Figure 4 at the right shows the result of a manipulation of batches time windows in order to produce first ProC and later ProA and ProB so that equipment units sharing between different products is avoided. To obtain this result the following modifications have been introduced: lft(tc5/5) has been changed from 100 to 35 and est(ta1/1) and est(tb1/1) originally at 1 have been increased to 25 and 40 respectively. Finally batches of tasks TA2 and TA4 that share equipment unit P2 have been separated. Obviously these manual modifications can induce infeasible situations. To allow the user to interactively attain an acceptable solution they are implemented in a tree procedure that allows backtracking. In a low load situation as that considered the final time windows obtained by the user through those manipulations can incorporate other characteristics such setup times between batches of different tasks, working patterns and shop floor flexibility through time windows larger than processing times. If the user wants a scheduling solution with time allocation of all the batches EST or LFT heuristics can be launched on the remaining time windows. 4. Future work For the heuristics presented in sections 3.1 and 3.2 the load imposed on each equipment unit is used in a qualitative way. A bottleneck approach is being developed utilizing intensively the information given by equipment units aggregated demand. Details are not presented here but basically the procedure i) selects the equipment unit and time interval with the higher load and ii) proceeds to allocate the batches assigned to this unit
and with lower impact on the bottleneck, that is batches whose time windows are far away from the bottleneck time interval. This leads to a problem with bottlenecks lower or at worst equal to the initial situation but with a reduced dimension in terms of batches remaining to be scheduled. In higher load situations a CBS procedure can then be started focusing only in the bottlenecks. Acknowledgments This work was partially supported by International Cooperation Project CAPES/MECD - 034 (Brazil/Spain). References Kirchmier B. (1998). Finite Capacity Scheduling Methods. APICS The Performance Advantage. Rodrigues M.T., L.G. Latre and L.C Rodrigues. (2000). Production Planning Using Time Windows for Short-Term Multipurpose Batch Plants Scheduling Problems. Ind. Eng. Chem. Res., 39, 3823-3834. Sadeh, N.(1991) Look-Ahead Techniques for Micro-Opportunistic Job Shop Scheduling. PhD Thesis, CMU-CS-91-102, School of Computer Science, Carnegie Mellon University, 1991. Figure 4. Initial time windows for demand on t = 100 (left side) and time windows after limited search heuristic (right side).