Optimal Long-Term Campaign Planning and Design of Batch Operations

Long-term campaign operation of batch plants is appropriate where product ... for optimal campaign planning and design, which considers simultaneously...
0 downloads 0 Views 2MB Size
Ind. E n g . C h e m . Res. 1991,30, 2308-2321

2308

Series, Series E.; Kluwer: Boeton, MA, 1986;Vol. 110,pp 245-289. Hoffman, A. C.; Yates, J. G.Experimental observations of fluidized beds at elevated pressures. Chem. Eng. Sci. 1986,41, 133-149. Howard, J. R. Fluidized bed technology-principles and applications. Adam Hilger: Bristol, New York, 1989. Jacob, K. V.; Weimer, A. W. High-pressure particulate expansion and minimum bubbling of fine carbon powders. AIChE J. 1987, 33, 1698-1706. Jacob, K. V.; Weimer, A. W. Normal bubbling of fine carbon powders in high-pressure fluidized beds. AIChE J. 1988,34, 1395-1397. Klier, K.; Chatikavanij, V.; Herman, R. G.;Simmons, G. W. Catalytic synthesis of methanol from CO/H2, IV, the effects of carbon dioxide. J . &tal. 1982, 74, 343-360. Kuczynski, M.; Browne, W. I.; Fontein, H. J.; Westerterp, K. R. Reaction kinetics for the synthesis of methanol from CO and H2 on a copper catalyst. Chem. Eng. Process. 19878, 21, 179-191. Kuczynski, M.; Oyevaar, M. H.; Pieters, R. T.; Westerterp, K. R. Methanol synthesis in a countercurrent gas-solid-solidtrickle flow reactor, an experimental study. Chem. Eng. Sci. 198713, 42, 1887-1898. Kunii, D.; Levenspiel, 0. Fluidization Engineering; Wiley: New York, 1977. Lee, K. S.; Hong, C. S.; Lee, C. Kinetic modelling and reactor simulation for methanol synthesis from hydrogen and carbon monoxide on a copper base catalyst. Korean J. Chem. Eng. 1984,1, 1-11. Martin, H. The effects of pressure and temperature on heat transfer to gas fluidized beds of solid particles. XVI ICHMT Symposium, Sept 1984,Dubrovmyt, Yugoslavia. Mcneil, M. A,; Schack, C. J.; Rinker, R. G . Methanol synthesis from hydrogen, carbon monoxide and carbon dioxide over a CuO/ ZnO/A1203catalyst, 11, development of a phenomenological rate expression. Appl. Catal. 1989,50, 265-285. Mori, S.;Wen, C. Y. Estimation of bubble diameter in gaseous fluidized beds. AIChE J. 1975,21, 109-115. Ozturk, S. S.; Shah, Y. T.; Decker, W. D. Comparison of gas and liquid phase methanol synthesis processes. Chem. Eng. J. 1988, 37, 177-192. Reid, R. C.; Prausnitz, J. M.; Sherwood, T. K. The properties of gases and liquids, 3rd ed.; McGraw-Hill London, 1977. Renz; et al. Heat transfer characteristics of the FBC Acchen Technical University. Proceedings of the 1987 International Conference on fluidized bed combustion; American Society of Melchanical Engineers: New York, 1987. Richardson, J. F. Fluidization; Davidson, J. F., Harrison, D., Eds.; Academic Press: New York, 1971;p 50.

Rowe, P. N.; MacGillivary, H. J. A preliminary X-ray study of the effect of pressure on a bubbling gas-fluidized bed. Inst. Energy Symp. Ser. 1980, I (No. 4),IV-1. Rowe, P. N.; Foscolo, P.; Hoffmann, A. C.; Yates, J. G . Fine powders fluidized at low velocity at pressures up to 20 bar with gases of different viscosity. Chem. Eng. Sci. 1982, 37, 1115. Rowe, P. N.; Foscolo, P. U.; Hoffmann, A. C.; Yates, J. G. X-ray observation of fluidized beds under pressure. Proceedings of the 4th International Conference on Fluidization, Kashikojima, Japan; Engineering Foundation: New York, 1983;pp 1-8. Saxena, S. C.; Vogel, G. J. The measurement of incipient fluidization velocities in a bed of coarse dolomite at elevated temperature and pressure. Trans. Inst. Chem. Eng. 1977,55, 184. Schack, C. J.; Mcneil, M. A.; Rinker, R. G. Methanol synthesis from hydrogen, carbon monoxide and carbon dioxide over a CuO/ ZnO/A1203catalyst, I, steady state kinetic experiments. Appl. &tal. 1989,50, 247-263. Sit, S. P.; Grace, J. R. Interphase mass transfer in aggregative fluidized bed. Chem. Eng. Sci. 1978,33, 1115-1122. Subzwari, M. P.; Clift, R.; Pyle, D. L. Bubbling behaviour of fluidized beds at elevated pressures. Fluidization; Davidson, J. F., Kerns, D. L., Eds.; Cambridge University Press, 1978;p 50. Takagawa, M.; Ohsugi, M. Study on reaction rates of methanol synthesis from carbon monoxide, carbon dioxide and hydrogen. J. Catal. 1987, 107, 161-172. Villa, P.;Forzatti, P.; Buzzi-Ferraris, G.; Garone, G.; Pasquon, I. Synthesis of alcohols from carbon oxides and hydrogen, 1, kinetica of the low-pressuremethanol synthesis. Ind. Eng. Chem. Process Des. Deu. 1985,24, 12-19. Wagialla, K. M.; Helal, A. M.; Elnashaie, S. S. E. H. The use of mathematical and computer models to explore the applicability of fluidized bed technology for highly exothermic catalytic reactions, I. Oxidative dehydrogenation of butene. Math. Comput. Modell. 1991, 15, 17-31. Westerterp, K. R.; Kuczynski, M. A model for a countercurrent gas-solid-solid trickle flow reactor for equilibrium reactions, the methanol synthesis. Chem. Eng. Sci. 1987,42, 1871-1885. Yahia, A. S.; Soliman, M. Personal communication, 1990. Yang, W.; Chitester, D. C.; Kornosky, R. M.; Keairns, D. L. A generalized methodology for estimating minimum fluidization velocity at elevated pressure and temperature. AIChE J. 1985, 31, 1086-1092.

Received f o r review June 5, 1990 Revised manuscript received November 27, 1990 Accepted May 6,1991

Optimal Long-Term Campaign Planning and Design of Batch Operations Nilay Shah and Constantinos C. Pantelides* Centre for Process Systems Engineering, Imperial College of Science, Technology and Medicine, London SW7 2BY, U.K.

Long-term campaign operation of batch plants is appropriate where product demands are stable and plants may be dedicated to a small subset of their potential products for relatively long periods of time. In contrast to previous work which assumed that all of the processing steps involved in the manufacture of a product must take place within any campaign producing it, we examine the use of intermediate storage to decouple the manufacture of each product into several stages, each of which can be run independently in campaign mode. Since each stage involves fewer processing steps, more economical plant designs may be produced. We present a systematic and efficient method for optimal campaign planning and design, which considers simultaneously the problems of unitto-task allocations and task timings. The problem is formulated as a mixed integer linear programming model (MILP) and solved by a modified branch-and-bound technique. A case study is presented to illustrate the applicability of the method. 1. Introduction

There h a been a great deal of interest in the computer-aided scheduling and design of batch plants Over the

* Author to whom correspondence should be addressed. 0888-5885/91/2630-2308$02.50/0

past 1 0 years. This mirrors the resurgence of the batch mode of operation as an efficient means of production, especially where flexibility is required or a large number of low-volume, high-value-addedproducts are to be made in the same facility. Parakrama’s (1985) survey of 99 batch processes oper0 1991 American Chemical Society

