Production Planning Using Time Windows for Short-Term

and forward explosion procedures are developed in such a way that time windows, defined by the earliest starting time and latest finishing time for ea...
0 downloads 0 Views 719KB Size
Ind. Eng. Chem. Res. 2000, 39, 3823-3834

3823

Production Planning Using Time Windows for Short-Term Multipurpose Batch Plants Scheduling Problems Maria Teresa M. Rodrigues† School of Chemical Engineering, State University of Campinas, CP. 6166, 13083-970 Campinas S.P., Brasil

Luis G. Latre* and Luiz Carlos A. Rodrigues School of Electrical and Computer Engineering, State University of Campinas, CP. 6101, 13083-970 Campinas S.P., Brasil

This paper deals with short-time planning and scheduling in multipurpose plants subject to a variable demand profile. In this case, production delays are often due to equipment overload, and this paper addresses a two-level approach that is intended to help managers engineer a scheduling solution that fulfills a compromise between products’ demands and plant loading. At the first level, once a product’s demand and raw-material delivery plan are defined, backward and forward explosion procedures are developed in such a way that time windows, defined by the earliest starting time and latest finishing time for each batch, are generated. Those time windows are submitted to an extended capacity analysis, based on constraint-propagation mechanisms, which is intended to reduce the time windows. If, after the capacity analysis, the problem is still feasible and the plant loading is accepted, then a scheduling procedure is launched. The scheduling approach is based on a uniform discrete time representation that is intended to explore plant features, such as, zero-wait policies, limited storage, and/or low equipment demand. The mixed integer linear problem (MILP) approach, combined with the timewindow shortening procedure at the planning level, leads to smaller MILP problems, thereby reducing the solution time. 1. Introduction The operation of multiproduct/multipurpose plants is greatly influenced by the way demands for products are fulfilled. Orders representing customer demands can be shipped from inventories that are replenished through cyclic plant operation, or production scheduling can be driven by customer orders. The first situation is adopted when reliable demand forecasts are available. In the second situation, planning and scheduling are determined on a shorter time horizon to satisfy variable customer demands. It has been argued that market volatility makes the second scenario more and more frequent. In this work, the problem considered is short-term planning and scheduling of batch plants. Each product’s demand is characterized by specific quantities to be delivered at specific times. A central question in shortterm problems is the determination of whether a product’s demand can be satisfied in terms of quantities and due dates, given the plant capacity and the time horizon. Planners and schedulers must estimate the plant loading implied by a product’s demand and take actions such as renegotiating due dates when load is excessive or producing to stock to avoid plant under utilization. To complicate matters further, plant capacity in multiproduct/multipurpose batch facilities is only roughly defined because products can be manufactured following different routes through the plant using different equipment units. In this work, a two-level * Author to whom correspondence should be addressed. Fax: +55-19-2891395.Phone: +(55)-19-7883785.E-mail: [email protected]. unicamp.br. † Fax: +55-19-7883946. Phone: +(55)-19-7883908. E-mail: [email protected].

approach, planning and scheduling, is proposed, in which the planning phase addresses the problem of demand feasibility. The link among products’ demands, the time horizon, and plant capacity has been the main strength of Manufacturing Resources Planning (MRP) systems.1 Through the exploding phase, the requirements of the final products, in terms of both quantities and due dates, are propagated through the recipe structure (bill of materials) to establish requirements in terms of intermediates and raw materials. Assignments of tasks to units are considered fixed, and if there is a way to estimate good lead times, equipment unit loadings can be inferred from the task batches’ processing time windows (given by their respective release and due dates). The MRP approach uses lead times as input data, but in fact, they are not known in variable product demand situations.2 Having knowledge of these lead times would be equivalent to having a priori knowledge about the impact of demands on unit loadings. Dividing the problem into two levels, planning and scheduling, could be difficult because planning models must include or abstract conveniently many scheduling constraints in order to build useful frames for the scheduling phase. For example, the MRP “infinite capacity” hypothesis can lead to infeasible situations if lead times are not long enough. On the other side, monolithic models dealing with planning and scheduling simultaneously are not a solution for large problems as they quickly give way to large-dimensional formulations, as in Kondili et al.3 The main approach in the literature has been to develop simpler planning models based on lower-level scheduling models.4 Time aggregation and constraint aggregation have been the main directions.5,6 Production

10.1021/ie9904551 CCC: $19.00 © 2000 American Chemical Society Published on Web 10/02/2000

3824

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000

requirements obtained for each aggregated time period are used by the scheduling procedure to obtain task sequencing and timing, the problem being to guarantee that a feasible scheduling solution will be obtained. Infeasible situations have to be managed ultimately by returning to the planning phase and introducing time buffers as forced equipment downtimes, reduced available production times, or planning production upper bounds obtained somehow through a relaxed problem.7 The objective with these time buffers is to limit production requirements in the planning phase, giving more flexibility for task allocation in the scheduling phase, thus preventing infeasible problems. The objective in this work has been to develop a planning level that can take into account equipment unit capacity constraints without the inclusion of scheduling considerations and that allows the user to analyze different scenarios in terms of product demand and raw material availability. This can be achieved using task processing time windows as a means to analyze the feasibility, plant loading, and task allocation flexibility induced by each particular demand plan, once a unique assignment of tasks to equipment units is chosen. The loading on each equipment unit imposed by a set of task time windows is analyzed using the principles of constraint-propagation mechanisms. They allow a determination of the ordering between tasks, the timewindow shortening imposed by this ordering, and the propagation of any reductions on other time windows. Coupled with constraint propagation induced by mass balances, they give a set of final time windows. These time windows must be feasible (greater than or equal to task processing time plus any sequence-independent setup time) and acceptable to the scheduler in terms of remaining slack times. The purpose of slack times is to prevent the lack of time because of situations not taken into account in the capacity analysis, such as shared capacitated resources. The proposed planning level is described in section 2. In section 3, its utilization in the scheduling phase is discussed, and a mixed integer linear problem (MILP) scheduling formulation is used to exemplify the reduction in problem dimension that can be obtained. Finally, section 4 presents some experimental results. 2. Planning Level The recipe is modeled using the state task network (STN) representation of Kondili et al.3 States represent final or intermediate products and raw materials; tasks represent the processing steps transforming input states into output states. At the planning level, time windows are obtained through the following steps: (i) determination of the number of batches and their respective due dates for each intermediate state, (ii) calculation of batches’ earliest starting times from raw materials delivery dates, and (iii) constraint propagation induced by mass balance, storage conditions, and an equipment-unit capacity analysis. The procedure outlined above implies unique assignment of tasks to equipment units and fixed batch sizes. In fact, these problems should be part of the planning/ scheduling problem. For example, the MILP formulation in Kondili et al.3 includes these aspects. Nevertheless, it is well-known that the inclusion of assignment and batch size determinations in MILP formulations increases the problem dimension, and if the task assign-

