Scheduling of ... - ACS Publications

Feb 8, 1996 - In the companion paper, a single-level mathematical formulation has been presented describing the multiple campaign planning/scheduling ...
10 downloads 16 Views 455KB Size
510

Ind. Eng. Chem. Res. 1996, 35, 510-529

Optimal Campaign Planning/Scheduling of Multipurpose Batch/ Semicontinuous Plants. 2. A Mathematical Decomposition Approach Lazaros G. Papageorgiou and Constantinos C. Pantelides* Centre for Process Systems Engineering, Imperial College of Science, Technology and Medicine, London SW7 2BY, United Kingdom

In the companion paper, a single-level mathematical formulation has been presented describing the multiple campaign planning/scheduling problem in considerable generality. However, the resulting mixed integer linear programming model is too large to be computationally tractable for many cases of practical interest. In this paper, we present a rigorous decomposition approach to the solution of this problem and demonstrate its effectiveness by applying it to a number of illustrative examples. In addition, we consider ways in which the structure of the constituent mathematical models of the decomposition scheme can be exploited to reduce their sizes and the associated integrality gaps. Examples illustrating the applicability of the overall approach are also presented. 1. Introduction The companion paper (part 1; Papageorgiou and Pantelides, 1995) presented a general mathematical formulation of the campaign planning and scheduling problem for multipurpose batch/semicontinuous plants. The formulation is based on the state-task network (STN) process representation (Kondili et al., 1993) and takes account of many of the features of realistic problems without resorting to artificial restrictions regarding the utilization of the available production resources. Much progress has been achieved in recent years in the solution of large mixed integer linear programs (MILPs) arising from STN-type scheduling formulations (see Shah et al., 1993a,b). However, the formulation presented in part 1 results in much larger MILPs than those encountered in the short-term or periodic scheduling applications considered by earlier work. The main reason for this is the potentially large number of active campaigns, combined with the time discretization of the operating cycle within each campaign. The complexity of the processing recipes and the multipurpose utilization of all the resources also contribute to this problem. We are therefore led to consider a rigorous mathematical decomposition approach to the solution of this problem. This comprises a master problem and a subproblem. In the master problem, described in section 2, the number of active campaigns, the constituent processing tasks of each campaign, and the alignment of possible interior events with campaign boundaries are determined. The master problem represents a relaxation of the formulation presented in part 1. In the subproblem, described in section 4, the exact duration of and a detailed operating schedule for each campaign are determined. The formulation of the subproblem is essentially the same as that presented in the part 1, with fixed values of the Xc, Yci , and Λµc variables as determined by the master problem. Note, however, that the resulting model may be significantly smaller in size: only active campaigns (i.e., these for which Xc ) 1) are taken into account and, for each of * Author to whom all correspondence should be addressed. FAX: +44-171-594-6606. E-mail: [email protected].

0888-5885/96/2635-0510$12.00/0

these, only the variables and constraints corresponding to active tasks i (i.e., Yci ) 1) are generated. The MILPs describing both the master problem and the subproblem can still be large. A number of techniques may be applied to reduce their size and to improve their tightness. These are considered in detail in sections 3 and 5 of this paper. The overall decomposition algorithm is described in section 6 while the subsequent three sections present examples illustrating its effectiveness. Some concluding remarks are made in the last section. The notation used in this paper is identical to that employed by Papageorgiou and Pantelides (1995). Any new variables necessary are defined when they are introduced. 2. Master Problem Formulation 2.1. Campaign Planning Constraints for Master Problem. The campaign planning problem constraints in the master problem are essentially the same as those presented in section 4 of part 1 in the context of the single-level formulation. The main difference is in the way the number of cycles, nc in each campaign is characterised. The binary encoding representation given by eq 3 of part 1 is certainly the most economical in terms of the number of binary variables required. On the other hand, the introduction of large coefficients 2i may have a detrimental effect on the efficiency of solving the MILP. One alternative is to use a representation of the form: nmax -nmin c c

nc )

nmin c Xc

+

∑ i)0

iL′ic

∀c

(1)

where the binary variables L′ic form a special ordered set (SOS; see, for instance, Williams, 1990): nmax -nmin c c

∑ i)0

L′ic ) 1

∀c

(2)

The SOS nature of these constraints can be exploited to improve the efficiency of branch-and-bound algorithms used for the solution of the MILPs. However, © 1996 American Chemical Society

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 511

Figure 1. Time description.

the number of binary variables introduced may be too large if nmax . nmin c c . In order to resolve the above difficulties, we note that it is not essential for the master problem to characterize the number of cycles in each campaign exactly, as this task may be left to the subproblem. Instead, here we attempt to determine nc only within a range of values. In particular, we partition the possible range of values max of nc, namely [nmin ], into a number of subranges as c ,nc shown in Figure 1 where the subrange boundaries Ni, i ) 1, ..., I + 1 are given but not necessarily uniformly spaced. We now introduce binary variables, L ˜ ic, such that

Now from (4) and since both ∆S+ sc g 0 and ∆Ssc g 0 we can derive

I

+ NiL ˜ ic∆S+ ∑ sc e nc∆Ssc e i)1 I

(Ni+1 - 1)L ˜ ic∆S+ ∑ sc i)1 I

NiL ˜ ic∆S∑ sc e nc∆Ssc e i)1 I

(Ni+1 - 1)L ˜ ic∆S∑ sc i)1

L ˜ ic ) 1 if Ni e nc e Ni+1 - 1; 0 otherwise

L ˜ ic ) Xc ∑ i)1

∀c

(3)

I

I

∑ i)1

∑ i)1

(Ni+1 - 1)L ˜ ic

∀c

∀ c, s

∀ c, s

S˜ ic∆Sics ≡ L sc

∀ c, s, i

(8b)

I

(5)

Here ∆S+ sc and ∆Ssc can be interpreted as the amounts of material in state s respectively produced and consumed over a cycle in campaign c. We therefore have

nc∆Ssc ) nc∆S+ sc - nc∆Ssc

(8a)

I

∑ i)1

(4)

We note that, provided the number of intervals I is not too large, we can now express the number of cycles nc in terms of a relatively small number of binary variables L ˜ ic, without introducing any large coefficients of the form 2i. Obviously, as the number of intervals used increases, the master problem becomes bigger, but also characterizes the number of cycles in each campaign better. In the limit, if we are willing to introduce I ) nmax - nmin intervals, each of length 1, constraints c c 3 and 4 become equivalent to constraints 1 and 2, but the resulting MILP may be too large. In any case, it is worth noting that the choice of partitioning does not affect the optimality of the solution obtained by the decomposition algorithm since the master problem is only a relaxation of the original. In our experience, a uniform partitioning, with each interval comprising 1020 cycles, has been found to lead to satisfactory performance for problems involving up to several hundreds of cycles per campaign (see examples in sections 7-9). We now consider the bilinear products nc∆Ssc appearing in the material balance constraints 10 of part 1. The quantity ∆Ssc can be either positive or negative depending on whether there is a net production or consumption of state s in campaign c. However, it can always be represented as the difference of two nonnegative quantities, ∆S+ sc and ∆Ssc: ∆Ssc ) ∆S+ sc - ∆Ssc

∀ c, s, i

NiS+ ∑ ics - ∑ (Ni+1 - 1)Sics) e nc∆Ssc e i)1 i)1

I

NiL ˜ ic e nc e

˜ ic∆S+ S+ ics ≡ L sc

and combining (6), (7a), and (7b), we obtain the desired bounds on the quantity nc∆Ssc:

(

and we can write

(6)

∀ c, s (7b)

Introducing new variables S+ ics and Sics defined by

for each discretization interval i. If the campaign exists, then exactly one of these variables must have a value of 1; otherwise they must all be 0: I

∀ c, s (7a)

(

I

(Ni+1 - 1)S+ ics -

NiS∑ ics) i)1

∀ c, s (9)

which can now be used to replace the material balance constraints 10 of part 1 with I

I

F I NiS+ ∑ ics - ∑ (Ni+1 - 1)Sics) e BSsc - BSsc e i)1 i)1

(

I

(

I

(Ni+1 - 1)S+ ∑ ics - ∑ NiSics) i)1 i)1

∀ c, s (10)

Finally, we relate the new variables, S+ ics and Sics to the original variables through the constraints

+ 0 e S+ ics e MicsLic

