A Divide and Conquer Strategy for the Scheduling of Process Plants

A Divide and Conquer Strategy for the Scheduling of Process Plants ... of the proposed strategy is illustrated through the solution of three example p...
1 downloads 0 Views 278KB Size
Ind. Eng. Chem. Res. 2004, 43, 7939-7950

7939

A Divide and Conquer Strategy for the Scheduling of Process Plants Subject to Changeovers Using Continuous-Time Formulations Pedro M. Castro,*,† Ana P. Barbosa-Po´ voa,‡ and Augusto Q. Novais† Departamento de Modelac¸ a˜ o e Simulac¸ a˜ o de Processos, INETI, 1649-038 Lisboa, Portugal, and Centro de Estudos de Gesta˜ o, IST, 1049-001 Lisboa, Portugal

This paper proposes a methodology that improves the performance of uniform time grid, continuous-time scheduling formulations, in problems involving changeovers. The procedure consists of dividing the problem into complementary subproblems of lower complexity based on simple structural decisions and subsequently solving all of the subproblems. The performance of the proposed strategy is illustrated through the solution of three example problems that have been thoroughly examined in the literature, two concerning short-term scheduling problems and one concerning a periodic scheduling problem. The results show that it is best to solve several subproblems sequentially rather than one single large problem. Moreover, in the case of the nonconvex periodic scheduling problem, the proposed methodology was able to generate substructures that guided the solver to closer-to-the-global-optimum regions of the search space. For this specific example, the use of a general continuous-time formulation together with the proposed methodology leads to a solution that is 18.8% better than the best solution reported in the literature. 1. Introduction Most manufacturing environments are currently changing very rapidly because of an increasingly competitive global market. The trend is to move toward more flexible multipurpose process systems that can respond to market requirements quickly. In such systems, the production of a particular product usually involves a sequence of operations that can be batch, semicontinuous, or continuous in nature. These are performed in a set of equipment items, where a particular unit is usually suitable for more than a single operation. Consequently, the procedure of allocating resources and equipment over time so as to execute the chemical and physical processing tasks required to manufacture a few products in a profitable manner can be quite complex. To help with this decision-making process, numerous scheduling tools have appeared. Process plants are usually operated in either a shortterm or a campaign mode. The short-term mode of operation is appropriate where the demands for the different products are subject to rapid change, whereas the campaign mode of operation is used wherever demands are stable over extended periods of time. In the latter case, the plant may be dedicated to a small subset of its potential products for relatively long periods of time (campaigns), thus reducing the cost of changeovers. In campaign-mode operation, it is often profitable to establish a regular periodic operating schedule (typically on the order of days) in which the same sequence of operations is carried out repeatedly. The goal of both types of scheduling problems is to optimize the utilization of resources over a certain period of time. However, while in short-term problems the time horizon is fixed, in periodic problems it is * To whom correspondence should be addressed. Tel.: +351217162712.Fax: +351-217167016.E-mail: [email protected]. † INETI. ‡ IST.

usually a variable of the model (the cycle time). As a consequence, the latter are typically much more difficult to solve. The last couple of decades saw scheduling formulations evolving from a large set of different approaches, each suitable to a specific category of problems, to more general ones. The development of systematic ways of representing the process under study, first with the well-known state task network (STN) of Kondili et al.1 and later with the resource task network (RTN) of Pantelides,2 was decisive in this leap forward because it made model building simpler. Initially, STN- and RTN-based formulations have employed a simple discretization of the time horizon into equal-length intervals. The problem with discrete-time formulations is that they may require a large number of time intervals to represent problem data accurately. Because the underlying mathematical model must characterize the potential occurrence of events at each time point, a large number of variables and constraints may be required, which may lead to problem intractability. Continuoustime formulations emerged as an effort to eliminate unnecessary time intervals in the hope of reducing the problem size and computational cost. Recent STN/RTNbased continuous-time formulations include those of Schilling and Pantelides,3 Ierapetritou and co-workers,4-6 Castro and co-workers,7-9 Giannelos and Georgiadis,10,11 and Maravelias and Grossmann.12 Despite recent developments, the solution of scheduling problems by continuous-time formulations is still limited to small/medium-sized problems. Because of their characteristically large integrality gap (especially when batch tasks are involved), mixed-integer linear problems (MILPs) from continuous-time scheduling formulations can become intractable for more than 10 event points. Even if this number is sufficient to find a feasible solution to the problem, it might be insufficient to prove that the obtained solution is the global optimum (it is assumed that a given solution is the global

10.1021/ie0342614 CCC: $27.50 © 2004 American Chemical Society Published on Web 10/22/2004

7940

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004

optimum when the objective function remains unchanged after a single increase in the number of event points). The fact that there is a practical upper bound on the number of event points can be particularly restrictive when addressing a problem involving sequence-dependent changeovers with a continuous-time formulation. These types of problems are common in the process industries, for instance, in those dealing with colored materials, such as plastics or paints, where cleaning is required between the production of different products. Even if no additional variables are required to model changeovers (such as in work by Giannelos and Georgiadis10,11 and Maravelias and Grossmann12), setup/ changeover times need to be accounted for. Thus, if changeovers are considered implicitly,10-12 all tasks executed in equipment units that require cleaning will span at least two time intervals, whereas if changeovers are considered explicitly,9 a production task will always be followed by a cleaning task. Either way, more event points will be required, which in turn will make the model more difficult to solve. This paper presents a technique that significantly improves the performance of the general RTN-based continuous-time formulation of Castro et al.9 for shortterm scheduling problems involving changeovers and that can be particularly useful for periodic scheduling problems of the same type. It is based on a very simple concept that is now explained. The RTN representation of a process can be viewed as a superstructure that includes all possible paths to go from a set of raw materials to a set of products. Because the number of different paths (substructures) can be quite high, it would be helpful to reduce the number of possibilities based on simple structural decisions. Good structural decisions are those that allow a significant reduction of the domains of certain variables of the problem and hence enhance the performance of the solver. In a multiproduct plant, a typical example would involve deciding what product sequence to follow on a particular production line: for a certain sequence, the problem becomes much easier to solve. The drawback is that all possible sequences need to be accounted for or else there is the risk of losing the optimal solution. This means solving several subproblems, instead of one large general problem. Interestingly, this divide and conquer strategy can lead to very significant reductions in the computational effort, as will be shown through the solution of three well-known problems. This paper also shows how important it is to use a general continuous-time formulation to tackle scheduling problems. The periodic problem considered here is a two-stage, three-product example of the more general M-stage, P-product problem, with sequence-dependent changeovers, first addressed by Pinto and Grossmann.13 Their formulation relies on the assumption that every product must be processed in the same sequence throughout all stages, a hypothesis that is now shown to be inadequate because significant savings in the cost of changeovers can be achieved by using different product sequences in different stages. The rest of the paper is structured as follows. Section 2 introduces some fundamental concepts concerning the type of time grid employed by the continuous-time formulations used in this paper and the RTN process representation. The proposed divide and conquer algorithm is given in section 3 and is later applied to the solution of three examples taken from the literature.