Ind. Eng. Chem. Res., Vol. 30,No. 10, 1991 2309 ated by 74 UK manufacturing concerns showed that 80% of the plants are producing chemicals in steady or growing markets, and that only 6% of processes were likely to be changed to continuous ones, despite the fact that 95% of the processes were capable of such conversion. The same survey highlights the need for scheduling algorithms and software that are able to handle the full complexity of such operations. This need is also emphasized in many review articles (Rippin, 1983a,b, 1985; Reklaitis, 1982, 1989; Ku et al., 1987). Batch processes may be operated in two different modes, reflecting different business conditions: (i) The first is a reactive mode, where demands for the different products are subject to rapid change and schedules may show few similarities from week to week. The time horizon of interest is relatively short (say 1 week to 1 month). (ii) The second is a campaign mode, where the demand pattern is stable. A campaign is constructed by the allocation of resources (time, equipment, and utilities) over relatively long time periods to the different products, or to different stages involved in the manufacture of one or more products. Many batches of the same product are produced in succession. This type of operation is typical of the "upstream" manufacture of pharmaceuticals, as well as fine chemicals. The ability of stages to be performed in parallel is affected by the allocation of scarce equipment and/or utilities to constituent tasks of the stages. This paper considers the latter mode of operation and the problem of allocation of time and equipment to the production stages in an optimal manner with respect to a variety of optimization criteria. The extension of the planning formulation to one that is appropriate for design or retrofit problems is straightforward in principle. Previous relevant work can be divided into categories: (i) production planning and scheduling; (ii) design. We note that efficient designs can only be produced by taking into account planning and scheduling considerations. 1.1. Production Planning and Scheduling. Early work on production planning and scheduling was based on a two-level decomposition of the problem. The top level concerns itself with the aggregate planning of the plant, solving materials requirement planning (MRP), and lotsizing-type problems as multiperiod linear programs (LPs). The result is a series of production targets forming an overall production plan based on a simplified model of the plant. The lower level involves the sequencing of tasks on the available equipment so as to satisfy the demands posed by the production plan. A heuristic procedure is usually used for this purpose (Bitran and Hax,1978; Baker, 1981). Mauderli and Rippin (1979, 1980) propose a different two-stage approach that forms the basis of much of the subsequent work in both production planning and design. They assume multipurpose units and a zero-wait (ZW) transfer policy between production stages, the objective being profit maximization. Their solution procedure first generates a number of alternative routes through the plant for each product, discarding any inefficient ones. The remaining routes are used to create a series of production lines, which are combined into campaigns. The latter are then screened to identify the dominant ones. The allocation of time to the dominant campaigns is solved as a LP. Ldzaro et al. (1989) present an approach similar to that of Mauderli and Rippin (1979,1980) which includes consideration of utility requirements. Again, dominant production lines and campaigns are created and the produc-

tion plan is formed from these. Espufia and Puigjaner (1989) study the special case of production planning for parallel multiproduct plants. They assume that unlimited intermediate storage (UIS) is available and use a simulation approach to evaluate alternative production plans. Birewar and Grossman (1990) considered a multiperiod LP model with one unit per processing stage. The time horizon is divided into production slots of variable length to which batches may be assigned. Given a number of orders, the objective is minimization of the makespan. A LP is solved to generate the production plan. Production schecules (Le., task sequences) for both the ZW and UIS cases can be inferred from the L P solution. Recently, Wellons and Reklaitis (1991a) presented a single product campaign problem formulation similar to that of Mauderli and Rippin (1979). The problem is formulated as a mixed integer nonlinear program (MINLP), but is efficiently solved by a campaign formation decomposition algorithm. In a companion paper (Wellons and Reklaitis, 1991b), they present a procedure to identify dominant multiple product campaigns. In both cases, production time is allocated to the dominant campaigns in order to create a production plan. 1.2. Design. Most of the work reported in the literature on the multipurpose plant design problem is based on what Reklaitis (1989) terms the "unique assignment" case, Le., the assumption that there is a unique unit-to-task relationship and the units are not multipurpose with respect to tasks. Parallel production of products is only allowed if the products do not share any equipment. Often, all parallel units are assumed to be identical and are operated in an out-of-phase mode. This approach was first considered by Suhami and Mah (1982), who assumed a ZW mode of operation. They observe that, for every product configuration (i.e., set of campaigns where products may be manufactured simultaneously),a MINLP similar to the multiproduct design MINLP of Grossmann and Sargent (1979) must be solved. To avoid the combinatorial nature of this problem, they randomly generate a fixed number of product groupings, use a heuristic procedure to select the best one, and solve a single MINLP for this configuration. Imai and Nishida (1984) develop a more efficient procedure to solve the product configuration generation problem using a set partitioning approach. Vaselenak et al. (1987) avoid the two-stage nature of this approach by embedding all maximal candidate product groupings in a superstructure. This results in a single MINLP which includes the product grouping problem. A major difficulty with this approach is the derivation of the so-called "horizon Constraints", which basically state that the time dedicated to sequential campaigns (the time dedicated to product seta that must be produced sequentially) must not exceed the available time horizon. It is particularly important to derive the limiting constraints to avoid redundant constraints in the model. Coulman (1989) proposes a simpler procedure for superstructure determination and horizon constraint generation based on matrix manipulation. Cerdl et al. (1989) represent each multiproduct campaign by a characteristic product, which removes the need for horizon constraints. Faqir and Karimi (1988) use a more efficient horizon constraint set based on linear inequality theory. They devise a superstructure which always has a unique minimum. They extent this work (Faqir and Karimi, 1989) to cover the case where a product may follow multiple routes through the plant. All the above use either parallel or single-unit unique

2310 Ind. Eng. Chem. Res., Vol. 30, No. 10, 1991

assignments. Kirdy et al. (1989) use a two-stage procedure, with campaign generation and flexible equipment allocation to tasks, similar to the production planning of Mauderli and Rippin (1979, 1980). More recently, Papageorgaki and Reklaitis (1990) have presented a more general problem formulation. They consider flexible unit-to-task allocations and nonidentical parallel units. The time horizon of interest is divided into a number of campaigns of varying length within which products may be manufactured in parallel. Equipment may be allocated to a task in groups of nonidentical units operating in phase. Furthermore, identical groups operating in an out-of-phase mode may be allocated to a task. The problem is formulated as a MINLP which is solved using an outer approximation MILP/NLP iterative procedure. Although this does not always guarantee the optimum, it does provide optimal solutions to the examples presented. It is important to note at this point that, in all the work reviewed above, it is assumed that the manufacture of each produced involves a linear sequence of processing tasks with no intermediate storage between them. A direct consequence of this assumption is that, if a product is involved in a certain campaign, then all its constituent tasks must take place in this campaign. This, coupled with the requirement that no unit is used for more than one task within the same campaign, implies that the minimum number of processing units is determined by the product with the maximum number of tasks. Although this is acceptable for simple processes, it results in extremely inefficient designs whenever products involving many processing steps are to be manufactured. For instance, products with 40 or 50 basic tasks are quite common in the fine chemicals or pharmaceuticals industry, yet in actual industrial practice the corresponding plants typically involve much fewer processing units. This economy in design is achieved by providing sufficient intermediate storage at various appropriate points in the linear sequence of tasks. This has the effect of allowing small subsets of the tasks for each product to take place independently of all others during each campaign, thus significantly relieving the demands on processing equipment. In this paper, we take into account the effects of intermediate storage in decoupling the manufacture of each product into several stages, each consisting of several tasks, so that each stage can be run independently in campaign mode. Although the use of intermediate storage for each decoupling has been recognized in the pase (Karimi and Reklaitis, 1985; Modi and Karimi, 1989), it has not been used in the context of multipurpose batch plant design. Our formulation also differs from those described in section 1.1 in that the campaign construction and production planning problems are solved simultaneously. In section 2, we present this stagewise decomposition in its general form, before identifying the special case considered in detail in this paper and discussing the features of the plant operation that need to be taken into account. In section 3, we present the mathematical formulation of the problem for the single product case; this is then extended to take account of multiple products in section 4. Section 5 discussed the solution method used and its implementation. A case study illustrating various features of the program formulation is given in section 6. 2. The Long-Term Campaign Planning and Design Problem 2.1. Processing Macrostructure and Microstructure. We consider the manufacture of a number of products within the same plant. In general, each product