∀ c, s, i

(11a)

0 e Sics e MicsLic

∀ c, s, i

(11b)

∆Ssc )

∑i (S+ics - S-ics)

∀ c, s

(12)

where M+ ics and Mics are appropriate upper bounds on + ∆Ssc and ∆Ssc respectively which can be derived using the procedure described in the Appendix of part 1. Constraints 11a,b ensure that S+ ˜ ic ) ics and Sics are 0 if L 0, while constraint 12 together with 3 implicitly enforces the definition 5. In summary, constraints 3, 4, 10, 11a,b, and 12 replace the original campaign planning constraints 3, 12a,b and 13a of part 1. Similar constraints may be derived for problems involving continuous receipts or deliveries of material. Also, the campaign duration constraint 1 of part 1 can be omitted as it is implied by constraints 3 and 4 presented here. 2.2. Aggregate Campaign Scheduling Formulation for Master Problem. In general, the effectiveness of decomposition approaches depends strongly on the accuracy with which the master problem approxi-

512

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996

mates the original. The tighter this relaxation, the fewer iterations between master problem and subproblem will be required to obtain the optimal solution to the original problem. For the specific problem under consideration, this tightness may be achieved by involving as much campaign scheduling information in the master problem as possible. On the other hand, there is a trade-off between the extent of the scheduling description incorporated and the size of the resulting problem and the computational time required for its solution. We consider the use of aggregate models in order to incorporate scheduling information in the master problem. First, we introduce the following aggregate variables and indicate their relation to those of the detailed formulation of section 5 of part 1. Nijc ) total number of batches of task i carried out in Tc c unit j during a cycle of campaign c (Nijc ≡ ∑t)1 Wijt ) c Bij ) total amount of material undergoing task i in Tc c unit j during a cycle of campaign c (Bijc ≡ ∑t)1 Bijt ) c Uu ) total amount of utility u required during a cycle Tc of campaign c (Ucu ≡ ∑t)1 Ucut) c CTj ) total cleaning time for unit j in a cycle of campaign c The aggregate campaign scheduling constraints included in the master problem are described below. 2.2.1. Aggregate Equipment Allocation Constraints. The total occupation time of unit j in each cycle of campaign c performing tasks i ∈ Ij plus any necessary cleaning time cannot exceed the cycle time Tc:

piNcij + CTcj e TcXc ∑ i∈I

∀ c, j

i′∈train

(

card(Ki′)

)

+ CTcj e TcXc

∀ c, (i, j) (14)

Note that the number of batches for every task in the train is determined by the longest processing task, taking into account the number of equipment items available for this task. Also, if unit j does not perform task i in campaign c (i.e., Yijc ) 0), then the corresponding number of batches (Nijc) should be forced to 0. On the other hand, if Yijc ) 1, then unit j must perform at least one batch of task i per cycle:

Ycij e Ncij e Tc/piYcij

∀ c, j, i ∈ Ij

(15)

2.2.2. Aggregate Batch-Size Constraints. The total amount of material undergoing task i in unit j

∀ c, j, i ∈ Ij (16)

c c max c φmin ij VjNij e Bij e φij VjNij

(cf. constraints 27 of part 1). 2.2.3. Aggregate Material Balances over a Cycle. An aggregate material balance may be obtained by summing up all the material balance constraints 28 of part 1 over all times t in a cycle: c Ss,T ) Scs0 + c+1

∑ j∈K ∑ FisBcij - i∈T ∑ j∈K ∑ FisBcij i

i∈Ts

s

∀ c, s

i

(17)

Note that because of the cyclic nature of the schedule, Tc

∑ t)1

Tc

c Bij,τ ) c(t-pis)

Bcijt ) Bcij ∑ t)1

∀ c, j, i ∈ Ij

which accounts for the simple form of the second and third terms on the right hand size of (17). 2.2.4. Aggregate Utility Utilization Constraints. Summing up all the utility constraints 30 of part 1 over all times t in a cycle yields

Ucu

We note that if campaign c is inactive (i.e., Xc ) 0), the above forces both Nijc and CTcj to 0. In some cases, tighter allocation constraints may be formulated by exploiting special features of the scheduling problem. One such case is that of serial processing networks (“trains”) of tasks operating under a zero-wait mode. Assuming that the equipment items suitable for performing each task in the train are dedicated to it and operate in an out-of-phase mode, we can modify (13) to

pi′

during a cycle of campaign c, Bijc, is constrained by

(13)

j

Ncij max

Figure 2. Cleaning time matrix.

)

∑i j∈K ∑

i

pi-1

(Ncij

∑ Ruiθ +

θ)0

pi-1

Bcij

∑ βuiθ)

θ)0

∀ c, u (18)

2.2.5. Equipment Cleaning Time. The exact length of the cleaning time required for every unit j in a cycle of campaign c can be ascertained only by examining a detailed operating schedule. However, it is possible to determine a lower bound on it by considering the set of tasks for which the unit is to be used during a given campaign. In particular, we make the realistic assumption that the cleaning time required between successive batches of the same task does not exceed the cleaning time between successive batches of any two different tasks. Then the minimum cleaning time is achieved by carrying out all batches of one task successively before switching the unit over to a different task. Under such conditions, the minimum cleaning time can be determined simply by considering the optimal ordering of the tasks without being concerned with individual batches. Consider for instance, a unit j which is suitable for three different tasks with the cleaning time matrix shown in Figure 2. By inspection, the optimal cyclic ordering of the three tasks is 1-3-21-3-2... incurring a total cleaning time of 1 + 2 + 1 ) 4 h per cycle. Of course, the cleaning time per cycle for a given campaign will depend on which of the tasks for which the unit is suitable are actually active over the campaign. Thus, in the above example, if only tasks 1 and 2 are active over a given campaign, then the minimum

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 513 Table 1. Alternative Task Orderings and Cleaning Times optimal cyclic task ordering

τkj (h)

Ukj

Dkj

1-3-2-1-3-2... 1-2-1-2... 1-3-1-3... 1-1... 2-3-2-3... 2-2... 3-3... -

4 3 2 0 4 0 0 0

{1,2,3} {1,2} {1,3} {1} {2,3} {2} {3} L

L {3} {2} {2,3} {1} {1,3} {1,2} {1,2,3}

c c c combination k Y1j Y2j Y3j

1 2 3 4 5 6 7 8

1 1 1 1 0 0 0 0

1 1 0 0 1 1 0 0

1 0 1 0 1 0 1 0

cleaning time is only 2 + 1 ) 3 h per cycle. And if only task 1 is active, then no cleaning is necessary. We therefore have to enumerate all possible combinations, and determine the optimal cyclic task ordering and the corresponding cleaning time for each, as shown in Table 1. In general, each combination k is characterized by the set of tasks for which Yijc are 1 and those which are 0. We denote these sets by Ukj and Dkj respectively (see last two columns of the above table). For each combination, we can determine the minimum total changeover time, denoted by τkj. The latter calculation is a relatively small travelling salesman problem which can be solved as a MILP model or by explicit enumeration. We now introduce the following constraints into the master problem formulation:

∑ i∈U

CTcj g τkj[

kj

Ycij -

∑ i∈D

Ycij - card(Ukj) + 1] +

kj

(Ncij - 1)τij ∑ i∈I

∀ c, j, k (19)

j

where τij is the cleaning time (often 0) required between consecutive batches of task i performed in unit j. The first term on the right hand side of (19) corresponds to cleaning taking place between batches of different tasks when switching the unit utilization from one task to another, while the second term accounts for cleaning incurred between batches of the same task. It should be noted that the first term is positive for exactly one combination k, corresponding to the current values of Yijc variables. 3. Master Problem Enhancements In this section, we consider techniques to reduce the size of the master problem and to remove some potential sources of degeneracy and infeasibility in its solution. 3.1. Exploitation of Task Coupling. A key set of decisions in the campaign planning/scheduling problem are the subsets of the overall process STN that are active in each individual campaign. These are characterized by the binary variables Yci which take the value of 1 if task i is active in campaign c and 0 otherwise. In this section, we consider how the characteristics of the problem may be used to establish a priori relations between these variables. In particular, we examine tasks which are coupled through intermediate states of material for which no external supplies or deliveries to customers take place. 3.1.1. Tasks Coupled through States with No Dedicated Storage Capacity. Consider first a state s with no dedicated storage capacity. If this state is produced by a single task i and consumed by a single task i′ (see Figure 3), then clearly i and i′ must be both

