Ind. Eng. Chem. Res. 1997, 36, 2701-2714
2701
Planning and Scheduling of Parallel Semicontinuous Processes. 2. Short-Term Scheduling Iftekhar A. Karimi and Conor M. McDonald* Advanced Process Control and Optimization, Central Research and Development, E. I. DuPont de Nemours, Experimental Station, Wilmington, Delaware 19880-0101
In part 1 of this series, it was seen how minimum run length constraints may complicate conventional multiperiod models. For short-term scheduling, these constraints, along with sequencing issues, become even more critical, and part 2 explores the application of continuous time formulations to this class of problems. Two mixed-integer linear programming (MIP) formulations are presented for the detailed short-term scheduling of a single-stage multiproduct facility with multiple parallel semicontinuous processors. Given a set of due dates, demands for products at these dates, and several operational and topological constraints, it is desired to determine the start and end times of individual product campaigns and machine assignments to minimize the inventory, transition, and shortage costs. The key feature of these formulations is that they can accommodate prespecified discrete time events such as due dates while employing a continuous representation of time. In addition to regular production, various outages such as tests and maintenance can be scheduled and a variety of transitions between operations can be accommodated. For purposes of illustration, a (relatively) small real plant scheduling problem is solved. 1. Introduction In part 1 (preceding paper in this issue), we considered midterm planning of several multiproduct facilities. It was seen that minimum run length constraints need to be accommodated in order that the planning solutions are credible to the users of the model. In part 2, we descend a level down in the hierarchy of production planning and scheduling. We shorten the time horizon considered and focus in more detail on a single facility with multiple processors. Although details such as exact timing and sequencing of various production campaigns were not critical for the midterm planning models, they must be considered for the short-term models if cost optimal schedules are to be generated. As was mentioned in part 1, much of the chemical engineering research in planning and scheduling has focused on the area of batch processing. However, semicontinuous processes constitute a large and extremely important component of the chemical process industry. It is an area that deserves more attention from researchers. Sahinidis and Grossmann (1991) developed a continuous time formulation for the case of cyclic multiproduct scheduling on parallel lines. The concept of slots was developed within which a single production event could occur. Various strategies for solving the resulting nonconvex mixed-integer nonlinear programming (MINLP) were discussed. Although exact schedule timing and sequencing is an output, the main disadvantage of the approach is that the demand is assumed to be continuous over the time horizon. This is unrealistic when faced with highly dynamic demand variations. Kondili et al. (1993) addressed the minimization of changeover and energy costs in a single-stage, multiproduct plant with multiple continuous production lines involving highly energy intensive operations such as cement milling. They allowed the unit cost of energy to vary over the scheduling horizon, which gave rise to * Author to whom all correspondence should be addressed. E-mail address:
[email protected]. S0888-5885(96)00902-5 CCC: $14.00
time periods with constant unit energy costs. They also allowed nonzero transition times and point demands at period ends. They force every idle slot to be of zero length and force all idle slots to the end of the horizon. Thus, it is not possible for an idle slot to be between two nonidle slots. They also forbid a campaign ending at the scheduling horizon to be shorter than its minimum length. This can eliminate solutions that are optimal. Each slot is also assumed to have the same minimum run length, although in industry there is a usually a wide variation across products. Schilling et al. (1994) extend the scope of the work of Kondili et al. (1993) by addressing a general semicontinuous process represented in the STN (state task network) framework. They allow continuous as well as point demands and include inventory costs in the objective function. Furthermore, they impose constraints forbidding a slot from overlapping with more than one period; i.e., they restrict a slot to be in a single period only during optimization. Schilling and Pantelides (1996) extend the scope of the above work to the general framework of resource-task networks. The interesting feature of this work is an initial branch-andbound scheme for the continuous slot lengths, which is used to generate a tighter formulation. Subsequent branching on the binary variables then continues as normal. The paucity of research in the area of scheduling for semicontinuous processes is evident from the brevity of the literature survey. After analyzing a broad range of industrial problems, the following set of requirements for a scheduling model was derived; a short-term scheduling model should (1) represent demand as discrete points over the time horizon, (2) output a schedule with start and end times for each event, (3) incorporate sequence dependent transitions, (4) allow the scheduling of multiple processors, (5) allow minimum run lengths to vary by product, (6) permit idle slots, and (7) allow the incorporation of instantaneous resource constraints. Notice that much of the operations research on the economic lot-sizing problem (see Elmaghraby (1978) for a review) satisfies none of the © 1997 American Chemical Society
2702 Ind. Eng. Chem. Res., Vol. 36, No. 7, 1997
above requirements and is therefore of limited use in solving the kinds of real world problems we encountered. To this end, we developed two mixed-integer linear programming (MIP) formulations for the shortterm (0-6 months) scheduling of multiple parallel semicontinuous processors in a single, multiproduct, multiprocessor facility. They are henceforth referred to as M1 and M2. They both achieve the goals of a shortterm model as described above. However, the representation of slots is the fundamental difference between these two formulations: (M1) There is no a priori assignment of slots to time periods. A slot can be of any length and can spread over multiple time periods. (M2) Each time period has a predesignated number of slots, and each slot is therefore fixed to a particular time period. Even though M1 addresses all of the requirements for the short-term scheduling problem, it leads to large integrality gaps, creating difficulties in obtaining optimal solutions efficiently. This fact provided the momentum for the development of M2. In contrast to M1, all slots are preassigned in M2 and the optimization formulation is not burdened with this assignment. Of course, this results in a much more complex set of minimum run length constraints, as the slots must be “linked” over multiple time periods, but it does lead to much improved computational performance as will be demonstrated by the examples. This confirms the observation by Schilling and Pantelides (1996) that the continuous time formulations are cursed by poor computational performance. For this reason, they employ an interesting and novel branch-and-bound scheme that involves branching on the continuous slot length variables. Requirement 7 is not undertaken in the modeling framework of this work. It is simple to include resource constraints that apply for time periods, such as limiting the consumption of a resource to a certain amount over the course of a time period. Instantaneous resource constraints are much more challenging and can include restrictions on the rate of change of a resource, as well as total simultaneous consumption of a resource. Schilling and Pantelides (1996) provide constraints which can (with some adjustment) deal with this scenario. It is worth discussing the attributes of the various continuous time formulations of Pantelides and coworkers. The model of Kondili et al. (1993) satisfies requirements 1-4. A key difference between M1 and their formulation is in the variables and constraints used to define slot-period overlaps. Another major difference is the manner in which idle slots are handled. In addition, we develop several constraints in our formulation to strengthen its LP relaxation and to eliminate classes of known suboptimal schedules. The major difference between M2 and the model of Schilling et al. (1994) is the fact that the slots are not preassigned to specific periods in their model but are assigned during the optimization by means of additional binary variables and constraints. In contrast, all slots are preassigned in M2 and optimization is not burdened with the assignment. In their formulation, they eliminate the binary variables used by Kondili et al. (1993) to define slot-period overlaps. Schilling et al. (1994) also assume that the slots are identical for all resources, while we keep them independent on different machines. The former strategy has some advantages and can be easily used in M2, but it will require more slots than the latter in order to guarantee the optimal solution. Some other minor differences are that they do not mention explicitly
Figure 1. Time periods and scheduling horizon.
how to accommodate the initial state of a plant, and their treatment of machine outages is less flexible than ours, employing a unique time period for each outage. In M2, both special outages as well as idling are handled more naturally, just like “regular” consumable products but with some special features. Both of the aforementioned works prefer to use classes of transitions rather than all possible transitions. Although this may require less constraints and variables, we prefer to use the modified constraint set proposed by Sahinidis and Grossmann (1991), mainly because of its simplicity in exposition, its ease of use, and its proven tightness. Since both Schilling et al. (1994) and Kondili et al. (1993) deal with idle slots differently, they do not define a changeover that is equivalent to the start-up of an idle machine. Furthermore, in both works, minimum run lengths and processing rates are assumed to be independent of the product being processed. This may not be valid for real processes. In what follows, we first state the short-term scheduling problem and then discuss some of the characteristics of the manufacturing system. The two formulations, M1 and M2, are then described in some detail. An example is then supplied to illustrate the models and their differences. 2. Problem Statement The short-term scheduling problem may be stated as follows: A multiproduct facility employs a single stage of multiple parallel, semicontinuous processors or machines j. A machine can make one or more products. A short-term (0-6 months) scheduling horizon (Figure 1) consisting of multiple periods is given. The periods t are defined by due dates DDt, t ) 1, ..., NT with H ) DDNT. Dit is the demand of product i at DDt. For each product i, a minimum inventory or safety stock target IitL is to be maintained whenever possible in order to guard against uncertainty and variability in demands and events. The scheduling problem is to determine the start and end times of individual product campaigns and the machines on which they should be run so as to minimize the schedule cost consisting of inventory holding costs, transition (between campaigns) costs, penalties for not meeting customer orders on time, and penalties for running below the safety stock targets. 3. System Description The machines have different sizes, rates, capacities, etc., and operate in a semicontinuous manner. In other words, the production takes place in continuous product campaigns. Hardware/process changes or even flushing/ cleaning may be required between campaigns of different products. Thus, transitions between products may cost time, labor, materials, and money. Many times, a campaign change may upset a machine and it will need time to reach the desired product quality or efficiency or steady state. These considerations lead to the
Ind. Eng. Chem. Res., Vol. 36, No. 7, 1997 2703
concept of minimum campaign lengths. Once a campaign for product i begins on a machine j, it must continue for a certain minimum time, called minimum run length MRLij. These run lengths may also depend on the sequence of campaigns. For instance, if two products are very similar in nature as well as processing, then essentially no changes in machine or conditions may be required and the machine operation is not upset. In this case, individual campaign lengths need not exceed the minimum run length, but the sum of campaign lengths of the two products must. We will consider such products to belong to the same family. Thus, we assume that the products are grouped into distinct families such that transitions between products of the same family require negligible transition time or machine/process changes. In general, it may not be possible to produce all products on any given machine. Even if it may be so, some machines may be preferred for producing a given product. We assume that a list of preferred machines is known for producing every product. Although the discussion in this paper applies to the case in which a product can be produced only by a subset of machines, we assume that every machine can produce all products for the sake of simplicity of exposition and notation. Appropriate formulations that impose preference constraints can be easily extracted from our discussion. This will be clear from the numerical examples discussed later. Mainly, if a product cannot be made on a machine, then all variables which involve that machineproduct combination will not exist in the formulation. Furthermore, when a product can be produced only on a subset of machines, it may be possible to divide machines into disjoint subsets such that the product subsets that the machine subsets can produce are also disjoint. For instance, suppose that machine 1 can produce products (A, B), machine 2 can produce (B, C), and machine 3 can produce product D; then machines 1 and 2 are in one group, and machine 3 is another group. Again, for the sake of simplicity, we deal with a single indivisible group of machines. A given problem should be analyzed first to identify independent machine groups, and then each group should be solved separately. This is important in solving large-scale problems. We assume that all demands are point or discrete demands. While the production may occur any time during a period, product shipments occur only at the period ends and not in between. Inventory values in Figure 1 are point values at period ends after subtracting shipments. As discussed in part 1, each machine j has an ideal rate and an effective rate Rij at which it produces a product i. These two rates can be related for a given process by means of yield, efficiency, etc. In addition, the machine operation is constrained such that RijL e Rij e RijU. In contrast to part 1, we will not need the index s in part 2, as we are dealing with a single facility. 4. Formulations For both formulations, we divide the available production time on a machine j into a number of consecutive slots. Slots on each machine are numbered consecutively starting from 0. The time before the start of the scheduling is called period 0 and slot 0. A single operation is assigned to each slot to generate a schedule. The operation can be any processing of a product or sitting idle or maintenance or product testing, etc. We
Figure 2. Slot design in model M1.
Figure 3. Slot design in model M2.
assume that machine j has NKj slots in addition to slot 0. A slot k on machine j starts at time Tj(k-1) and ends at time Tjk, and its length is SLjk ) Tjk - Tj(k-1). Thus, the slots and their start/end times vary from machine to machine and are independent of each other. M1 and M2 differ in the designs of time slots and how they are assigned to time periods. In M1, slots are of arbitrary lengths and are independent of the time periods. A slot is not confined to be within one or more periods. It may cover one or more periods and can even extend beyond the scheduling horizon. In M2, however, each time period is divided into a fixed number of slots a priori. Thus, a slot is confined to be within a single period, and its length cannot exceed the length of its period. Figures 2 and 3 illustrate the difference in slot designs of two formulations. In these figures, vertical dashed lines denote the period boundaries and rectangles are slots. Slots with zero lengths are not shown in the figures. In Figure 2, there are 12 slots on each machine. In Figure 3, there are 3 slots each in periods 1-3 and 19 slots in total on each machine. In contrast to Schilling et al. (1994), slots in different machines are not synchronized in both models. As we can see, a slot (e.g., slot 1 on machine 1) may cover multiple periods in M1, but not so in M2. In the figures, machine 1 is a dedicated machine running a single product. We need only two nonzero slots 0 and 1 to model this campaign in M1, while we need one nonzero slot per period to do the same in M2. Slots 2-12 on machine 1 are all zero and null slots in M1, while slots 2, 3, 5, 6, 8, 9, etc. belong to the same campaign in M2, but have zero lengths. On machine 2, slot 11 in M1 extends beyond H in order to achieve the minimum run length for its campaign, while slot 12 is zero and null. On the other hand, on machine 3, the slots do not even reach H. In this case, slots 5-12 are all zero and null slots. In M2, however, the horizon is necessarily covered by slots, so some slots may be nonzero and null. As we can see, a single slot in M1 usually amounts to multiple slots in M2. For instance, slot 1 on machine 3 in M1 is formed by slots 1-7 in M2 with only slots 1, 4, and 7 being nonzero. Thus, fewer slots are generally required in M1 than in M2 to achieve the same flexibility and freedom in operation, but we expect M2 to be a tighter formulation than M1. 4.1. Model M1. In this model, slots on a machine are of arbitrary lengths and are not related to periods. So a key question is how a given slot is spread over the
2704 Ind. Eng. Chem. Res., Vol. 36, No. 7, 1997
periods. We need this information to relate production, supply, inventory, etc., in a given period to the operation in an arbitrary slot. Time Slots. First, we need to relate slot lengths with their start/end times; i.e.,
Tjk ) Tj(k-1) + SLjk
(1)
Since we do not know which periods a slot covers, we assume that it is spread over all periods and use SLjkt to denote the portion of SLjk that lies in period t. Therefore, NT
SLjk )
SLjkt ∑ t)1
(2)
Now, our task is to define the SLjkt in terms of the Tjk. For this, we must determine where the Tjk are in relation to the DDt. So we first relate a time event Tjk to a due date DDt by defining a binary variable Zjkt as follows.
Zjkt )
{
if Tjk g DDt otherwise
1 0
distributed among time periods. We now define operations that take place in slots. Product Assignment and Sequencing. As we mentioned earlier, every slot on a machine is assigned a distinct operation. We think of every operation on a machine as a product (real or fictitious) being produced on that machine. For instance, if a machine is idle during a slot, we say that it is producing a null product φ. Thus, we associate a distinct product name with every distinct operation and use i to denote a product. As opposed to the null product, there are products that are marketable or consumable. For the time being, we assume that there are no outages on machines for the sake of simplicity, so a machine, at any given time, is either producing a real product or is sitting idle. We explain later that outages such as tests, maintenance, etc., can be handled easily. To model the operations in a slot k on machine j, we use binary slot assignment variables Yijk as follows.
Yijk ) 1 if product i is produced in slot k of machine j 0 otherwise
{
Since every slot must be assigned one operation
Now we express the unrestricted variable Tjk - DDt in + terms of two new nonnegative variables Tjkt and Tjkt such that + - Tjkt Tjk - DDt ) Tjkt
and
+ Tjkt ) 0 or Tjkt )0
Specifically, if Tjk g DDt, then we want Tjkt ) 0 and + + Tjkt g 0. And if Tjk e DDt, then we want Tjkt ) 0 and Tjkt g 0. Unfortunately, an LP solution is not auto+ matically guaranteed to give one of the Tjkt and Tjkt as + zero, because we have to use Tjkt and Tjkt separately (vs + always as a difference Tjkt - Tjkt ) later. So we must make use of the binary variables Zjkt to ensure that as follows:
e DDt(1 - Zjkt) Tjkt
and
+ Tjkt e UZjkt
where U (eq 7) is an upper bound on the Tjk. With the above constraints, we can show that SLjkt ) (Tj(k-1)t - Tjkt ) - (Tj(k-1)(t-1) - Tjk(t-1) ) Since Tjkt e DDt, we rewrite the last four constraints as follows by defining a continuous variable zjkt ∈ [0,1] via Tjkt ) DDt(1 - zjkt).
zjkt g Zjkt DDtzjkt e Tjk e DDtzjkt + (U - DDt)Zjkt SLjkt ) DDt(zjkt - zj(k-1)t) DD(t-1)(zjk(t-1) - zj(k-1)(t-1)) + We do the above mainly to eliminate Tjkt . Now and Tjkt note that there is a certain hierarchy among the Zjkt variables because of the relative ordering of DDt and Tjk. Since Tj0 ) DD0 ) 0 and Tjk g DD0, we must have Zjk0 ) 1 and Zj0(t>0) ) 0. Further thought reveals that the Zjkt decrease with t and increase with k. Therefore,
Zjkt e Zjk(t-1)
and
Zjkt g Zj(k-1)t
With these, we have defined slots and how they are
∑i Yijk ) 1 We cannot impose the other assignment constraint ∑k Yijk ) 1, because we want to allow a product to be produced more than once, if needed. To model transitions between products, we define binary transition variables.
Xii′jk )
{
1 0
if product i in slot k and i′ in (k + 1) of machine j otherwise
As shown by Sahinidis and Grossmann (1991), the Xii′jk are related to the Yijk as follows.
Yijk )
∑i′ Xii′jk
and
Yij(k+1) )
∑i′ Xi′ijk
We prefer this formulation over the other mentioned by Sahinidis and Grossmann (1991) and used by Kondili et al. (1993) and Schilling et al. (1994) for several reasons. Firstly, Sahinidis and Grossmann (1991) proved this to be tighter. Secondly, the Xii′jk can be considered as continuous; they are guaranteed to be binary when the Yijk are. Thirdly, their extensive use simplifies and unifies our formulations and explanation. Knowing the products that are produced in different slots or periods and the lengths of such slots or periods, we can now determine their production amounts, inventory levels, etc., in various periods. Production. The issue here is how to relate slot lengths to production amounts of various products in different time periods. Since we do not know which product is assigned to a slot a priori, we distribute (or disaggregate) the slot length into run lengths for various products. So if RLijkt denotes the portion of SLjkt that is used to produce product i, then
SLjkt )
∑i RLijkt
(3)
Since a slot k has only one product, only the RLijkt belonging to that product can be nonzero and the rest must be zero. Then, using SLjkt e ∆DDt, where ∆DDt
Ind. Eng. Chem. Res., Vol. 36, No. 7, 1997 2705
machine j produces product i, then SLjkt g MRLij must hold. Therefore,
) DDt - DD(t-1) is the length of period t, we get
RLijkt e ∆DDtYijk
(4) Tjk g Tj(k-1) +
This along with eq 3 ensures that Yijk ) 1 w SLjkt ) RLijkt. Now recall that the range of production rates for producing product i on machine j is [RijL, RijU]. Therefore Pit, or the total amount of product i produced in period t, is bounded by
RLijRLijkt e Pit e ∑RU ∑ ij RLijkt j,k j,k
(5)
If an amount Sit of product i is shipped to customers during period t and Pit is produced, then the inventory level for product i at the end of period t is given by
Iit ) Ii(t-1) + Pit - Sit We assume that if a portion of demand is not satisfied in a period, then it is carried over to the next period. Therefore, Iit ) Ii(t-1) + Dit - Sit
We are assuming that backorders from a period may be filled in subsequent periods. However, cumulative shipments of a product cannot exceed its cumulative demand, so
∑Dit′ g t′et ∑Sit′ t′et Finally, the shortages in safety stocks are given by
I∆it g ILit - Iit In the above, we assumed that the safety stocks are monitored at the end of each time period. This may not be true in all cases. If the stocks are monitored only at certain periods, then the above constraint should be used for those periods only. Obviously no production constraints are used for the null product or outage products (as discussed later). Minimum Run Lengths. In practice, transition from one product to another on a machine can disrupt its operation. Acceptable product quality and yields are usually not achieved instantaneously after the transition. Some transition time may be required before stable operation is achieved. The product produced during this time is mostly off-quality and must be discarded or recycled. Moreover, hardware changes or process changes may also be needed to set up the machine for the next product. Thus, transition times and transition costs can be significant in practice. For now, we assume that the transition times are zero. In many operations, a machine must be run for a certain minimum length of time to achieve a desired yield or cost effectiveness. For tests, maintenance, etc., certain minimum duration must be assigned. Thus, we assume that a minimum run length for every operation is known; i.e., once an operation begins on a machine, it must run for at least that much time before another operation can begin. MRLij denotes the minimum run length for product i on machine j. The minimum run length for product φ is taken as zero. If a slot k on
∑i MRLijYijk
k>0
(6)
If a product is already running on a machine at the start of the scheduling horizon, its current run length must be taken into account. If its current run length already exceeds its minimum run length, then that product should not be included in the sum in eq 6 for slot 1. If a slot starts within H, it has to continue for its minimum run length (e.g., campaign in slot 11 on machine 2 in Figure 2), so a reasonable upper bound on the Tjk is
Tjk e U ) H + max{MRLij}
(7)
i,j
Miscellaneous. Although we are done with the main body of model M1, additional constraints are needed to improve its tightness. In this section, we develop constraints to eliminate schedules that are clearly redundant and/or nonoptimal. First and foremost, two consecutive slots on a machine should not be allowed to produce the same product except when the product is null or the first slot is slot 0. Clearly a single slot is sufficient for the task. Thus, we forbid transitions from a product to the same product by setting
Xiijk ) 0
0 < k < NKj, i * φ
(8)
Note that we do not use the above for the null product, because we do not know a priori how many nonzero slots will be required in the optimal solution. Since we would assume NKj to be sufficiently large, all extra, useless slots must be zero null slots (i.e., those with zero lengths and the null product). Furthermore we would want all such useless slots to stack up as last slots in a schedule, rather than be interspersed among nonzero slots. We can achieve this by requiring that a slot following two consecutive null slots must also be null; i.e.,
Xφφjk g Xφφj(k-1)
1 < k < NKj
We cannot use this for k ) 0, because a schedule should be allowed to continue a null campaign at time zero, if desirable. Note that the above constraint will ensure that we do not get schedules in which two consecutive null slots are before a nonnull slot, unless the former occur at time zero. In addition to forcing the extra slots to be null slots, we can also force them to be zero slots. In other words, two consecutive null slots must also have zero lengths, unless they occur at time zero; i.e.,
Tj(k+1) e Tj(k-1) + U(1 - Xφφjk)
0 < k < NKj
As mentioned before, a slot need not be entirely within H in this model. But if it falls entirely beyond H, then it is useless as far as the current scheduling is concerned. Such a slot need not have any product other than the null product and also must have zero length, i.e.,
Yφjk g Zj(k-1)NT
and
SLjk e U(1 - Zj(k-1)NT)
Lastly, we would like to eliminate schedules in which a product demand is not satisfied in a period, but some
2706 Ind. Eng. Chem. Res., Vol. 36, No. 7, 1997
free time is available on a machine either in that or any earlier period. As indicated earlier, the set of machines used in this formulation is indivisible; i.e., all machines are interrelated through common products. Thus, a schedule change on one machine impacts all other machines. So if a product is shorted in a period t, then no slot that starts before DDt can be a null slot on any machine; i.e.,
Iit e (
∑
that slot k belongs to period t. Then, eqs 3-5 are written as
SLjk )
The binary variables Yijk and Zjkt can be prioritized naturally for branching in the branch and bound method that is used by MIP solvers such as CPLEX. Since the Yijk represent assignment and hence sequencing decisions and the Zjkt timing decisions, the former should have higher priority than the latter. Similarly, within the Yijk and Zjkt, the priority should be higher for lower k, because those with lower k’s directly impact those with higher k’s. Finally, we give lower priority to Yφjk than other products, because normally null slots stack up at the end. In this work, we have used the same priorities for all machines, but that need not be true in all cases. With this, our formulation M1 for the scheduling problem is complete. 4.2. Model M2. In this model, every slot is confined to be in a specific period, so its length cannot exceed the period length. This means that a product may use multiple consecutive slots, potentially over multiple time periods, in a single campaign to satisfy its minimum run length. Although this does complicate the minimum run length constraints for this model, the big advantage is that we do not need the binary variables Zjkt, as the positions of slots relative to the time periods are predefined. Time Slots. Instead of specifying NKj, as done in model M1, we must now specify NKjt, the number of slots in time period t on machine j. Now NKj ) ∑tNKjt. For instance in Figure 3, period 1 has slots 1-3, period 2 has slots 4-6, etc. Slot 1 is the first in period 1 and slot 4 the first in period 2. Since slots in a period fill the period completely, start points of the first slots and end points of the last slots are fixed by the DDt. For instance in Figure 3, Tij0 ) DD0 ) 0, Tij3 ) DD1, Tij6 ) DD2, etc., are all fixed. However, we still need eq 1 to relate Tjk and SLjk. Moreover, if a Tjk is to be within L period t, then its lower and upper bounds are Tjk ) U DD(t-1) and Tjk ) DDt. The Tjk that are already fixed are not considered to be within periods but at their ends. Since a slot is no longer spread over periods, we do not need eq 2. None of the remaining constraints for time slots in M1 are needed in this formulation. Product Assignment and Sequencing. This section remains exactly the same as in M1, except that a campaign of a product cannot be restricted to a single slot. It may cover more than one slot and/or period. Note that, provided Yijk ) 1, Yijk - Xiij(k-1) ) 1 signifies the start of a campaign of product i in slot k of machine j and Yijk - Xiij(k-1) ) 0 with Yijk ) Xiij(k-1) ) 1 its continuation. Production. Since slots are preassigned to periods in this model, SLjkt ) SLjk for t such that the slot is assigned to period t and SLjkt ) 0 otherwise. Thus, we do not need SLjkt in this model. Since a slot will be in a single period, so will the run lengths and we will also not need RLijkt. Furthermore, the upper bound on the U run length is given by RLijk ) ∆DDt, where t is such
(9)
RLijk e ∆DDtYijk
∑
j,(k∈Kt)
Dit′ - Ii0)(1 - Yφjk + Zj(k-1)t)
t′et
∑i RLijk
RLijRLijk e Pit e
∑
(10) RU ij RLijk
(11)
j,(k∈Kt)
where Kt is the set of all slots that belong to period t. Now suppose that a campaign uses two slots and both are in the same period. For a given length of the campaign, there are infinite combinations of the lengths of the two slots. To eliminate these combinations, we classify run lengths into several types. The first type is in a slot that is the first in its period. The second is in a slot that is not the first in its period but the first in a product campaign. The third is in a slot that is neither the first type nor the second type. We allow only the first two types of run lengths to be nonzero. Run lengths of the third type are set to be zero. To achieve this, we rewrite eq 10 as follows.
RLijk e
{
∆DDtYijk slot k first in period t ∆DDt(Yijk - Xiij(k-1)) slot k not first in period t
}
k > 0 (12) Although we consider slot 0 as the first slot in time period 0, we do not use eq 12 for it, as its run length is already fixed. The remaining constraints are the same as those in M1. Minimum Run Lengths. In contrast to M1, these constraints pose a challenge in M2. This is mainly because a campaign may cover multiple slots and we must know when it starts and ends to satisfy its minimum run length. We first consider a slot k in a period t. Assume that it starts a campaign for product i; i.e., Yijk - Xiij(k-1) ) 1. We cannot simply use RLijk g MRLij(Yijk - Xiij(k-1)) because it may be that the upper U bound RLijk on run length RLijk is less than MRLij. U < MRLij, then the campaign must conBut, if RLijk tinue in slot (k + 1) so as to attain its minimum length. In other words, we must force Xiijk ) 1 and should also relax RLijk g MRLij(Yijk - Xiijk). Alternately, we enforce RLijk g MRLij only if the campaign has only one slot. If the campaign has multiple slots, then we impose no constraint on RLijk. This logic leads us to the following constraint.
RLijk g MRLij(Yijk - Xiij(k-1) - Xiijk)
0 < k < NKj (13)
As desired, the above constraint relaxes if the campaign has multiple slots (Xiijk ) 1) or if it does not produce product i or if slot k is not its first slot (Xiij(k-1) ) 1). Now what if the campaign has multiple slots? For this, we need constraints that involve sums of run lengths. Recall that a run length can be nonzero only if it is in a slot that is first in either the campaign or a period. We would like to force such run lengths to assume their highest values possible in order to attain the minimum run length for the campaign. Using an example, first we consider a few schedules that we would like to avoid. In model M1, we used eq 8 to
Ind. Eng. Chem. Res., Vol. 36, No. 7, 1997 2707
preclude two consecutive slots running the same product. In this model, we contend that a transition from a product to the same product should be allowed only at the DDt. For clarity, consider a period t with four slots, namely, slots k, (k + 1), (k + 2), and (k + 3). If a product i runs in all four slots, then eq 12 will force slots (k + 1), (k + 2), and (k + 3) to have zero lengths, and since the slots must cover the entire period, RLijk will equal ∆DDt. The result is that the transitions from i to i occur only at DDt. Note that the same would occur, if a campaign of i were to start in any of the four slots and were to extend all the way to DDt. For instance, suppose that only slots k and (k + 1) constitute the campaign. Again, from eq 12, SLj(k+1) ) RLij(k+1) ) 0. If the campaign is to be nonzero, then RLijk > 0. But this is not a desirable schedule either, because we do not need slot (k + 1) and need slot k only. To avoid such a schedule, we must not allow slot (k + 1) to have product i, when slot k already has it and slot (k + 2) is nonzero and is running another product. This essentially means that a transition from one product to the same cannot take place at a time which is not the end of a period. Therefore, we use the following. U Tj(k-1) + RLijk g Tjk Xiijk
Thus, the only time Xiijk ) 1 is when the point of transition Tjk ) Tj(k-1) + RLijk is at its upper bound U Tjk ) DDt with slot k in period t. Similarly if a product i wants to continue in the next slot, then we should force all the remaining slots in the same period to have product i. This is done by using,
Xiijk g Xiij(k-1)
k ∈ Kt, (k - 1) ∈ Kt, k not last in Kt
Note that the above is very much like the one used in M1 to force extra slots to be zero null. The difference is that here we are dealing with extra slots in each period rather than the whole horizon and the extra slots are forced to be zero but not necessarily null slots. Now we can say that if a campaign for product i starts in a slot k in period t, then either RLijk g MRLij or Tjk ) DDt and the campaign extends into period (t + 1). Also note that all slots following slot k in period t will be zero slots. So if RLijk < MRLij, then the first slot in period (t + 1) must be nonzero and must have product i. For this, we use
RLijk + RLijf(j,k) g MRLij(Yijk - Xiij(k-1) 0 < k < NKj (14) Xiijf(j,k)) where f(j,k) is the first slot in period (t + 1) on machine j. If it turns out that even two periods t and (t + 1) are unable to accommodate the minimum run campaign length, then Xiijf(j,k) will have to be 1 and the campaign will extend into period (t + 2). Then the left hand side of the above equation will have a sum of three run lengths. We can generalize this constraint by defining g(i,j,k) as the first slot after k (i.e., g(i,j,k) > k) on machine j that is first in its period and would guarantee the minimum required length for the campaign of i that started in k. For example, suppose that there are three periods with lengths 100, 150, and 200 h, respectively. They have respectively 2, 3, and 4 slots numbered as slots 1, 2, 3, ..., 9. Let product i have a minimum run length of 400 h. First consider the case in which a campaign of i starts in slot 1. In order to satisfy the minimum run length, the campaign must cover slots
1-6 for sure. Inclusion of slot 6 in the campaign will guarantee that the campaign will have enough slots to be of minimum length. Thus, for slot 1, f(j,k) ) 3 and g(i,j,k) ) 6. On the other hand, if the campaign were to start in slot 2, inclusion of slot 6 will not guarantee the minimum run length. This is because slot 2 may be shorter than 50 h. In that case, the campaign length cannot exceed 400 h even with the inclusion of slot 6. So for slot 2, f(j,k) ) 3, but g(i,j,k) ) 10. With this explanation, we generalize eq 14 as follows:
RLijk +
∑
RLijk′ g MRLij(Yijk - Xiij(k-1) -
k k be the slot such that if a campaign of i starts in slot k, then it must extend at least up to slot g′(i,j,k). We can calculate g′(i,j,k) a priori for every U slot k with RLijk < MRLij. Then we can say that
Xiij(k′-1) g Yijk - Xiij(k-1)
U RLijk < MRLij, k < NKj, k < k′ e g′(i,j,k) (17)
Note that g(i,j,k) and g′(i,j,k) are not necessarily the same. For instance, consider the example that we used earlier to explain g(i,j,k). For slot 1, g(i,j,1) ) g′(i,j,1) ) 6, but for slot 2, g(i,j,2) ) 10 and g′(i,j,2) ) 6. This is because, irrespective of the length of slot 2, the campaign cannot exceed its minimum run length without including slot 6. Furthermore, if slot 2 exceeds 50 h, then slot 10 need not be included in the campaign. Further note that eq 17 makes some of eq 13 redunU dant, namely, those for the slots with RLijk < MRLij.
2708 Ind. Eng. Chem. Res., Vol. 36, No. 7, 1997 U Thus, eq 13 is not used for slots with RLijk < MRLij. Similarly, eq 17 for k′ ) k + 1 is nothing but eq 16, so we also do not need eq 16. The priorities for the binary variables Yijk are the same as those used in M1. This completes our second formulation for the scheduling problem. 4.3. Outages. In our development of models, we assumed that all products were “regular” products and machines has no outages or special tests. In reality, scheduling is always complicated by the requests from research for special product or machine tests, routine maintenance or shut downs, project work, machine upgrades, etc. Thus, one must allow for such special outages alongside the regular production. Fortunately, they can be dealt with relatively easily within our formulations. As before, we will associate a product with each such operation. This product will be dealt with exactly as a regular product except for some additional constraints. Moreover, production constraints will not need to be imposed for such products. We assume that a machine on which each such product must run, the duration of its run, and the acceptable time window (lower and upper bound on time during which the outage must happen) are all prespecified. First of all, only one campaign will be needed for each product, so we use ∑kYijk ) 1 in M1 and ∑k(Yijk - Xiij(k-1)) ) 1 in M2 for each such product. In eqs 13 and 15 of M2, we exempted all campaigns that end at H from necessarily having the minimum run lengths, since we assume that they will continue in the future. Since outages must have their minimum allocated times, no matter where they are in the scheduling horizon, we must force the sum of their run lengths to be at least the minimum, i.e., ∑kRLijk g MRLij for each outage product i. Suppose that an outage product i must run during [TLi ,TU i ]. If i runs in slot k on machine j, then we must have
Tj(k-1) g TLi Yijk
and
Tjk e TU i Yijk + U(1 - Yijk)
U for where U is as defined in eq 7 for M1 and U ) Tjk M2. In M1, slots can be placed arbitrarily, so no slot can be precluded from running an outage product i. In contrast, in M2, we know explicitly which time period a slot is in, so slots that cannot have outages can be identified a priori from TLi and TU i . 4.4. Objective Function. We assume that the scheduling objective is to minimize the total cost which includes inventory holding costs, transition costs, and penalties for supply shortages and safety stock shortages. hit denotes the cost of holding a unit amount of product i for the entire length of period t. We do not use exact time averaged inventory, because that leads to a nonlinear objective function. Rather we approximate the inventory costs by a linear function. The inventory cost in period t for a product i consists of two parts. One is the cost hitIi(t-1) of holding Ii(t-1) for the entire duration of t. And the second is the cost of holding what is produced during t. Although the production Pit does not occur uniformly during the entire period t, we assume that it does. Then the holding cost for Pit during t is 1/2Pithit. Thus, the total inventory cost for i during t is hit(Ii(t-1) + 1/2Pit). Note that this treatment of inventory holding cost, although different
from that used in part 1, should be more accurate for short time periods. In part 1, the second term involving Pit was not used. cii′j denotes the cost of transition from product i to product i′ on machine j. The start-up of a machine from an idle state is the transition from the null product, and the shut-down is the transition to the null. The transition cost at slot k (k < NKj) on machine j is cii′jXii′jk, and the total transition cost for the schedule is ∑i,i′,j,kcii′jXii′jk. Note that the transitions at the last slot (slot NKj) are not defined and so should not be included in the sum. µi denotes the supply shortage cost per unit amount of product i. This would generally include the revenue and the goodwill lost because of shorting a customer. Then, the total cost of not meeting the demands at various due dates is ∑i,tµiIit-. Finally, ζi denotes the cost of safety stock shortage per unit amount of i. It is basically an assessment of risk associated with a low inventory that may result in lost sales due to unforeseen circumstances. In the previous paper, we compared relative values of hit, µi, and ζi. The total cost of safety stock shortages is then ∑i,tζiIit∆. Here again we assume that safety stock is monitored at each time period. If not, only the monitoring time periods should be included in the sum. From the above discussion, the objective for our scheduling problem is to minimize
C)
hit(Ii(t-1) + 1/2Pit) + ∑ cii′jXii′jk + ∑ i,t i,i′,j,k ∆ µiI∑ it + ∑ζiIit i,t i,t
We summarize both formulations in Appendix A. 4.5. Transition Times. We used the simpler case of zero transition times for an easier conceptual understanding of our formulations. We now consider modifications to handle the more realistic case of nonzero transition times. τii′j denotes the time required to transition from product i to product i′ on machine j. By definition, τiij ) τiφj ) 0. We assume that no useful product is produced during the transition. Depending on the process, minimum run length could be defined inclusive or exclusive of the transition time. The first case is easier to handle than the second, so we assume that the transition time is not included in the minimum run length. We start with M1 and then consider M2. M1. We need a few more variables to handle the nonzero transition times in M1, as we need to differentiate between the start of transition and that of actual production in each slot. We assume that each slot begins with a transition period and the actual production continues until the end of slot. Note that now the useful production time is not the full slot [Tj(k-1),Tjk], but transition time is excluded from it. To keep many constraints unchanged, we redefine slot length SLjk to be exclusive of the transition time; i.e.,
Tjk ) Tj(k-1) + SLjk +
τii′jXii′j(k-1) ∑ i,i′
In order to determine the production that takes place in a given period, we need to identify the overlaps of the useful production time in a slot with periods. To this end, we define an additional binary Z′jkt and a continuous z′jkt for the start of useful production, which is Tj(k-1) + ∑i,i′ τii′jXii′j(k-1), just like we defined Zjkt and
Ind. Eng. Chem. Res., Vol. 36, No. 7, 1997 2709
zjkt for Tjk. Then we can write the following constraints to interrelate these variables as follows.
Table 1. Current Products, Their Campaign Lengths, and Planned Outages for Example 1 current campaign
z′jkt g Z′jkt DDtz′jkt e Tj(k-1) +
τii′jXii′j(k-1) e DDtz′jkt + ∑ i,i′ (U - DDt)Z′jkt
Then SLjkt is given by
SLjkt ) DDt(zjkt - z′jkt) - DD(t-1)(zjk(t-1) - z′jk(t-1)) and the hierarchy among the Zjkt and Z′jkt is given by
Z′jkt e Z′jk(t-1)
and
Zjkt e Zjk(t-1)
Zjkt g Z′jkt g Zj(k-1)t The only other constraint that changes is the minimum run length constraint (eq 6), which now becomes
Tjk g Tj(k-1) +
τii′jXii′j(k-1) ∑i MRLijYijk + ∑ i,i′
k>0
M2. For M2, we assume that a transition period cannot be split across multiple periods and must lie in a single period only. For this to happen, the smallest period has to be longer than the largest transition time. Although Schilling et al. (1994) do not explicitly state this assumption, their treatment seems to assume it implicitly. To ensure that every transition lies entirely in a single period, we must impose a lower bound on run length as follows.
RLijk g
∑i′ τi′ijXi′ij(k-1)
Note that this affects the run length of only the first slot in a campaign and not the subsequent ones. This lower bound can be absorbed easily into the minimum run length constraint (eq 13) as
RLijk g MRLij(Yijk - Xiij(k-1) - Xiijk) +
∑i′ τi′ijXi′ij(k-1)
0 < k < NKj
Similarly the second minimum run length constraint (eq 15) becomes
RLijk +
∑
RLijk′ g MRLij(Yijk - Xiij(k-1) - Xiijk′′) +
k 0): zjkt g Zjkt Zjkt e Zjk(t-1) Zjkt g Zj(k-1)t Tjk g DDtzjkt Tjk e DDtzjkt + (U - DDt)Zjkt
minimum run lengths (k > 0): Tjk g Tj(k-1) +
∑i MRLijYijk
zero-length slots (k > 0):
{
Tj(k+1) e Tj(k-1) + U(1 - Xφφjk) k < NKj Tjk e Tj(k-1) + U(1 - Zj(k-1)NT)
outage products (i ) outage):
{
Tjk e TU i Yijk + U(1 - Yijk)
null slots:
{
∑k Yijk ) 1
Yφjk g Zj(k-1)NT k > 0 Xφφjk g Xφφj(k-1) 1 < k < NKj
single slot campaigns (0 < k < NKj, i * φ): Xiijk ) 0
{
run lengths (k > 0): RLijkt e ∆DDtYijk
∑i RLijkt ) DDt(zjkt - zj(k-1)t) DD(t-1)(zjk(t-1) - zj(k-1)(t-1))
2714 Ind. Eng. Chem. Res., Vol. 36, No. 7, 1997
Common Constraints.
production bounds (i * φ, i * outage): RLijRLijkt e Pit e ∑RU ∑ ij RLijkt j,k j,k machine idle time (i * φ, i * outage): Iit
e(
∑Dit′ - Ii0) (1 - Yφjk + Zj(k-1)t)
t′et
slot lengths (k > 0):
{
Tjk ) Tj(k-1) +
∑i RLijk
outage products (i ) outage): TU i Yijk
+ DDt(1 - Yijk)
∑i′ Xii′jk
Yij(k+1) )
∑i′ Xi′ijk
supply shortages (i * φ, i * outage): Iit ) Ii(t-1) + Dit - Sit
∑k RLijk g MRLij
supply bounds (i * φ, i * outage):
safety stock shortages (i * φ, i * outage): I∆it g ILit - Iit
U RLijk < MRLij,
k ∈ Kt, (k - 1) ∈ Kt,
Xiijk g Xiij(k-1)
k * last in Kt run lengths (k > 0):
{
∆DDtYijk k first in t RLijk e ∆DD (Y - X ) t ijk iij(k-1) k * first in t U RLijk + Tj(k-1) g TjkXiijk
}
}
minimum run lengths (0 < k < NKj): RLijk g MRLij(Yijk - Xiij(k-1) - Xiijk)
U RLijk g MRLij
RLijk′ g MRLij(Yijk - Xiij(k-1) - Xiijk′′)
k 0):
Yijk )
M2 Constraints.
Tjk e
outage products (i ) outage, k > 1): Tj(k-1) g TLi Yijk
Literature Cited Brooke, A.; Kendrick, D.; Meeraus, A. GAMS: A User’s Guide; Scientific Press: Palo Alto, CA, 1988. Elmaghraby, S. E. The economic lot scheduling (ELSP): Review and extensions. Mgmt. Sci. 1978, 24 (6), 587. Kondili, E.; Shah, N.; Pantelides, C. C. Production planning for the rational use of energy in multiproduct continuous plants. Comput. Chem. Eng. 1993, 17, S123. Pantelides, C. C. Unified frameworks for optimal process planning and scheduling. In Proceedings of FOCAPO II; Rippin, D. W. T., Hale, J. C., Davis, J. F., Eds.; Cache Publications: Austin, TX, 1993; p 253. Sahinidis, N. V.; Grossmann, I. E. MINLP model for cyclic multiproduct scheduling on continuous parallel lines. Comput. Chem. Eng. 1991, 15 (2), 85. Schilling, G.; Pantelides, C. C. A simple continuous-time process scheduling formulation and a novel solution algorithm. Comput. Chem. Eng. 20S:S1221, 1996, 20S, S1221. Schilling, G.; Pineau, Y.; Pantelides, C. C.; Shah, N. Optimal scheduling of multipurpose continuous plants. Presented at AIChE Annual Meeting, November 1994.
Received for review December 23, 1996 Revised manuscript received April 21, 1997 Accepted April 22, 1997X IE9609022 X Abstract published in Advance ACS Abstracts, June 15, 1997.