Figure 1. Uniform time grid for short-term scheduling.

The two that concern short-term scheduling are addressed in section 4, while the periodic scheduling problem is left for section 5, which also contains the comparison to the formulation of Pinto and Grossmann.13 Finally, the conclusions are stated in section 6. 2. Fundamental Concepts 2.1. Uniform Time Grid. The time horizon (H) is divided into a fixed number of time intervals/slots of unknown length, with events taking place only at interval boundaries. Furthermore, each boundary will have at least one event taking place, which can be either the beginning or end of a task. For this reason, the interval boundaries of time grids of the type used by continuous-time formulations are usually referred to as event points. Another important feature is that all events report to the same time grid. Uniform time grids such as the one adopted in this work have been used by Mockus and Reklaitis,14 Schilling and Pantelides,3 Castro and co-workers,7-9 and Maravelias and Grossmann.12 Although they are essentially the same, the time grid used for short-term scheduling is slightly different from that used for periodic scheduling. As can be seen in Figures 1 and 2, the event points are numbered from 1 to T in both grids. However, in Figure 1 the last event point defines the end of the time horizon, while in Figure 2 there is still another interval (slot T). Note that there is no need to define another event point because, as a result of the use of the concept of task wraparound,8,15 the periodic scheduling formulation only needs to consider one cycle (T + 1 ≡ 1). 2.2. RTN Process Representation. The RTN process representation2 regards all processes as bipartite graphs comprising two types of nodes: resources and tasks. The concept of resource is entirely general and includes all entities that are involved in the process steps, such as materials (raw materials, intermediates, and products), processing and storage equipment (tanks, reactors, etc.), and utilities (operators, steam, etc.). On the other hand, a task is an abstract term for an operation that transforms a certain set of resources into another set. A given RTN can feature two possible ways of resource interaction. Discrete interaction (e.g., with equipment units) can be viewed as a temporary decrease of the total resource availability because a task captures the equipment unit at its start only to release it back at its end. On the other hand, interaction with material resources, which can be either discrete, for batch tasks, or continuous, for continuous tasks, results in a permanent decrease of the total resource availability. These two different modeling options are differentiated in the RTN by using double-arrow connectors to link a particular task to equipment resources and single-arrow connectors for the material resources. Above the connector between a certain task and a particular resource, it is common to see a positive number that gives the proportion between the amount of material processed in the task and the amount of resource produced/

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004 7941

Figure 2. Uniform time grid for periodic scheduling.

consumed. However, the default value (1) is usually omitted for simplification. For reasons related to the performance of the model (details can be found in work by Castro et al.9), it is assumed that all equipment resources have a maximum availability of 1. In other words, even identical equipment items will correspond to different resources. 2.3. Mathematical Formulation. The mathematical formulation depends on the mode of operation being considered, which can be either a short-term or a periodic mode. The complete short-term scheduling formulation used in this paper can be found in work by Castro et al.,9 while the periodic scheduling formulation used can be viewed as a generalization of that of Castro et al.8 with the inclusion of the more recent developments of the short-term scheduling formulation. Readers should refer to the Nomenclature section of Castro et al.9 for the description of the variables and parameters mentioned in this paper. 3. Divide and Conquer Strategy Continuous-time formulations give rise to mathematical problems that can be very difficult to solve using commercial solvers even when using a relatively low number of event points in the time grid. In problems involving changeovers, this behavior is more pronounced because there is a need to allocate both processing and cleaning tasks. It is thus convenient to develop a strategy that significantly reduces the computational burden of these specific types of scheduling problems. The methodology described below can easily be adapted to other uniform time grid, continuous-time formulations. 3.1. General Idea. The complexity of mathematical problems can only be reduced if certain solutions, which can be viewed as substructures of the complete superstructure, are eliminated from the formulation. This can be accomplished either by fixing the values of some of the binary extent variables or by adding additional sets of constraints. The difficulty of such a method lies in the selection of an adequate set of variables/constraints because a wrong option will inevitably lead to a solution that is worse than the true optimal solution. Thus, we must proceed with caution. The first step is to look at both the production recipe and problem data. A careful analysis of these usually allows the elimination of some variables and constraints from the formulation. More specifically, this preprocessing step involves the definition of the minimum event point at which a particular task can start, LBi (1 e LBi e |T| - 1), and the maximum event point at which the task can end, UBi (2 e UBi e |T|). These bounds are then used to define a new set, It,t′ (see Figure 3), which contains all tasks that start at event point t and end at event point t′. Finally, all variables (V) and constraints (C) of types Vi,t,t′ and Ci,t,t′, with (i, t, t′) ∉ It,t′, are removed from the general model. A further reduction in the number of binary variables causes a loss of generality. At this point, the complexity of the complete problem is at its minimum. Now, instead of solving the problem,

Figure 3. Divide and conquer algorithm for short-term scheduling: calculation of set It,t′ for level 1.