Figure 1. Planning modules and user interaction.

ment possibilities are large, they lead to problem degeneracy and long execution times because many equivalent solutions exist. Techniques such as constraintbased search,8 simulated annealing, and genetic algorithms, when applied to scheduling problems, do not consider also batch size determination and assignment choices. Instead, the quantities are input data that can be changed to analyze different scenarios. In general, planners and schedulers use operational preferences to limit assignment possibilities. This is done on the basis of their estimate of the impact that the specific product’s demand plan will have on the plant loading. That is, only a subset of assignment possibilities can make sense for each particular situation. Techniques in the literature lack this type of assignment filtering as it is dependent on the product mix considered, quantities to be delivered, and due dates. Planning and scheduling algorithms deal with assignment possibilities as input data, independent of demand and input material availability. The proposed planning level works with fixed assignments and batch sizes, allowing the user to interactively modify these inputs. It can be seen as an information provider system allowing the user to analyze different production scenarios, hence permitting an easier and deeper insight into the feasible planning alternatives. For example, heavily loaded equipment units and feasible time intervals for task allocations are indicated. Planning modules are represented in Figure 1 and described in the following. A. Intermediate Batches and Latest Finishing Times. The final products’ demands and due dates are used to calculate the number of batches of intermediates and raw materials and the corresponding latest finishing times, through a backward exploding procedure. This procedure is analogous to the exploding phase in MRP systems, but in this case, it is based on processing times instead of lead times as in MRP systems. The

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000 3825

exploding procedure ends by defining a limiting rawmaterial delivery plan, established on the basis of the hypothesis that the equipment units are not shared. This plan would be possible only if equipment units were dedicated; therefore, for multipurpose plants, the supply of raw materials will have to be anticipated. B. Intermediate Batches’ Earliest Starting Times. Introduction of the raw-materials supply plan by the user allows for the attainment of the earliest starting times for all of the batches through a forward massbalance procedure. For each batch, the earliest starting time and due date will define its processing time window. Again, states must be treated in an ordered way so that, when a state is treated, all of the upstream states in the recipe have been considered. This procedure is straightforward with the exception of split states, which are input states for more than one task. In this case, mass availability of the consumed state at a time instant can be insufficient to allow the processing of all of the tasks’ batches that consume this state to begin. An ordering among consuming tasks’ batches must be established in order to define earliest starting times, but this ordering should be a scheduling decision, not a planning decision. At this point, it is important to note that what is sought is a set of realistic time windows on which a capacity analysis can be made to determine whether the situation is feasible. Alternatively, it should avoid a set of optimistic time windows that could signal no capacity problems when, in fact, there are capacity problems. To proceed in this way, the user can input a priority order among batches of output states. This ordering decision is used to define the earliest starting times through mass balances. The resulting time windows will be analyzed for feasibility, prompting the user to change the ordering in an infeasible situation. Batch ordering may not be critical as (i) it can have small effects on time windows’ earliest starting times if raw materials are delivered early enough, and (ii) in the scheduling phase, it is not obligatory to use this ordering, allowing the scheduling phase to obtain other possible orderings. It is assured that, if the capacity analysis is feasible in this case, then a solution exists inside the time windows resulting from this ordering. User definition of a reasonable ordering among batches of output states can be a difficult matter when the number of competing batches is high and different batches’ latest finishing times are not very different. To give the user a starting point, the following procedure is proposed. It is reasonable to expect that capacity problems are more likely to occur with shorter time windows, especially in equipment units with higher loads. To introduce this point, the ordering problem is formulated as an optimization problem in which the objective function is the maximization of the weighted sum of output batch time windows. Through batch time window weighting, the user can introduce the knowledge of relative loading among equipment units assigned to the output tasks. A higher weight on the tasks’ batches assigned to units with higher loads will prevent large reductions in its time windows. This optimization problem can be formulated as a mixed integer linear problem (MILP) for each split state, as shown in Table 1.

Table 1. Indexes, Sets, Parameters, and Variables Used in MILP Formulation of Split State Optimization Problem i j,j′ t

Indexes task output of split state batch time slots

OUTBi,j OUTi

Sets task and batch output of split state task output of split state Parameters earliest starting time of task i batch j obtained without considering other output tasks latest finishing time for task i batch j processing time of task i mean processing time consumption of split state by each batch of task i earliest time profile production of split state weight on task i in cost function time horizon spanning batches’ time windows

ESTi,j LFTi,j TPi TPi Ci Pt qi H

Variables modified earliest starting time (binary variable) ) 1 if new EST for task i batch j is time slot t ) 0 otherwise stock of split state at time slot t (positive variable)

ESTMi,j,t St

Constraints: ∑ tgESTi,j teLFTi,j-TPi+1