Figure 3. One consumer-one producer tasks.

Figure 4. One consumer-many producer tasks.

Figure 5. Many consumer-one producer tasks.

active or both inactive within any single campaign. This leads to the following constraints:

∀c

Yci ) Yci′

(20a)

Thus, the Yci variable needs to be defined for only one of the two tasks i and i′. The above reasoning can be applied to trains of tasks with no intermediate storage between successive members of the train. The net effect is automatically to group all of these tasks into a single “production stage”, a concept used in some of the earlier formulations of the campaign planning/scheduling problem (see, for instance, Shah and Pantelides, 1991). More generally, if a state s with no dedicated storage capacity is consumed by only one task i, but is produced by several tasks i′ (i.e., Ts ) {i}, card(Ts) ) 1, but card (Ts) > 1) as shown in Figure 4, then we can write

Yci g Yci′

∀ c, i′ ∈ Ts

(20b)

In effect, if any task i′ producing s is active in campaign c, then so must be the single task i consuming s. Conversely, if task i is involved in campaign c, then at least one task i′ must be included in the same campaign as well:

∑ Yci′ g Yci

∀c

(20c)

i′∈Ts

Similar constraints may be formulated for the case in which card(Ts) ) 1 and card(Ts) > 1 as shown in Figure 5:

Yci g Yci′

∀ c, i′ ∈ Ts

(20d)

514

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996

Yci′ g Yci ∑ i′∈T

∀c

(20e)

s

Note that if task i is not involved in campaign c, i.e., Yci ) 0, then all the immediately downstream tasks are also excluded from the same campaign. On the other hand, if task i is involved in campaign c, then (20e) forces at least one of the preceding tasks to be performed within that same campaign. 3.1.2. Tasks Coupled through States with Limited Dedicated Storage Capacity. The above discussion was restricted to tasks coupled through states of material for which no dedicated storage was available. It is intuitively obvious that similar relationships may exist between tasks which are coupled through states with relatively small amounts of dedicated storage. The latter may be sufficient to permit short-term decoupling of the tasks within a single cycle of the same campaign, but not large enough to allow the tasks to operate in separate campaigns. Here we seek to formalize this reasoning in terms of mathematical constraints. In general, in each campaign a subset of the tasks producing and consuming a state s will be active. We denote these subsets by Θs and Θs (Θs ⊂ Ts, Θs ⊂ Ts) as illustrated in Figure 6, where inactive tasks are shown as dashed boxes. Furthermore, we denote the subset of equipment items that are actually used for carrying out task i during the campaign by K ˜ i (K ˜ i ⊂ Ki). Note that, due to the multipurpose nature of the equipment, K ˜ i and K ˜ i′ are not necessarily disjoint for two different tasks i and i′. Any active task must take place at least once per cycle in each item of equipment used for it. Hence the minimum amount of material undergoing this task is

φmin ∑ ij Vj j∈K ˜

(21)

i

obtained by setting all batch sizes at their minimum values. On the other hand, the maximum number of batches of material that can undergo a task i during a cycle of duration Tc is Tc/pi. Thus by setting all batch sizes to their maximum value, we obtain the maximum amount of material that can undergo task i during a cycle:

Tc/pi

φmax ∑ ij Vj j∈K ˜

(22)

i

Now consider the net accumulation of material in state s over a cycle, ∆Ssc. Its minimum value would occur if all tasks producing it (i ∈ Θs) produced the minimum possible amount of material while all tasks consuming it (i ∈ Θs) processed the maximum possible amount. Hence the lower limit is

∆SLsc ≡

i

∑ FisTc/pi j∈K ∑˜

i∈Θs

∈ Θs as little as possible:

φmax ij Vj

∀ c, s

i

for given sets Θs, Θs, and K ˜ i. On the other hand, the maximum possible net accumulation of state s would occur if all tasks i ∈ Θs processed as much material as possible and all tasks i

∑ FisTc/pi j∈K ∑˜ φmax ij Vj -

∆SU sc ≡

i

i∈Θs

∑ Fis j∈K ∑˜ φmin ij Vj

i∈Θs

∀ c, s

i

Having established bounds on the net accumulation over a single cycle, consider now the accumulation over an entire campaign of minimum duration Dmin comc prising a minimum of Dmin c /Tc cycles. If the minimum accumulation of material s over a cycle is positive (i.e., ∆SLsc > 0), then material will inevitably accumulate over the campaign, the minimum net accumulation being L Dmin c /Tc∆Ssc

(23)

If this exceeds the available storage capacity Cs for this material, then the combination of active tasks Θs, Θs and utilized equipment K ˜ i is illegal and can be excluded a priori. Now consider the case where ∆SU sc < 0, i.e., material is actually depleted during the campaign. The minimum net depletion is given by U Dmin c /Tc(-∆Ssc)

(24)

The maximum possible initial amount of s that could be available at the start of a campaign is given by the dedicated storage capacity, Cs. If the latter is less than the minimum depletion (24), then again the combination of Θs, Θs, and K ˜ i under consideration can be excluded a priori. The elimination of a given {Θs, Θs, K ˜ i} combination can be achieved through integer cuts on the binary variables Yijc which describe whether or not equipment item j is used for task i during campaign c:

∑ j∈K ∑˜ Ycij - ∑ j∈K ∑˜ Ycij e ( ∑

i∈ΘIN s

∑ Fis j∈K ∑˜ φmin ij Vj -

i∈Θs

Figure 6. Many consumer-many producer tasks.

i

i∈ΘOUT s

i

i∈ΘIN s

card(K ˜ i)) - 1 ∀ c, s (25)

where ΘIN s ) Θs ∪ Θs is the subset of tasks producing or consuming s that are active over campaign c, and ΘOUT ) (Ts ∪ Ts) - ΘIN s s is its complement. 3.2. Elimination of Campaign Degeneracy. The formulation presented in part 1 assumes a certain maximum allowable number of campaigns. If an optimal solution involves fewer campaigns than this maximum, then equivalent solutions may be obtained by

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 515

artificially partitioning any one campaign into two or more identical successive campaigns, provided minimum campaign duration constraints are not violated. This solution degeneracy may be detrimental to the solution efficiency of the MILP. One way of avoiding it is to penalize the number of campaigns in the objective function through a term of the form

νicc′ g Yci + Yc′i - 1

∑ Xc c)1

NT

zcc′ )

(26)

∑i λic e NT - Xc

∀c

(27)

where λic are the similarity variables introduced in section 4.8 of part 1, and NT is the total number of processing tasks in the STN. We note that for two exactly identical campaigns c and c + 1, ∑iλic ) NT, but this is prohibited by (27) if the campaigns are active (i.e., Xc ) 1). Furthermore, for problems not involving any discrete event or continuous deliveries/receipts of material during the horizon, no two active campaigns c and c′ need be identical in the optimal solution even if they are not consecutive. We therefore define similarity variables λicc′ for every pair of campaigns (c, c′; c′ > c) through the following constraints (cf. constraints 23 of part 1):

λicc′ g 1 - Yci - Yci

∀ i, c, c′ > c

(28a)

λicc′ g Yci + Yc′i - 1

∀ i, c, c′ > c

(28b)

∀ c, c′ > c

(27′)

2i-1µicc′ ∑ i)1

∀ i, c, c′ > c

(31a)

∀ i, c, c′ > c

(31b)

NT

rcc′ )

when  is a small number. For problems that do not involve discrete point events (such as deliveries of products or changes in utility availability), there is no reason for two consecutive active campaigns to be identical in the optimal solution. This possibility can therefore be excluded explicitly through the a priori introduction of constraints of the form

(30c)

Every pair of campaigns c and c′ is characterized by two distinct indices, zcc′ and rcc′, defined as

N

-

∀ i, c, c′ > c

2i-1νicc′ ∑ i)1

It should be noted that zcc′ g rcc′, with zcc′ ) rcc′ only if every task occurs either in both c and c′, or in neither. Hence identical campaigns can be avoided by enforcing the constraints

zcc′ - rcc′ g 1

∀ c, c′ > c

(32)