one can break its superstructure down into simpler, complementary substructures and then solve every single subproblem either sequentially or using parallel processing. The best solution, of all optimum solutions found, will be the optimal solution of the complete problem. In scheduling problems involving changeovers, there are two simple ways of generating complementary subproblems, which have been classified into level 1 and level 2 structural decisions. 3.1.1. Level 1 Subproblems. Level 1 involves choosing the initial condition of all equipments of the plant that are subject to changeovers. Because these can be directly related to particular excess resource variables (R0r ), the proposed methodology can be viewed as a branch and bound (B&B) method that starts by branching on some specific continuous variables (which can be viewed as binary variables because a correct definition of the RTN parameters ensures that they can only be equal to 0 or 1). Then, for each node, preprocessing is performed to further decrease the size of the problem, before proceeding to the usual branching on the binary variables. Naturally, the elements of set It,t′ will vary between subproblems. Although the general calculation procedure is very difficult to present for all possible subproblems, it is shown for the first subproblem (iteration) in Figure 3. Because of the complex nature of the equations used to define LBi and UBi, a brief explanation of some of the mathematical terms is now provided. The more general case of sequence-dependent changeovers is assumed, although the methodology can easily be adapted to cases where more than one product can be produced before the equipment is cleaned (see example 1). In this way, before the equipment state can be changed, at least one processing task and one cleaning task needs to be executed. In the short-term scheduling problems, it is also assumed that there is no need to regenerate the initial state of the equipment, so the last task of the schedule will be a processing task. The first iteration of level 1 for short-term scheduling corresponds to the selection of the first of all possible states in all equipment units. All tasks consuming one of those states (for example, one with µS1r1,i ) 1) can start from the first event point (if they are processing tasks, i ∉ ICL) or from the second event point (if they are cleaning tasks, i ∈ ICL) onward, while for the other processing tasks, LB ) 3, and for the other cleaning tasks, LB ) 4. For the upper bound, we need to leave room for all tasks that take place in the same equipment

7942

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004

Figure 4. Divide and conquer algorithm for short-term scheduling: calculation of set It,t′ for level 2.

Figure 5. Divide and conquer algorithm for periodic scheduling: calculation of set It,t′ for level 2.

unit, i.e., at least two time intervals (one for processing and another for cleaning) per task. This constraint is only for processing tasks consuming one of the initial states; all other processing tasks can end at the last event point. The last term of the right-hand side makes sure that the cleaning tasks can end one event point later than the corresponding processing tasks (the task that produces a resource corresponding to the equipment state that is consumed by the cleaning task) and that all cleaning tasks that produce one of the initial equipment states are eliminated from the formulation. 3.1.2. Level 2 Subproblems. Level 2 goes one step further than level 1 because it involves choosing the product sequence on the equipments that are subject to changeovers. In this way, we emphasize important substructures that are somehow hidden because of the fact that the decision of the product sequence is not directly related to the model variables. The general calculation procedure for the elements of set It,t′ is given in Figure 4 for short-term scheduling problems and in Figure 5 for periodic scheduling problems. The first iteration of level 2 for short-term scheduling problems corresponds to the selection of a production sequence that goes from the first possible state to the last possible state in all equipment units. It is important to mention that a particular state must be in exactly one position of the sequence. In level 2, the bounds are more difficult to calculate, so the tasks have again been divided into processing and cleaning tasks. Now that

Figure 6. Divide and conquer algorithm.

the relative position of all tasks is known a priori, more variables can be eliminated from the formulation. For example, processing tasks consuming the first, second, or third state of the sequence can start no sooner than the first, third, and fifth event point. Similarly, the first cleaning task, which consumes the first state of the sequence and produces the second state of the sequence, starts no sooner than the second event point, while the second cleaning task can only start at the fourth event point. For the upper bounds, the procedure is similar, but now it is applied in reverse, from tasks consuming the last state to those consuming the first state of the sequence. Notice that all cleaning tasks that are not required in the chosen sequence are also eliminated. For periodic scheduling problems, not all equipment items are subject to the same constraints. On the one hand, there is the equipment resource that has one of its tasks anchored (see section 5), while, on the other hand, there are all other equipment resources. Figure 5 assumes that the former corresponds to the first equipment resource. It can be seen that tasks executed in this equipment item are subject to the exact same bounds as those of short-term scheduling problems with one exception: in periodic scheduling problems, the first equipment state needs to be regenerated so there is the need to clean from the last to the first state of the sequence. Thus, the cleaning task that regenerates the first equipment state will start sooner or at t ) |T| and end at t′ ) 1 (see Figure 2). With respect to the other equipments and because of the periodic nature of the problem, the best approach is to eliminate the cleaning tasks that are not required. All other tasks can start at any event point. 3.2. Overview. The divide and conquer algorithm can be directly applied to scheduling problems with sequencedependent changeovers and is shown in Figure 6. In cases where some sequences do not require changeovers, some adaptations are required that rely on a careful examination of the production recipe. However, the required changes are easy to implement, as can be seen in section 4.1. The algorithm also assumes that only one cleaning of the same type is executed during the time horizon. Although this is a limitation of the algorithm because it is possible that a process with many stages can have more than one setup of the same type in a

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004 7943