ESTMi,j,t ) 1 ∀ i, j ∈ OUTBi,j

∑ ESTMi,j′,t × t g

tgESTi,j′ teLFTi,j′-TPi+1

(

(1)

)

∑ ESTMi,j,t × t + TPi

tgESTi,j teLFTi,j-TPi+1

∀ i ∈ OUTi, ∀ j,j′ such that j′ ) j + 1 (2) St ) St-1 + Pt -



Ci × ESTMi,j,t ∀ t ∈ H (3)

i,j∈OUTBi,j

Cost function: max

{



[(

i,j∈OUTBi,j

LFTi,j -



) ]

ESTMi,j,t × t + 1 ×

tgESTi,j teLFTi,j-TPi+1

qi ×

( )} TPi TPi

(4)

Equation 1 states that each task i batch j must have a modified earliest starting time defined. Equation 2 establishes the ordering between successive batches of the same task. Mass balance in eq 3 obliges that modified earliest starting times cannot lead to negative stock values. The cost function is obtained by summing over all time windows. Increasing a weight qi will avoid reducing the time windows for task i’s batches. The MILP model given by eqs 1-4 has a low dimension as it only considers tasks output of one split state. C. Equipment Unit Load, Capacity Analysis, and Constraint Propagation. At this step, the load imposed on the plant by the batch time windows is analyzed. Time windows for the batches assigned to a shared equipment unit that are too small can lead to an infeasible situation in terms of satisfaction of the latest finishing times. Conversely, time windows that are too large mean unit under-utilization, allowing, for example, for anticipation of the latest finishing times, delaying of raw-material requests, or scheduling of maintenance tasks.

3826

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000

A unit’s load imposed by time windows can be analyzed using the concepts of batch criticality and unit cruciality functions presented in Keng et al.9 or the similar individual and aggregated demands concepts discussed in Sadeh.10 Criticality of a batch with processing time TP and processing time window with duration DW is defined as the quotient TP/DW. For a feasible situation, the value of this quantity must be lower than or equal to unity. Small values mean that there are many possible allocations of the batch inside its time window. In fact, there are (DW - TP + 1) possible allocations. The time loading of an equipment unit, implied by the time windows of the tasks’ batches assigned to it, is represented by its cruciality function. This time function is built by adding, for each time slot, the criticality values of the batches whose time windows include this time slot. In Sadeh,10 the similar concepts of individual demand and aggregated demand are introduced. Individual demand for a batch given its time window is a time function that takes values representing the likelihood that each time slot be utilized by the batch. As for batch criticality, a fixed allocation leads to a unity individual demand. Aggregated demand is obtained by adding individual demands, as is done for the cruciality function. Individual demands can be calculated when a batch has disjoint time windows to which it can be allocated, whereas batch criticality implies a continuous time window. In both cases, more than one unit can be assigned to the task, in this case, operating in phase. The cruciality functions or aggregated demands of equipment units allow for a comparison of unit loadings to discover bottlenecks. The two references cited above developed constraint-based-search scheduling techniques using these concepts. Variable-ordering heuristics select the most-constrained equipment unit, and value-ordering heuristics select a batch and its allocation inside its time windows. A set of time windows representing batches requesting the same equipment unit can imply ordering among them. This ordering can, in turn, impose reductions in time windows that can trigger further orderings through constraint-propagation mechanisms. Tools for that type of analysis have been used in constraint-based-search scheduling11 and have made their way into commercial scheduling systems (ILOG,8 Le Pape,12 Das et al.13). Main results are summarized in Appendix 1. Here, it is proposed that these tools be used to analyze an equipment unit’s load in the planning phase (i) to determine whether the situation is feasible and (ii) to give planners and schedulers a qualitative measure of the true load induced on a unit by the resulting time windows. Constraint-propagation mechanisms work in two directions. From resources to batches (activities), they reduce a batch’s time window when resources are not available in a time interval spanned by the batch’s time window. From batches to resources, a reduction in resource availability in a time interval is obtained when it is assured that a batch, using this resource, will execute in the time interval. Equipment units belong to the class of unitary resources that can handle only one activity at a time. Propagation from units to activities (batches) can lead to detection of ordering between two batches (disjunctive constraints) and/or between a batch and a set of batches (edge finding).

Time-window reduction posts new constraints that must be propagated through the recipe in order to enforce mass balance and storage constraints. In constraint-based-search scheduling techniques, this propagation is done solely through temporal relationships linking batch start and end times. These types of relations can model precedence relations among batches obtained from mass balances and zero-wait policies, but cannot take into account constraints imposed on time windows by no-intermediate-storage (NIS) or finiteintermediate-storage (FIS) policies. In those cases, constraints on equipment and storage availability also impact start and finishing times for each batch involved. For two batches producing and consuming an NIS state, the latest finish time of the consumer batch is constrained by the availability of the unit assigned to the producer batch to hold the material. The unit’s latest available time is the latest starting time of the next batch assigned to this unit. Constraints can also be deduced for states with an FIS condition; in this case, the set of earliest starting times (latest finishing times) of producer (consumer) batches must avoid exceeding storage limits. Constraint-based-search scheduling systems start with a complete definition of the batches to be scheduled, temporal relationships linking possible start and end times, and resources required by each batch. They require a preprocessing material-balance phase13 to determine batch sizes and the number of batches to satisfy final product demands. The proposed planning phase is an answer to this problem that exploits massbalance calculations to enlarge constraint definitions and propagation. As propagation mechanisms are only utilized in the planning phase, this supplementary effort is worthwhile. 3. Utilization of Processing Time Windows at the Scheduling Level The scheduling problem is the allocation of a task’s batches inside its time windows, minimizing the final product’s earliness. The objective of this section is to analyze the impact of processing time windows on the reduction of the dimension of the scheduling problem. Constraint-based-search scheduling techniques8 make full utilization of time windows as their efficiency is linked to propagation mechanisms that reduce the search space defined by these time windows. In the search procedure, one scheduling decision is taken at each node, for example, in the form of ordering between two batches, and time windows for these two batches are updated and propagated so that a new set of processing time windows is obtained. The choice of batches to be ordered at each step is done using a bottleneck approach that looks for situations with lower slack time, and several heuristic rules are described in the literature for making an ordering decision. The search procedure can give a solution or lead to an infeasible situation (dead end) that forces backtracking. Unless an optimal solution is obtained, the system backtracks, including the cost function’s value as an upper/lower bound that acts as an additional constraint. Approaches such as simulated annealing, genetic algorithms, or taboo searches can benefit from the planning output in constrained scheduling problems. This benefit comes from the difficulty of introducing constraints in candidate generation, which leads to the generation of a large quantity of infeasible candidates.

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000 3827 Table 2. Indexes, Parameters, and Variables Used in MILP Model