However, as the binary variables µicc′ and νicc′ occur with large coefficients in constraints 31a,b, the measures for campaign differences may be quite loose even for moderate NT. In addition, constraints 29-32 do not allow more than one empty campaign at the final plan, and are therefore not directly applicable to our mathematical formulation. Finally, the number of variables and constraints is larger than the one described earlier in this section. 3.3. Elimination of Planning Infeasibilities. During the solution of the MILP using branch-and-bound procedures, it is often the case that many of the relaxed LPs solved are found to be infeasible. It is clearly desirable to accelerate the MILP solution by avoiding partial assignments of the binary variables leading to such infeasible nodes on the search tree. For problems involving interior point events, taking account of the ascending time ordering of these events, i.e., τµ < τµ+1, can eliminate potentially infeasible branching. This can be ensured by constraints of the form

and introduce the constraint c

∑i

λicc′ e NT - Xc

Constraints for avoiding campaign degeneracy have also been presented by Tsirukis et al. (1993). These are described briefly below using notation consistent to that of the present paper. Binary variables µicc′ equal to 1 if task i is involved in either campaign c or c′, and 0 otherwise are introduced, along with the following constraints:

µicc′ g Yci

∀ i, c, c′ > c

(29a)

µicc′ g Yc′i

∀ i, c, c′ > c

(29b)

µicc′ e Yci + Yc′i

∀ i, c, c′ > c

(29c)

Additional binary variables νicc′ are used to denote whether task i occurs in both campaigns c and c′. These are defined by the following constraints:

νicc′ e Yci

∀ i, c, c′ > c

(30a)

νicc′ e Yc′i

∀ i, c, c′ > c

(30b)

1 - Λµc g

∑ Λµ′c′ c′)1

∀ µ, c, µ′ ) µ + 1, ..., NE (33)

Note that if event µ occurs at the end of campaign c, i.e., Λµc ) 1, then no subsequent event (µ′ > µ) is allowed to occur before campaign c, and thus the Λµ′c′ variables are forced to 0. On the other hand, if any Λµ′c′ ) 1, then Λµc ) 0. The inclusion of a task within a certain campaign is often the source of infeasibility, if, for example, sufficient inputs for this task are not available at the start of the campaign. In particular, consider an intermediate state s that is neither received from external suppliers nor delivered to external clients. If the initial inventory of this state is zero (i.e., BSIs1 ) 0), no task consuming s can be active in a campaign if its preceding tasks have not been included in this or previous campaigns. This can be written as c

Yc′i′ g Yci ∑ ∑ c′)1

∀ c, s ∈ SZ, i ∈ Ts

(34a)

i′∈Ts

where SZ is the set of states with zero initial inventory (i.e., BSIs1 ) 0).

516

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996

Figure 7. Zero-wait train.

Note that the above constraints do not need to be written for every event µ, but only for the smallest µ for which D ˜ sµ g BSIs1: the constraints referring to all c subsequent events are looser than (34c) as ∑c′)1 Λµc′ g c ∑c′)1 Λµ+1,c′. Finally, a lower bound on the final number of active campaigns can be derived by exploiting the task complexity factors, ψi. Mathematically, this can be written as

∑c Xc g (i∈ET ∑ ψi)/Ψ

(35)

where ET is the set of essential tasks, i.e., all those which lead directly or indirectly to the production of materials, for which the minimum demand over the entire horizon exceeds the initially available amount. Figure 8. Decomposition scheme. Table 2. Details of Processing Equipment for Example 1 unit

size (tonnes)

suitable tasks

Unit1 Unit2 Unit3 Unit4 Unit5 Unit6

5.0 8.0 6.0 8.0 3.0 4.0

T1, T4 T2 T3 T5, T6 T7, T9 T8, T10

Consider also an event µ involving a discrete nonzero external delivery of material in state s. In terms of the formulation of part 1, this is equivalent to a negative receipt Rsµ. Now, if the minimum amount to be delivered, Dmin sµ , exceeds the initially available amount, BSIs1, then this delivery cannot take place before some material in this state is actually produced. This leads to c

c

∑ ∑ Yc′i g c′)1 ∑ Λµc′ c′)1

∀ {µ, s}:

i∈Ts

I Dmin sµ g BSs1, c (34b)

Constraints 34b consider each discrete delivery separately, taking no account of the fact that there may be multiple events involving deliveries of the same state s, and hence the cumulative amount of the minimum amounts to be delivered may exceed BSIs1 even if the individual amounts do not. Defining µ

D ˜ sµ ≡

min ∑ Dµ′s µ′)1

to be the minimum cumulative delivery for state s up to and including event µ, we modify 34b to c

∑∑

c′)1

i∈Ts

g

∑ Λµc′

As mentioned earlier in the Introduction, the formulation of the subproblem is similar to the single-level mathematical formulation presented in part 1 with the Xc, Yci , and Λµc variables fixed at the values determined by the master problem. Compared to the single-level formulation, the subproblem formulation is often much smaller as every campaign involves only a portion of the original STN. Also the number of active campaigns under consideration may be smaller than the maximum number of potentially available campaigns (i.e., N). One interesting point concerns the determination of the campaign lengths, or equivalently the number of cycles in each campaign. A reasonable approach for the subproblem would appear to be to determine the exact number of cycles from within the subrange determined by the master problem (cf. section 2.1). This would have the advantage that, since the range of the number of cycles for each subrange is relatively small, a special ordered set representation could be used for nc (cf. eqs 1 and 2) instead of the less well-conditioned binary encoding one (eq 3 of part 1). However, in practice it was found to be better to ignore the subrange determined by the master problem for the purposes of solving the subproblem. This was due to the fact that very often the master problem determines nc to lie in (slightly) wrong subranges, and enforcing these in the subproblem simply results in more master-subproblem iterations being required by the decomposition scheme (see section 6). In fact, during the solution of the subproblem, the algorithm may effectively eliminate some of the campaigns proposed by the master problem by setting the corresponding nc to 0. 5. Subproblem Enhancements

c

Yc′i

4. Subproblem Formulation

∀ {µ, s}: D ˜ sµ g

BSIs1,

c

c′)1

(34c)

In this section, we consider techniques for reducing the size of the subproblem and removing some potential sources of degeneracy and infeasibility in its solution.

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 517

Figure 9. STN representation for example 1.

Figure 10. Optimal campaign structure for example 1. c 5.1. Elimination of Wijt Variables. The main set of binary variables in our formulation is that of the c . Shah et al. equipment allocation variables Wijt (1993b) developed a specialized MILP solver which eliminated these variables along with the related capacity constraints from the LP relaxation, and then reconstructed them from the solution obtained. This reduces the size of the LP examined and therefore accelerates its solution. The idea is applicable to all STN-based discrete-time formulations, including the one presented here. Additional variable elimination can be performed in the special but common case of zero-wait trains of tasks when only one item of processing equipment is suitable for each task in the train, i.e., card(Ts) ) card(Ts) ) 1 and card(Ki) ) card(Ki′) ) 1 where i ∈ Ts and i′ ∈ Ts. This situation is depicted in Figure 7.

For a train of length L, we can write the constraints

Wicλ+1jλ+1t ) Wicλjλ,τc(t-pi ) λ

∀ c, t ) 1, ..., Tc, λ ) 1, ..., L - 1 (36a)

That is, a task iλ+1 may start in its corresponding unit at time t only if the previous task in the train, iλ, started at time t - piλ. Through the mass balances, we can also relate the batch sizes of corresponding tasks:

Fiλ+1sλBicλ+1jλ+1t ) FiλsλBicλjλ,τc(t-pi ) λ

∀ c, t ) 1, ..., Tc, λ ) 1, ..., L - 1 (36b)

Constraints 36a,b allow the elimination of the equipment allocation and batch-size variables for all but one task in the train (e.g., the first one). However, the batch-size constraints 27 of part 1 on the first task must be amended to take account of possible capacity limita-

518

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996

The utility utilization constraints 30 of part 1 should also be modified accordingly: pi-1

Ucut

)

c c ∑i j∈K ∑ θ)0 ∑ (RuiθNij,τ (t-θ) + βuiθBij,τ (t-θ)) c

c

i

∀ c, u, t (40) Finally, the sequence-dependent cleaning constraints c . To do can be written in terms of the new variables Nijt c c ˜ jkt denoting the number of this, we replace W ˜ jkt by N units of type j which are idle in condition k over time interval t in a cycle of campaign c. Constraints 32-34 of part 1 are modified to c c N ˜ jkt )N ˜ jk,t-1 +