nonbottleneck stage, it is not an important one because it is unlikely that such large problems are treatable with existing continuous-time formulations and computers. Nevertheless, in such cases, the oversimplification of the problem can be viewed as a good heuristic rule. The process of dividing the complete scheduling problem into several subproblems is accomplished through the definition of set It,t′. All required subproblems are then solved sequentially with one particuliarity: to speed up the search procedure, we use a cutoff value that is updated every time a better solution is found. Naturally, the cutoff value can be removed if there is the curiosity to find the optimal solution of all subproblems. The performance of the algorithm is illustrated in the next two sections for two short-term problems and one periodic problem taken from the literature. The algorithm has been implemented in GAMS, where set It,t′ has been defined as a dynamic set. 4. Short-Term Example Problems In this section, two short-term example problems taken from the literature are used to illustrate the performance of the proposed algorithm. It is assumed (also for the periodic problem given in section 5) that the cleaning tasks can only last one time interval (∆t ) 1). This significantly reduces the complexity of the formulation (see work by Castro et al.8) and is a quite reasonable assumption because the processing tasks usually last longer than the cleaning tasks (the validity of the hypothesis can be confirmed by setting ∆t ) 2, solving the problem, and then seeing if the value of the objective function remains the same). The same assumptions are used on each of the subproblems generated by the divide and conquer algorithm so that a direct comparison can be made. The resulting MILPs were solved to optimality (0% tolerance) on a Pentium IV 2.53 GHz machine, running Windows XP Professional, by the commercial solver GAMS/CPLEX 8.1.0. 4.1. Example 1. The first problem, which can be viewed as the motivating example, has been addressed by several authors5,9,11,16,17 for a few scenarios concerning the intermediate storage policy. Of these scenarios, no intermediate storage (NIS) is the most interesting one and has recently been addressed by Castro et al.9 Although the authors were able to find a good solution to this problem by using nine event points in the time grid, they were unable to prove its optimality because the solver was unable to decrease the initial integrality gap within the maximum computational limit defined. This problem is thus an excellent candidate to test the performance of the proposed strategy. Finding the global optimum through the use of continuous-time formulations involves the solution of the problem for different cardinalities of set T, i.e., for different numbers of event points. It starts by finding the minimum number of event points required to reach a solution and then continues by solving the problem successively for an increasing number of event points until no increment is observed in the value of the objective function or the problem becomes intractable. This problem belongs to the latter class of problems. Although initially the solution is found to improve for every increment in the number of event points, when we get to nine event points, it is not possible to prove the optimality of the best solution encountered (2672.5

Table 1. Example 1: Results for the Entire Problem for Several Event Points event points binary variables continuous variables constraints obj relaxed MILP obj MILP nodes examined CPU s

6

7

8

9

143 486 561 2688.65 2601.28 5830 6.3

174 578 672 2695.32 2638.40 202757 694

205 670 783 2695.32 2665.83 745115 5173

236 762 894 2695.32 2672.50a 8007335 200000

a Resource limit exceeded. Best integer solution possible: 2695.32 (gap ) 0.85%).

for a possible maximum of 2695.32; see Table 1) even for a maximum resource limit of 2 × 105 s. To apply the proposed strategy at level 1, we need to choose the initial condition of all equipments of the plant that are subject to changeovers. In the present case, there are two possible initial conditions for each of the four packing lines that are subject to changeovers, so 24 ) 16 complementary subproblems are generated in level 1. While the complete problem requires 236 binary variables (for nine event points), a particular problem resulting from level 1 decisions requires only 200 binary variables (an illustration of the application of the preprocessing step for this example can be found in work by Castro et al.18). Although there is only a 15% decrease in the number of binary variables from the entire problem to a particular subproblem, there is an enormous difference in the computational effort because, for nine event points, all 16 subproblems are solved in just 26.4 CPU s. Such a small value results from two facts: (i) most subproblems are infeasible, a situation that the solver is capable of identifying very quickly; (ii) those that are feasible are solved rather fast, meaning that they are much simpler than the complete problem. It is particularly interesting to note that the two feasible subproblems have opposite initial conditions and lead to solutions that have the same value for the objective function. In fact, the (1; 1; 2; 2) optimal schedule could be the exact mirror image of the (2; 2; 1; 1) optimal schedule (shown in Figure 7). This can be explained by the following problem characteristics: (a) there are only continuous production tasks; (b) the cleaning tasks last the same in both directions; (c) the initial equipment conditions are not fixed; (d) no storage is available for the intermediate products. Thus, any given schedule works in both ways (direct or reverse), which means that only half of the subproblems needed to be checked for this particular example. The small computational effort associated with the subproblems also indicates that the search for the global optimal solution can be continued. For 10 event points, the total computational effort is equal to 603 s (the subproblems consist of 231 binary variables, 783 continuous variables, and 933 constraints). Again only the (1; 1; 2; 2) and (2; 2; 1; 1) subproblems are feasible, and they both lead to solutions corresponding to an objective of 2672.5. Because there is no variation in the objective function from the nine event point case, it is assumed that 2672.5 is the global optimum. The next decision level, level 2, involves choosing the product sequence on each of the four packing lines that are subject to changeovers. In this case, it does not seem advantageous to further divide the problem because of the following reasons: (i) a much larger number of subproblems: 2! × 3! × 4! × 4! ) 6912 would need to

7944

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004

Figure 7. Example 1: Optimal schedule for nine event points [results from subproblem (2; 2; 1; 1)].

Figure 8. Example 2: RTN representation of the process (part I: processing tasks).

be solved; (ii) it is not clear that we are not oversimplifying the problem because in a very constrained scenario like NIS it may be convenient to produce a given product in alternation with another if changeovers are not required in between. Such solutions would be removed from the formulation because for them the product sequence is undefined. 4.2. Example 2. The second short-term scheduling problem to be considered features sequence-dependent changeovers and so is a good example to test the performance of the proposed strategy at the two decision levels. It is taken from Maravelias and Grossmann12 and concerns a small batch plant where two equipment units (U1 and U2) are available to perform six processing tasks that result in the production of two different products: P1 and P2 (see Figure 8). All processing tasks have variable durations that depend on the batch size, which in turn is subject to given lower and upper bounds, and it is assumed that zero-wait (ZW) policies do not apply; i.e., inherent waiting periods are allowed9