Sst ) Ss,t-1 + t--1≡Sas,t



Indexes s t, t--1 i b Sas,t Fis, Fjis Bi OGis OCis Tgs Tcs Rst Dst pis pi δgis δcis Ij shat,j esti,b lfti,b φi,j ∆i,j TIi

Wbit Sst

states time slots tasks (subtrains) batches Parameters last slot before t for mass balance recurrence mass factors batch size of task (subtrain) i tasks (subtrains) i that have as output state s tasks (subtrains) i that have as input state s time slots during which state s can be produced time slots during which state s can be consumed external input of state s at slot t external output of state s at slot t processing time of task (subtrain) i for state s max(pis) time interval for state s production in subtrain i after subtrain start time time interval for state s consumption in subtrain i after subtrain start time task i or tasks belonging to subtrain i assigned to equipment unit j time slots in unit j where batches compete earliest starting time of task (subtrain) i, batch b latest finishing time of task (subtrain) i, batch b sum of processing times of tasks preceding task assigned to unit j in subtrain i processing time of subtrain i in unit j () pi if subtrain with one task) time interval between start times of two successive batches of subtrain i () pi if subtrain with one task) Variables binary variable Wbit ) 1 if batch b of task (subtrain) i starts processing at slot t amount of state s stored at slot t

Infeasible situations are only detected in the allocation phase when sequencing and timing is solved and the cost function is evaluated. Time windows establish orderings between batches that must be obeyed by any candidate, and this information can be used in candidate generation to filter out infeasible generated candidates prior to the allocation phase. Mathematical programming approaches can benefit also from a planning frame in the form of processing time windows as this can reduce the quantity of binary variables and the scope of the equations. The MILP formulation of Kondili et al.3 is used, because the discrete time representation allows for the easy introduction of the information contained in the processing time windows. The main modifications with respect to the original formulation are limited to balance equations (eq 5) and to the equations that limit equipment unit utilization (eq 6). Tasks are grouped in subtrains when intermediate states are unstable, thus implying a zerowait mode of operation. Indexes, parameters and variables for these equations are provided in Table 2. A subtrain with more than one task can have many different input and output states distributed along the subtrain. Parameters δgis and δcis are introduced to represent the time elapsed between the start time of the subtrain and the times when state s is produced and consumed, respectively. States encapsulated within a subtrain must be processed in ZW mode and are called internal states.

∑ FisBi × ∑b Wb,i,t-δg

i∈OGis

∑b

FjisBi ×

i∈OCis

is

t∈Tgs

Wb,i,t-δcis + Rst -

t∈Tcs

Dst ∀ t,s such that t ∈ Tgs ∪ Tcs (5) Mass-balance equations for each state s are only written for slots t in which amount Sst can change. These slots are obtained from time windows through earliest/ latest finishing times of producer batches and earliest/ latest starting times of consumer batches. Recurrence relation 5 links slots t and t--1 for a state s. t--1 stands for the last slot before t during which changes in the amount of state s can take place. This information is contained in Sast and obtained from Tgs and Tcs. Binary variables Wb,i,t are not dependent on equipment units as assignments are fixed. Equipment units sharing by assigned batches are limited by eq 614 whose domain has been reduced.



i,bi∈Ij

∑τ

Wb,i,τ e 1 ∀ t,j such that t ∈ shat,j

τet-φi,j τgt-φi,j-∆i,j+1 τgesti,b τelfti,b-pi+1

(6)

Time windows of batches competing for the same equipment unit allow a determination of time slots during which this competition might occur, that is, when batches’ time windows overlap. For each equipment unit set, shat, j contains this information. The summation is performed over all tasks i assigned to unit j. If i is a subtrain, a determination of whether any of its tasks is assigned to unit j is taken into account. In this way, eq 6 is written for all of the tasks belonging to the subtrain and assigned to active units. Competition for units can only occur inside the batches’ time windows, so that the summation in slots τ is limited by the batches’ earliest starting time and latest finishing time. If i is a subtrain with an internal task assigned to unit j, then the summation in eq 6 is restricted to slots τ during which this task can execute through φi,j and ∆i,j. As the batches to be scheduled are already defined by the planning phase, eqs 7 and 8a are introduced to force batch allocation and time monotonicity among batches of the same task.

∑t

Wb,i,t ) 1 ∀ b,i

(7)

tgesti,b telfti,b-pi+1

∑t tgesti,b telfti,b-pi+1

Wb,i,t × t + TIi e

∑t tgesti,b′ telfti,b′-pi+1

Wb′,i,t × t ∀ b,i,b′ > b (8a)

Equation 8a can be written in an aggregated form (eq 8b) without explicit calculation of start and end times.

3828

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000

∑τ

Wb,i,τ e 1 - Wb′,i,t

τgebti,b τelfti,b-pi+1 τgt+TIi