∑ ∑ k′ i∈I

∑ ∑ k′ i∈I

c Nij,τ c(t-pi)

jk′k

∀ c, j, k ∈ UCj, t ) 1, ..., Tc (41a)

Ncijt

jkk′

Figure 11. Inventory profiles for Int1 and Int2 for example 1.

c c N ˜ jk0 )N ˜ jkT c

tions in subsequent tasks:

max(Rλφimin Vjλ) e Bic1j1t e min(Rλφimax Vjλ) λjλ λjλ λ

(37)

λ

where R1 ≡ 1 and Rλ+1 ) Rλ(Fiλ+1sλ/Fiλsλ), λ ) 1, ..., L - 1. 5.2. Elimination of Equipment Degeneracy. Our current formulation is degenerate for plants involving multiple equipment items with exactly the same functionality and capacity characteristics. This equipment degeneracy stems from the fact that assignments of distinct but otherwise identical equipment result in the same optimal solution. In order to remedy the above deficiency, we introduce the idea of an equipment type comprising all identical items. We can then replace the basic binary variables, c c with new integer ones, Nijt , defined as Wijt c : number of units of type j that start processing task Nijt i at the start of time interval t in a cycle of campaign c

The allocation constraints 25 of part 1 of the original formulation should now be replaced by pi-1

c Nij,τ ∑ ∑ (t-θ) e N* j Xc i∈I θ)0

∀ c, j, t

c

(38)

j

where N* j is the available number of units of type j. Note that these constraints are written only once for each equipment type j and not for every equipment item separately. c variables must now be interpreted as agThe Bijt gregated batch sizes (instead of individual ones), defined as the total amount of material that starts undergoing task i in all items of type j at time t. The new batch size constraints are as follows:

c c max Ncijtφmin ij Vj e Bijt e Nijtφij Vj

∀ c, j, i ∈ Ij, t

replacing constraints 27 of part 1.

(39)

∑ k∈UC

∀ c, j

(41b)

pi-1

c N ˜ jk1 j

+

c Nij,τ ∑ ∑ (1-θ) ) N* j Xc i∈I θ)0 c

∀ c, j

(41c)

j

Apart from eliminating degeneracy, the above formulation results in smaller numbers of variables and constraints, thus potentially requiring less computational time for their solution. In fact, the general idea of treating identical equipment items as a single type (“resource”) and the specific form of constraints 41a is consistent with the resource-task network (RTN) formulation of scheduling problems recently proposed by Pantelides (1994). 5.3. Elimination of Scheduling Infeasibilities. The imposition of minimum run-length constraints on the operation of semicontinuous units (cf. section 5.6 of part 1), may cause some equipment allocations generated during the branch-and-bound search to be infeasible. In particular, this may arise if, by a certain stage in c has been fixed to 1. Now, if the search, a variable Wijt c at this stage, variable Wij,τ is also fixed to 0, then c(t-1) this implies that the unit j actually starts processing task i at time t and should continue doing so for the next τijRL time intervals. However, this results in an c infeasibility if any one of the variables Wij,t+θ , θ ) 1, ..., RL τij - 1, has already been fixed to 0 at an earlier stage of the search. Such infeasible LPs may be avoided by checking for the above cases during the branch-and-bound procedure. Alternatively, constraints 39 of part 1 could be disaggregated to c c Wij,t+θ g Wcijt - Wij,τ c(t-1)

∀ c, t )

1, ..., Tc, i ∈ CT, j ∈ Ki, θ ) 1, ..., τRL ij - 1 (42) This would eliminate any potential infeasibilities, as c c fixing Wij,t+θ and Wij,τ to 0 would immediately c(t-1) c constrain Wijt to 0 and no branching on this variable

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 519

Figure 12. Gantt charts for example 1. Table 3. First Master Problem Solution for Example 1 campaign

subrange of nc

active tasks

1 2

[81, 100] [81, 100]

T1, T2, T3, T7, T8 T4, T5, T6, T9, T10

would ever be attempted. However, it may also result in a large number of constraints if τijRL . 1. 6. Decomposition Scheme As the master problem constitutes a relaxation of the

original problem, its solution is a valid upper bound, ΦU, on the value of the optimal objective function, Φ. On the other hand, the solution of the subproblem provides a lower bound ΦL on Φ as its feasible region is restricted with respect to the original one due to the fixed values of variables determined by the master problem. At every iteration of the decomposition, all assignments of binary variables determined by previous master problems are excluded. More specifically, at the

520

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996

Table 4. Computational Details for Example 1a

5.

Solve the subproblem with the variables determined by the master problem fixed, determining campaign durations and detailed operating schedules for every campaign and a valid objective function lower bound ΦL. The branch-and-bound search for this step is initialized using ΦIP as the best objective function value found so far, as subproblem solutions with ΦL < ΦIP are not useful.

6.

If ΦL > ΦIP, keep the current solution as the best feasible solution (BFS) so far and set ΦIP :) ΦL.

7.

If (ΦU - ΦIP)/ΦIP e , go to step 9.

8.

Set k :) k + 1. Go to step 2.

9.

Stop. If ΦIP :) -∞ then the original problem is infeasible; otherwise, the BFS is the optimal solution with an objective function value of ΦIP.

decomposition approach iteration 1 MP

SP

iteration 2 MP

single-level solution

NIV NOV NOC

37 326 548

93 518 980

37 326 549

171 864 2047

LPs CPU

64 10.3

142 28.6

110 14.2

56132 22667.1

OBJ

4156.5

3227.9

infeasible

3366.9

a

MP, master problem; SP, subproblem. NIV, number of integer variables; NOV, number of variables; NOC, number of constraints; LPs, LP calls for MILP solution (CPLEX); CPU, CPU time (s) on SPACStation 10/41; OBJ, objective function value (relative cost units, rcu).

The next three sections present examples illustrating various features of the formulation and the solution algorithm. 7. Example 1 Figure 13. STN representation for example 2.

Kth iteration we introduce the following constraints:



(k)

c (k) (X(k) c + Yi + Λµc ) -

(c,i,µ)∈U(k)

Λ(k) µc )



(k)

c (X(k) c + Yi +

(c,i,µ)∈L(k) (k)

e card(U ) - 1

∀ k ) 1, ..., K - 1 (43)

where U(k) and L(k) denote the subsets of the Xc, Yci , and Λµc variables that were at their upper and lower bounds respectively at the solution of the master problem at iteration k. We note that these cuts involve only the binary variables whose values are fixed during the subproblem solution. If the lower and upper objective function bounds, ΦL and ΦU, converge to within a prespecified tolerance, the algorithm terminates. In any case, since there are a finite number of possible combinations of values of the {Xc, Yci , Λµc} variables, the algorithm is theoretically guaranteed to terminate. However, its practical efficiency depends on the tightness with which the master problem approximates the exact formulation. In all cases, the optimal solution corresponds to the subproblem solution with the best objective function value. Overall, the decomposition scheme adopted is shown diagrammatically in Figure 8. The solution algorithm comprises the following steps. Given a margin of optimality, , 1.

Set ΦIP :) -∞, k :) 0.

2.

Solve the master problem (including cuts 43) obtaining, if feasible, an upper bound, ΦU. The branchand-bound search for this step is initialized using ΦIP as the best objective function value found so far, as master problem solutions with ΦU < ΦIP are not useful.

3.

If the master problem is infeasible, go to step 9.

4.

If (ΦU - ΦIP)/ΦIP e , go to step 9.