recipe comprises a number of stages. The feedstocks of a stage may be raw materials, or they may be produced by other stages in the process, thus establishing a process macrostructure. Two or more stages (not necessarily of the same product) may share the same feedstock. The products of each stage are stable materials that may be stored, if necessary. This, together with the availability of unlimited, or finite but substantial, storage capacity for each stage product, implies that a stage can be run in campaign mode independently of all others provided that (a) its feedstocks are available in sufficient amounts and (b) adequate storage capacity is available for its products if they are not immediately consumed by other downstream stages operating simultaneously. Each stage comprises a number of basic processing tasks which, operating in a cyclic mode over a campaign, transform the stage feedstock(s) into the stage product($ The processing network, or microstructure of a stage can itself be quite complex, involving mixed intermediate storage policies, shared intermediates, recycles of materials, etc. Both general macrostructures and general microstructures can be represented unambiguously as state task networks (Kondili et al., 1988). We also note that the optimal cyclic scheduling of single stages described by general microstructures was considered by Shah et al. (1989). In this paper, we restrict our attention to macrostructures in which each stage has only one useful product. Furthermore, although a stage can have multiple feedstocks, no sharing of feedstocks is allowed between different stages. At the microstructure level, we assume that each stage consists of a linear sequence of tasks operating in a zero-wait (ZW) mode. This model of processing is particularly applicable in the fine chemicals/ pharmaceuticals area, where many stages of processing exist, with each stage producing a stable solid, large quantities of which may be stored for long periods. Under the above simplifying assumptions, both macrostructures and microstructures may be represented as ordinary networks of processing operations, as shown in Figure l a and lb, respectively. 2.2. Processing Characteristics. A cleanout period is usually required when a unit switches from processing one stage to another. This cleanout period is normally relatively short when the stages are of the same product, but long when the stages are of different products. In order to minimize changeover co9ts, we limit ourselves to the case where each stage starts production only once over the time horizon and proceeds uninterrupted for as long as required using the same equipment throughout its duration. Under these conditions, it is not necessary to divide a priori the planning horizon into a fixed number of campaign periods (see, for example, Papageorgaki and Reklaitis, 1990). The different campaigns are delimited by the starting and finishing times of the various production stages in the problem. Another characteristic of many batch processes of the type considered here is that often some stages involve one or more product stabilization tasks. The latter are necessary to transform the stage product to a storable form. For instance, drying may be used to convert a wet solid to a dry powder which may then be stored in drums. However, this stabilization is normally unnecessary if the stage producing the wet solid overlaps in time with the downstream stage that consumes it. Taking this complication into account may be important in determining the optimal campaign plan.

Ind. Eng. Chem. Res., Vol. 30, No.10,1991 2311 1

Stage 1

b

Stage2

Stage4

Stage 3 : Mix

I

.

.

React

u

Stage6

Stage1

Filter

Figure 1. (a) Process macrostructure for a single product. (b) Processing microstructure for a single stage.

If two successive stages are separated by UIS, then the start time of the second stage is independent of the first, apart from the obvious condition that the second cannot start earlier than the first. On the other hand, if no intermediate storage exists between the stages, then the start times must be the same, in which case the two stages could well be merged into one. If finite intermediate storage (FIS) exists between the stages, this means that there is a maximum length of time for which the first stage may operate until either it stops because the storage facility is full or the second stage starts, so as to remove material from storage. 2.3. Equipment Utilization, Tasks are carried out in the available plant equipment. Because of the multistage nature of the processes considered here, it is important to be able to relate the equipment capacity utilized by a given task to the amount of final product produced. This is expressed in terms of a given material balance factor, defined as the amount of final product (in mass terms) that can be produced by allocating a unit volume of equipment capacity to the corresponding task. This type of information can be deduced from laboratory or pilot-plant data. Equipment is usually multipurpose and may therefore be used to perform a variety of tasks over the scheduling horizon. The rules regarding allocation of equipment to tasks are as follows: (1) An item of equipment must obviously only be allocated to tasks for which it is suitable; therefore unit/task suitabilities must be specified as part of the problem description. (2) At least one piece of equipment must be assigned to each task. (3) Although an item may be suitable for several tasks of the same stage, it may not be assigned to more than one of them as this would violate the assumption of an overlapping no-wait mode of operation of the tasks. However, units may be reused for the manufacture of the same product if they are allocated to different nonoverlapping stages of that product. (4) In order to alleviate the effects of bottlenecks on the overall production, more than one unit may be allocated to the same task at the same time. In this paper, we assume that all items of equipment assigned to a task operate in phase. As will be seen in section 3.2, this maintains linearity in the mathematical formulation. The allocation of equipment to individual tasks within stages defines the ability of stages to overlap in time, since two stages that share equipment cannot do so. 2.4. Utilities. In addition to the allocation of equipment, some tasks may require additional resources, such as utilities, manpower, etc. As for the processing equip-

ment, the ability of stages to overlap may depend on the allocation of scarce resources. In this paper, we assume that the rate of utility utilization of a stage consists of a fixed contribution and a variable contribution, the latter being proportional to the amount of material undergoing processing in the stage per unit time. In the design case, the maximum level of utility provision for a plant may also be considered as a design variable. This may be treated in two ways: (i) The maximum level of utilization may be minimized. For instance, it is often the case that contractual agreements are made as to the maximum level of electricity usage by the plant at any one time. (ii) The level of utility to be made available depends on the amount of capital expenditure for this purpose. This is relevant where auxiliary equipment (e.g., compressors) is used to provide the utility (e.g., refrigeration). The design calculation involves the choice of one or more such relatively expensive items according to their capacity. 2.5. Planning and Design Objectives. Subject to the above constraints and characteristics, the allocation of units to tasks may be optimized, resolving any potential conflicts between stages sharing common equipment by adjusting the stage start and finish times. In this paper, we consider three different types of optimization objectives: (i) The first is maximization of combined production value, subject to minimum requirements and maximum production amounts for some or all of the products. (ii) The second is maximization of combined production value subject to a capital cost ceiling and minimum requirements and maximum production amounts for some or all of the products. (iii) The last is minimization of capital cost subject to minimum production requirements on all products. Objective i would be used where planning of the operation of existing production facilities is desired and ii and iii where a plant design or retrofit is the requirement. For the latter case, we assume that any new equipment is available in discrete sizes with given fixed costs for each size, the objective being to determine which items of equipment (out of a maximal potential set) need to be purchased. For retrofit studies, the cost of already existing equipment is set to zero, while the actual cost is used for equipment that is being considered for purchase or manufacture. The problem to be solved may then be summarized by the following: Given: the characteristics of the existing equipment (in the case of planning) or planned equipment (in the case of design-type problems), the product recipes in terms of

2312 Ind. Eng. Chem. Res., Vol. 30, No. 10, 1991

stages and their constituent tasks with the associated material balance factors, the available or planned utility provisions, and a time horizon of interest. Determine: the allocation of equipment to the various processing tasks in each stage and the starting and finishing times of all the stages, subject to the processing conditions described above, so as to optimize one of the three criteria above. In the next section, we describe the formulation of the single product problem which encapsulates all the important features of the general problem while allowing simplicity of notation and ease of understanding. The extension to the general multipurpose case is considered in section 4. 3. Mathematical Formulation of the Single Product Case As described above, the production stages consist of one or more constituent tasks, and precedence relations may exist between various production stages. The formulation is based on two key variable types, describing the allocation of units to stage tasks, and the timing of the stages respectively: ujki

I

= 1if unit j is used by the ith task of stage k 0 otherwise

where R is the amount of final product produced, $& is the material balance factor for task i of stage k (see section 2.3), Tk is the cycle time for stage k , and Vjis the capacity of unit j . Note that the limitation of in-phase parallel operation maintains the linearity of the above constraint, by ensuring that the stage cycle time Tk,is a constant defined by Tk =

maXTi

(5)

iEPk

where T~ is the processing time of task i. Out-of-phase operation could be allowed by replacing the above by I .

where P k * P k is the subset of tasks for which out-ofphase operation is allowed. This, however, would introduce some nonlinearity in the material balance constraint. For the product stabilization tasks of a stage, further material balance constraints must be included:

= starting time of stage k = finishing time of stage k The following auxiliary variables are also defined: 1 if the stabilization task(s) of stage k are to be performed

&=[

0 otherwise

V k, i E p k U PI1 ( 7 ) where M is a sufficiently large number and T i is the stage cycle time taking into account all tasks:

I

1if stage k starts after stage k’ has finished Y M = 0 otherwise

We also define the following sets: = set of obligatory (Le., excluding any product stabilization tasks) tasks in stage k p“k = set of product stabilization tasks in stage k Aik = set of equipment units suitable for task i of stage k Ak = set of equipment units that may be used for stage P k

k Qjk

time of th_estage. We define the continuous intermediate variable U j k i as the length of time during which unit j is allocated to task i of stage k. The basic material balance constraint is written for all the obligatory tasks of the stage:

(‘UiEP

= set of tasks of stage k for which unit j is suitable (={iv

. E

Aikl)

Ah = set of stages that must immediately precede stage k (Le., those stages, the products of which are feedstocks of stage k) r k = set of stages that must precede stage k;this is defined reCUrSiVely by r k = A k ( U k J E a rk+, 3.1. Allocation Constraints. Each obligatory task of each stage must be assigned at least one item of equipment:

u

Mik

2

ujki

21

v k, i E P k

(1)

j E h

where M i k is the maximum number of units that may be assigned to task i of stage k. For stabilization tasks, the above is modified to Mik

2

Ujki j € h

2

X k

v k, i E f l

(2)

No item can be assigned to more than one task in the same stage: Ujki 5 1 v j , k (3) iEQ,r

3.2. Material Balance Constraints. The stage production rate in terms of final product is determined by the minimum of the individual task rates. These are determined by the unit allocations to the tasks and the cycle

r k

= max [Tk, max g ] ieP,”

(8)

We note that if the stabilization tasks are omitted (Le., X k = 0), ( 7 ) is a nonconstraint. On the other hand, if they are to be performed (i.e., X k = l), then it becomes identical with (4) apart from the possibly different cycle time Ti. Thus, if T $ = Tk,( 7 ) need be written for i E p“k only; in this case, (4) will suffice for the obligatory tasks. The variables U j k i are defined by

where H is the given planning horizon. 3.3. General Campaign Timing Constraints. We assume that at the beginning of the time horizon, only raw materials are available. Therefore, stage k cannot start earlier than any of its immediate predecessors: tt 2 t $ r v k, k’ E (10) Also, there is no point in continuing to operate a stage after its successor stage has finished:

tf, 2 tf,, v k, k ’ E A k (11) Two stages, k and k’,that clash over equipment allocations must not overlap in time. Therefore either 12 must start after k’has finished (Le., Ykk‘ = 1)or k must finish before k’starts (i,e,,Y k ‘ k = 1). This is ensured by the following constraint:

Ind. Eng. Chem. Res., Vol. 30, No. 10, 1991 2313 stage L‘

b

4

4

b

Stage k

e. e

/il

-

--

82

Figure 2. Utilization profiles for intermediate storage capacity.

which implies that Y k p and Yk’k cannot both be zero if item j is allocated to tasks in both k and k! Note that the above constraint is only written for k’ < k to avoid duplication. The Y k k ‘ variables are related to the stage timing variables as shown below: tft 2 tit

+ Ykk’Tkk’ - (1 - Y k k ’ ) H

v k, k’lAk

fl

f {}

(13)

where T ~is ,the interstage setup time if stage k is to follow stage k ’in the same vessel. The above is only constraining if Y k k ’ = I, in which case it ensures that ti I t i t + Tkk’. Of course, such timing constraints are only necessary for stage pairs that can potentially use the same equipment, Le., such that hk n # {). For the case where a precedence relationship (direct or indirect) exists such that k’is a predecessor of k, we only need to define the stage timing variables Y k k ’ , since Yk‘k will be 0 under all circumstances. Constraints 12 above are then simplified to Ykkt

2

1

iEQ,b

Ujki

+ i EQ,,

Ujk‘i -

1

v k,k’ E r k , j

E n (14) and the timing constraint (13) corresponding to Y k ’ k is omitted. 3.4. Intermediate Storage Constraints. If the storage between stages is not unlimited but restricted to the extent that it may affect processing (i.e., if it is less than the entire production amount of the upstream stage), the stage timings must take this into account. Consider two partially overlapping stages, k’and k (see Figure 2). O1 denotes the duration of time for which stage k‘operates in a nonoverlapping mode with stage k and O2 the duration of time for which the stages overlap in operation. Let Qk denote the time-averaged production rate for stage k. This is defined as the amount produced (in final-product-equivalent terms) per cycle divided by the cycle time. If QK > Qk,the amount of intermediate under

storage will reach its maximum at the end of the overlapping period, i.e. after O1 + O2 units of time. If Qk’ I &, then the stored amount will be at its maximum at the start of the overlapping period, Le. after O1 units of time. In any case, this maximum amount must not exceed the storage available, Sk‘, defined, for convenience, in final product terms. If the stages do not overlap at all, the period is equal to the duration of stage k’, at which the amount stored will again be a t a maximum. This leads to the following constraints: skt

2 Qk’Ol

- MYkki - QkM2 - M Y k k i

(Qk’ ski 2 Qkdl for the overlapping case, and s k t I Q k d 1 - hf(1 - Ykkt)

for the nonoverlapping case. If the stages overlap 6.e. Ykk’ = 0), the last constraint is nonconstraining, whereas if they do not overlap (Le. Ykk’ = l),the first two are nonconstraining. In the last constraint, since is the duration of the stage, the product Q#e, is the same as R, the amount of final product produced. The above constraints involve the products of two variables and therefore introduce nonlinearity. We employ an approximate transformation procedure (described in the Appendix) to obtain a generalized linear form of these constraints. The final constraints, which may be exact or overconstraining depending on the problem, are of the form

skt

2 R - M(l

- Ykk‘)

where the new continuous variables

0jki

(17) are defined by

2314 Ind. Eng. Chem. Res., Vol. 30, No. 10, 1991

(th - tit) - (1 - Ujkp)M IO j k p (tf

- t f ! ) - (1 - Ujkti+)MIO j k ' i +

v j E Apk v j Ebi+k

(18) (19)

Constraints 18 are only written for the successor stage (denoted by k), and constraints 19 are only written for the predecessor stage (denoted by k 9. Furthermore, constraints 15 and 16 are written for the tasks i* E Pk and i+ E Pk', which minimize the quantities ($i*k/Tk)&A,*bV, and ($i+k'/T k l ) C j E+ktV., d respectively. We note that, if the ability to store the product of stage k depends on the inclusion of any stabilization tasks in this stage, we must replace sk' in constraints 15-17 by the product X k ' S V . This implies that the storage is only available if the stabilization tasks are performed. 3.5. Utility Constraints. We consider the case where the utility requirement of a stage is made up of a fixed term and a variable term. The utility constraints must not allow stages to overlap if their combined utility requirements exceed the availability of the utility or utilities concerned. We define W k , as the fixed amount of utility u required by stage k per unit time and &I , as the amount of utility required per unit of final product produced. Assuming that these quantities remain constant over the duration of the stage, and that the availability of all utilities is constant over the time horizon, we need only check for utility sufficiency at the start of each stage. This is achieved by the following constraint: Wku

+ GkuQk + k ' g k (Ykk' - Ykk')(ak'u + G k f u Q k i )

5 L,

The upper bound on the availability of a utility u, L,, may be a fixed constant, or a continuous variable to be determined. Alternatively, as described in section 2.4, design calculations may require discrete choices from a set of appropriate auxiliary equipment (such as compressors) or other sources for the provision of the necessary utility level. We define the binary variable El to be 1 if source 1 is selected as part of the design, and 0 otherwise. This leads to the constraint

where Z, is the set of sources that may be used to provide utility u and VLis the maximum supply potential of source 1. 3.6. Objective Function. We consider three possible objective functions: (1) Maximize R-this will calculate the maximum theoretical capacity of a given plant. (2) Maximize R subject to a capital constraint-this will calculate the maximum output of a proposed plant, given a fixed ceiling on capital expenditure. (3) Minimize the fixed capital cost of a plant which will produce a given amount Rminof product. For design-type calculations, we assume processing units to be available from manufacturers in discrete sizes, each size and type having an associated cost. In order to formulate mathematically the latter two objective functions, variables denoting unit existence must be defined:

V u, k (20) where L, is the upper limit on the availability of utility u, Qk is the production rate of stage k in final product terms, and Ykk' is 1 if stage k starts simultaneously with, or after stage k! If Ykkr is 1and Y&k'is 0, then stage k starta while stage k ' is in operation. Note that Ykk' cannot be 0 if ykk! is 1, as stage k must start after stage k'if Ykk' is 1. Constraints 20 therefore state that the combined utility requirements for stage k and all other stages that are already in operation when k starts must not exceed the upper bound on the utility availability. The variables Ykk' are defined by:

Ykk' 2 (tt -

t t t

+ t)/H

(21)

Here t is a sufficiently small number which is included to ensure that Ykk' = 1 in the case that tt = ti,. Constraint 20 is nonlinear due to the product (Ykk' Y&&:)(Wk', + GktUQk,) and also involves the rate variables Qk which are related to the total amount of final product produced, R, in a nonlinear fashion. We again employ an approximate transformation procedure (see Appendix), to eliminate Qk and linearize (20) to

The new variables ujkkti+

ujkk'i+

are defined by

2 Ykk' - Y k k r

+ Ujkti+- 1

(23)

where i* f Pk and i+ E Pkl are chosen as the tasks that minimize the sums (+i.k/Tk)C,EAi.rVj and ( $ i + k ' / T k ! ) x j E A , + Vj,respectively. Because of the form of (221, Ujkk'i' can 4e treated as continuous variables in the range [O, 11.

Ej

I

= 1 if unitj exists 0 otherwise

The constraints that define the new variables Ej are

which ensure that Ej is 1 if unit j is allocated to any task i of any stage k. It should be noted that, because of the form of (25)) it is not necessary to treat the Ej as true binary variables. However, in the context of the branchand-bound solution of the MILP, it may be preferable to do so, and, in fact, prioritize them for branching. This is because they represent the strongest "dichotomies" in the model; Le., they have the greatest effect on the objective function (see, e.g., Williams, 1990). This objective function in the case of cost minimization is min CCjEj I

(26)

where C j is the cost of item j . If utility utilization is to be considered (see section 2.4), two types of penalty terms may also be introduced into the objective function. If the maximum level of utility utilization is to be penalized, terms such as C,L,C, must be introduced, where C , is the unit cost of utility u. If discrete utility sources are to be selected, their utilization must introduce a fixed cost term into the objective function; otherwise _theywill all be selected. In this case, the term CuCIEguEICl must be introduced, where Cl is the fixed cost of acquiring utility source 1. In the case of capital limitation, the objective function to be maximized is still R , but the following constraint is added:

where C""

is the given capital ceiling.

Ind. Eng. Chem. Res., Vol. 30, No. 10, 1991 2315 4. Extension to the Multiple Product Case The formulation above corresponds to a single product situation. The extension to the multipurpose case is very straightforward, as the problem is still considered in terms of stages and tasks, which, however, may pertain to different products. The general formulation of the problem remains the same, whereby stages (whether they belong to the same or different products) may or may not overlap, depending on equipment allocation and precedence relations. Hence products may overlap for some or all of their production, depending on the allocation of resources. Precedence relations may be imposed between products, as may earliest start times and latest finish times-these may be needed because of late availability of feedstock or early due dates for products. The interproduct precedence relations may be weak, where a product cannot start before its predecessor has started, or strong, where a product cannot start until its predecessor has finished. To facilitate the formulation, we define the following new variables: T ’ = starting time of production of product p T ! = finishing time of production of product p and the following new sets: I I p = set of stages involved in the production of product

ii

P

= set of weak predecessors of product p = set of strong predecessors of product p We modify the product variable R to take account of multiple products: R, = total production of product p The formulation presented in the previous section must be modified as follows: The allocation constraints must be written for all tasks of all stages of all products. Material balance constaints (4) must be modified to correspond to the different products to be produced:

Constraints 7 must be modified similarly, while constraints 9 must be written for all tasks of all stages of all products. The general timing constraints (12) and (13) must be written for all possible stage pairings, irrespective of the products to which the stages belong. The interstage cleanout times Tk’k are modified to reflect interproduct cleanouts (usually longer) if the consecutive stages are of different products. The product start and finish times may then be defined in terms of the stage start and finish times: and

TL It l p L

VP

(30)

where kL is the last processing stage of product p . Note that (297 is only written for stages with no predecessors. Also, if absolute product start and/or finish times are specified, the upper and lower bounds on the and variables can be adjusted accordingly. The precedence relations between products are easily expressed in terms of the new variables:

Ti 1 Ti,

V p , p’ E

(31)

and

T ; 1 Ti, Vp,p’E (32) The intermediate storage constraints must be written for every stage of every product, Le., V p , k E lip, k ’ E Ah.

The utility constraints remain the same and are written for all utilities and all stages, irrespective of the products to which the stages competing for the same utility belong. For the objective of maximization of total production value, each product must be assigned a unit value (possibly zero). Thus, if qp is the unit value of product p , the objective function is max

ET&,

(33)

P

The same objective function is used for design calculations involving the maximization of production value subject to a capital ceiling. On the other hand, for capital cost minimization calculations, the appropriate objective function is still (26). In all cases, minimum and maximum production requirements may be imposed on some or all of the products

R p ” ” I R p 5 Rp””

V p

(34)

5. Solution Procedure and Implementation The solution method is based on a branch-and-bound procedure. Two measures have been implemented to improve the efficiency of the search procedure; they are described in sections 5.1 and 5.2. Section 5.3 briefly presents some aspects of the implementation of the algorithm as a computer software tool. 5.1. Tightening of the LP Relaxation. When a minimum production requirement is imposed on a certain product, it is sometimes possible to exploit it in order to generate a priori all-integer constraints in the allocation variables Ujki. Although these are redundant, they often accelerate the solution of the MILP by eliminating part of the noninteger feasible region of the fully relaxed LP. This in turn, increases the effectiveness of the branchand-bound approach by reducing the “integrality” gap between the optimal solution of the MILP and its L P relaxation. The appropriate constraints may be generated from the material balance constraints (4) which can simply be written as

where Dk ti - ti is the duration of the operation of stage k. From this, and the given lower bound R Y on R,, we obtain

Constraints on the allocation variables Ujkimay be generated by replacing Dkon the right-hand side of (36) by an upper bound. Obtaining such a bound is considered in the following subsection. 5.1.1. Upper Bounds on Stage Durations. Although Dk is bounded from above by the time horizon, H,it is often possible to obtain even tighter upper bounds by considering the limited availability of equipment in the plant. This is demonstrated below. Using the pair notation (i,k)to denote task i of stage k, let Qj be the set of all tasks (i,k)for which equipment item j is suitable. Since no item of equipment can be allocated to more than one task at a time, we can write the constraints UjkiDk 5 H V i (37) W€Q,

Consider a subset J of the (potentially) available plant

2316 Ind. Eng. Chem. Res., Vol. 30, No. 10, 1991

equipment. Summing the above constraints over all elements of J , we obtain

Now let QJ UjEJQ,,and assume that Aik J for every task ( i , k ) E QJ. The latter condition requires that the equipment set J is complete with respect to the set QJ of tasks for which it is suitable, in the sense that no equipment item outside J can be used for any task in this set. This is, in fact, quite common in practice because of the specialized nature of most types of plant equipment; for instance, J could be the set of all the reactors in the plant with f l J simply being the set of all reaction tasks. Under these conditions, the order of the summations in (38) may be reversed to yield

Constraint 1 ensures that the inner summation of (39) cannot be less than 1, which leads to the simpler constraint

qualities in the binary variables U ' k i from Constraints of the above form is a well-established idea in mixed integer programming (see, e.g., Nemhauser and Wolsey (1988), chapter 2.1). One type of such inequalities is simply: ujhi 2 j E Aih

1 5 1 max5

(46)

Vk,iE

where the rounding up operation I 1 provides the additional tightening. This type of constraint is likely to be most effective when the various equipment items in the set Aik are of identical or similar capacities, thus keeping the value of the denominator relatively low. We note that if the right-hand side of (46) is greater than 1,it may simply be used to replace the right-hand sides of the corresponding allocation constraints (1). Alternatively, all-integer "cover" constraints may be created from (45), as follows: If a set elk h i k exists such that

c

C

Vj

V k , i E pk

Pik

(47)

J€'b-%

Clearly, the above constraint is only worth considering if the cardinality of the set QJ exceeds that of J-otherwise, the upper bound of H on each Dk already implies (40). Thus, for instance, (40) could be useful in a plant involving 3 reactor vessels and 10 reaction tasks, but not vice versa. We also note that the same Dk may appear more than once on the left-hand side of (40) if stage k involves more than one task in Q, Thus, (40) is equivalent to constraints of the form C V k D k 5 H card (J) (41) k

5

[Hcard (J)-

E

k'zk

VkfDpin]/Vk

RFinTk

b' P, k E

2 d'ik

UjkiVj

np,i E pk

(43)

j € h

which implies

E pk

(48)

ti 2

ti, + Tkkt

(49)

ti 2 tf.,+ k

v

(504

v Rlk E AI;

(50b)

and tuI; 2

tit + Tkkt

Provided that TkkT 2 7k.and Tkki 2 tively lead to

t$ 2 t i , +

T&,

the above respec(514

?kit

and ts 2 I;

ti?+ 76kt

(51b)

Comparing (51) to (49), it can be seen that, if Y k k ' = 1, variables Ykk' and yckr can also be fixed to 1 without constraining the problem further. Consequently,the following redundant constraints could be added to the MILP a priori: ykk 2 Y k k t v k' E Ak'l7kk' 2 Tk& (52a) Y&

5.1.3. Obtaining Constraints on the Allocation Variables. The values of Dt'" obtained from (44) may be substituted in (42) to obtain an improved estimate for Dfp" which can then be used in (36) to give a constraint of the form U j k i V j 2 bik v k , i E pk (45) j€.h

RpminTk/c$ikDjpu.

Tkkt

and

n minm

where &k

v k, i

A simple recursive procedure has been derived to generate all nonredundant constraints 48 from constraint 45. 5.2. Implicit Stage Timing Constraints. Consider any MILP solution in which the binary variable Ykk' has a value of 1. Constraint 13 then reduces to

(42)

If the same Dk occurs in more than one such constraint, obviously the minimum of these upper bounds is used. In any case, lower bounds on stage durations are needed in the right-hand side of (42). The problem of obtaining them is considered in the next subsection. 5.1.2. Lower Bounds on Stage Durations. A lower bound, D Y , on the duration of any stage can again be obtained from the material balance constraints. Rearranging (36) gives Dk

2 1

uJki

IE%

This, together with constraints 10 and 11, implies that

where the coefficients Vk are nonnegative integers. From these, upper bounds on individual stage durations may be derived: Dk

then it is clear from (45) that not all U j k i , j E e i k can be zero simultaneously. This implies that

The generation of valid h e -

Ykkt

'd Rlk E AI;;

7kkt

2

Tkk!

(52b)

Although constraints 52 significantly reduce the number of LPs required to solve the MILP using a branch-andbound procedure, the cost per LP is increased due to the larger number of constraints. In practice, much better overall results are obtained by simply enforcing (52) during the branch-and-bound search without adding the constraints explicitly to the formulation. Thus, whenever a variable Ykk' is fixed to 1,all other variables y i p such that k is either k , or a direct or indirect successor of k ; k' is either k', or a direct or indirect predecessor of k'; and Tkk' L 7,3 are also set to 1.

Stage 1

- - Stage2

stage3

Stage4

J Stage6

- Stage7

Stage 8

i Stage 5

Figure 3. Macrostructure of product Prodl. Table I. Processinn Characteristics for Prodl process. mater bal task prereq time, h factof stage stage(s) task type 1 1 reaction 1 9 0.1987 0.1254 11 2 reaction 2 2 1 reaction 1 10 0.0458 3 8 0.0568 4 reaction 2 13 0.0921 8 crystallization 1 13 0.0712 2 3 2 reaction 1 12 0.0712 9 crystallization 1 11 4 3 reaction 1 5 0.0109 7 10 0.0105 crystallization 1 9 0.0234 reaction 2 3 0.0198 crystallization 2 8 8 1 5 reaction 1 8 0.3260 9 0.1070 crystallization 1 9 6 0.0876 6 4,5 reaction 1 10 crystallization 1 10 10 0.0975 7 0.5310 7 6 reaction 1 25 4 0.5280 reaction 2 19 7 8 7 reaction 1 8 0.0312 0.0312 8 crystallization 1 9 9 crystallization 2 7 0.0312

In metric tons of final product per m3 of processing equipment for the task.

5.3. Implementation. The algorithm described in this paper is implemented as an integrated package, CamPlan (Shah and Pantelides, 1990),whose input is expressed in a simple keyword-oriented language. Following input translation and validation, the MILP formulation is derived automatically. The subsequent branch-and-bound procedure employs the MINOS (Murtagh and Saunders, 1985)large-scale linear programming package to solve the relaxed LPs. 6. A Case Study In this section we consider two problems derived from a case study based on the design and planning of an "upstream" pharmaceuticals manufacturing facility. The data used are adapted from an existing industrial process. 6.1. Planning the Production of a Single Product Plant. We consider the production of a single product, Prodl, over a period of approximately 3 months (2196h) via the stages described in Table I. The corresponding macrostructure is illustrated in Figure 3. The interstage cleanout time is assumed to be negligible. To facilitate the definition of the unit-to-task suitabilities, we introduce a notion of "task types", whereby each item of equipment is suitable for all tasks of one or more types. We consider an optimal planning calculation for a given set of equipment items (see Table 11). The details of the optimal solution obtained may be found in Table 111, and the corresponding Gantt chart is shown in Figure 4. The number above or below the horizontal line representing unit usage denotes the stage and task undergoing processing (for instance, 3.2 denotes the second task of the third stage). The maximum amount that can be produced

Table 11. Details of Processing Equipment for Case Study 6.1 unit volume, m3 suitable task types reactor 1 5 1, 5 reactor 2 5 2, 3 reactor 3 7 4,6 reactor 4 7 5 reactor 5 10 6,7, 1 reactor 6 10 7,2 crystallizer 1 7 8,9 crystallizer 2 10 9,10 crystallizer 3 10 8,10 Table 111. Solution Details for Case Study 6.1 (Optimal Production = 11.24 metric tons)' start. finish. equipment stage time, h time, h task allocated 1 0.0 98.6 reaction 1 reactor 1 reactor 5 reaction 2 reactor 6 0.0 638.2 reaction 1 reactor 2 2 reaction 2 reactor 3 crystallization 1 crystallizer 1 crystallizer 3 3 98.6 638.2 reaction 1 reactor 1 reactor 5 crystallization 1 crystallizer 2 4 693.8 1871.7 reaction 1 reactor 1 reactor 4 crystallization 1 crystallizer 2 reaction 2 reactor 2 crystallization 2 crystallizer 1 5 638.2 693.9 reaction 1 reactor 5 crystallization 1 crystallizer 2 reactor 5 6 1730.3 1871.7 reaction 1 crystallization 1 crystallizer 3 7 1795.6 1871.7 reaction 1 reactor 6 reaction 2 reactor 3 8 1871.7 2196.0 reaction 1 reactor 5 crystallization 1 crystallizer 3 crystallization 2 crystallizer 2 'Number of integer variables = 67;number of variables = 116; number of constraints = 203;number of linear programs required = 339;CPU s (SUN SparcStation 1) = 186.

in this plant is 11.24 metric tons. 6.2. A Multiple Product Design Problem. Three products, A, B, and C, are to be produced in the same facility over a time horizon of 1year (8760h). The recipes for the three products are shown in Table IV, their corresponding annual requirements being 14,27and 27 metric ton, respectively. Note that stage 2 of product C includes an optional stabilization task, which, if performed, will allow the product of stage 2 to be stored in unlimited quantities. An interproduct cleanout time of 5 days (120 h) is specified. In addition to the processing equipment requirements described in the table, stages 1 and 5 of product A require compression duties of 0.1 MW per metric ton of final product. The details of both the processing equipment and

2318 Ind. Eng. Chem. Res., Vol. 30, No. 10, 1991 -E

Prodn:

Campaign Schedule

km

xsnlsEw

2.3

11.2

Cost:

I

t

0.0 82

e2

xsnissw

XSTLSERl

REACTOR6

REACTORS

I 5.1

1.1 I

I 0.1

t 6.1

I

3.1

'

REACTOR.(

REACTOR3

RVICToR2

REACTOR1

2.2

w

I

21

I

I

I

I 4 3

I

I

1.1

I

4.1

I

3.1

I

Figure 4. Gantt chart for case study 6.1. Table IV. ReciDes for Products A. B. and C

Table V. Details of Processing Equipment and Utility ~~

proprereq duct stage staae(s1 A

1 2

1

3

2

4

3

5 6

B

1 2

c

4, 5

1

3

2

4

3

1 2 3

1

2

task reaction 1 reaction 2 reaction 1 reaction 2 crystallization reaction 1 crystallization reaction 1 crystallization reaction 2 crystallization reaction 1 crystallization reaction 1 crystallization reaction 1 filtration 1 reaction 1 crystallization reaction 1 crystallization reaction 1 crystallization reaction 1 filtration 1 reaction 1 crystallization dryingb reaction 1 crystallization

process. mater time, bal task h factora tvDe

1 1 1

2 1

1

1 1 1

1

10 11 13 8 10 11 13 11 11 10 8 8 9 10 7 9 8 9 11 11 8 12 10 10 9 9 10 8 11 9

0.1512 0.0836 0.0297 0.0357 0.0719 0.0598 0.0598 0.0088 0.0085 0.0151 0.0144 1.1900 0.1032 0.0657 0.0650 0.0365 0.0332 0.1240 0.0980 0.0781 0.0675 0.0976 0.0698 0.0435 0.0398 0.1980 0.1270 0.93 0.0923 0.0763

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

1 9 2 10 6 9 12 4 8

In metric tons of final product per ms of processing equipment for the task. *Optional stabilization task.

the compressors that may be included in the design are shown in Table V.

Sources for Case Study 6.2 volume, unit m3 reactor 1 5 5 reactor 2 reactor 3 7 reactor 4 7 10 reactor 5 reactor 6 10 crystallizer 1 7 crystallizer 2 10 crystallizer 3 12 10 filter 1 filter 2 7 dryer 15 compression source max dutv. compressor 1 2 compressor 2 3

~~

~~~

fixed cost

suitable task types

1.00 1.00 1.25 1.25 1.50 1.50 1.25 1.50 1.55 1.50 1.25 1.0

1, 5 2, 3 4, 6 5 6, 1 2, 3, 4 7, 8, 9 7, 8, 9 7, 8, 9 10 10 12

MW

fixed cost ~~

1.0 3.0

The optimal solution is shown in Table VI and the corresponding Gantt chart in Figure 5. On the Gantt chart, the first letter beside a horizontal line denotes the product undergoing processing, with the numbers after it denoting stage and task, respectively. The solid shaded sections denote interproduct cleanouts. It should be noted that, of the six potentially available reactor units, only three are actually included in the design. Similarly, only two of the three crystallizers and one of the two filters need to be purchased. It is also beneficial to purchase a drier in order to perform the drying task in stage 2 of product C. If it were not performed, more equipment would be required so that stages 2 and 3 of product C could be performed in parallel. Overall, only seven items of processing equipment are required for the entire facility, despite the fact that the manufacture of product A alone involves 15 processing steps.

Ind. Eng. Chem. Res., Vol. 30, No. 10,1991 2319

Figure 5. Gantt chart for case study 6.2.

Furthermore, only the smaller of the two compressors is required. Inspection of the optimal solution shows that this is achieved by ensuring that the two stages that require refrigeration do not overlap in time. Finally, it is worth pointing out that the computational effort required for the solution of this problem is quite modest, in terms of both the number of nodes that have to be examined during the branch-and-bound procedure, and the resulting CPU time (13 min on an inexpensive desktop workstation). 7. Concluding Remarks The long-term campaign planning and design problem has been considered taking into account a variety of features exhibited by plants that are likely to run in campaign mode. The problem is formulated as a mixed integer linear program (MILP) that simultaneously considers the unitto-task allocations and the production stage timings, so as to optimize one of three possible objectives, namely maximization of production value for given equipment and utility availabilities, maximization of production value in a plant being designed subject to a capital ceiling, or minimization of capital cost subject to minimum production requirements. The costs for both processing and auxiliary equipment (used for providing utilities) may be included in the capital cost where appropriate. The resulting MILP model is augmented, whenever possible, by a set of valid inequalities generated a priori. This serves to reduce the integrality gap between the solutions of the MILP and the fully relaxed LP corresponding to it. Furthermore, implicit timing constraints are enforced during the branch-and-bound search procedure. Overall, these improvements allow realistic industrial problems to be solved without the need for excessive computation.

The formulation presented allows the exploitation of intermediate storage to obtain more economical designs via more efficient use of modular, multipurpose equipment, by determining the unit-to-task allocations (rather than assuming them to be fixed) and by allowing units to be reused during the processing of a product. This latter feature is particularly important when a large number of processing steps are required for the manufacture of one or more products under consideration. A number of limiting assumptions and simplifications were made in order to maintain linearity in the formulation. Thus, operation of parallel equipment was limited to in-phase mode, while constraints on intermediate storage and utility availability were replaced by linear forms that, although always maintaining true feasibility of operation, may overconstrain the problem in some cases. All these deficiencies may be remedied if one is willing to accept the additional burden of solving a nonconvex MINLP instead of a simpler MILP problem (cf. the formulation of out-of-phase parallel unit operation of Papageorgaki and Reklaitis, 1990). It is, however, our belief that, from a practical viewpoint, the major limitation of both our and earlier work in the area arises from the restricted macrostructures and microstructures considered. For instance, macrostructures allowing an intermediate to be shared among different products are quite common in practice, and so are nonlinear microstructures (e.g., involving recycles of material and shared intermediates). The use of finite intermediate storage within the microstructure of each stage could also reduce the required expenditure on processing equipment. These considerations seem to point toward the need for a generalization of the work of Shah et al. (1989) on optimal single campaign scheduling for processes with general microatructurea to cover the multiple campaign case.

2320 Ind. Eng. Chem. Res., Vol. 30, No. 10,1991 Table VI. Solutlon Details for Case Study 6.2 (Capital Cost Reauirement = 10.0 UnitsP prostart. finish. equipment allocated task duct stage time, h time, h A 1 770.4 929.4 reaction 1 reactor 1 reaction 2 reactor 6 2 2506.2 3184.4 reaction 1 reactor 6 reaction 2 reactor 3 crystallization 1 crystallizer 1 3 3184.4 3488.7 reaction 1 reactor 6 crystallization 1 crystallizer 1 4 3488.7 6988.7 reaction 1 reactor 1 crystallization 1 crystallizer 1 reaction 2 reactor 6 crystallization 2 crystallizer 2 5 1725.5 1797.3 reaction 1 reactor 1 crystallization 1 crystallizer 2 6 8505.8 8760.0 reaction 1 reactor 3 crystallization 1 crystallizer 2 B 1 1725.5 2421.8 reaction 1 reactor 6 filtration 1 filter 1 2 7108.7 7411.8 reaction 1 reactor 3 crystallization 1 crystallizer 1 3 7411.8 7792.1 reaction 1 reactor 6 crystallization 1 crystallizer 2 4 792.1 8385.8 reaction 1 reactor 1 crystallization 1 crystallizer 2 c 1 0.0 650.4 reaction 1 reactor 6 filtration 1 filter 1 2 1049.4 1605.5 reaction 1 reactor 3 crystallization 1 crystallizer 2 drying dryer 3 1049.4 1605.5 reaction 1 reactor 6 crystallization 1 crystallizer 1 Number of integer variables = 194;number of variables = 315; number of constraints = 662;number of linear programs required = 156;CPU s (SUN SparcStation 1) = 768.

Nomenclature card ( ) = set cardinality operator C. = cost of unit j = cost of utility source 1 C, = unit cost of utility u Dk = duration of stage k Drru = maximum duration of stage It qp = minimum duration of stage k E, = decision variable denoting whether utility source 1 is purchased E . = decision variable denoting whether unit j is purchased d = time horizon i = standard subscript for processing tasks j = standard subscript for equipment units k = standard subscript for processing stages 1 = standard subscript for utility sources L, = upper limit of availability of utility u M& = maximumnumber of units that may be allocated to task i of stage k = set of obligatory tasks of stage k 9 = set of product stabilization tasks of stage k Qk = production rate of stage k R = amount of final product produced (single product) R = amount of final product p produced (multiple product) Rgh = minimum amount of final product p produced RF- = maximum amount of final product p produced s k = storage capacity for product of stage k t ) = starting time of stage k t k = finishing time of stage k T k = cycle time for stage k T i = cycle time for stage k taking stabilization tasks into account T’ = starting time of production of product p T ! = finishing time of production of product p u = standard subscript for utility

C:

= decision variable denoting whether unit j is allocated to task i of stage k iTjki = length of time during which unit j is allocated to task i of stage k 0 , k i = duration of nonoverlapping operation of unit j performing task i of stage k UjM!i = decision variable denoting whether unit j is allocated to task i of stage k ’and stages k and k’overlap in operation and stage k does not start earlier than stage k’ Vl = maximum potential of utility source 1 V . = volume of unit j i k = decision variable denoting whether stabilization task(s) of stage k are performed Ykk’ = decision variable denoting whether stage k starts after stage k’ has finished Y k k l = decision variable denoting whether stage k starts simultaneously with, or after, stage k A k = set of stages that must immediately precede stage k r k = set of stages that must precede stage k q p = unit value of product p Aik = set of equipment units suitable for task i of stage k Ak = set of equipment units that may be used for stage k Zu= set of sources that may be used to provide utility u I I p = set of stages involved in the production of product p T~ = processing time of task i $ik = material balance factor for task i of stage k a! = set of weak predecessors of stage p ap= set of strong predecessors of stage p Wku = fixed amount of utility u required by stage k per unit time i&, = variable amount of utility u required by stage k per unit time f$k = set of tasks of stage k for which unit j is suitable Qj = set of all tasks for which unit j is suitable U,ki

Appendix A. Linearization of Storage Constraints. The nonlinear form of the storage constraints for the overlapping case is ski 2 - MYkki (A.1)

- %)e2 - M Y k k ‘ (A.2) where dl = ti - ti,and O2 = ti, - ti (see section 3.4). sk’

2

Qdi

(QkJ

First, we simplify (A.2) by noting that 6,) =

Qkt(e1

Qkr(tfrt-

tit) = R

(A.3)

and that

- ti) = Q k ( t f r - ti) % ( t i p - ti) (A.4) Now, the fmt term on the rightchand side of (A.4) is simply R, which together with (A.3) implies that (A.2) can be =

Qk(t6’

written as ski

2

-

- MYkki

(A.2’)

The production rates are related to the overall final product amount, R, through constraints:

R = Q k ( t f r - t i ) = &(ti,- tit)

(A.5)

which are nonlinear, and are bounded from above by

Thus a valid nonlinear formulation would consist of constraints A.l, A.2’, A.5, and A.6. However, if one wishes to avoid the nonlinearity, one may completely eliminate the variables Qk from (A.l) and (A.2’) by replacing them by the right-hand side of any appropriate constraint of the form (A.6). Thus, for instance, (A.2’) becomes

Ind. Eng. Chem. Res., Vol. 30, No. 10,1991 2321

for some i* E P k . Since the constraints A.6 bound the production rates from above, and the coefficients of Qkl and Qk in (A.l) and (A.2’) are positive whenever the constraints are active (i-e., when Y k k ‘ = l),this substitution at least maintains true feasibility of the solution with respect to the intermediate storage constrainta. On the other hand, optimality may be lost if the approximation greatly overestimates the actual production rate. For this reason, we select the task i* which minimizes the quantity ( $ i k / Tk)CjEbfiVj-

I t may appear that even the above substitution is not sufficient to render the formulation totally linear because of the nonlinear product ( t i - t:,)u’k’ in (A.7). However, any nonlinear product of the form where 0 is a continuous variable may be replaced by a new nonnegative variable U j k i defined via the linear constraint

ti,)$

6

- hf(1 - U j k i . )

5

(A.8)

Qjki*

with (A.7) being simplified to

We note that, if u j k i ; = 1 the above ensures that UjJjkit I 6, which has the desired effect on the right-hand side of (A.7). B. Linearization of Utility Constraints. The basic utility constraints (20) also involve the production rates Qk which are related nonlinearly to the production amount R via (A.5). As in the case of the intermediate storage constraints, variables Qk may be eliminated in an approximate fashion by replacing them with the right-hand side of one of the constraints of type (A.6). Once again, this guarantees the feasibility of the obtained solution, while the risk of losing optimality may be reduced by careful selection of the substitution to be utilized, as outlined above. Although the substitution yields nonlinear terms of the form: (Ykk’

- Ykk’) Ujk’i*

they can be replaced by new variables through the linear constraints Ojljkk’i.

2

Ykkt

- Ykk’

(B.1) UjJjkk’i

+ Ujk’ir - 1

defined

(B.2)

Literature Cited Baker, T. E. A Branch and Bound Network Algorithm for Interactive Process Scheduling. Math. h o g . Study 1981,15,43-57. Birewar, D. B.; Grossmann, I. E. Simultaneoua Production Planning and Scheduling in Multiproduct Batch Plants. Ind. Eng. Chem. Res. 1990,29,570-580. Bitran, G.R.; Hax, A. C. On the Design of Hierarchical Production Planning Systems. Decision Sci. 1978,28,28-55. CerdB, J.; Vicente, M.; GutiBrrez, J. M.; Esplugas, S.; Mata, J. A New Methodology for Optimal Design and Production Schedule of Multipurpose Batch Plants. Ind. Eng. Chem. Res. 1989, 28, 988-998. Coulman, C. A. Algorithm for Optimal Scheduling and a Revised Formulation of Batch Plant Design. Ind. Eng. Chem. Process Des. Dev. 1989,28,553-556. Eepuiia, A.; Puigjaner, L. Solving the Production Planning Problem for Parallel Multiproduct Plants. Chem. Eng. Res. Des. 1989,67, 589-592. Faqir, N. M.; Karimi, I. A. Optimal Design of Batch Plants with Single Production Routes. Presented ‘at the AIChE Annual Meeting, Washington, DC, 1988.

Faqir, N. M.; Karimi, I. A. Optimal Design of Batch Plants with Multiple Production Routes. Presented at FOCAPD, Snowmass, c o , 1989. Grossmann, 1. E.; Sargent, R. W. H. Optimum Design of Multipurpose Chemical Plants. Ind. Eng. Chem. Process Des. Dev. 1979, 18,343-348. Imai, M.; Nishida, N. New Procedure Generating Suboptimal Configurations for Optimal Design of Multipurpose Batch Plants. Ind. Eng. Chem. Process Des. Dev. 1984,23,845-847. Karimi, I. A,; Reklaitis, G. V. Deterministic Variability Analysis for Intermediate Storage in Non-Continuous Processes. AIChE J. 1985,31,1516-1537: Kirlly, L. M.; Friedler, F.; Szoboszlai, L. Optimal Design of MultiDurDose Batch Plants. ComDut. Chem. Enn. 1989,13,527-534. Kind&, E.; Pantelides, C. C.; Shgent, R. W. H.A General Algorithm for Scheduling Batch Operations. Proc. Int. Symp. Process Syst. Eng. 1988,3rd,62-75. Ku, H.;Rajagopalan, D.; Karimi, I. A. Scheduling in Batch Processes. Chem. Eng. Prog. 1987,April, 35-45. LBzaro, M.; Espuiia, A.; Puigjaner, L. A Comprehensive Approach to Production Planning in Multipurpose Batch Plants. Comput. Chem. Eng. 1989,13, 1031-1047. Mauderli, A.; Rippin, D. W. T. Production Planning and Scheduling of MUltiDUrDOSe Batch Chemical Plants. Comput. Chem. Ena. 1979,3,i99-206. Mauderli, A.; Rippin, D. W. T. Scheduling Production in Multipurpose Batch Plants: the Batchman Program. Chem. Eng. Prog. 1980,4,37-45. Modi, A. K.; Karimi, I. A. Design of Multiproduct Batch Processes with Finite Intermediate Storage. Comput. Chem. Eng. 1989,13, 127-140. Murtagh, B. A.; Saunders, M. A. “MINOS 5.0 User’s Guide”;Technical Report SOL 83-20,Stanford University, 1983. Nemhauser, G. L.; Wolsey, L. A. Integer and Combinatorial Optimisation; Wiley: New York, 1988. Papageorgaki, S.; Reklaitis, G. V. Optimal Design of Multipurpose Batch Plants. Ind. Eng. Chem. Res. 1990,29,2054-2062. Parakrama, R. Improving Batch Processes. Chem. Eng. 1985,Sept, 24-25. Reklaitis, G.V. Review of Scheduling of Process Operations. AIChE Symp. Ser. 1982,78, 119-133. Reklaitis, G. V. Progress and Issues in Computer Aided Batch Process Design. Proc. Int. Conf. Found. Comput.-Aided Process Des. 1989,3rd,241-276. Rippin, D. W. T. Simulation of Single- and Multiproduct Batch Chemical Plants for Optimal Design and Operation. Comput. Chem. Eng. 1983a, 7,137-156. Rippin, D. W. T. Design and Operation of Multiproduct and Multipurpose Batch Chemical Plants. Comput. Chem. Eng. 1983b, 7,463-471. Rippin, D. W. T. Computer-Aided Design A d Scheduling for Batch Processes. A Review of Current Status and Future Prospects. Inst. Chem. Eng. Symp. Ser. 1985,94, 3.66-3.71. Shah, N.; Pantelides, C. C. CamPlan User Manual, Technical Report, Centre for Process Systems Engineering, College, - Imperial London, 1990. Shah, N.; Pantelides, C. C.; Sargent, R. W. H. An Algorithm for ODtimal Scheduling of Lone-Term Batch Process CamDaiens. Piesented at the A k h E Annual Meeting, San Franciscd, 1689. Suhami, I.; Mah, R. S. H.Optimal Design of Multipurpose Batch Plants. Ind. Eng. Chem. Process Des. Deu. 1982,21, 94-100. Vaselenak, J.A,; Grossmann, I. E.; Westerberg, A. W. An Embedding Formulation for the Optimal Scheduling and Design of Multipurpose Batch Plants. Ind. Eng. Chem. Process Des. Dev. 1987, 26, 139-148. Wellons, M. C.; Reklaitis, G. V. Scheduling of Multipurpose Batch Chemical Plants. 1. Formation of Single-Product Campaigns. Ind. Eng. Chem. Res. 1991a,30,671-688. Wellons, M. C.; Reklaitis, G. V. Scheduling of Multipurpose Batch Chemical Plants. 2. Multiple-Product Campaign Formulation and Production Planning. Ind. Eng. Chem. Res. 1991b, 30, 688-705. Williams, H.P. Model Building in Mathematical Programming; Wiley: Chichester, 1990.

Received f o r reuiew December 20, 1990 Revised manuscript receiued May 23, 1991 Accepted June 20, 1991