∀ b,i,b′ > b,{t/t g ebti,b′; t e lfti,b′ - pi + 1; t e lfti,b - pi + 1} (8b) The cost function is given by the total earliness represented by eq 9 and limited to final products.

[lfti,b - pi - ∑ ∑ i,b t

Wb,i,t × t]

(9)

tgebti,b telfti,b-pi

These modifications in the scope of the equations have, as their main effect, an important reduction in the number of binary variables, thus reducing the problem dimension and the branch and bound search effort. Nevertheless, in several examples, experimental results have shown the type of degeneration often found with this MILP formulation when applied to medium or large problems: basically the difficulty in obtaining integer solutions. All of these situations have a common characteristic: there are equipment units with no competition among batches of different tasks that increase the burden of the MILP formulation unnecessarily. In real situations, surely schedulers would not pay attention to these units and would concentrate on the rest of the problem, knowing that the requirements on these units, imposed by the solution of the remaining problem, would be easily satisfied. Constraint-basedsearch scheduling techniques, in their use of a bottleneck approach, have this characteristic. A reduced MILP formulation has been developed with this objective. The user can define the equipment units that will not be modeled based on aggregated demands given in the planning phase; the remaining units are termed active units. Mass-balance equations are only written for states whose producing and consuming tasks are assigned to active units. A problem remains to be solved because tasks in nonactive units will not be scheduled but their processing times must be taken into account in order to obtain a feasible solution. To solve this problem, a supplementary equation is introduced. Basically, it is a pegging equation that links batches of output and input states not modeled by mass-balance equations (eq 10a).

(

∑t Wb,i,t × t) + gapb,i,b′,i′ + pi e (∑t Wb′,i′,t × t)

∀ i,i′,b,b′/pegb,i,b′,i′ ) true (10a)

In the same way as for eq 8a, eq 10a can be written in an aggregated way (eq 10b).

∑τ Wb,i,τ e 1 - Wb′,i,t

∀ i,i′,b,b′/pegb,i,b′,i′ ) true; {t/t g ebti,b′; t e lfti,b′ pi + 1; t - gapb,i,b′,i′ e lfti,b - pi + 1} (10b)

where τ is restricted by τ g ebti,b; τ e lfti,b - pi + 1; and τ g t - pi - gapb,i,b′,i′ + 1. The term gapb,i,b′,i′ gives the time spent in processing of the batches of unmodeled tasks that link (b, i) and (b′, i′) through pegging relations given by pegb,i,b′,i′. These pegging relations simply represent the mass-balance

precedence links between batches and are obtained at the planning phase when the batches’ earliest starting times are determined. The gap defined above is a lower bound on the time that must elapse between batches. If no competition exists in the nonactive units, it is the real time that would be spent in a global solution. This will happen for dedicated units or units for which batches of different tasks do not overlap. 4. Example The example considered is taken from Papageorgiou and Pantelides15 with some modifications. The recipe’s representation is given in Figure 2 through its state task network representation. Equipment units suitable for each task and product demands are given in Tables 3 and 4. Storage constraints are given in Table 5. Zerowait (ZW) policies in intermediate states are used to define subtrains, represented in Figure 2 as dashed groups of tasks. Different assignment possibilities are only possible for tasks T41, T51, and T72. The main guidelines used to define task/equipment assignments are the following: (i) Task T32 is necessary for production of all final products, and only unit P2 is suitable for this task. Because the capacity of unit P2 is similar to all the other equipment units’ capacity, the number of batches for task T32 will be great. Therefore, it seems important to guarantee the lowest competition level for unit P2; consequently, tasks T41 and T51 are assigned to their alternative equipment units (P7 and P8, respectively). (ii) The number of batches for T31 is also large; nevertheless, it seems clear from the time windows that demand for equipment unit P3 by T31 and T72 will not occur in contiguous time intervals given the recipe structure and product demands, so T72 could be assigned to unit P3. The alternative assignment of T72 to unit P8 would compete for close time intervals with tasks T71 and T51. Batch sizes are taken equal to unit sizes given the assignment of tasks above. From the final product demands given in Table 4, the exploding procedure described in section 2 gives the number of batches and corresponding latest finishing times for intermediate states and raw materials. Figure 3 shows at the left side the limiting supply plan for raw materials. Demand for raw materials appears on an individualized basis; that is, each batch of a task using a raw material as input induces a raw-material demand to be delivered with a specific due date. Surely, a realistic delivery plan will be more aggregated, but those delivery dates represent bounds that must be fulfilled by any delivery plan input by the user. Suppose that planners define a planning horizon starting at time 10 with the raw-materials supply plan shown in Figure 3. Batch processing time windows obtained after constraint propagation are shown in Figure 3, together with the load imposed on equipment units using the units’ aggregated demand. In split states Int2 and Int3, the batches’ earliest starting times for tasks T40/T21 and T50/T70 were obtained with a higher weight on T40 and T50 to reduce the load on units P5, P7, and P8. Propagation of constraints drastically reduces the processing time windows, leading to 33 batches out of 114 with unique allocations, in contrast with only 5 batches in this condition after the exploding phase. Aggregated demand, representing a unit’s loading, is

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000 3829

Figure 2. State task network representation for example 1. Table 3. Unit Sizes and Equipment Units Suitable for Each Task units

tasks

unit size

P1 P2 P3 P4 P5 P6 P7 P8

T10,T21 T32,T41,T51 T31,T72 T23,T30,T60 T20,T40,T50 T61,T70 T11,T22,T41 T62,T71,T51,T72

6 8 7 7 8 6 7 8

Table 4. Product Demand Pro1 Pro2 Pro3 Pro4

ton

due date

50 30 40 35

60 60 60 60

Table 5. Storage Conditions state

storage

state

storage

S10 Int1 S20 S21 S22 S30 S31 Int2