This is a small problem involving mixed storage policies, multipurpose equipment, sharing of intermediates, and material recycles. It considers a multipurpose batch plant manufacturing three products P1, P2, and P3 according to the following recipe (see Figure 9): T1. Heat Feed1 for 2 h producing S1. T2. Blend S1 immediately after its production with a small amount of additive. Add for 1 h to form the unstable intermediate S2. T3. Let S2 react for 1 h to form the stable intermediate Int1. T4. React Int1 for 2 h to form intermediate S3. T5. React S3 for 2 h to manufacture P1. T6. React S3 for 2 h to obtain 98% of product P2 and 2% of Waste. T7. Mix 95% of Feed2 and 5% of S4 for 4 h to form intermediate S5. T8. Immediately react S5 for 2 h to form 90% stable intermediate Int2. Unreacted S4 (10% of batch size) forms a separate phase which can be recovered and recycled to task T7. T9. Blend 50% of Int1 and 50% of Int2 for 2 h to form the unstable intermediate S6. T10. React S6 for 3 h to manufacture product P3. Unlimited dedicated storage capacity is available for all feeds (Feed1 and Feed2), products (P1, P2, and P3) and intermediates Int1 and Int2. Limited amounts of storage capacity are available for S3 (15 tonnes (metric tons)) and S4 (40 tonnes). The rest of the states are considered to be unstable; i.e., as soon as a batch of material is produced by the upstream task(s), it must immediately be consumed by downstream task(s) (zerowait operation). The available processing equipment is multipurpose in nature as shown in Table 2. A minimum batch size of 25% of their nominal equipment capacity is imposed on all units. Irrespective of the processing order, when switching the production between tasks T1 and T4, T7 and T9, and T8 and T10 on units 1, 5, and 6, respectively, cleaning of 3 h duration is needed. No cleaning is required for unit 4. We aim to derive a production plan over a horizon of 3 months (2160 h), generating a periodic operating schedule within each campaign repeated at a constant cycle time of 12 h. The objective is to maximize the

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 521

Figure 14. Gantt chart for example 2 without equipment cleaning. Table 5. Details of Processing Equipment for Example 2 unit

size (tonnes)

suitable tasks

Unit1 Unit2 Unit3

5.0 2.0 3.0

T10, T20, T30 T11, T21, T31 T12, T22, T32

Table 6. Computational Details for Example 2 iteration 1 MP

SP

iteration 2 MP

NIV NOV NOC

66 481 796

95 470 884

66 481 797

LPs CPU

113 32.6

37 5.7

130 32.7

OBJ

2240.4

1944.0

infeasible

combined production of the plant, subject to minimum production requirements of 1000 tonnes for product P1 and 800 tonnes for products P2 and P3 by the end of the planning horizon. A maximum of two campaigns, each of minimum duration of 720 h are considered. One basic characteristic of the algorithm is the exploitation of task coupling (see section 3.1) in order to facilitate the determination of the optimal campaign structure. For instance, since no storage capacity is available for state S1, tasks T1 and T2 will always occur within the same campaign(s). Similar couplings can be deduced for states with nonzero but small dedicated storage capacity. For instance, consider state S3 for which a 15-tonne storage tank is available. It may appear that a campaign could

Figure 15. Inventory profiles for P1, P2, and P3 for example 2.

involve task T4 producing S3 but neither of the two tasks consuming S3 (i.e., T5 and T6). However, using the analysis presented in section 3.1.2, we can show that the minimum net accumulation of S3 per cycle is L ∆SS3,c ) 1.25 tonnes, corresponding to the minimum allowable batch size in unit 1 ()0.25 × 5). As any single campaign must involve at least 60 cycles ()720/12), the minimum net accumulation of S3 per campaign is 75 tonnes (1.25 × 60). Since this exceeds the available storage capacity for S3 (15 tonnes), we can immediately

522

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996

Table 7. Campaign Structures for Example 2 MP structure duration (h) cycles structure duration (h) cycles

SP

Campaign 1 T10, T11, T12 732-960 61-80

T10, T11, T12 744 62

Campaign 2 T20, T21, T22, T30, T31, T32 1692-1920 141-160

T20, T21, T22, T30, T31, T32 1896 158

deduce that this campaign structure is actually infeasible. We can therefore introduce the cut c c c YT4 - (YT5 + YT6 )e0

∀c

(cf. constraint 25). For computational comparison purposes, the problem has been solved using both the single-level formulation of part 1 and the decomposition approach presented here. 7.1. Single-Level Approach. The example was solved with a discretisation interval of 1 hour to within a relative margin of optimality of 5%. It involves 864 variables (of which 171 binary), and 2047 linear constraints. It is worth mentioning that without applying variable elimination using the techniques of sections 3 and 5, the resulting model would involve 960 variables (267 binary). The optimal solution was found after 56132 LPs in 22667 CPUs on a SUN SPARCStation 10/ 41, using CPLEX (CPLEX Optimization Inc., 1993) for the solution of the MILP model. The active parts of the STN for each campaign in the optimal solution are shown in Figure 10. Inventory profiles for Int1 and Int2 are illustrated in Figure 11. It can be seen that during the first campaign, large amounts of Int1 and Int2 are built up in order to be consumed by the downstream processes during the second campaign. The total production is 3385.7 tonnes comprising 1613.7, 800.0, and 972.0 tonnes of products P1, P2, and P3 respectively. The durations of the two campaigns are 1188 and 972 h, respectively. The optimal Gantt charts for single cycles of the two campaigns are illustrated in Figure 12. The number above each horizontal line denotes the processing task while that below it is the corresponding batch size (in tonnes). Equipment is generally used for a single task over each campaign except for Unit4 in the second campaign which is used for both T5 and T6 without incurring any cleaning requirements. 7.2. Decomposition Approach. Here, we apply the decomposition approach described in sections 2-6 of this paper. For the purposes of the master problem, we partition the allowable range of the number of cycles for each campaign [60, 180] into 6 subranges of 20 cycles each (cf. section 2.1). The solution of this problem using the decomposition approach presented in the previous section required two master problems and one subproblem. The first master problem iteration results in the solution shown in Table 3. The corresponding subproblem determines the exact number of cycles to be n1 ) 91 and n2 ) 89 (i.e., D1 ) 1092 h and D2 ) 1068 h). It can be seen that, for this example, the master problem has predicted the correct optimal subranges of nc. However, our experience indicates that this is not always the case.

Table 4 gives the relevant computational details for the decomposition scheme, along with the results presented in section 7.1 (single-level solution) for comparison. Essentially the first iteration determines the optimal solution to the problem as the second master iteration gives an infeasible solution, thus terminating the procedure (step 3 of the algorithm). The results of Table 4 provide some evidence for the relative efficiency of the decomposition approach presented in this paper. Both the total number of LPs and the computational time required have been reduced by approximately 2 orders of magnitude compared to the single-level solution approach. The difference between the objective functions obtained by the two approaches is within the margin of optimality (5%) used for the solution of the MILP problems. 8. Example 2 This example emphasizes trade-offs between intertask and intercampaign changeovers, also taking account of inventory costs. We consider a multiproduct plant manufacturing three products, P1, P2, and P3 from three feedstocks, Feed1, Feed2, and Feed3 over a planning horizon of 4 months (2880 h). Minimum amounts of 400 tonnes of P1 and 500 tonnes of P2 and P3 are required by the end of the 4-month period. Continuous demands of 0.1 and 0.2 tonnes/h for P1 and P2, respectively, must be satisfied throughout the planning horizon. The following processing steps are involved in the process, corresponding to the STN shown in Figure 13. T10. React feedstock Feed1 to produce S10 after 4 h. T11. Filter S10 for 2 h to manufacture S11. T12. Dry immediately S11 for 2 h to produce final product P1. T20. React feedstock Feed2 to produce S20 after 3 h. T21. Filter S20 for 2 h to manufacture S21. T22. Dry immediately S21 for 2 h to produce final product P2. T30. React feedstock Feed3 to produce S30 after 2 h. T31. Filter S30 for 1 h to manufacture S31. T32. Dry immediately S31 for 2 h to produce final product P3. Unlimited storage is available for all feedstocks and final products. Three 10-tonne storage tanks dedicated to S10, S20, and S30, respectively, are available to buffer the production between reaction and filtering steps. The processing equipment characteristics are shown in Table 5. A minimum batch size of 25% of the nominal capacity for all processing equipment items is required. Unlimited amounts of all three feedstocks as well as 200 tonnes of P2 are available at the start of the horizon. A cycle time of 12 h is used. A minimum campaign duration of 480 h is imposed on the plant operation. Inventory cost calculations are based on an annual interest rate of 10% (see section 6.5 of part 1) and a price of 1 rcu/tonne (rcu ≡ relative cost units) for all products. 8.1. Case I: No Equipment Cleaning Requirements. This example is first modeled as a singlecampaign problem assuming no equipment cleaning is necessary. The mathematical formulation involves 469 variables (122 binary) which are reduced to 433 variables (86 binary) after eliminating variables and con-

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 523

Figure 16. Gantt charts for example 2 with equipment cleaning.