(these are represented on the Gantt chart as a grayfilled rectangle). Unlimited intermediate storage is also assumed. The objective of the short-term scheduling problem is the maximization of the product revenue over a time horizon of 12 h while meeting a minimum demand of 2 tons for each product. The initial excess resource of both raw materials (F1 and F2) is equal to 100 tons. The problem just described can be solved rather rapidly and is therefore of limited interest. What makes it attractive is the fact that it requires equipment cleaning every time a task is changed. Now, a more detailed and general model of resource conditions is required, where these are considered explicitly; i.e., each resource condition corresponds to a different resource. More specifically, any task will interact not only with a particular equipment resource and certain material resources but also with one or two resource conditions. For example, task T11 consumes a unit amount of resource U1_T11 at its beginning and produces the exact

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004 7945

Figure 9. Example 2: RTN representation of the process (part II: cleaning tasks).

Figure 10. Example 2: Optimal schedule for nine event points.

same amount of that resource at its end (see Figure 8), whereas the cleaning task C_T11_T21 transforms condition U1_T11 into condition U1_T21 (see Figure 9). This makes sure that all setup times are taken into account. Note also that the initial conditions of equipments U1 and U2 are to be determined by the solver, so we need to ensure that only two resource conditions (one for each equipment) are allowed initially (the excess resource balances will then ensure that this is always true). The mathematical problem would be completely defined if part of the problem data were not inconsistent. To avoid the possibility of going from condition U1_T21 to U1_T13 through path C_T21_T11-C_T11_T13, instead of following the correct path C_T21_T13, which lasts longer (0.6 h vs 0.3 + 0.1 ) 0.4 h), the total number of cleaning tasks is made equal to the total number of processing tasks that need to be executed in that equipment minus 1. The short-term scheduling problem consists of 146 binary variables, 398 continuous variables, and 365 constraints and is solved rather rapidly (5.6 s) for nine event points. The optimal solution, which is a global optimum, corresponds to an objective of 5.0193 and is shown in Figure 10. It is also worth mentioning that despite the large integrality gap (the objective of the relaxed problem is equal to 10.1251), a characteristic

of problems involving mainly batch tasks,9 only 1347 nodes were examined in the branch and bound search procedure. The proposed methodology can now be applied at both level 1 and level 2. In level 1, the initial conditions of the two equipment resources are previously set, meaning that 4 × 2 ) 8 subproblems need to be solved. Moving up means selecting the sequence of resource conditions that each equipment will undergo, which increases the number of subproblems from 8 to 48 (4! × 2!). The results for nine event points are shown in Table 2. On these runs, parameter ∆t was made dependent on set I to allow us to define different values for the processing and cleaning tasks, respectively 3 and 1. The results in Table 2 show that it pays off to choose a priori the order of execution of the cleaning tasks (level 2), even if it means solving a larger number of subproblems. This results mainly from the lower size of the subproblems, which in terms of binary variables means about one-third of those required to model the complete problem. Naturally, because of the complete problem’s low computational effort, the differences are not as significant as those in example 1. 5. Periodic Scheduling Problem: Example 3 The third and final example is taken from work by Pinto and Grossmann13 and concerns the optimal periodic scheduling of a continuous multiproduct plant. It is the most important example of the three considered here because it will serve not only to illustrate the applicability of the proposed strategy but also to show that the continuous-time scheduling formulation given in this paper gives rise to significant better solutions than the ones reported by Pinto and Grossmann.13 5.1. Problem Characteristics. The plant consists of two stages, each with its own dedicated equipment, and its purpose is to produce a minimum of 50 kg/h of A, 100 kg/h of B, and 250 kg/h of C. These valuable materials are then sold at 150, 400, and 650 $/ton,

Table 2. Example 2: Results for Level 1 and Level 2 level 1 feasible subproblems (U1_T11, U2_T12) (U1_T21, U2_T22)

obj MILP

level 2 CPU s

feasible subproblems

obj MILP

CPU s

5.0193 4.7020

1.31 1.06

(U1_T11, U1_T21, U1_T13, U1_T23, U2_T12) (U1_T11, U1_T21, U1_T23, U1_T13, U2_T12) (U1_T21, U1_T11, U1_T23, U1_T13, U2_T22)

total CPU s

2.9

5.0193 4.0385 4.7020 total CPU s

0.28 0.16 0.33 1.7

7946

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004

Figure 11. Example 3: RTN representation of the process (part I: processing tasks).

respectively. Finite intermediate storage is available for all three intermediates (IntA, IntB, and IntC) at a cost of 140.6 $/ton and for all three final products (FPA, FPB, and FPC) at a cost of 4.06 $/ton/h. The two dedicated processing equipments are subject to sequence-dependent changeovers, where the cost is equal to the duration of the task multiplied by a transition cost. These are sequence-dependent and cost the same in both stages (760 $/h A-B or A-C, 750 $/h B-A/C, and 770 $/h C-A/ B). The RTN representation of the process is given in Figures 11 and 12. For periodic scheduling problems, the mathematical formulation gives rise to nonconvex mixed-integer nonlinear problems (MINLPs) so optimality cannot be guaranteed by standard commercial solvers (the MINLPs were solved by GAMS/DICOPT, which then used CONOPT for the NLPs and CPLEX for the MILPs). It is important to keep this in mind because it can explain awkward phenomena in the search for the best solution such as (i) the solver returns a worse solution for |T| + 1 than for |T| event points; (ii) the solution changes when the cleaning tasks are subject to ZW policies; (iii) for the same number of event points, the solver returns different solutions for the complete and corresponding subproblem. Note that it can be confirmed that this behavior is due to the solver and not an overreduction of the solution space, by resolving a particular MINLP with the variables fixed to the values obtained from another approach and seeing if the problem is feasible. This was done in all cases reported below. The problem was solved for two scenarios that differ only in the type of policy followed by the cleaning tasks. On the one hand, cleaning tasks were allowed to last longer than their actual processing time in order to decrease the minimum number of event points required to solve the problem. This alternative has the disadvantage of underestimating the total cost of changeovers because only the processing time (and not the processing time plus the inherent waiting period/buffer time) is