ZW UIS UIS UIS ZW UIS UIS UIS

Int3 S40 S50 S60 S61 Int4 S70 S71

UIS ZW ZW UIS UIS UIS ZW UIS

only a qualitative measure, as it is obtained as a sum of probabilities; nevertheless, it is useful to point out tight situations. The pattern in some time intervals such as P1 (37-50), P6 (39-54), and P7 (39-52) is linked to low slack times, in these cases 0 (for T10/5, T21/1-5), 2 (for T61/4, T70/1-5), and 1 (for T11/5, T22/1-5, excluding T41/1-4). Planners may consider the situation too tight for the shop floor, in which case production can be anticipated through earlier deliveries of raw materials. Figure 4 represents the final situation with a new raw-materials supply plan. A pegging function

has been developed to assist the user; after his/her choice of a time window to be increased through earliest starting time anticipation, it propagates this anticipation to raw-materials deliveries. Anticipation of deliveries for Feed1 and Feed2 has increased time windows for batches of tasks T10 and T11, thus reducing loading in units P1 and P7, where total slack times are 5 and 11, respectively. Time windows for batches of task T32 are larger, not implying unique allocations, but nevertheless, they give a small total slack time of 2 time units. This tight situation can be seen through the shape of the unit P2 aggregated demand. The optimal scheduling solution was obtained for the global problem after 2107 nodes and 27 212 iterations. The model has 1343 equations, 337 continuous variables, and 797 binary variables (GAMS/OSL, OPTCR ) 0.01, 192 s/Pentium II). This solution is shown in Figure 5, leading to an earliness value of 61 time units. An unavoidable earliness of 40 time units is already detected in Figure 4, as some latest finishing times for batches producing final products have been anticipated in the constraints propagation phase. Equipment unit P2 is dedicated to task T32; thus, it can clearly be eliminated using the reduced MILP formulation. The same solution as Figure 5 was obtained in two steps: with P2 as a nonactive unit in the first and with the resulting allocations fixed in a second step during which batches of task T32 were allocated. Figure 6 shows the Gantt chart obtained in the first step. The quantity of nodes searched in the first step was 125 with 5003 iterations; the model has 1038 equations, 167 continuous variables, and 755 binary variables, and execution time was 26 s. The relaxed solution in both situations was identical with a value of 58.75. The reduction in execution time was 86%, with a reduction in binary variables of 5%. Despite the limited conclusions that can be drawn from one ex-

3830

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000

Figure 3. Raw-material supply plan, batches’ time windows, and aggregated demand. Raw materials: limiting supply plan (white), actual plan (gray). Time windows: Slots of total reliance used by batches (circles), slots not available (dashed). Aggregated demand: tasks assigned to each equipment unit.

ample, this reduction seems to be linked to the fact that the search procedure will not deal with possible allocations of T32 batches. Any allocation of batches T32/113 inside its time windows has no effect on final products earliness; only batch T32/14 must be allocated at its earliest beginning time to avoid earliness increase in Pro1 and Pro4. As unit P2 has no competition between batches of different tasks, this allocation is possible after the first step (Figure 6). Because task T32 is not modeled, gaps between batches producing states S30 and S31 (T30 and T31) and batches consuming states Int2 and Int3 (T21, T40, T50, and T70) are determined from pegging relations. Table 6 contains pegging relations between producer batches T30 and consumer batches T21. For each producer batch, Table 6 shows the first batch of the inactive task T32 linked to it, and for each batch of T32, it shows the first batch of consumer task T21 linked to each batch of T32. This table defines the set pegb,i,b′,i′ utilized in eqs 10a,b, and Table 7 contains the values of gapb,i,b′,i′. In fact, all of the values in Table 7 are not necessary, only those in bold, which force an interval

between successive batches of T21 greater than the T21 processing time (2 h.). 5. Conclusions The two-level approach presented in this paper is motivated by the fact that short-term scheduling of multipurpose batch plants subject to demand changes is a hard problem, not only because of its combinatorial nature, but also because the impact of modifications on raw-material delivery plans and equipment availability/ loading/assignment needed to accommodate demand changes, are difficult to evaluate through monolithic models. The decomposition into planning and scheduling levels proposed in this paper is motivated by the utilization, at the planning level, of a combination of traditional tools, such as the MRP-like backward explosion, and a powerful constraint-propagation mechanism. As a result, time windows can be significantly shortened depending on equipment loading, leading to a simpler scheduling problem. Some important features incorpo-

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000 3831

Figure 4. Raw-material supply plan, batches’ time windows, and aggregated demand with anticipation in Feed1 and Feed2 deliveries.

rated at this level are a backward explosion procedure based on processing times instead of lead times and a full propagation constraint mechanism taking into account mass balances and storage policies. Additionally, the interactive nature of the planning level allows managers to evaluate the impact on plant loading of changes in demand, deliveries of raw material, and assignments. It can be seen as an information provider system allowing the user to interactively analyze different production scenarios and, hence, permitting an easier and deeper insight into the feasible scheduling alternatives, for example, by indicating heavily loaded production units, bottlenecks, and feasible time intervals for task allocation. The scheduling level benefits from shorter time windows, regardless of the approach being used to solve the scheduling problem, because of the reduction of the solution space. Particularly, in this paper is proposed an MILP model based on a discrete time representation that benefits from the reduction on the time windows, which impacts directly on the number of binary vari-

ables, and which explores some processing features as low loading on some equipment units and processing policies. The results show that the proposed approach at the planning level can be used as a powerful screening procedure, and MILP approaches can still be used for moderate to large problems, depending on the tightness of the time windows. Appendix 1 Task ordering and time-window constraint propagation techniques have been developed by researchers in disjunctive scheduling. Disjunctive scheduling has been an active research field in the artificial intelligence area for several years. Essentially, the problem considered is to order a set of tasks on a set of machines to minimize the makespan. Tasks are linked through precedence constraints and must be processed inside given time windows. Disjunctive constraints establish that each machine can execute at most one task at a time.11,16 An important effort has been made in constraintpropagation mechanisms to deduce new constraints