straints using the techniques of sections 3 and 5. Also, the model involves 745 linear constraints. The problem was solved via a branch-and-bound technique (CPLEX) with a 5% margin of optimality. The optimal solution was obtained after examining 451 LPs and a CPU time of 73.2 s on a SUN SPARCStation 10/ 41. An optimal objective function value of 2186.2 rcu was obtained. The final production amounts of the products (after deducting the continuous deliveries taking place during the horizon) are 672.0, 584.0, and 960.0 tonnes for P1, P2, and P3 respectively. An inventory cost of 29.8 rcu was incurred. The optimal operating schedule is shown in Figure 14.

8.2. Case II: Equipment Cleaning Requirements. In practice, due to the multipurpose nature of the processing equipment, cleaning may be needed when switching the production from one processing task to another. Here, we assume that irrespective of the processing order, a cleaning duration of 2 h is required when switching the production between tasks T12 and either T22 or T32 on Unit3, and between T20 and T30 on Unit1. Also 3 h of cleaning is needed when switching between tasks T10 and either T20 or T30 on Unit1. If we try to solve the above problem using a single campaign as in section 8.1, we find that it is infeasible. This is due to the fact that a large proportion of the cycle time is taken up by the cleaning, thereby not leaving

524

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996

Figure 17. STN representation for example 3. Table 8. Details of Processing Equipment for Example 3 unit

size (tonnes)

suitable tasks

Unit1 Unit2 Unit3 Unit4 Unit5 Unit6 Unit7 Unit8

6.0 5.0 7.0 7.0 8.0 6.0 7.0 8.0

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

Table 9. Computational Details for Example 3 iteration 1 NIV NOV NOC LPs CPU OBJ

Table 10. Campaign Structures for Example 3 iteration 1 MP structure

duration (h) structure

iteration 2

MP

SP

MP

SP

iteration 3 MP

166 1553 2671 1276 3127.0 9845.5

394 1925 4388 195 342.7 9180.7

166 1553 2672 1001 2858.2 9771.9

394 1924 4385 0 52.8 infeasible

166 1553 2673 3622 5182.0 infeasible

sufficient time for the required minimum production to be achieved. Next, we consider up to three campaigns with a fixed cycle time of 12 h. A constant intercampaign changeover of 240 h is imposed for plant reconfiguration. The single-level formulation involves 1356 variables (365 binary) which are reduced to 1248 variables (257 binary) after eliminating variables and constraints using the techniques of sections 3 and 5. The formulation also involves 3029 linear constraints. We use 20-cycle subranges for the master problem of the decomposition scheme, and a discretization interval

duration (h) structure

duration (h)

SP

Campaign 1 T10, T11, T10, T11, T30, T31, T30, T31, T32, T50, T32, T50, T51, T60, T51, T60, T61, T62 T61, T62 732-960 996 Campaign 2 T20, T21, T20, T21, T22, T23, T22, T23, T30, T31, T30, T31, T32, T40, T32, T40, T41, T70, T41, T70, T71, T72 T71, T72 732-960 1644 Campaign 3 T20, T21, T22, T23, T30, T31, T32, T70, T71, T72 732-960

0

iteration 2 MP T10, T11, T30, T31, T32, T50, T51, T60, T61, T62 732-960 T20, T21, T22, T23, T30, T31, T32, T70, T71, T72 732-960 T20, T21, T22, T23, T30, T31, T32, T70, T71, T72, T40, T41 732-960

of 1 h for the subproblem. All the MILP models are solved via a branch-and-bound procedure (CPLEX) with a 5% margin of optimality. The problem solution required two master and one subproblem iterations. The computational details are described in Table 6. The optimal plan involves two active campaigns out of three potential ones with campaign durations equal

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 525

Figure 18. Optimal campaign structure for example 3.

to 744 and 1896 h, respectively. The campaign structures determined by the first master problem along with the corresponding ranges of campaign durations are shown in the first column of Table 7. The second column of this table shows the solution obtained by the first subproblem. Figure 15 shows the variation of the product inventories during the planning horizon. At the end of the 4-month period the amounts of P1, P2, and P3 manufactured are 456.0, 888.0, and 632.0 tonnes, respectively, while the associated inventory cost is 32.0 rcu. The optimal operating schedules (Gantt charts) for a cycle of each of the two campaigns in the final solution

are illustrated in Figure 16. The hatched boxes denote cleaning between successive processing tasks. It can be seen from the results that the first campaign involves the production of P1 only, while both P2 and P3 are produced during the second campaign. This structure avoids most, but not quite all, cleaning requirements. The continuous demand for P2 during the first campaign is satisfied from the stock that is initially available. 9. Example 3 Here, we consider planning the production for a plant manufacturing four products from six feedstocks over

526

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996

Figure 19. Inventory profiles for P1, P2, P3, and P4 for example 3.

Figure 20. Inventory profiles for Int1, Int2, Int3, and Int4 for example 3.

a horizon of 4 months (2880 h). Minimum amounts of 750 tonnes of each of the final products are required at the end of the 4-month period; however the market demand for all of them is practically unlimited. Up to four potential campaigns are allowed, each with a given cycle time of 12 h. A minimum campaign duration of 480 h is imposed. Fixed intercampaign changeovers of 240 h are required for plant reconfiguration. The plant involves 19 processing steps manufacturing four final products as shown in Figure 17. The processing time of each task is indicated on the top right corner of the corresponding rectangle. Unlimited dedicated storage is available for all feedstocks and final products as well as for stable intermediates Int1, Int2, Int3, and Int4. Furthermore, dedicated storage of 20 tonnes is available for intermediates S30, S31, and S61 and also 10 tonnes for S20 and S71. The processing equipment is multipurpose in nature as shown in Table 8. Several operating constraints are

imposed on its utilization. A minimum batch size of 25% of the nominal capacity is required for all processing units. Furthermore, when switching the production from one processing task to another, cleaning may be needed. Irrespective of the task sequence involved, a cleaning duration of 4 h is imposed on Unit2 and Unit3, 3 h is imposed on Unit1, Unit5, and Unit6, and also 1 h is imposed on Unit4. Moreover, although Unit7 and Unit8 are, in principle, suitable for three and four different tasks, respectively, they are allowed to be used for at most two of these in any single campaign in order to facilitate the management and the control of the plant. In addition, a cleaning time of 2 h is needed when switching between T11 and T41 in Unit7, and T51 and T71 in Unit8. The single-level formulation involves 4167 variables with 1164 binary variables. These are reduced to 3927 and 924 respectively after elimination of variables using the techniques of sections 3 and 5. The formulation also involves 10 502 linear constraints. Due to the large size of the problem, we attempt to solve it using the decomposition approach only. We used 20-cycle subranges for the master problem of the decomposition scheme, and a discretization interval of 1 h for the subproblem. All the MILP problems were solved via a branch-and-bound technique (CPLEX) with a 5% margin of optimality. In total, three master and two subproblem iterations were required. The computational details are described in Table 9. In this example, there is a trade-off between intercampaign changeovers for plant reconfiguration forcing a smaller final number of active campaigns, and intertask changeovers directing the solution toward more active campaigns with fewer constituent processing tasks. The optimal plan comprises two active campaigns out of four potential ones, with campaign durations of 996 and 1644 h, respectively. The campaign structures and the corresponding campaign durations or ranges obtained during the solution procedure are given in Table 10. It can be seen that the campaign structure proposed by the first master problem is refined by the subproblem which eliminates the third campaign and increases substantially the length of the second campaign. The active parts of the original STN involved within each campaign in the final solution are shown in Figure 18. It can be seen that product P3 is manufactured during the first campaign while the rest of the products are produced during the second campaign as illustrated in Figures 18 and 19. At the end of the planning horizon, the amounts of the final products, P1, P2, P3, and P4, manufactured are 3836.0, 895.8, 830.0, and 3718.6 tonnes, respectively. During the first campaign, intermediates Int1 and Int4 are produced, to be consumed by downstream processes during the second campaign. Intermediate Int2 is produced in both campaigns but is only consumed in the second one. On the other hand, Int3 is both produced and consumed in both campaigns. Figure 20 shows the inventory profiles over the 4-month planning horizon for the four stable intermediates Int1, Int2, Int3, and Int4. The optimal operating schedules (Gantt charts) for a cycle of each campaign are illustrated in Figure 21. The hatched boxes denote cleaning between successive processing tasks. The limited amounts of dedicated storage for various states may be used as temporary buffers, thus alleviating production bottlenecks caused by limited availability

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 527