taken into account. This, of course, does not happen when ZW policies are assumed, a scenario that increases the complexity of the problem due to the necessity of a larger number of event points. In addition, the minimum number of event points needs to be determined by trial and error instead of being clear-cut (if buffer times are allowed, the minimum number of event points required to find a feasible solution is equal to the number of processing and cleaning tasks that any product has to complete to go from raw material to final product, i.e., 3 + 3 ) 6). The results for the two scenarios are given in Table 3. The results of Table 3 show that the best solution is obtained for 10 event points when considering ZW policies. A further increment in the number of event points does not produce a better solution, so the search procedure was stopped. The same happened when buffer times were allowed. The best solution was found for nine event points, when it should have been for 10 event points (the ZW scenario is a more constrained problem, so its solutions are also solutions of the no-ZW problem). This is a clear indication of the existence of several local optima. 5.2. Breaking the Problem into Simpler Subproblems. In periodic scheduling problems, the proposed methodology of dividing the problem into simpler subproblems is not as straightforward. While in shortterm scheduling the beginning and end of the scheduling horizon are perfectly defined, in periodic scheduling this is not always the case. Because of the wraparound operator, the end of a given cycle corresponds to the beginning of the next, which in turn is equivalent to the beginning of the same cycle (see Figure 2). In other words, if we know from the RTN that task B follows task A, in short-term scheduling, we can say that task B will start at a higher event point than task A, while in periodic scheduling task A can start near the end of the cycle, a situation that would force task B to start at the beginning of the cycle, i.e., at a lower event point. Fortunately, not all tasks have their relative position undefined because a particular task has to be chosen to anchor the schedule (in order to reduce solution degeneracy), which in this case was task Make_A_1. Thus, we know for sure that equipment stage 1 will start by executing Make_A_1, so LBMake_B_1 ) LBMake_C_1 ) 3 (recall that one cleaning task is required between make tasks). Similarly, one of the two clean to A tasks will start at the last event point and end at the first event point, UBMake_B_1 ) UBMake_C_1 ) |T| and UBMake_A_1 ) |T| - 4. Overall, the anchoring of the schedule constraint works as a level 1 decision (note that this preprocessing step was applied to all problems listed in Table 3) but for one equipment only, in this case stage 1. Thus, we can go directly to level 2.

Figure 12. Example 3: RTN representation of the process (part II: cleaning tasks).

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004 7947 Table 3. Example 3: Results for the Entire Problem for Several Event Points and Two Different Scenarios (Hmax ) 250 h) event points ZW binary variables continuous variables constraints obj MINLP ($/h) H (h) CPU s

6

7

8

8

9

9

10

no 60 190 151 276.85 174.92 0.8

no 76 228 177 299.93 160.75 1.6

no 92 266 203 317.88 148.76 1.9

yes 92 266 219 38.03 126 8.7

no 108 304 229 343.25 178.26 4.5

yes 108 304 247 322.24 149.69 8.2

yes 124 342 275 347.87 177.92 9.6

Table 4. Example 3: Results for Level 2 (Hmax ) 250 h, ZW) for 10 and 11 Event Points event points for the method applied to stage 1 10 subproblems binary variables continuous variables constraints best solution ($/h) H (h) total CPU s

11

stage 2 10

11

stages 1 and 2 10

11

2 109 323

2 123 359

2 100 318

2 113 353

4 85 299

4 96 332

271 347.87 177.92 17.8

299 352.93 173.14 39

275 347.87 177.92 16

303 345.86 179.77 22.9

271 347.87 177.92 18.0

299 352.93 173.14 23.2

Table 5. Example 3: Best Solutions Found for Each Sequence

sequence (A, B, C; A, C, B) (A, C, B; A, C, B)a (A, B, C; A, B, C) (A, C, B; A, B, C)a a

total obj changeovers event MINLP (h) points ($/h) 16 29 34 47

11 10 10 10

352.93 290.90 228.06 183.69

H (h)

CPU s

173.14 241.84 239.03 289.55

3.8 2.6 2.7 9.8

Hmax ) 300 h.

In level 2, the equipment resource that has one of its tasks anchored continues to be handled in a way different from that of all other equipment resources. While the fixing of the product sequence in stage 1 allows for a further reduction in the number of variables linked to both the processing and cleaning tasks, the same decision has no effect on the number of processing tasks linked to stage 2 because their relative position remains undefined. For stage 2, the best we can do is to eliminate all variables related to the three cleaning tasks that are not required in the chosen sequence. So, is it convenient to apply level 2 decisions to both stage 1 and stage 2, only to stage 1, or only to stage 2? The overall results for the three alternatives are given in Table 4, while the best solutions found for a particular sequence are given in Table 5. The most important result in Table 4 is that a new best solution was found for 11 event points, which corresponds to a profit of 352.93 $/h. Of the three alternatives tested, only that resulting from the application of the proposed methodology to equipment stage 2 did not lead to that solution. This, when added to the fact that the third alternative performs better, seems to suggest that it is preferable to apply level 2 decisions to all equipments of the plant, even if this means solving a larger number of subproblems. 5.3. Solution Analysis. The results of Table 5 are of significant importance because they clearly show a pattern between the total changeover time required by a particular combination of sequences and the profit of the plant: the higher the time required for changeovers, the lower the profit. This would seem obvious for a