3832

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000

Figure 5. Optimal scheduling solution for the global problem.

Figure 6. Scheduling solution with unit P2 eliminated from the MILP model.

from existing constraints. At each node during the scheduling search procedure, the task allocated puts new constraints on the remaining problem; propagation of these constraints reduces the solution space and eventually detects a dead end that forces backtracking. Among constraint-propagation mechanisms, edge-finding bounding techniques have been developed to determine mandatory orderings between tasks.

The main results are summarized below, using the notation in Table 8. Ordering between Two Tasks A and B. Consider two tasks A and B assigned to the same unit that have processing times TPA and TPB with time windows (ESTA, LFTA) and (ESTB, LFTB). Ordering must only be analyzed if the time windows overlap. An infeasible situation can be detected by condition 1.

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000 3833 Table 6. Pegging relations nonactive tasksT32 batches

producer tasks’ batches T30 1

T31 1 2 3 4 5 6 7 8 9 10 11

2

3

1 2 3 4 5 6 7 8 9 10 11 12 13 14

12 13

4

consumer tasksT21 batches

1 2, 3 4, 5 6 7 8

Table 7. Values of gapbib′i′ in Equations 10a,b producer T30/T31 batches T30/1 T30/2 T30/3 T30/4 T31/1 T31/2 T31/3 T31/4 T31/5 T31/6 T31/7 T31/8 T31/9 T31/10 T31/11 T31/12 T31/13

consumer T21 batches T21/1 T21/2 T21/3 T21/4 T21/5 T21/6 T21/7 T21/8 24 12

27 15 3

29 17 5

31 19 7

33 21 9

35 23 11

37 25 13

24 21 18 15 12 9 6 3

27 24 21 18 15 12 9 6 3

29 26 23 20 17 14 11 8 5

31 28 25 22 19 16 13 10 7 3

33 30 27 24 21 18 15 12 9 5

35 32 29 26 23 20 17 14 11 7 3

37 34 31 28 25 22 19 16 13 9 6

42 30 18 3 42 39 36 33 30 27 24 21 18 15 12 6 3

Table 8. Indexes and Variables Indexes A, B, i

tasks

Ω TPA TPΩ ESTA LFTA EFTA LSTA

Variables set of tasks processing time of task A sum of processing times of tasks belonging to set Ω earliest starting time of task A latest finishing time of task A earliest finishing time of task A; EFTA ) ESTA + TPA latest starting time of task A; LSTA ) LFTA - TPA

max(LFTA, LFTB) - min(ESTA, ESTB) < TPA + TPB (1) If the situation is feasible, then ordering between A and B can be deduced if conditions 2a or 2b hold.

if EFTB > LSTA, then A < B (A precedes B) (2a) if EFTA > LSTB, then B < A (B precedes A) (2b) These orderings give rise to reductions in time windows in the following situations.

if ESTA < ESTB + TPB, then ESTA ) ESTB + TPB (3b) if LFTB > LFTA - TPA, then LFTB ) LFTA - TPA In the first case (eq 2a), A precedes B so that the earliest starting time for task B has a minimum value to make room for task A, and the due date for task A has a maximum value to allow processing of task B (eqs 3a). The inverse situation occurs in the second case (eqs 2b and 3b). Any ordering is, in fact, deduced from the condition LFTr - ESTr g TPr, where r represents any of the sets of competing tasks. There are (2n - 1) such sets for n competing tasks. To reduce the problem dimension, a more efficient approach is presented by Caseau and Laburthe16 through the introduction of the concept of task interval. A tasks interval is defined as the set of tasks built from two tasks A and B (that can be the same) picking up tasks i such that ESTi g ESTA and LFTi e LFTB. It is shown that it suffices to consider only task intervals instead of all of the sets that can be generated with the competing tasks, the advantage being that the number of task intervals is at most n2. The ordering between a task and a task interval is deduced in the following situations. Ordering between a Task A and a Task Interval Ω (A ∉ Ω). The due date (earliest starting time) for a set Ω is taken as the maximum due date (minimum earliest starting time) of the tasks belonging to Ω, and the processing time for a set Ω is taken as the sum of tasks’ processing times. Defining Φ ) Ω ∪ A, infeasibility will occur if LFTΦ - ESTΦ < TPΩ + TPA. In a feasible situation, ordering conditions can be deduced in two cases. (a) If LFTΩ ESTA < TPΩ + TPA, then A does not precede the entire set Ω, so that the following constraint must be satisfied.

ESTA e min(ESTi + TPi) i∈Ω

(4a)

(b) If LFTA - ESTΩ < TPΩ + TPA, then A does not follow the entire set Ω, so that the following constraint must be satisfied.

LFTA e max(LFTi - TPi) i∈Ω

(4b)

In two cases, strong ordering conditions and tighter constraints can be obtained. In case a, if additionally LFTΩ - ESTΩ < TPΩ + TPA, then A cannot be processed among tasks i belonging to Ω. As far as it is known that A does not precede set Ω, it follows that Ω precedes A. In this case, the earliest starting time for A must be greater than set Ω’s earliest finishing time. A lower bound for that quantity is ESTΩ + TPΩ so that

ESTA g ESTΩ + TPΩ

(5a)

Also in this case, the latest finishing times for tasks i belonging to Ω must satisfy

if ESTB < ESTA + TPA, then ESTB ) ESTA + TPA (3a)

LFTi e LFTA - TPA ∀ i ∈ Ω

if LFTA > LFTB - TPB, then LFTA ) LFTB - TPB