Figure 21. Gantt charts for example 3.

of scarce resources (e.g., processing equipment) or differences in the processing times and cleaning requirements of successive tasks. For instance, in the second campaign, Unit5 (see Figure 21) can perform tasks T20 and T40 only once per cycle due to the relatively long processing time of the former task and the large cleaning time required between these tasks. The availability of limited storage capacity after task T20 (dedicated to state S20) is crucial in enhancing the performance of the plant. Figure 22 illustrates the detailed storage utilization profile for S20 during a cycle of the second campaign.

The optimal value of the objective function is found to be equal to 9180.7 rcu, with 9280.4 rcu associated with the value of the products and 99.7 rcu related to the corresponding inventory costs. 10. Concluding Remarks A decomposition approach to the solution of the campaign planning/scheduling problem as formulated in part 1 has been presented. The number of the active campaigns over the whole planning horizon and the constituent processing tasks within each campaign are

528

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996

Figure 22. Storage utilization profiles for S20 for campaign 2 for example 3.

estimated by the master problem and may subsequently be refined by the subproblem. The duration and the detailed operating schedule for each campaign are also determined during the solution of the subproblem. The decomposition approach has been found to be generally effective, requiring a relatively small number of iterations between master problem and subproblem. This is despite the fact that the only information passed back from the subproblem solution to the master problem is a single integer cut (43). The reason for this appears to be the success of the aggregated formulation used in the master problem in predicting the correct campaign structure within the first couple of iterations. In any case, the use of better aggregated models (taking, for instance, better account of equipment cleaning requirements) could lead to further improvements in this area. A number of ways of improving the efficiency of the solution of both the master problem and subproblem MILP formulations have been considered. It is worth mentioning that the techniques proposed for enhancing the subproblem efficiency are, in fact, equally applicable to all scheduling formulations based on the STN concept with a discrete time representation. They can thus be used in conjunction with the short term scheduling algorithm of Kondili et al. (1993) and the periodic scheduling algorithm of Shah et al. (1993a). It is interesting to compare our mathematical decomposition approach to sequential decomposition approaches such as those proposed by Mauderli and Rippin (1979) and its later extensions (see literature review presented in part 1). Sequential decomposition approaches are based on the a priori formation of a number of individual campaigns that exhibit “good” performance. These are then combined to form the final plan. However, the fundamental problem with all such approaches is that it is generally difficult to relate the objective used in forming the individual campaign schedules to the overall objective for the entire plant operation. Furthermore, when restrictions on the utilization of processing equipment are removed (e.g., by allowing the same unit to be used for more than one task in the same campaign), the number of candidate campaigns that have to be formed for later consideration becomes prohibitively large. This situation becomes even worse once one starts to consider infinitely divisible resources (such as utilities). On the contrary, both levels of the decomposition approach presented in this paper consider the campaign planning/scheduling problem in its entirety, albeit at different levels of detail, and both attempt to optimize the same overall economic objective. Furthermore, only campaign structures that are appropriate given the objective and constraints under consideration are generated by the master problem for further consideration.

Finally, the rigorous nature of the decomposition algorithm ensures the optimality of the solution obtained. Acknowledgment This research was supported by a joint SERC/AFRC grant to the Centre for Process Systems Engineering at Imperial College. Nomenclature Symbols not listed below are as defined in part 1 of this paper. c B ij ) total amount of material undergoing task i in unit j during a cycle of campaign c card(‚) ) set cardinality operator CTcj ) total cleaning time for unit j in a cycle of campaign c Dkj ) set of tasks in combination k that are not actively using unit j over a campaign Dmin sµ ) minimum amount of material s to be delivered at time τµ D ˜ min sµ ) minimum amount of material s in discrete deliveries up to and including time τµ k ) standard index for combination of active tasks in a campaign K ˜ i ) set of equipment items actually used for carrying out task i during a campaign L ) number of tasks in a zero-wait train L′ic ) variables used for binary representation of nc L ˜ ic ) variables used for binary representation of range of nc + Mics ) upper bound on ∆S+ sc Mics ) upper bound on ∆Ssc Ni ) lower limit of ith range of number of cycles Nijc ) total number of batches of task i carried out in unit j during a cycle of campaign c c Nijt ) number of units of type j that start processing task i at the start of time interval t in a cycle of campaign c N*j ) maximum available number of units of type j rcc′ ) variable defined by constraint 31b + ) variable representing product L ˜ ic∆S+ Sics sc Sics ) variable representing product L ˜ ic∆Ssc ∆SLsc ) minimum attainable net accumulation of material in state s during campaign c ∆SU sc ) maximum attainable net accumulation of material in state s during campaign c ∆S+ sc ) amount of material in state s produced over a cycle in campaign c ∆Ssc ) amount of material in state s consumed over a cycle in campaign c SZ ) set of states with zero initial inventory Ukj ) set of tasks in combination k that are actively using unit j over a campaign

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 529 Ucu ) total amount of utility u required during a cycle of campaign c zcc′ ) variable defined by constraint 31a Greek Letters Rλ ) batch size of first task in a zero-wait train relative to task λ in the train Θs ) set of active tasks consuming state s during a campaign Θs ) set of active tasks producing state s during a campaign ΘIN s ) set of tasks consuming or producing state s that are active during a campaign ) complement of ΘIN ΘOUT s s λ ) standard index for tasks in a zero-wait train λicc′ ) 1 if task i is either active or inactive in both campaigns c and c′; 0 otherwise µicc′ ) 1 if task i is active in either campaign c or c′; 0 otherwise νicc′ ) 1 if task i is active in both campaigns c and c′; 0 otherwise τkj ) minimum total changeover time for task combination k in unit j τij ) cleaning time required between consecutive batches of task i performed in unit j ΦIP ) best lower bound on objective function value obtained so far by decomposition algorithm ΦL ) lower bound on objective function (solution of current subproblem) ΦU ) upper bound on objective function (solution of current master problem)

Kondili, E.; Pantelides, C. C.; Sargent, R. W. H. A General Algorithm for Short-Term Scheduling of Batch Operations. Part IsMathematical Formulation. Comput. Chem. Eng. 1993, 17, 211-227. Mauderli, A.; Rippin, D. W. T. Production and Scheduling for Multi-purpose Batch Chemical Plants. Comput. Chem. Eng. 1979, 3, 199-206. Pantelides, C. C. Unified Frameworks for Optimal Process Planning and Scheduling. Proceedings Second Conference on Foundations of Computer-Aided Operations; Rippin, D. W. T., Hale, J. C., Davis, J. F., Eds.; CACHE Publications: Austin, TX, 1994; pp 253-274. Papageorgiou, L. G.; Pantelides, C. C. Optimal Campaign Planning/Scheduling of Multipurpose Batch/Semicontinuous Plants. Part 1. Mathematical Formulation. Ind. Eng. Chem. Res. 1995, 34, xxxx. Shah, N.; Pantelides, C. C. Optimal Long-Term Campaign Planning and Design of Batch Operations. Ind. Eng. Chem. Res. 1991, 30, 2308-2321. Shah, N.; Pantelides, C. C.; Sargent, R. W. H. Optimal Periodic Scheduling of Multipurpose Batch Plants. Ann. Oper. Res. 1993a, 42, 193-228. Shah, N.; Pantelides, C. C.; Sargent, R. W. H. A General Algorithm for Short-Term Scheduling of Batch Operations. Part IIsComputational Issues. Comput Chem. Eng. 1993b, 17, 229244. Tsirukis, A. G.; Papageorgaki, S.; Reklaitis, G. V. Scheduling of Multipurpose Batch Chemical Plants with Resource Constraints. Ind. Eng. Chem. Res. 1993, 32, 3037-3050. Williams, H. P. Model Building in Mathematical Programming; John Wiley and Sons: Chichester, 1990.

Received for review January 26, 1995 Revised manuscript received June 12, 1995 Accepted September 26, 1995X IE950082D

Literature Cited CPLEX Optimization Inc. Using the CPLEX Callable Library and CPLEX Mixed Integer Library; CPLEX: NV, 1993.

X Abstract published in Advance ACS Abstracts, December 15, 1995.