short-term scheduling problem, where the times are absolute, but in periodic scheduling problems, it is equivalent to having changeovers of 10 h in a cycle of 100 h or changeovers of 20 h in a cycle of 200 h. It is thus expected that an increase in total changeovers will lead to an increase in the cycle time (H), and this was observed with one exception: (A, B, C; A, B, C). However, the quantitative effect is far from the one anticipated, and this is due to the influence of the inventory costs, which have an opposite effect on the cycle time (note that a larger cycle time means a larger amount of intermediates to be stored and, most importantly, higher inventory levels for the final products). This behavior is a clear indication that the problem is well posed and that the mathematical formulation works reasonably well. The best solution, which features an A-B-C sequence in stage 1 and an A-C-B sequence in stage 2 (note that, because this is a periodic problem, A-C-B ≡ B-A-C), is given in Figure 13. It features 11 event points with the following absolute times (h): T2 ) 10.822, T3 ) 15.822, T4 ) 24.857, T5 ) 26.857, T6 ) 30.25, T7 ) 33.25, T8 ) 36.477, T9 ) 37.477, T10 ) 168.145, and T11 ) 169.145. The corresponding inventory levels for all three intermediates and all three final products are shown in Figure 14, which also shows the maximum storage requirements. Figure 14 also confirms that there is no net accumulation of intermediates and final products over the cycle because there is one instant where these materials do not exist in the plant. Interestingly, this solution has lower revenue (557.66 vs 558.87 $/h) than the one obtained from the solution of the complete problem. It also has higher changeover costs (70.23 vs 68.35 $/h) because, although exactly the same cleaning tasks are executed, the cycle time is lower. The better profit results from the lower inventory costs coming from the intermediate products (20.93 vs 22.03 $/h) but mostly from that related to the final products (113.56 vs 120.62 $/h). Three factors indicate that, even if this is not a global optimum solution, it should not be far from it: (i) the production rates for the less valuable products (A and B) are at the minimum demand rates; (ii) only one continuous task is not executed at its maximum processing rate (task Make_C_2 is processed at 1040 kg/h instead of 1100 kg/h); (iii) almost all IntC is being produced and consumed simultaneously, which is particularly important for the most required intermediate because it avoids the need to store large amounts of the resource (see Figure 14). 5.4. Comparison to the Formulation of Pinto and Grossmann.13 Pinto and Grossmann13 were the first to address this periodic scheduling problem with their MINLP formulation that is appropriate to multistage continuous multiproduct plants, with intermediate storage. Their MINLP continuous-time model relies on the

7948

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004

Figure 13. Example 3: Best solution found.

Figure 14. Example 3: Inventory profiles for the intermediates and final products.

assumption that each product must be processed in the same sequence throughout all stages, a hypothesis that the authors considered reasonable in cases where the difference between the production rates in successive stages is not very large. Also, they consider that all of the equipments work at their maximum rate and treat changeover times implicitly, which when added to the fact that a different time grid is used for each equipment resource (stage) leads to great savings in terms of binary variables when compared to our formulation (for this example, their MINLP is composed of 36 binary variables, 191 continuous variables, and 293 constraints). As a consequence, the resulting MINLPs can effectively handle problems involving more products and/or stages (results were reported for 5-products/4-stages and 9-products/2-stages examples). The authors also proposed a

solution method, based on variants of the generalized Benders decomposition and outer approximation, to improve the computational performance. It consists of an MINLP subproblem in which cycle times and inventory levels are optimized for a fixed sequence and of an MILP master problem that determines the optimal sequence of production. The proposed solution method was shown to produce good savings in terms of computational requirements for most of the problems solved. The case of global optimization has been reported recently by Alle and Pinto19 for a similar formulation. The quality of the formulation of Pinto and Grossmann,13 together with their solution method, can only be measured with a method that does not rely on their most important assumption. Our general periodic scheduling formulation belongs to this group of methods, and

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004 7949

the results listed in Table 5 clearly show that the assumption that the same product sequence must be followed on each stage is weak. This conclusion is, of course, data-dependent and so should not be viewed as a general rule. It is just that in this case the savings in the cleaning costs more than compensate for the somewhat higher intermediate inventory costs resulting from a different product sequence. In this respect, the size of the storage vessels, a design variable, plays an important role. The best solution reported by Pinto and Grossmann corresponds to a profit of 297 $/h, a value that is 15.8% lower than that of our best solution. This difference is not entirely due the use of a different product sequence. The other important distinction between the two formulations is that our formulation allows all continuous tasks to be processed below their maximum rates, if this is suitable to the plant objective. In fact and as was already mentioned in section 5.3, in the optimal solution shown in Figure 14, task Make_C_2 is below its maximum rate in order to lower the storage requirements of final product C. The drawback of the periodic scheduling formulation used in this work is that the resulting MINLPs become very difficult to solve even for a single increase in the number of products. For instance, when solving a 2-stages/4-products problem (with the data of products A/D of example 3 of Pinto and Grossmann13), 2500 CPU s were required for 11 event points, while for 12 event points, the computational effort increased to 9200 s. Interestingly, the best solution of the complete problem was found for 11 event points and is about 1% worse than the best solution returned from the divide and conquer algorithm (six subproblems were generated from applying level 2 decisions to stage 1) for 12 event points (Obj ) 7087.69 $/h, H ) 673.98 h, total CPU ) 743 s), which again featured a different sequence in both stages: A-B-C-D/A-D-C-B. Moreover, it was possible to solve the six subproblems for 13 event points in 3800 s, but the best solution found was the one already known. The advantage of the formulation of Pinto and Grossmann13 is that it still remains useful for larger problems of this particular type, mainly if the changeover costs are similar between different sequences, which is not the case in the example studied in this section.

of the resulting subproblems is significantly lower than the size of the complete problem, with the difference increasing from the first to the second level. Although this decrease in size is accompanied by an increase in the number of problems to solve, the results suggest that it is better to solve a larger number of subproblems. The proposed strategy was shown to be very effective in all three cases because significant savings in computational effort were achieved. More specifically, a decrease of 4 orders of magnitude in the computational effort was observed for example 1, which allowed us to solve the problem for a larger number of event points and, most importantly, to prove for the first time that the best solution reported in the literature9 is, in fact, a global optimal solution. Overall, the results clearly show that the benefits of the divide and conquer algorithm become more evident for larger problems. Therefore, the proposed methodology has the potential to transform intractable problems into tractable ones, which is equivalent to saying that larger problems can be handled. Although illustrated with decisions related to the location of changeover tasks, the divide and conquer strategy is entirely general and can, in principle, be applied to other types of decisions in other kinds of problems. For periodic scheduling problems, the proposed methodology has another advantage. Because these are usually nonconvex, considering several subproblems instead of one can lead the solver to different regions of the solution space and hence help him to evade local optima. In fact, better solutions were obtained both for example 3 and for the 4-products/2-stages problem briefly discussed in the last part of the previous section. When compared to the complete problem solutions, the profit increased by 1.5% and 1%, respectively. This paper also shows that the periodic scheduling formulation of Castro and co-workers8,9 is more general than the MINLP formulation of Pinto and Grossmann.13 When solving a 3-products/2-stages example of the general multistage, multiproduct plant, a better solution, corresponding to an 18.8% increase in profit, was found. The difference results from the fact that our formulation does not need to assume that (i) the product sequence is the same in all stages and (ii) all equipments work at their maximum processing rate, as could be confirmed in the resulting optimal schedule.