In the same case a, the conclusion that Ω precedes A is also obtained if task A must follow any task i ∈ Ω because ESTA + TPA > LFTi - TPi ∀ i ∈ Ω, so that the constraints in eqs 5a and 6a hold.

and

(6a)

3834

Ind. Eng. Chem. Res., Vol. 39, No. 10, 2000

In case b, if additionally LFTΩ - ΕSΤΩ < TPΩ + TPA, then A cannot be processed among tasks i belonging to Ω. As far as it is known that A does not follow set Ω, it follows that A precedes Ω. In this case, the due date for A must be lower than set Ω’s latest starting time. An upper bound for that quantity is LFTΩ - TPΩ so that

LFTA e LFTΩ - TPΩ

(5b)

Also in this case, the earliest starting times for tasks i belonging to Ω must satisfy

ESTi g ESTA + TPA ∀ i ∈ Ω

(6b)

In the same case b, the conclusion that A precedes Ω is also obtained if task A must precede any task i ∈ Ω because LFTA - TPA < ESTi + TPi ∀ i ∈ Ω, so that constraints in eqs 5b and 6b hold. Ordering between a Task A and a Task Interval Ω (A ∈ Ω). An infeasible situation is detected if LFTΩ - ESTΩ < TPΩ. In a feasible situation, the ordering can be deduced in two cases

if LFTΩ - ESTΩ < TPΩ, then A does not precede the remaining set Ω - {A} (7a) if LFTΑ - ESTΩ < TPΩ, then A does not follow the remaining set Ω - {A} (7b) Constraints identical to eqs 4a and 4b are obtained. In the first case, the earliest starting time for task A is modified to satisfy

ESTA g

min (ESTi + TPi) i∈Ω,i*A

(8a)

In the second case, the latest finishing time for task A must satisfy

LFTA e

max (LFTi - TPi) i∈Ω,i*A

(8b)

Acknowledgment The reviewer’s contribution is acknowledged for the aggregated versions of eqs 8a and 10a. This work has been partially supported by Fundac¸ a˜o de Amparo a` Pesquisa do Estado de Sa˜o Paulo (FAPESP). Literature Cited (1) Orlicky, J. Material Requirements Planning; McGraw-Hill Book Company: New York, 1975.

(2) Baker, K. R. Requirements Planning. In Handbooks in OR & MS; Graves, S.C., Ed.; Elsevier Science Publishers: New York, 1993. (3) Kondili, E.; Pantelides, C. C.; Sargent, R. W. H. A General Algorithm for Short-Term Scheduling of Batch OperationssI. MILP Formulation. Comput. Chem. Eng. 1993, 17 (2), 211. (4) Shah, N. Single and Multisite Planning and Scheduling: Current Status and Future Challenges. Foundations of Computer Aided Process Operations; Cache Corporation: Snowbird, UT, 1998. (5) Kudva, G.; Elkamel, A.; Pekny, J. F.; Reklaitis, G. V. Heuristic Algorithm for Scheduling Batch and Semi-Continuous Plants with Production Deadlines, Intermediate Storage Limitations and Equipment Changeover Costs. Comput. Chem. Eng. 1994, 18 (9), 859. (6) Bassett, M. H.; Dave, P.; Doyle, F. J., III; Kudva, G. K.; Pekny, J. F.; Reklaitis, G. V.; Subrahmanyam, S.; Miller, D. L.; Zetner, M. G. Perspectives on Model Based Integration of Process Operations. Comput. Chem. Eng. 1996, 20 (6/7), 821. (7) Subrahmanyam, S.; Pekny, J. F.; Reklaitis, G. V. Decomposition Approaches to Batch Plant Design and Planning. Ind. Eng. Chem. Res. 1996, 35 (6), 1866. (8) ILOG Scheduler 4.0 User’ Manual; ILOG: Mountain View, CA, 1997. (9) Keng, N. P.; Yun, D. Y. Y.; Rossi, M. Interaction Sensitive Planning System for Job-Shop Scheduling. In Expert Systems and Intelligent Manufacturing; Oliff, M. D., Ed.; Elsevier: New York, 1988. (10) Sadeh, N. Look-Ahead Techniques for Micro-Opportunistic Job Shop Scheduling. PhD Dissertation, CMU-CS-91-102, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, 1991. (11) Baptiste, P.; Le Pape, C. A Theoretical and Experimental Comparison of Constraint Propagation Techniques for Disjunctive Scheduling. Proceedings of the 14th International Joint Conference on Artificial Intelligence, Montreal, Canada, 1995. (12) Le Pape, C. Implementation of Resource Constraints in ILOG SCHEDULE: A Library for the Development of Constrained Based Scheduling Systems. Intell. Syst. Eng. 1994, 3 (2), 55. (13) Das, B. P.; Shah, N.; Chung, P. W. H. Off-line Scheduling a Simple Chemical Batch Process Production Plan Using the ILOG Scheduler. Comput. Chem. Eng. 1998, 22 (Suppl), S947. (14) Shah, N.; Pantelides, C. C.; Sargent, R. W. H. A General Algorithm for Short-Term Scheduling of Batch OperationssII. Computational Issues. Comput. Chem. Eng. 1993, 17 (2), 229. (15) Papageorgiou, L. G.; Pantelides, C. C. Optimal Campaign Planning Scheduling of Multipurpose Batch Semicontinuous Plants, Part2. Ind. Eng. Chem. Res. 1996, 35 (2), 510. (16) Caseau, Y.; Laburthe, F. Improved CLP Scheduling with Tasks Intervals. Proceedings of the Eleventh International Conference on Logic Programming; van Hentenryck, P., Ed.; The MIT Press: Cambridge, MA, 1994.

Received for review June 22, 1999 Revised manuscript received January 20, 2000 Accepted July 22, 2000 IE9904551