6. Conclusions Literature Cited This paper presents a methodology that can substantially improve the performance of continuous-time formulations that use a uniform time grid in scheduling problems involving changeovers. It consists of the division of the problem into complementary subproblems of lower complexity based on simple structural decisions and subsequent solution of all subproblems. The procedure was illustrated by solving three wellknown scheduling problems with the formulations of Castro and co-workers,8,9 which are entirely general and can handle problems involving batch and continuous operations, ZW policies, and various intermediate storage scenarios. The proposed methodology can be applied at two different decisions levels. In the first level, the initial conditions of all equipment resources of the plant are chosen a priori. In the second level, the decision concerns the actual sequence of tasks to execute, again in all equipments of the plant. In both levels, the size

(1) Kondili, E.; Pantelides, C. C.; Sargent, R. A General Algorithm for Short-Term Scheduling of Batch OperationssI. MILP Formulation. Comput. Chem. Eng. 1993, 17, 211. (2) Pantelides, C. C. Unified Frameworks for the Optimal Process Planning and Scheduling. Proceedings of the Second Conference on Foundations of Computer Aided Operations, 1994; p 253. (3) Schilling, G.; Pantelides, C. C. A Simple Continuous-Time Process Scheduling Formulation and a Novel Solution Algorithm. Comput. Chem. Eng. 1996, 20, S1221. (4) Ierapetritou, M. G.; Floudas, C. A. Effective ContinuousTime Formulation for Short-Term Scheduling. 1. Multipurpose Batch Processes. Ind. Eng. Chem. Res. 1998, 37, 4341. (5) Ierapetritou, M. G.; Floudas, C. A. Effective ContinuousTime Formulation for Short-Term Scheduling. 2. Continuous and Semicontinuous Processes. Ind. Eng. Chem. Res. 1998, 37, 4360. (6) Ierapetritou, M. G.; Hene´, T. S.; Floudas, C. A. Effective Continuous-Time Formulation for Short-Term Scheduling. 3. Multiple Intermediate Due Dates. Ind. Eng. Chem. Res. 1999, 38, 3446.

7950

Ind. Eng. Chem. Res., Vol. 43, No. 24, 2004

(7) Castro, P.; Barbosa-Po´voa, A. P. F. D.; Matos, H. An Improved Continuous-Time Formulation for the Short-Term Scheduling of Multipurpose Batch Plants. Ind. Eng. Chem. Res. 2001, 40, 2059. (8) Castro, P.; Barbosa-Po´voa, A. P.; Matos, H. Optimal Periodic Scheduling of Batch Plants Using RTN-Based Discrete and Continuous-Time Formulations: a Case Study Approach. Ind. Eng. Chem. Res. 2003, 42, 3346. (9) Castro, P. M.; Barbosa-Po´voa, A. P.; Matos, H. A.; Novais, A. Q. A Simple Continuous-Time Formulation for Short-Term Scheduling of Batch and Continuous Processes. Ind. Eng. Chem. Res. 2004, 43, 105. (10) Giannelos, N. F.; Georgiadis, M. C. A Simple ContinuousTime Formulation for Short-Term Scheduling of Multipurpose Batch Processes. Ind. Eng. Chem. Res. 2002, 41, 2178. (11) Giannelos, N. F.; Georgiadis, M. C. A Novel Event-Driven Formulation for Short-Term Scheduling of Multipurpose Continuous Processes. Ind. Eng. Chem. Res. 2002, 41, 2431. (12) Maravelias, C. T.; Grossmann, I. E. New General Continuous-Time State-Task Network Formulation for Short-Term Scheduling of Multipurpose Batch Plants. Ind. Eng. Chem. Res. 2003, 42, 3056. (13) Pinto, J. M.; Grossmann, I. E. Optimal Cyclic Scheduling of Multistage Continuous Multiproduct Plants. Comput. Chem. Eng. 1994, 18, 797.

(14) Mockus, L.; Reklaitis, G. Mathematical Programming Formulation for Scheduling of Batch Operations Using NonUniform Time Discretization. AIChE Annual Meeting, San Francisco, CA, 1994; Paper 235d. (15) Shah, N.; Pantelides, C. C.; Sargent, R. W. H. Optimal periodic scheduling of multipurpose batch plants. Ann. Oper. Res. 1993, 42, 193. (16) Schilling, G. Optimal Scheduling of Multipurpose Plants. Ph.D. Thesis, University of London, London, U.K., 1997. (17) Me´ndez, C. A.; Cerda´, J. An efficient MILP continuoustime formulation for short-term scheduling of multiproduct continuous facilities. Comput. Chem. Eng. 2002, 26, 687. (18) Castro, P.; Barbosa-Po´voa, A.; Novais, A. New Strategy for the Scheduling of Process Plants subject to Changeovers. In Computer Aided Chemical Engineering; Barbosa-Po´voa, A., Matos, H., Eds.; Elsevier: New York, Vol. 18, 2004; p 907. (19) Alle, A.; Pinto, J. M. A General Framework for Simultaneous Cyclic Scheduling and Operational Optimization of Multiproduct Continuous Plants. Braz. J. Chem. Eng. 2002, 19, 457.

Received for review November 20, 2003 Revised manuscript received October 5, 2004 Accepted October 11, 2004 IE0342614