Scheduling of Multipurpose Batch

Feb 8, 1996 - A general mathematical formulation for multiple campaign planning/scheduling of multipurpose batch/semicontinuous plants is presented. I...
8 downloads 19 Views 663KB Size
488

Ind. Eng. Chem. Res. 1996, 35, 488-509

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

A general mathematical formulation for multiple campaign planning/scheduling of multipurpose batch/semicontinuous plants is presented. In contrast to sequential approaches, a single-level formulation is developed encompassing both overall planning considerations pertaining to the campaign structure and scheduling constraints describing the detailed operation of the plant during each campaign. The problem involves the simultaneous determination of the campaigns (i.e., duration and constituent products), and for every campaign the unit-task allocations, the task timings, and the flow of material through the plant. A cyclic operating schedule is repeated at a fixed frequency within each campaign, thus simplifying significantly the management and control of the plant operation. The problem is formulated as a single-level mixed integer linear programming model. Issues pertaining to its solution are considered in the companion paper. 1. Introduction Although continuous operation is the dominant mode of manufacture for products produced in large quantities (e.g., commodity chemicals), batch and semicontinuous operations are suitable for plants manufacturing relatively large numbers of low-volume, high-value-added products (e.g., pharmaceuticals) which compete for scarce common resources over a given horizon of interest. The past decade has seen a renewed interest in the batch mode of operation in the chemical industry (Parakrama, 1985; Hasebe and Hashimoto, 1992), particularly because of the commercial environment which has become more uncertain, complex, and competitive. Typically, the need for product customization and diversification has led to a larger number of end products being produced in common manufacturing facilities. Processing recipes for the manufacture of various products as well as modern equipment and resources in general are becoming more flexible and complex, thus complicating plant management and control. Furthermore, the uncertainty with respect to sudden changes of current outstanding orders, market economics, and resource availabilities requires rapid responses. Usually, batch plants operate with considerable flexibility, accommodating large numbers of products using the same resources. Depending on the production routes, batch plants are distinguished into multiproduct and multipurpose ones. In the former case, all the products are manufactured following the same production route while in the latter, more general case, products may follow different routes through the plant. Depending on the business environment as well as on the availability of accurate information concerning future demands for all potential products being produced, batch/semicontinuous plants usually operate in one of two distinct modes. In the absence of reliable, long-term information, plants tend to be operated in a short-term mode, with the production plan being largely determined by the currently outstanding orders. This usually implies relatively short planning horizons (typi* Author to whom all correspondence should be addressed. FAX: +44-171-594-6606. E-mail: [email protected].

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

cally ranging from one to a few weeks). The pattern of operations in any schedule is usually irregular with production being different from one planning interval to the next due to the varying nature of outstanding orders. If, on the other hand, reliable long-term demand predictions are available, it is often preferable to partition the planning horizon into a number of relatively long periods of time (“campaigns”), each dedicated to the production of a single product or a subset of products. This campaign mode operation may result in important benefits such as minimizing the number and costs of changeovers when switching the production from one product to another. The complexity of management and control of the plant operation is further reduced by operating the plant in a more regular fashion, such as in a cyclic mode within each campaign, with the same pattern of operations being repeated at a constant frequency. Typical campaign lengths are from a few weeks to several months, with cycle times ranging from a few hours to a few days. The campaign mode of operation is often used for the manufacture of “generic” materials (e.g., base pharmaceuticals) which are produced in relatively large amounts and are then used as feedstocks for downstream processes producing various more specialized final products. This paper and its companion (Papageorgiou and Pantelides, 1995) are concerned with the derivation of optimal production plans for multipurpose plants operating in campaign mode. The rest of this section describes the general characteristics of batch/semicontinuous plants, and also defines the overall problem of campaign planning/scheduling. A review of the relevant literature on campaign planning is presented in section 2. Section 3 clarifies the underlying assumptions of the mathematical formulation for the campaign planning/ scheduling problem, which is described in detail in sections 4 and 5 pertaining to planning (campaign structure, durations) and scheduling (detailed operating schedules) considerations, respectively. The objective function for this complex optimization problem is discussed in section 6. Finally, section 7 summarizes the mixed integer linear programming formulation, while some concluding remarks are made in section 8. © 1996 American Chemical Society

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

Figure 1. State-task network process representation.

1.1. Representation of Batch/Semicontinuous Processes. One key feature of the approach used in this paper is the use of the state-task network (STN) process representation (Figure 1) introduced by Kondili et al. (1988, 1993). STNs are directed graphs, comprising two types of node, namely state and task nodes. State nodes (denoted by circles) correspond to feeds, intermediates, and final products, while task nodes (denoted by rectangles) represent physicochemical operations transforming material from one type (task feeds) to another (task products). In contrast to conventional flowsheets, the STN representation describes bacth/semicontinuous recipes unambiguously, thus accommodating complex processes with material recycles, shared intermediates, multiple processing routes to the same type of material, as well as mixing and splitting of individual batches. The STN framework makes the following simplifying assumptions: no task preemption is allowed (i.e., no task may be interrupted once it has started); the task processing times are fixed and known a priori; different output states of the same task may have different processing times; the material is transferred instantaneously from states to tasks and vice versa; and all data are deterministic and fixed over the planning horizon of interest. 1.2. Resource Characterization. The STN representation is concerned only with process recipes and does not involve any information associated with the plant resources. In this context, resources include processing and storage equipment, as well as the available utilities. In general, all available resources are flexible and multipurpose. Their specific characteristics are outlined below. Processing equipment is suitable for performing various processing tasks. Each item is characterized by its nominal capacity, but may have different utilization factors for different tasks due to safety and/or other operating bounds. For example, a mixer requires a minimum batch size to ensure that its impeller will be covered, and a reactor with a heating or cooling coil will have operating bounds on the volume of its contents in order to ensure effective temperature control. Apart from performing tasks, each item of equipment may also be suitable for storing various states of material. Although there may often be no clear distinction between processing and storage equipment, the latter usually refers to items that are suitable only for storing processing states over certain periods of time. On the basis of the way the storage resources are used for storing various states, we can distinguish three storage modes, namely dedicated, multipurpose, and shared storage. In the first case, a storage tank is suitable for storing exactly one state. The multipurpose mode refers to cases where a storage tank can store more than one state but at most one at any given time. The shared

Figure 2. STN for multiproduct plant.

storage mode refers to the possibility of storing various products within the same storage resource (e.g., warehouses) where more than one state can share the same facility at the same time as long as their cumulative level does not exceed the overall capacity of the resource. Finally, the available utilities of the plant (e.g., steam, cooling water, manpower) may have multipurpose functionality, being used by more than one processing task. The amount of a utility consumed by a task may be constant, or a function of the batch size. Also, the availability and cost of the utility may vary with time. 1.3. Campaign Operation for Multipurpose Plants. Campaign operation is particularly appropriate for plants operating under stable demand patterns over long planning horizons. The basic advantages of campaign operation are lower inventory costs, fewer changeovers, and improved plant operability. 1.3.1. Motivation for Campaign Operation. In order to illustrate why the campaign mode of operation is necessary or desirable in certain cases, we consider a simple multiproduct plant manufacturing three products, Prod1, Prod2, and Prod3, from three feedstocks, Feed1, Feed2, and Feed3, respectively. All the products are made via the following processing steps: (1) reaction, a batch task which transforms feedstocks to intermediates after a processing time of 2 h; (2) filtering, a batch task that starts immediately after the reaction task, resulting in final products from intermediates after 1 h. The corresponding STN is illustrated in Figure 2. Minimum production requirements of 400, 400, and 800 tonnes (≡metric tons) are imposed on Prod1, Prod2, and Prod3, respectively, at the end of a 3-month planning horizon. Unlimited market demand exists for all the products, each of which is assumed to have a unit price. The plant processing equipment comprises a single 5-tonne reactor suitable for performing all reaction tasks, and two 3-tonne filters for performing all filtering tasks. A 4 h cleaning task is required when switching production on the reactor. However, no cleaning is necessary for the filters. There is no storage capacity for intermediates, and the plant operates in “zero-wait” mode. Also, unlimited storage is assumed for all feedstocks and final products.

490

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

Figure 3. Single-campaign Gantt chart.

Figure 4. Three-campaign production plan.

We assume that the plant will operate in a cyclic mode with a 24 h cycle time. A production plan along with detailed operating schedules is required to maximize the production amounts subject to fulfilling the minimum production requirements. First, we derive a periodic schedule for a single campaign spanning the whole planning horizon, with all three products being manufactured in each cycle. The optimal operating schedule is shown in Figure 3. This Gantt chart represents unit-task allocations as horizontal solid line segments. The number above each segment denotes the task (see key in right hand side of Figure 3) while the number below each segment denotes the corresponding batch size. Note that task 7 denotes the reactor cleaning operation. Due to the cyclic nature of the schedule, some processing tasks may span successive cycles, starting in one cycle and extending across the boundary into the next one (the so-called “wraparound” effect). This is shown as a dashed line in Figure 3. The above production plan leads to an objective function of 2700 relative cost units (rcu). It can be seen from Figure 3 that, as expected, three cleaning tasks are required per cycle in order to switch production between different products.

Due to the relatively large durations of the cleaning operations, a multiple campaign production plan may be more appropriate in this case. More specifically, we consider three campaigns, each manufacturing only one of the above products. Furthermore, we assume that when switching the production from one campaign to another, an intercampaign shutdown of 1 day is required for plant maintenance and reconfiguration. In this case, the final production plan involves three campaigns with durations 768, 576, and 768 h, respectively. Two days are spent for intercampaign changeovers as shown in Figure 4. By operating the plant in multiple campaign fashion, the objective function increases to the value of 5213 rcu, leading to an improvement of 93% due to elimination of cleaning times within each campaign, leaving only a short downtime of 2 days duration between successive campaigns. The improved resource utilization for the first campaign manufacturing Prod1 is illustrated in Figure 5. Similar schedules are derived for the other two campaigns. 1.3.2. Product Demands, Raw Material Supplies, and Inventories. An important aspect of the operation of any plant is its interaction with the material flows from suppliers and to customers. Deliv-

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

Figure 5. Gantt chart for campaign 1.

eries and receipts of different types of material (raw materials, intermediates, and products) may be point events, taking place at the end of the time horizon, or at distinct points during it. Alternatively, the product demand and the raw material supply may be expressed in terms of continuous, possibly seasonally varying, rates. Typically, point demands may correspond to one or more specific orders, while continuous demand rates may express market predictions averaged over a large number of potential customers. In practice, a plant may be faced with a combination of pointwise and continuous product demands and raw material supplies. This is illustrated in Figure 6 for a plant manufacturing two end products, D and E, from three raw materials, A, B and C, over a horizon of 1 year. It can be seen that raw materials are supplied in two large consignments at the beginning of January and June. There are three pointwise product deliveries as well as continuous demands for these products that vary seasonally. Long campaigns often require large amounts of stocks to be held for relatively long periods of time before being used for downstream processing or sold. Inventory considerations are therefore an important aspect of plant operation. Figure 7 shows a typical inventory profile for a certain product over four campaigns. We can see that this is consumed during the first and fourth campaigns, while some amount is produced in the third campaign. Furthermore, discrete changes occur after the first and third campaigns due to discrete deliveries to customers. Generally, the solution of every planning problem is characterized by trade-offs between the costs of inventories and the costs of intertask and intercampaign changeovers.

1.3.3. The Campaign Planning/Scheduling Problem. The general campaign planning problem may be defined as follows: Given the time horizon of interest, the product recipes in terms of a STN and all its associated resource data, the maximum number of campaigns, and raw material supply and product demand data, Determine the number of active campaigns and, for each campaign, its duration, the part of the process which is active over it, and a cyclic operating schedule So as to optimize a performance criterion (e.g., the maximization of the combined production value). 2. Review of Literature on Campaign Planning/ Scheduling Reklaitis (1991) identifies the following three basic components of a general solution to the planning/ scheduling problem of multipurpose batch plants: a production plan which involves the active campaigns and their time frames; the assignment of all the resources to the processing steps; and the detailed operating schedule (i.e., the task timings, the batch sizes, and the flow of material through the plant and the resource utilization profiles). As expected, the problem resulting from considering all three aspects together is of high dimensionality and complexity. Most of the published work involves simplifying assumptions, such as zero-wait task operation, serial processing networks, and fixed equipment/task allocation, in order to render the above problem tractable. Comprehensive reviews of the literature on batch/semicontinuous plants have been given by Reklaitis (1991, 1992) and Rippin (1993).

492

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

Figure 6. Product demands and raw material supplies.

Figure 7. Inventory variations.

Here, we consider only the literature on campaign planning of direct relevance to the problem described in section 1.3.3. We distinguish between two different classes of approach, namely sequential (sometimes also referred to as “hierarchical”) and simultaneous. These are reviewed in the next two subsections. 2.1. Sequential Approaches. A number of algorithms for the optimal campaign planning problem have been presented. Mauderli and Rippin (1979) studied the combined production planning and scheduling problem developing a sequential procedure suitable for serial processing networks operated in a zero-wait mode. First, they consider each product individually, generating alternative production lines of a single product by assembling the available processing equipment in groups so as to attain maximum path capacity. This is achieved by using equipment items in parallel, first in phase and then out of phase, and hence removing capacity and timing stage bottlenecks. Two or more production lines for the same or different products can then be combined to construct alternative campaign candidates provided that they use disjoint subsets of the available equipment. A linear programming (LP) based screening procedure is used to determine a set of dominant campaigns. Finally, the production plan is generated by solving a LP or mixed integer programming (MILP) problem, allocating the available production time to the

various dominant campaigns for a given set of production requirements. The generation of the alternative production lines in the Mauderli and Rippin (1979) algorithm is based on an exhaustive enumeration procedure. A more efficient generation procedure is described by Wellons and Reklaitis (1989a), who formulated the optimal scheduling of a single-product production line as a mixed integer nonlinear programming (MINLP) model. They consider serial processing networks with zero-wait (ZW) and no intermediate storage (NIS) policies between different processing steps. Strict batch identity is preserved, and hence aggregation of different batches and/or splitting of a specific batch are not allowed. Equipment is prearranged into groups operating in parallel and strictly out of phase, where the items belonging to the same group must operate in phase. Each group can be used at most once in each cycle in a fixed order, and each equipment item is preassigned to a given stage. The objective of the problem is the maximization of the processing rate of the production line. The resulting MINLP model is nonconvex, and this, together with the large number of integer variables involved in the formulation, renders the model difficult to solve. Additionally, the proposed model exhibits high degeneracy as many path assignments result in equivalent schedules. The elimination of this degeneracy was consid-

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

ered by Wellons and Reklaitis (1989b), who identified a set of dominant unique path sequences which can be used to improve the solution efficiency of their original formulation. A further improvement from the single-product production line scheduling to the single-product-campaign formation problem has been presented by Wellons and Reklaitis (1991a). This extends the previous work (Wellons and Reklaitis, 1989a,b) to include the automatic assignment of different equipment items to groups, and also the assignment of these groups to production stages. A decomposition scheme was proposed for the solution of the resulting MINLP. This reduces both the integrality gap and the computational cost, and eliminates degeneracy. The above work was extended by Wellons and Reklaitis (1991b) to the multiple-product-campaign formation problem for multipurpose batch plants. They present a procedure to identify the dominant set of multiple-product campaigns by using a linear programming procedure based on a noninferior set estimation (NISE) method. Finally, a multiperiod planning model is proposed, allocating the production time among the dominant campaigns while considering simultaneously profit from sales and costs of equipment changeover, inventory holding, and campaign setups. Papageorgiou and Pantelides (1992) presented a sequential approach attempting to exploit better the inherent flexibility of multipurpose plants by removing various restrictions regarding the intermediate storage policies between successive processing steps, the utilization of multiple equipment items in parallel, and also the use of the same item of equipment for more than one task within the same campaign. A three-step procedure is proposed. First, a feasible solution to the campaign planning problem subject to restrictive assumptions is obtained to determine the number of campaigns and the active parts of the original processing network involved within each campaign. Second, the production rate in each campaign is improved by removing these assumptions and applying the cyclic scheduling algorithm of Shah et al. (1993a). Finally, the timing of the campaigns is revised to take advantage of the improved production rates (using, for instance, the final stage of the Mauderli and Rippin (1979) algorithm). An interesting feature of this approach is that any existing campaign planning algorithm can be used for its first step (e.g., Mauderli and Rippin, 1979; Wellons and Reklaitis, 1991b; Shah and Pantelides, 1991). 2.2. Simultaneous Approaches. The algorithms described above are sequential in nature, and therefore relatively easy to implement given the reduction in the size of the problem solved at every step. On the other hand, it is generally difficult to relate the exact objective for each individual step in the hierarchy to the overall campaign and planning objective function, and therefore it is very difficult to assess the quality of the final solution obtained. Shah and Pantelides (1991) proposed a single-level mathematical (MILP) formulation for the simultaneous campaign formation and planning problem. Their algorithm determines simultaneously the number and the length of the campaigns and the products and/or stable intermediates manufactured within each campaign. They consider serial processing networks operating in a mixed zero-wait/unlimited intermediate storage (ZW/UIS) mode, and nonidentical parallel equipment items operating in phase. Limited availability of utili-

ties and storage capacity for stable intermediates being stored between campaigns may also be taken into account. An approach suitable for general processing networks with general equipment utilization that takes into account the possibly limited availability of resources (e.g., utilities, manpower, storage capacity) along with other technical and contractual constraints is described by Shah et al. (1993a). However, their approach is suitable only for determining cyclic operating schedules within a single campaign, within which all the products are manufactured. Voudouris and Grossmann (1993) extended the work originally presented by Birewar and Grossmann (1989a,b, 1990) to campaign planning problems for multiproduct plants. They introduced cyclic scheduling, location and sizing of intermediate storage, and inventory considerations along with linearization schemes transforming the resulting mixed integer nonlinear programming (MINLP) formulations into mixed integer linear programming (MILP) models. Tsirukis et al. (1993) considered the optimal operation of multipurpose plants operating in campaign mode to fulfill outstanding orders. Resource constraints are explicitly taken into account. The problem is formulated as a mixed integer nonlinear model. To deal with the complexity, nonconvexity, and nonlinearity of the formulation, more efficient formulations along with a problem-specific two-level decomposition strategy were proposed. First, a campaign formation subproblem (CFS) is solved where all customer orders are assigned to campaigns. Given the campaign structure, at the second level an equipment and resource assignment subproblem (ERAS) allocates all the equipment items and resources to production tasks. Both subproblems are formulated as MINLP models. Finally, Tsirukis and Reklaitis (1993a,b) proposed the use of feature extraction strategies for the efficient solution of large scale MINLP problems in order to direct the optimization methods toward the most promising regions of the optimal problem domain. Although the work reviewed in this section constitutes significant progress for the campaign planning problem, a number of restrictive assumptions are adopted by all of these formulations. More specifically, the following assumptions are usually made: 1. Serial processing networks where every processing step has at most one successor and/or predecessor step are assumed. Multiple production routes, or material recycles are not taken into account. 2. Limited flexibility in the utilization of processing equipment is also assumed. Each item of processing equipment can be assigned to at most one processing step during any single campaign. Also, all equipment items assigned to the same processing step operate in a fixed in-phase or out-of-phase manner throughout the campaign. 3. Various operational limitations are imposed (e.g., ZW, or NIS storage policies, no batch splitting/mixing). 3. Basis of the Mathematical Formulation This section describes the basic characteristics and major assumptions underlying our mathematical formulation. All product recipes are given in terms of STNs. Resource characteristics and functionalities, and production requirements are also assumed to be known.

494

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

Figure 8. Point events and campaigns.

We assume a maximum potential number of campaigns, N, not all of which need be active in the final solution. The number of active campaigns and the processing tasks which are involved within each campaign are to be determined by the optimization algorithm. We assume cyclic plant operation with a given cycle time within each campaign. The formulation aims to determine a detailed cyclic operating schedule based on the discrete time representation of Kondili et al. (1993) and Shah et al. (1993a,b). We ignore startup and shutdown periods in each campaign assuming that they are negligible compared to the campaign length. The latter, comprising an integer number of cycles, is to be determined. Product demands may be incurred either at the end of or during the planning horizon. Demands during the horizon may either fall due at distinct points or be expressed as continuous rates of demand. Such rates may be different for different parts of the horizon. A similar set of assumptions is adopted for raw material supplies during the horizon of interest. Changes in resource availability and/or prices may occur at a set of discrete points over the horizon. All data are assumed to be deterministic. 4. Mathematical Formulation: Campaign Planning Constraints We present the mathematical formulation in two parts. The first refers to campaign planning constraints while the second deals with the constraints describing a cycle in the cyclic operating schedule of each campaign. As has already been mentioned, a number of discrete events (e.g., product deliveries, changes in utility availability, and/or price) may take place during the horizon. We sort the prescribed NE distinct times (τµ, µ ) 1, ..., NE) at which these events occur in ascending order such that τ1 < τ2 ... < τNE and require each one of them to coincide with an intercampaign boundary as shown in Figure 8. As nothing prevents two successive campaigns from being identical, this assumption is not restrictive provided a sufficiently large number of campaigns is considered. A number of parameters are associated with the campaign planning problem. These are listed below; the precise meaning of some of them will become clear later in this section. The time horizon of interest is denoted by H. Campaign c is characterized by Dmin, Dmax: minimum and maximum acceptable campaign durations Tc: cycle time of campaign c Ψ: maximum acceptable campaign complexity

Task i is characterized by Ki: set of equipment times that are suitable for task i ψi: complexity factor associated with task i State s is characterized by Cs: maximum dedicated storage capacity for state s Unit j is characterized by Ij: set of tasks for which unit j is suitable nj: the maximum number of tasks for which unit j can be used in any single campaign Utility u is characterized by Umax uc : maximum availability of utility u over campaign c Warehouse w is characterized by Sw: set of states that can be stored in warehouse w Cw: total capacity of warehouse w ωws: amount of storage capacity occupied by a unit amount of state s stored in warehouse w We postulate a maximum number, N, of campaigns to be considered. The formulation is based on the following key variables characterizing each campaign c ) 1, ..., N: Binary Variables Xc ) 1 if campaign c is included in the plan; 0 otherwise Yci ) 1 if task i is active during campaign c; 0 otherwise Yijc ) 1 if task i is performed in unit j during campaign c; 0 otherwise Λµc ) 1 if the end of campaign c coincides with distinct point µ; 0 otherwise λic ) 1 if task i ether occurs in both campaigns c and c + 1 or does not occur in either of them; 0 otherwise Integer Variables nc ) number of cycles in campaign c Continuous Variables ∆Ssc ) net accumulation of state s within each cycle in campaign c BSIsc ) amount of material stored in state s at the start of campaign c BSFsc ) amount of material stored in state s at the end of campaign c before any discrete deliveries and receipts BSF′ sc ) amount of material stored in state s at the end of campaign c after any discrete deliveries and receipts Rsµ ) amount of material in state s to be received from external suppliers at time τµ (negative values indicate deliveries to external customers) rsc ) rate of continuous receipt of material s during campaign c (negative values indicate deliveries) tc ) starting time of campaign c Θc ) duration of intercampaign changeover between campaigns c and c + 1 With the exception of ∆Ssc, Rsµ, and rsc, all variables are assumed to be nonnegative.

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

4.1. Campaign Timing Constraints. The campaign duration is equal to the number of cycles within each campaign nc multiplied by the cycle time Tc. This duration must lie within specified bounds if the campaign is included in the final plan (i.e., Xc ) 1); otherwise it must be 0:

∀c

DminXc e ncTc e DmaxXc

(1)

The starting times of the active campaigns are governed by the following constraints:

∀ c ) 1, ..., N - 1 (2a)

tc + ncTc + Θc e tc+1

tN + nNTN e H

(2b)

where Θc is the duration of the intercampaign changeover needed for reconfiguring the plant between campaigns c and c + 1. This may be constant, or it may depend on the degree of similarity between two consecutive campaigns. Also, if campaign c + 1 is inactive, then no changeover is incurred (i.e., Θc ) 0). We return to a more detailed consideration of intercampaign changeovers in section 4.8. For reasons that will become apparent later (see section 4.5.1), the general integer variable nc must be converted to a set of binary variables. If nmax is an c upper bound on nc, then the latter can be substituted by the expression rc-1

nc )

nmin c Xc

2 Lic ∑ i)0 i

+

∀c

(3)

where the Lic are 0-1 variables, nmin ) Dmin/Tc, and c min rc-1 e (nmax - nmin) < rc ) log2(nmax n ) + 1, i.e., 2 c c c c 2rc. Thus the Lic variables provide a binary encoding of the general integer nc. It is worth noting at this point that in typical industrial problems, nc can be of the order of hundreds or thousands. Therefore constraint 3 seeks to achieve its binary encoding in terms of the minimum number of binary variables. However, there also exist other encodings which may have certain advantages as far as the resulting mathematical formulation is concerned. This important issue is considered in section 2.1 of the companion paper (Papageorgiou and Pantelides, 1995). 4.2. Campaign Activity Constraints. The actual number of campaigns in the optimal schedule will often be smaller than the maximum allowed. In such cases, there will be significant degeneracy in the solution as the inactive campaigns can be positioned anywhere in the horizon without affecting the objective function value. This can be avoided by forcing all inactive campaigns to the end of the horizon:

Xc+1 e Xc

∀ c ) 1, ..., N - 1

(4)

These constraints ensure that a campaign can be active only if all the previous ones are also active. No task i should be included in campaign c if that campaign is not active. This can be written as

Yci e Xc

∀ c, i

(5a)

Also, if a task is not included in a campaign, then no equipment item should be used for it:

Ycij e Yci

∀ c, i, j ∈ Ki

(5b)

4.3. Plant Operability and Safety Constraints. Various constraints reflecting plant operability and safety can be imposed on the desired campaign plan. For instance, if a set Ξ of tasks are mutually exclusive over the same campaign (e.g., in order to eliminate any cross-contamination risks), we can simply write

Yci e Xc ∑ i∈Ξ

∀c

(6)

This ensures that, if campaign c is active, then at most one task in Ξ can take place in it. Operational complexity may be limited by characterizing each task i by a measure of complexity ψi, and then imposing an upper limit Ψ on the complexity of any campaign c:

∑i ψiYci e ΨXc

∀c

(7)

The above operability and safety constraints are concerned with whether or not a certain task i is active over a certain campaign c. In some cases, we may have further constraints on the utilization of specific equipment items j. For instance, the imposition of an upper bound nj on the number of different tasks for which an item j can be used during any single campaign can simply be written as

Ycij e njXc ∑ i∈I

∀ c, j

(8)

j

In practice, the coefficients ψi, Ψ, and nj will most often reflect the preferences of the plant operators rather than hard technical constraints. For instance, by setting ψi ) 1 for tasks i that are somehow perceived as “difficult”, the coefficient Ψ becomes an upper bound on the number of such tasks that can be included in any single campaign. Also, by specifying nj ) 1, we can revert to the common “unique equipment assignment” case (Reklaitis, 1991) in which each piece of equipment is used for at most one task in any campaign. 4.4. Interior Point Event Constraints. It is often assumed in formulating planning and scheduling problems that all feedstocks are available at the beginning of the plant operation and all products are to be delivered at the end of the planning horizon. However, in realistic market conditions, raw materials may be received at specific dates and products may have to be delivered before the end of the planning horizon, either continuously or at prespecified distinct time points. Also, resource availability may vary during the planning horizon for reasons such as the contractual nature of utility provision, machine reconfiguration, and cleaning. Suppose that all pointwise changes occur at a finite set of distinct time points τµ, µ ∈ 1, ..., NE. Our formulation is based on the idea of forcing all distinct points to coincide with the end of a campaign. The following constraints relate the distinct points τµ to the campaign timing variables tc:

∑c Λµc ) 1

∀µ

(9a)

∑µ Λµc e Xc

∀c

(9b)

496

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

0 e tc + ncTc -

∑µ τµΛµc e H(1 - ∑µ Λµc)

∀ c (9c)

Note that constraints 9a demand that every distinct point coincide with the end of exactly one campaign, while constraints 9b allow the end of each active campaign (Xc ) 1) to coincide with at most one distinct point. Finally, constraints 9c relate the distinct points τµ to the campaign timings. It should be noted that, if no distinct point coincides with the end of campaign c, i.e., Λµc ) 0, ∀ µ, then constraints 9c are inactive and redundant with respect to constraints 2a and 2b. On the other hand, if one of the Λµc is 1 for a given campaign c, then constraints 9c are equivalent to

τµ ) tc + ncTc thereby aligning the end of campaign c with discrete event µ. A consequence of the above constraints is that the number of campaigns N to be considered cannot be smaller than the number of discrete event time points NE. This is one of the factors that may lead to large problem sizes, an issue to which we return in the companion paper (Papageorgiou and Pantelides, 1995). 4.5. Material Balance Constraints over a Campaign. Every campaign c is characterized by three continuous variables, BSIsc, BSFsc, and BSF′ sc corresponding to inventory of material s at the start and at the end before and after discrete deliveries/receipts, respectively, of the campaign, as illustrated in Figure 9. The material balance considerations lead to three different constraints, corresponding to inventory changes during campaign c, at the end of campaign c, and during the changeover period between campaigns c and c + 1. We deal with each of these separately below. 4.5.1. Material Balance during Campaign c. Ignoring for the moment product deliveries and raw material receipts occurring during the horizon, the amount of material BSFsc in state s at the end of campaign c is equal to the amount at the start of the campaign BSIsc plus the net accumulation, nc∆Ssc, during the campaign:

BSFsc

)

BSIsc

+ nc∆Ssc

∀ c, s

(10)

The initial amount of material, BSIs1, for each state at the start of the time horizon is assumed to be given. It may be worth mentioning that, in their periodic scheduling formulation, Shah et al. (1993a) assume no accumulation of intermediates within a cycle. The main advantage of constraints 10 over this simplification is that they take explicit account of the true inventory of every state at the end of each campaign without the need for any distinction between different types of material. We note that constraints 10 involve a nonlinear term in the right hand side of the equation. In order to maintain linearity in our formulation, we must replace this term with a linear one. From constraints 10 and 3, we obtain rc-1

BSFsc ) BSIsc + nmin c ∆Ssc +

2iLic∆Ssc ∑ i)0

∀ c, s (11)

The resulting constraints 11 still involve bilinear terms, but these can be represented in linear form (Glover, 1975) due to the binary nature of Lic. In particular, we introduce continuous variables S ˆ ics de-

fined as

S ˆ ics ≡ Lic∆Ssc

∀ c, s, i ) 0, ..., rc - 1

This definition can be effected implicitly through the linear constraints:

Lic∆Smin ˆ ics e Lic∆Smax sc e S sc

∀ c, s, i ) 0, ..., rc - 1 (12a)

(1 - Lic)∆Smin sc e ∆Ssc ∀ c, s, i ) 0, ..., rc - 1 (12b)

S ˆ ics e (1 - Lic)∆Smax sc

and ∆Smax are appropriate lower and where ∆Smin sc sc upper bounds on ∆Ssc. Procedures for deriving such bounds, the tightness of which has a significant effect on solution efficiency, are described in the Appendix. If Lic ) 0, constraints 12a force the S ˆ ics variables to the value of 0 while constraints 12b become simple bounds on ∆Ssc. On the other hand, if Lic ) 1, then constraints 12a provide simple bounds on ∆Ssc while constraints 12b are active forcing the S ˆ ics variables to be equal to ∆Ssc. If continuous receipts or deliveries of material s do take place during campaign c, then (10) must be modified to

BSFsc ) BSIsc + nc∆Ssc + ncTcrsc

∀ c, s

(10′)

where rsc is the corresponding receipt rate. Once again, we replace nc by its binary encoding (3), introducing the new variables

S ˆ ics ≡ Lic(∆Ssc + Tcrsc)

∀ c, s, i ) 0, ..., rc - 1

defined through modifications of (12a) and (12b): min Lic(∆Smin ˆ ics e sc + Tcrsc ) e S

Lic(∆Smax + Tcrmax sc sc )

∀ c, s, i ) 0, ..., rc - 1 (12a′)

min (1 - Lic)(∆Smin sc + Tcrsc ) e ∆Ssc + Tcrsc -

S ˆ ics e (1 - Lic)(∆Smax + Tcrmax ∀ c, s, i ) sc sc ) 0, ..., rc - 1 (12b′) max where [rmin sc , rsc ] is an appropriate range for rsc. In any case, using the new variables S ˆ ics (defined through (12) or (12′)), we can rewrite (11) in linear form:

rc-1

BSFsc ) BSIsc + nmin c ∆Ssc +

2iS ˆ ics ∑ i)0

∀ c, s

(13a)

4.5.2. Material Balance at End of Campaign c. As has already been mentioned, BSFsc is the inventory of state s at the end of campaign c before any discrete deliveries or receipts take place. The inventory after such changes, BSF′ sc, is related to it through F BSF′ sc ) BSsc +

∑µ ΛµcRsµ

∀ c, s

(13b)

F It should be noted that BSF′ sc differs from BSsc only if a discrete event µ coincides with the end of campaign c (i.e., Λµc ) 1). The receipts (or deliveries) Rsµ may be constant or be allowed to vary within given bounds. In the latter case, they must be treated as unknowns, and this introduces a bilinearity in (13b). However, this again involves the

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

Figure 9. Inventory over campaign c.

product of binary and continuous variables and can therefore be reformulated exactly to linear form (Glover, 1975). 4.5.3. Material Balance during Intercampaign Changeover Periods. During the intercampaign changeover periods, no production takes place but inventory changes may still occur due to continuous receipts or deliveries of material. Thus the inventory at the start of campaign c + 1 is related to that at the end of campaign c through I BSs,c+1 ) BSF′ sc + rs,c+1Θc

∀ c ) 1, ..., N - 1, s (13c)

We note that, in common to all other discrete events, any discrete changes in the continuous receipt rate are assumed to coincide with campaign ends. Therefore, the rates obtaining during the intercampaign changeover period are those corresponding to the next campaign c + 1, namely rs,c+1. We also note that, in principle, (13c) contains a bilinear term involving two continuous quantities. Approximate linearization techniques (e.g., McCormick, 1976) may be applied to deal with this complication. However, the above linearizations are not necessary if either the receipt/delivery rates or the changeover duration are known constants. 4.6. Storage Capacity and Inventory Constraints. Here we consider various constraints imposed by the limited availability of storage capacity. For states s stored in dedicated storage facilities, we have

0 e BSIsc e Cs

∀ c, s

(14a)

0 e BSFsc e Cs

∀ c, s

(14b)

0 e BSF′ sc e Cs

∀ c, s

(14c)

As mentioned in section 1.2, an alternative storage mode is that of shared intermediate storage where various states can share the same storage facility at the same time (e.g., warehouses). Consider a storage resource w that can store a set of states Sw with a maximum available capacity of Cw. The cumulative

storage level of the suitable states must not exceed the available storage capacity of the storage facility:



ωwsBSIsc e Cw

∀ c, w

(15a)

∑ s∈S

ωwsBSFsc e Cw

∀ c, w

(15b)

∑ s∈S

ωwsBSF′ sc e Cw

∀ c, w

(15c)

s∈Sw

w

w

where ωws is the amount of storage resource w required for storing a unit amount of s. Irrespective of the precise mode of storage, it may be necessary to maintain certain minimum amounts of inventory (e.g., to provide a safety margin against uncertainty in demands) for certain products. Furthermore, safety and other considerations may lead to the imposition of upper bounds on the inventory of certain materials. This leads to bounds of the form

BSmin e BSIsc e BSmax s s

∀ c, s

(16a)

BSmin e BSFsc e BSmax s s

∀ c, s

(16b)

max BSmin e BSF′ s sc e BSs

∀ c, s

(16c)

As will be seen later (section 6.5), inventory variation over any campaign is approximately linear, and therefore these constraints practically guarantee feasibility at all times during the campaign and the intercampaign changeover periods. 4.7. Seasonal Data Variations. Several types of data defining the campaign planning problem may be seasonally dependent. These include the utility availability and the rates of continuous product demand and raw material supply. 4.7.1. Utility Availability Variations. If the ceiling of utility availability, Umax uc , changes during the planning horizon, then additional constraints need to be written to describe this profile. In particular, we assume that the maximum availability of utility u is a piecewise constant function over the time partition defined by {τµ}. Let the initial availability of utility u be Umax u0 , and let ∆Uuµ denote the change in this avail-

498

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

Figure 10. Variation of utility availability level over time horizon.

ability at time τµ as illustrated in Figure 10. Then the maximum availability of utility u over campaign c, Umax uc , is a variable given by max Uu,c+1 ) Umax uc +

∑µ Λµc∆Uuµ

∀ c ) 1, ..., N - 1, u (17)

If the end of campaign c coincides with the µth discrete max event, then these constraints ensure that Uu,c+1 ) max max max Uuc + ∆Uuµ. Otherwise, Uu,c+1 ) Uuc ; i.e., the utility availability remains the same. 4.7.2. Product Demand and Raw Material Supply Variations. As already discussed in section 4.5.1, the rates of continuous product demand and/or raw material supply may be given constants or may vary between given lower and upper bounds. The latter, moreover, may be seasonally dependentsa very common situation in certain sectors such as the food industry. We assume that the demand and supply bounds vary in a piecewise constant manner over the time horizon and, as all discrete events in our formulation, any changes in them are aligned with the campaign ends. In a manner similar to constraints 17, the following constraints are formulated: max rs,c+1 ) rmax + sc

min ) rmin rs,c+1 sc +

∑µ Λµc∆rmax sµ

∀ c ) 1, ..., N - 1, s

∑µ Λµc∆rmin sµ

∀ c ) 1, ..., N - 1, s

(18a)

(18b)

where ∆rsµ generally denotes the change in quantity r caused by point event µ. The bounds are used to constrain the actual receipt and delivery rates in each campaign: max rmin sc e rsc e rsc

∀ c, s

(19)

Of course, in many applications the actual receipt or delivery rates may be known a priori but still be seasonally dependent. In such cases, the upper and lower bounds are identical, and (18) and (19) collapse to

rs,c+1 ) rsc +

∑µ Λµc∆rsµ

∀ c ) 1, ..., N - 1, s (20)

4.8. Intercampaign Changeover Constraints. The duration of the intercampaign changeover period may depend on the nature of the two consecutive campaigns, and more specifically on how different they are. The need for a suitable measure denoting the degree of similarity of two successive campaigns is evident. In order to express in an approximate mathematical fashion the difference between consecutive campaigns, we introduce a similarity measure (SMc) between campaigns c and c + 1. This is defined as follows:

SMc )

∑i λic NT

∀ c ) 1, ..., N - 1

(21)

where NT is the total number of processing tasks in the problem. It will be recalled that λic is 1 if task i is involved in either both or neither of campaigns c and c + 1. Thus a SM of 1 denotes two campaigns which involve two completely identical sets of tasks, whereas a SM of 0 corresponds to two entirely different campaigns. As SMc f 1, the two consecutive campaigns, c and c + 1, are increasingly similar, which will normally imply a smaller duration of intercampaign changeover. If both c and c + 1 are active, then we assume that the duration of the changeover will, in gernal, comprise a fixed term ΘF and a variable term, ΘV, proportional to 1 - SMc, i.e., their degree of dissimilarity:

Θc ) ΘF + (1 - SMc)ΘV

∀ c ) 1, ..., N - 1

where ΘF and ΘV are given constants. However, if campaign c + 1 is inactive, it is reasonable to assume that no changeover is incurred. We therefore modify the above to

Xc+1(ΘF + ΘV) g Θc g Xc+1ΘF + (Xc+1 - SMc)ΘV

∀ c ) 1, ..., N - 1 (22)

We note that if Xc+1 ) 0 (i.e., campaign c + 1 is not active), (22) will force the nonnegative variable Θc to 0. On the other hand, if Xc+1 ) 1, then it becomes

(ΘF + ΘV) g Θc g ΘF + (1 - SMc)ΘV ∀ c ) 1, ..., N - 1

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

Figure 11. Cyclic nature of campaigns.

Figure 12. Discrete representation of time.

and the optimization will normally force the second part of this inequality to be active at the solution. We now have to define the variables λic appearing in (21). This is done through the constraints

λic g 1 - Yci - Yc+1 i

∀ i, c ) 1, ..., N - 1

(23a)

λic g Yci + Yc+1 -1 i

∀ i, c ) 1, ..., N - 1

(23b)

+1 λic e Yci - Yc+1 i

∀ i, c ) 1, ..., N - 1

(24a)

λic e Yc+1 - Yci + 1 i

∀ i, c ) 1, ..., N - 1

(24b)

Note that constraints 23 force the λic variables to 1 only if Yci ) Yc+1 i , while constraints 24 ensure that λic ) 0 if Yci * Yc+1 i . Furthermore, the λic can be treated as continuous variables as their integrality is implied by constraints 23 and 24 and the integrality of the Yci variables. 5. Mathematical Formulation: Campaign Scheduling Constraints The constraints presented in the last section deal with the overall campaign structure, namely the number and duration of the campaigns and the tasks which are active in each campaign. They also characterize the inventories at the campaign boundaries, and the utility availabilities and demand and supply rates over each campaign. We now turn our attention to the detailed scheduling of the plant operation in each campaign. As has already been mentioned, a campaign is made up of a number of cycles as shown in Figure 11. Each cycle involves the same pattern of operations repeated throughout the campaign at a fixed cycle time Tc. For the purposes of the formulation we ignore the end effects of starting up

and shutting down each campaign, effectively assuming that nc . 1. As argued by Shah et al. (1993a), for general multipurpose plants the cycle time is primarily determined by the level of operating complexity that the plant operator is willing to accept rather than being the result of any technical considerations. Thus, a cycle time of 1 week generally entails more complexity than one of 24 h as there is a longer sequence of operations to be executed before a regular pattern is established. On the other hand, a longer cycle time usually implies better plant performance although this is not always true (for instance, in processes involving many zero-wait operations, a longer cycle time may result in more idle time per cycle). Indeed, from a purely technical point of view, the truly optimal solution could always be obtained by considering a single cycle spanning the entire campaign (i.e., a nonperiodic schedule) since this imposes the minimum restrictions on the plant operation. However, such a schedule would be much more difficult to implement than a more regular, periodic one. For the purposes of this work, we therefore assume that the cycle time Tc is given but the precise operating schedule for each campaign is to be determined. In common with other STN-based formulations, we adopt a discrete representation of time dividing the cycle time Tc into a number of time intervals of equal duration as shown in Figure 12. The number of such intervals will henceforth also be denoted by Tc. A number of parameters are associated with the campaign scheduling problem. These are listed below. The notation used is generally consistent with that of Kondili et al. (1993) and Shah et al. (1993a,b). Task i is characterized by Si: set of states which feed task i S h i: set of states produced by task i Fis: proportion of input of task i from state s ∈ Si; ∑s∈Si Fis ) 1

500

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

Fhis: proportion of output of task i in state s ∈ S h i; ∑s∈Sh i Fhis ) 1 pis: processing time for the output of task i to state s ∈ S hi pi: completion time for task i, pi ) maxs∈Sh i pis Ki: set of units suitable for task i Ruiθ: fixed demand factor for utility u by task i at time θ relative to the start of the task βuiθ: variable demand factor for utility u by task i at time θ relative to the start of the task State s is characterized by Ts: set of tasks receiving material from state s T h s: set of tasks producing material in state s Cs: maximum dedicated storage capacity for state s Unit j is characterized by Ij: set of tasks (including cleaning) for which unit j is suitable Vj: nominal capacity of unit j φijmin, φijmax: minimum and maximum size factors when unit j is used for performing task i UCj: set of potential conditions of unit j (see section 5.5) Ijkk′: set of tasks that take unit j from condition k to condition k′ The campaign scheduling formulation is based on the following variables: Binary Variables c Wijt ) 1 if unit j starts processing task i at the beginning of time interval t in a cycle of campaign c; 0 otherwise c W ˜ jkt ) 1 if unit j is idle in condition k over time interval t in a cycle of campaign c; 0 otherwise (see section 5.5) Continuous Variables c Bijt ) amount of material that starts undergoint task i in processing unit j at the beginning of time interval t in a cycle of campaign c Scst ) amount of material stored in state s during time interval t in a cycle of campaign c Ucut ) amount of utility u used during time interval t in a cycle of campaign c Πcjt ) number of task batches performed in unit j between the last cleaning operation and the end of time interval t in a cycle of campaign c In order to facilitate the description of the formulation, we use the cyclic operator, τc(t), defined by

τc(t) )

{

t τc(t + Tc)

if t g 1 if t e 0

Below, we describe in detail the constraints that need to be taken into account for the campaign scheduling problem. 5.1. Allocation Constraints. Unit allocation constraints state that, if a campaign exists, then every unit can perform at most one task at a time in a non preemptive fashion. This is written as pi-1

c Wij,τ ∑ ∑ (t-θ) e Xc i∈I θ)0 c

∀ c, j, t ) 1, ..., Tc (25)

j

If Xc equals 1, then the above constraints reduce to the constraints described by Shah et al. (1993a). On the other hand, if a campaign does not exist, then Xc is 0, and constraints 25 force all the variables in the double summation to 0. The variables Yijc characterizing the utilization of equipment items in each campaign can be defined through constraints of the form:

min(Tc,(λ+1)pi)

Ycij

g

∑ t)λp +1

∀ c, i, j ∈ Ki, λ ) 0, ..., Tc/pi

Wcijt

i

(26)

The above constraints ensure that, if Yijc is 0, then no instance of task i in unit j is allowed to occur during campaign c. On the other hand, it should be noted that c at most one of the Wijt variables in the summations on the right hand side can have a value of 1 at the same time. This is a consequence of the allocation constraints 25 and the fact that constraints 26 divide the cycle time into segments not exceeding the processing time of task i. A set of fewer but less tight constraints can be derived by aggregating (26): Tc

Tc/pi Ycij g

Wcijt ∑ t)1

∀ c, i, j ∈ Ki

(26′)

5.2. Batch-Size Constraints. The amount of material that starts undergoing task i in unit j at time interval t during campaign c is bounded by the minimum and maximum unit capacities. The latter are expressed as constant fractions of the nominal unit capacity Vj:

∀ c, j, i ∈ Ij, t ) 1, ..., Tc (27)

c c max c φmin ij VjWijt e Bijt e φij VjWijt

5.3. Material Balance Constraints within a Cycle. These constraints state that the amount of a state s held in storage over time interval t in campaign c equals the corresponding amount over interval t - 1, plus the amount of material added to state s at the beginning of time interval t, minus the amount of material removed from state s at the beginning of time interval t. Material addition is a consequence of tasks i starting at time t pis, while material removal from state s is due to tasks starting at the beginning of time interval t. c Scst ) Ss,t-1 +

c FhisBij,τ ∑ ∑ (t-p ) i∈T h j∈K c

s

is

i

∑ ∑ FisBcijt

∀ c, s, t ) 1, ..., Tc + 1 (28)

i∈Ts j∈Ki

Note that in the second summation in the right hand side of (28), the cyclic operator τc(‚) must be used as material added to a state may be produced by tasks starting either within the current cycle or during the previous one. Also, storage capacity constraints must be imposed on all states depending on the dedicated storage Cs available for that state:

0 e Scst e Cs

∀ c, s, t ) 1, ..., Tc + 1

(29)

It should be noted that the initial amount Scs0 of every state in each cycle is a variable to be determined by the optimization algorithm. We also define ∆Ssc ≡ c Ss,T - Scs0 (cf. section 4.5). c+1 5.4. Utility Utilization Constraints. Many tasks require utilities such as steam and manpower. The utility demand may vary over the duration of the task, and is modeled using a fixed, batch-size-independent term and a variable batch-size-dependent term. The value of these terms may vary discretely (at each time interval) over the duration of the task. So, the total

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

Figure 13. Task splitting.

requirement of utility u over the time interval t in campaign c is given by pi-1

Ucut

)

∑i j∈K ∑ θ)0 ∑

c (RuiθWij,τ c(t-θ)



+

k∈UCj

i

∀ c, u, t ) 1, ..., Tc (30)

c βuiθBij,τ ) c(t-θ)

Furthermore, the amount of utility u consumed over time interval t for every campaign cannot exceed the maximum utility availability for this campaign, Umax uc :

0 e Ucut e Umax uc

∀ c, u, t ) 1, ..., Tc

(31)

5.5. Cleaning Constraints. The need for cleaning the processing equipment between different uses is very common in batch processes, especially when qualitycritical products such as pharmaceuticals and foods are involved. We consider two distinct types of cleaning: sequence-dependent and frequency-dependent cleaning. 5.5.1. Sequence-Dependent Cleaning Constraints. We adopt the approach proposed by Pantelides (1994) which considers equipment in different states of cleanliness as different resources, with processing and cleaning tasks transforming one type of resource to another. We denote the different conditions of a unit by index k. For a unit j, Ijkk′ is a subset of the tasks Ij, execution of which changes the condition of the unit from k to k′. Obviously, if unit j is in condition k, only one of the tasks in ∪k′ Ijkk′ can take place in it. It should be noted that the sets Ij and Ijkk′ include any cleaning tasks that the unit may undergo. c According to our definition, W ˜ jkt is 1 only if unit j is idle in condition k. The condition of an idle unit over interval t in campaign c depends on its condition during the previous time interval; whether any tasks i leading to that condition have finished at time t, having started pi time intervals earlier; and whether any tasks starting from that condition start at time t. Mathematically, this can be expressed as c c )W ˜ jk,t-1 + W ˜ jkt

∑ ∑ k′ i∈I

therefore need to fix it at least once during the cycle, say for t ) 1:

∑ ∑ k′ i∈I

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

jkk′

c The W ˜ jkt variables can be treated as continuous ones due to the nature of the two double summations in (32) which can take only the value 1 or 0. Also, it should be noted that, for t ) 1, the above constraint involves the c variable W ˜ jk0 on the right hand side, but due to the c cyclic nature of the schedule this is identical to W ˜ jkT : c

c c )W ˜ jkT W ˜ jk0 c

∀ c, j

+

c ∑ ∑ Wij,τ (1-θ) ) Xc i∈I θ)0 c

(33)

Constraint 32 can be viewed as a balance equation ensuring that the number of units j that are idle or in use is conserved from one time interval to the next. However, it does not actually define this number; we

∀ c, j

(34)

j

where the first summation on the left hand side represents unit j being idle in different conditions over the first time interval (t ) 1) in the cycle while the second one corresponds to unit j being used or cleaned (cf. the allocation constraints 25) during this same interval. Clearly the two summations must add up to 1 for any active campaign (Xc ) 1). For inactive campaigns, (34) together with (32) and (25) ensures that c all W ˜ jkt are forced to 0. Constraints 32 are valid provided that each task i that can take place in unit j is allowed to do so only if the unit is in a given unique condition k. This is not always true in practice: for instance, it may be possible to perform the same processing task both in a clean vessel and in a partially dirty one; or it may be possible to apply the same cleaning operation to a vessel being in a number of different “dirty” conditions. In such cases, we split task i into a number of tasks, all effecting the same material transformations but requiring the unit in different initial conditions. The corresponding STN modification is shown in Figure 13. It is worth noting that, although the above task splitting introduces additional processing tasks, there is no need to generate more variables in the mathematical formulation of the problem other than the correc c c sponding binary ones, i.e., Wi′jt , Wi′′jt , and Wi′′′jt . The latter are used only within constraints 32 replacing the c Wijt variables, while within the rest of the mathematical model (e.g., in the allocation constraints 25 where c appropriate) only the original Wijt variables will be used. An additional set of constraints is introduced to relate the new allocation variables to the original variables: c c c + Wi′′jt + Wi′′′jt Wcijt ) Wi′jt

c Wij,τ c(t-pi)

jk′k

Wcijt

pi-1

c W ˜ jk1

∀ c, j, t ) 1, ..., Tc (35)

Evidence illustrating the relative effectiveness of this type of formulation for sequence-dependent cleaning over earlier ones (e.g., Crooks, 1992) has recently been provided by Barbosa-Po´voa (1994). 5.5.2. Frequency-Dependent Cleaning Constraints. In this case, the cleaning requirements depend on the frequency with which a particular equipment item is used. Usually, this type of cleaning is used to prevent the buildup of impurities in processing items. A unit subject to such cleaning requirements is not allowed to process more than mj successive batches, unless a cleaning task i* takes place. A set of constraints for frequency-dependent cleaning in short-term scheduling formulations were first proposed by Kondili et al. (1993), and similar constraints apply for the cyclic case. In fact, as noted by BarbosaPo´voa (1994), only one group of the Kondili et al.

502

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

constraints are really necessary:

Πcjt

g

c Πj,τ c(t-1)

+



Wcijt

i∈Ij-{i*}

-

mjWci*jt ∀ c, j, t ) 1, ..., Tc (36)

Here Πcjt represents the number of batches processed by unit j since its last cleaning and is therefore bounded by

0 e Πcjt e mj

∀ c, j, t ) 1, ..., Tc

(37)

Note that every time a processing task i takes place, constraint 36 augments the value of Πcjt at least by 1. On the other hand, when the cleaning task i* starts c (Wi*jt ) 1), the Πcjt variable is allowed to return to a value of 0. The potential solution degeneracy is reduced by forcing as many of the Πcjt variables as possible to 0. Small penalty terms of the form

interest, taking into account the value of the products, the cost of the feeds, the value of the material that is received and/or delivered at distinct time instances, the cost of the utilities, the inventory cost for all the different types of material, and the cost of cleaning. We consider each of these terms separately below. 6.1. Value of Products and Cost of Raw Materials. As we have already seen, product deliveries and raw materials may occur at distinct points during or at the end of the time horizon, as well as continuously during the horizon. We must also account for the net changes in the inventory of each material over the entire horizon. Mathematically, we have terms of the form

∑s (νs(BSF′sN - BSIs1) - ∑µ ξsµRsµ - ∑c ζscrscncTc)

+

(40)

Tc

-

Πcjt ∑j ∑c ∑ t)1

(38)

can be added to the objective function (see section 6), where  is a small positive number. Albeit an integer, Πcjt can be treated as a continuous variable since its integrality is ensured by constraints c 36, the integrality of the Wijt variables, and the penalty 38 which ensures that either Πcjt ) 0 or constraints 36 are active. 5.6. Semicontinuous Operation Constraints. Apart from continuous and batch tasks, it is very common in practice to have semicontinuous tasks which operate in a continuous manner over short time periods. In our formulation, the latter can be modeled approximately as batch tasks with processing time equal to 1 time interval with an equivalent equipment processing capacity of

(production rate) × (duration of time interval) The above model may be insufficient if it is necessary to operate semicontinuous equipment uninterruptedly for a given minimum duration of time (“run length”). Crooks (1992) describes in detail the relevant constraints for the short-term scheduling problem; their extension to the campaign case is straightforward: τijRL-1

∑ θ)1

c c c Wij,t+θ g (τRL ij - 1)(Wijt - Wij,τc(t-1))

∀ c, t ) 1, ..., Tc, i∈CT, j ∈ Ki (39)

where CT is the set of semicontinuous tasks and τijRL is the minimum run length for semicontinuous task i taking place on processing unit j. c The above constraints are active only if Wijt ) 1 and c Wij,τc(t-1) ) 0, i.e., if the semicontinuous task actually starts at time t following a period of being idle or c carrying out a different task. In this case, all the Wijt variables involved in the summation on the left hand side of (39) are forced to take the value of 1; i.e., unit j is allocated to task i for at least τRL time intervals.

The above summation is, in principle, taken over all materials s in the process. The first term in the I summation multiplies the net change (BSF′ sN - BSs1) in the inventory of material s over the entire horizon by a nominal unit value, νs. For raw materials and saleable end products, this may well be a true market price, but the latter may be difficult to establish for intermediates. In this case, νs simply reflects the desirability of material s and it may depend on the degree of processing (i.e., how far along the path from raw material(s) to end product(s) state s actually occurs). For unwanted byproducts, νs may take a negative value reflecting the cost of disposal. The second term in (40) represents the value of product deliveries and raw material receipts that take place at distinct points during the horizon. Here, ξsµ is the true unit price realized or paid on each occasion. The final term corresponds to continuous receipts or deliveries. The true unit price involved in these transactions, ζsc, may be seasonally dependent and may therefore vary from campaign to campaign. In general, since ζsc, rsc, and nc can all be variables, the last term of (40) is highly nonlinear. On the other hand, if the prices and the receipt/delivery rates for the various materials are known functions of time, the net revenue to be realized from continuous receipts/deliveries can be calculated a priori and need not therefore be included in the objective function. 6.2. Utility Costs. The cost of utilities may be described mathematically as Tc

-

Ucut ∑u cu ∑c nc ∑ t)1

(41)

6. Mathematical Formulation: Objective Function

where cu is the unit cost of utility u. Note that the innermost summation corresponds to the total amount of utility used over a cycle in campaign c. This is multiplied by the number of cycles, nc, to obtain the total amount used over the entire campaign.

A typical objective function, Φ, is the maximization of the combined production value over the horizon of

The above constraints involve nonlinear terms. Replacing the number of cycles by constraints 3, we

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 503 c introduce new continuous variables U ˆ iut defined as

term must be added to the objective function:

∀ c, u, i ) 0, ..., rc - 1, t ) 1, ..., Tc

U ˆ ciut ≡ LicUcut

N-1

which allows us to replace (41) by

-

Tc

∑u ∑c cu

(nmin c

∑ t)1

rc-1

Tc

U ˆ ciut) ∑ ∑ i)0 t)1

Ucut +

2i

(42)

c The U ˆ iut can be defined implicitly through the constraints:

Ucut

- (1 -

Lic)Umax uc

U ˆ ciut

e ∀ c, u, i ) 0, ..., rc - 1, t ) 1, ..., Tc (43)

Due to the cost of utility the optimization algorithm c will always force the U ˆ iut to be as small as possible. c Thus, if Lic ) 1, constraints 43 will force U ˆ iut to the c value of Uut, while, if Lic ) 0, constraints 43 become c inactive and the U ˆ iut variables will be forced to their lower bound of 0. 6.3. Cleaning Costs. The constraints of section 5.5 characterize completely the occurrence of cleaning tasks, and therefore their cost can be taken into account in the objective function Tc

-

Wci*jt ∑j i*∈I* ∑ ∑c ∑ t)1 ci*j

nc

(44)

j

where I* j is the set of all different types of cleaning task that may be applied to unit j, and ci*j is the cost of cleaning task of type i* applied to j. The innermost summation corresponds to the number of cleaning tasks of type i* that take place in unit j over a cycle of campaign c. This is multiplied by nc to obtain the total number over the entire campaign. The nonlinear terms involved in the above constraints can be substituted by their linear equivalents after some straightforward modifications. Replacing the number of cycles, nc, using constraints 3, we come up with crossproducts of binary variables. We introduce new conc tinuous variables W ˆ ii*jt defined as c W ˆ ii*jt ≡ LicWci*jt

∀ c, j, i*, i ) 0, ..., rc - 1, t ) 1, ..., Tc

which allows us to replace (44) by the linear expression rc-1

Tc

c W ˆ ii*jt ∑j i*∈I ∑ * ∑c ∑ ∑ i)0 t)1

ci*j

-

2i

∑ ηc

(47)

c)1

(45)

j

The following constraints must also be added to the formulation: c Wci*jt + Lic - 1 e W ˆ ii*jt ∀ c, j, i*, i ) 0, ..., rc - 1, t ) 1, ..., Tc (46)

Note that if Lic ) 0, then the optimization will force the c c W ˆ ii*jt to 0. Otherwise, if Lic ) 1, the W ˆ ii*jt will be set c equal to Wi*jt. 6.4. Intercampaign Changeover Costs. The intercampaign changeovers needed for plant reconfiguration, maintenance, and/or unit cleaning not only imply loss of production time, but may also be associated with certain costs. If the cost of changeover between campaigns c and c + 1 is denoted by ηc, then the following

We assume that ηc is proportional to the difficulty of changeover as expressed by the similarity measure SMc (cf. section 4.8). This can be written as

ηc g η*(Xc+1 - SMc)

∀ c ) 1, ..., N - 1 (48)

We note that if campaign c + 1 is active, then the optimization will force ηc to η*(1 - SMc) where η* is the cost of completely reconfiguring the plant. On the other hand, if Xc+1 ) 0, then (48) is not active, and the optimization will force ηc to its lower bound of 0. 6.5. Inventory Costs. To determine the cost of holding inventory, we need to consider the variation of the amount of each material being kept in storage during the time horizon of interest. Consider, for instance, a typical product. From a macroscopic point of view, the inventory level variation will be of a piecewise linear form as shown in Figure 14. Here, a positive slope indicates campaign(s) during which the product is actually being produced while negative slope regions correspond to campaigns where either no such production takes place or, perhaps, the rate of continuous consumption exceeds the rate of production. Vertical changes in inventory levels correspond to point demands or receipts for the material. However, the microscopic view of the inventory variation within each campaign can be more complex. Consider, for instance, a cycle in campaign 2 during which three batches of product are produced. Then the inventory profile over the cycle may be of the form shown in Figure 15, where the small downward steps correspond to the continuous consumption of the material while the three large upward steps correspond to the three batches being produced. The inventory profile over the entire campaign 2 can be obtained by juxtaposing a number of the cycle profiles as illustrated in Figure 16. The precise inventory cost for campaign 2 is proportional to the area under the inventory line. However, provided that nc . 1, a reasonable approximation can be obtained by assuming a linear inventory profile over each cycle, and therefore the entire campaign. On the other hand, if the number of cycles is small, the linear approximation will not be so good but in such a case the contribution of the inventory cost to the overall objective function will probably be negligible anyway. We recall from section 4.5 that the variables BSIsc, BSFsc, and BSF′ sc respectively correspond to inventory of material s at the start of the campaign and at its end before and after discrete receipts/deliveries (cf. Figure 9). Inventory cost calculations must consider the variation of inventory over both the campaigns themselves and the intercampaign changeover periods. In general, the material inventory cost is proportional to the shaded area of Figure 9: I BSF′ BSIsc + BSFsc sc + BSs,c+1 n c Tc + Θc 2 2

(49)

We introduce new continuous variables INAsc and INBsc denoting the average amount of material in state s over campaign c and the subsequent changeover period,

504

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

Figure 14. Macroscopic view of inventory level variation.

money realized. This constant takes into consideration the annual interest rate IR and the unit value νs of state s, i.e.,

Rs )

IR × vs 365 × 24

with typical units of £/(kg‚h). Once again, we deal with bilinear terms ncINAsc by replacing nc by (3) and introducing new continuous variables INAics defined as Figure 15. Microscopic view of inventory level variation over a cycle.

respectively. These are defined as

INAsc ≡ INBsc ≡

BSIsc + BSFsc 2

I BSF′ sc + BSs,c+1 2

BSIsc + BSFsc 2

∀ c, s, i ) 0, ..., rc - 1

along with the additional constraints

∀ c, s

BSIsc + BSFsc - (1 - Lic)M e INAics 2 ∀ c, s, i ) 0, ..., rc - 1 (51)

∀ c ) 1, ..., N - 1, s

The relevant inventory cost can then be expressed as

∑s Rs ∑c (ncTcINAsc + ΘcINBsc)

-

INAics ≡ Lic

(50)

where Rs reflects the opportunity cost of keeping material s in storage rather than selling it and investing the

Figure 16. Detailed inventory level variation over campaign.

where M is an upper bound on (BSIsc + BSFsc)/2. This may take the value of the dedicated storage available for state s, Cs, or be based on some estimate of the production capacity. The bilinear terms INBscΘc can either be ignored due to the relatively short duration of the intercampaign changeovers, or be included by transforming them to

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

a linear form. From (21) to (22) we obtain

(

)

commonly validsassumptions.

Φ ≡ max

INBscΘc g INBscXc+1ΘF + INBsc

∑i

NT

(nmin c

Θ

V

∀ c ) 1, ..., N - 1, s (52)

rc-1

Tc

2 ∑ ∑ i)0 t)1 i

or

INBsc

g

INBscXc+1ΘF

∑i (Xc+1 - λic) NT

Tc

c 2 ∑W ˆ ii*jt ∑j i*∈I ∑ *ci*j ∑c ∑ i)0 t)1 i

-

(

j

rc-1

ηc - ∑ Rs ∑ Tc ∑ 2iINAics + ΘFINB1 ∑ cs + c)1 s c i)0 ΘV

+

Θ

V

NT

∀ c ) 1, ..., N - 1, s (52′)

∑i INB2 ics

Campaign Planning Constraints.

To linearize (52′), we introduce two new continuous B2 variables, INB1 ics and INcs , defined as

INB1 cs

Ucut + ∑ t)1

rc-1

U ˆ ciut)

N-1

INBscΘc

Tc

∑c ζscrscncTc) - ∑u cu ∑c

λic

Xc+1 -

∑s (νs(BSF′sN - BSIs1) - ∑µ ξsµRsµ -

I BSF′ sc + BSs,c+1 ≡ Xc+1 2

Campaign Timing Constraints

∀ c ) 1, ..., N - 1

tc + ncTc + Θc e tc+1 ∀ c ) 1, ..., N - 1, s,

I BSF′ sc + BSs,c+1 2 ∀ i, c ) 1, ..., N - 1, s

INB2 ics ≡ (Xc+1 - λic)

∀c

DminXc e ncTc e DmaxXc

tN + nNTN e H rc-1

nc )

nmin c Xc

+

2iLic ∑ i)0

∀c

Campaign Activity Constraints and determined by the following constraints:

Xc+1 e Xc

I BSF′ sc + BSs,c+1 - (1 - Xc+1)Cs e INB1 cs 2 ∀ c ) 1, ..., N - 1, s (53) I BSF′ sc + BSs,c+1 - (Xc+1 - λic)Cs e INB2 ics 2 ∀ i, c ) 1, ..., N - 1, s (54)

Following the above linearizations, the inventory cost can be written as

(

rc-1

ΘV

2iINAics + ΘFINB1 ∑s Rs ∑c Tc ∑ ∑ INB2 cs + ics NT i i)0

-

)

(55) where, for simplicity, we have assumed that nmin ) 0; c the formulation of this term of the objective function for nmin > 0 requires the introduction of some further c auxiliary variables.

∀ c ) 1, ..., N - 1 ∀ c, i

Yci e Xc Ycij e Yci

∀ c, i, j ∈ Ki

Plant Operability and Safety Constraints

Yci e Xc ∑ i∈Ξ

∀c

∑i ψiYci e ΨXc

∀c

Ycij e njXc ∑ i∈I

∀ c, j

j

Interior Point Event Constraints

∑c Λµc ) 1

∀µ

∑µ Λµc e Xc

∀c

0 e tc + ncTc -

∑µ τµΛµc e H(1 - ∑µ Λµc)

∀c

Material Balance Constraints over a Campaign 7. Summary of Formulation The entire formulation presented in this paper is outlined below. Terms shown in bold involve bilinear products of continuous quantities. However, they reduce to linear forms under certain simplifyingsbut very

rc-1

BSFsc ) BSIsc + nmin c ∆Ssc +

F BSF′ sc ) BSsc +

2iS ˆ ics ∑ i)0

∑µ ΛµcRsµ

∀ c, s

∀ c, s

)

506

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 I BSs,c+1 ) BSF′ sc + rs,c+1Θc

∀ c, s

Batch-Size Constraints

∀ c, s, i ) 0, ..., rc - 1

Tcrmax sc ) (1 -

Lic)(∆Smin sc

(1 -

+ Tcrmin ˆ ics e sc ) e ∆Ssc + Tcrsc - S max max Lic)(∆Ssc + Tcrsc ) ∀ c, s, i ) 0, ..., rc

Material Balance Constraints within a Cycle c Scst ) Ss,t-1 +

-1



e Cw;

s∈Sw



Cw;

∑ s∈S

s∈Sw

FisBcijt ∑ ∑ i∈T j∈K

∀ c, s

ωwsBSF′ sc e Cw

∀ c, w

pi-1

Ucut

)

c ∑i j∈K ∑ θ)0 ∑ (RuiθWij,τ (t-θ) + c

i

∀ c, s

∀ c ) 1, ..., N - 1, u

c c W ˜ jkt )W ˜ jk,t-1 +

min rs,c+1

)

rmin sc

+

+

∑µ ∑µ

Λµc∆rmin sµ

max rmin sc e rsc e rsc

∀ c, s

c Wij,τ c(t-pi)

jk′k

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

Wcijt

jkk′

∀ c, j

c c W ˜ jk0 )W ˜ jkT c

∀ c ) 1, ..., N - 1, s ∀ c ) 1, ..., N - 1, s

∑ ∑ k′ i∈I

∑ ∑ k′ i∈I

Product Demand and Raw Material Supply Variations

)

∀ c, u, t ) 1, ..., Tc

0 e Ucut e Umax uc

Sequence-Dependent Cleaning Constraints

Λµc∆Uuµ

Λµc∆rmax sµ

∀ c, u, t ) 1, ..., Tc

c βuiθBij,τ ) c(t-θ)

Utility Availability Variations

rmax sc

∀c, s

Utility Utilization Constraints

e

max BSmin e BSF′ s sc e BSs

max rs,c+1

∀ c, s, t ) 1, ..., Tc + 1

c ∆Ssc ) Ss,T - Scs0 c+1

BSmin e BSIsc e BSmax ; BSmin e BSFsc e BSmax ; s s s s

∑µ

∀ c, s, t ) 1, ..., Tc + 1

i

0 e Scst e Cs

w

max ) Umax Uu,c+1 uc +

is

c

s

0 e BSIsc e Cs; 0 e BSFsc e Cs; 0 e BSF′ sc e Cs ωwsBSFsc

c FhisBij,τ ∑ ∑ (t-p ) i∈T h j∈K i

Storage Capacity and Inventory Constraints

ωwsBSIsc

∀ c, j, i ∈ Ij, t ) 1, ..., Tc

c c max c φmin ij VjWijt e Bijt e φij VjWijt

min Lic(∆Smin ˆ ics e Lic(∆Smax + sc + Tcrsc ) e S sc

∑ k∈UC

pi-1

c W ˜ jk1 + j

c Wij,τ ∑ ∑ (1-θ) ) Xc i∈I θ)0 c

∀ c, j

j

Frequency-Dependent Cleaning Constraints c Πcjt g Πj,τ + c(t-1)



Wcijt - mjWci*jt

∀ j, c, t )

i∈Ij-{i*}

1, ..., Tc

Intercampaign Changeover Constraints

SMc )

∑i λic

0 e Πcjt e mj ∀ c ) 1, ..., N - 1

NT

(Xc+1 - SMc)ΘV

∑ θ)1

∀ i, c ) 1, ..., N - 1

λic g Yci + Yc+1 -1 i

∀ i, c ) 1, ..., N - 1

λic e Yci - Yc+1 +1 i

∀ i, c ) 1, ..., N - 1

λic e

-

+1

∀ i, c ) 1, ..., N - 1

Campaign Scheduling Constraints. Allocation Constraints pi-1

c Wij,τ ∑ ∑ (t-θ) e Xc i∈I θ)0 c

j

∑ t)λp +1 i

Wcijt

∀ c, t ) 1, ..., Tc, i ∈ CT, j ∈ Ki Constraints Defining Objective Function Terms.

Ucut - (1 - Lic)Umax ˆ ciut uc e U c Wci*jt + Lic - 1 e W ˆ ii*jt

∀ c, u, i ) 0, ..., rc 1, t ) 1, ..., Tc

∀ c, j, i*, i ) 0, ..., rc 1, t ) 1, ..., Tc

BSIsc + BSFsc - (1 - Lic)M e INAics 2

∀ c, s, i ) 0, ..., rc - 1

∀ c, j, t ) 1, ..., Tc

min(Tc,(λ+1)pi)

Ycij g

c c c Wij,t+θ g (τRL ij - 1)(Wijt - Wij,τc(t-1))

∀ c ) 1, ..., N - 1

λic g 1 - Yci - Yc+1 i

Yci

Semicontinuous Operation Constraints τRL ij -1

Xc+1(ΘF + ΘV) g Θc g Xc+1ΘF +

Yc+1 i

∀ c, j, t ) 1, ..., Tc

∀ c, i, j ∈ Ki, λ ) 0, ..., Tc/pi

I BSF′ sc + BSs,c+1 - (Xc+1 - λic)Cs e INB1 ics 2

∀ i, c ) 1, ..., N - 1, s

Ind. Eng. Chem. Res., Vol. 35, No. 2, 1996 507 I BSF′ sc + BSs,c+1 - (1 - Xc+1)Cs e INB2 cs 2

∀c) 1, ..., N - 1, s

8. Concluding Remarks As is evident from the literature review presented in section 2, a substantial amount of work has been done on the solution of the campaign planning/scheduling problem. However many features of the problem, such as the handling of complex processing recipes and the exploitation of flexible resources, have not yet been addressed to a satisfactory extent. A general framework for the description of batch processes and the associated scheduling problems has been presented by Kondili et al. (1988, 1993). The framework, based on the state-task network (STN) concept, has already been applied successfully to the mathematical formulation and solution of short-term (Kondili et al., 1993; Shah et al., 1993b) and cyclic (Shah et al., 1993a) scheduling problems. The major aim of this work is to extend the STN framework to cover general campaign planning and scheduling problems. Many general features of batch processing such as material recycles, shared intermediates, mixed storage policies, limited resources, and flexibility in the operation of parallel units are taken into account. Furthermore, no a priori restriction is imposed on the possible campaign structure. The latter is determined automatically by the formulation taking account of all relevant factors such as the availability of sufficient storage capacity to store large amounts of intermediates produced in one campaign for consumption over later ones, the cost of holding inventories, the product demand and raw material availability patterns, and the relative durations and costs of cleaning equipment within a campaign and intercampaign plant reconfigurations. Thus some of the key limitations of earlier approaches have been overcome. Of course, the presented formulation also features some of the limitations of other discrete-time formulations, and in particular the need for fine discretization which may potentially lead to large problem sizes. Furthermore, the assumption of a fixed cycle time in each campaign may lead to suboptimal solutions in some cases. However, as discussed in section 5, for most processes of realistic complexity, the plant performance is a nondecreasing function of cycle time, and the real trade-off is between performance and operational complexity. Thus, the assumption of a cycle time fixed at the maximum acceptable limit is well justified in such situations. The problem has been formulated as a mixed integer programming model, taking into account both planning and scheduling aspects simultaneously. The idea of having cyclic schedules within each campaign constitutes a convenient way for formulating our problem in a fashion similar to the one described by Shah et al. (1993a). As expected, the simultaneous consideration of all possible decisions results in a rather large mixed integer programming formulation that can be an order of magnitude larger than similar formulations for shortterm (Kondili et al., 1993) and periodic (Shah et al., 1993a) scheduling problems. In the companion paper (Papageorgiou and Pantelides, 1995), we present a mathematical decomposition approach to the solution

of this problem together with examples illustrating its applicability to complex campaign planning/scheduling problems. Acknowledgment This research was supported by a joint SERC/AFRC grant to the Centre for Process Systems Engineering at Imperial College. Nomenclature c Bijt ) amount of material that starts undergoing task i in processing unit j at the beginning of time interval t in a cycle of campaign c BSIsc ) amount of material stored in state s at the start of campaign c BSFsc ) amount of material stored in state s at the end of campaign c before any discrete deliveries and receipts BSF′ sc ) amount of material stored in state s at the end of campaign c after any discrete deliveries and receipts ) maximum allowable inventory of material in BSmax s state s ) minimum allowable inventory of material in BSmin s state s c ) standard index for campaigns ci*j ) cost of performing cleaning task i* in unit j cu ) unit cost of utility u Cs ) maximum dedicated storage capacity for state s Cw ) total capacity of warehouse w CT ) set of semicontinuous tasks Dmax ) maximum acceptable campaign duration Dmin ) minimum acceptable campaign duration i ) standard index for tasks; also index for binary encoding of nc i* ) equipment cleaning task Ij ) set of tasks for which unit j is suitable I* j ) set of cleaning tasks that may be applied to unit j Ijkk′ ) set of tasks that take unit j from condition k to condition k′ INAsc ) variable involved in inventory cost calculation (see section 6.5) A ) variable representing product LicINAsc INisc INBsc ) variable involved in inventory cost calculation (see section 6.5) INB1 sc ) variable involved in inventory cost calculation (see section 6.5) B2 ) variable involved in inventory cost calculation (see INisc section 6.5) IR ) annual interest rate j ) standard index for processing units k ) standard index for conditions of processing equipment items Ki ) set of equipment items that are suitable for task i Lic ) variables used for binary encoding of nc (see constraint 3) mj ) maximum number of consecutive batches that unit j can process without cleaning nc ) number of cycles in campaign c ) minimum number of cycles in campaign c nmin c nj ) maximum number of tasks for which unit j can be used in any single campaign N ) maximum number of campaigns considered NE ) number of discrete system events occurring during the horizon NT ) number of tasks in state-task network pi ) completion time for task i pis ) processing time for the output of task i to state s rc ) number of binary variables Lic rsc ) rate of continuous receipt of material s during campaign c ) upper bound on rsc rmax sc

508

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

rmin sc ) lower bound on rsc max ∆rmax caused by discrete event µ sµ ) change in rsc min min ∆rsµ ) change in rsc caused by discrete event µ Rsµ ) amount of material in state s to be received from external sources at time τµ s ) standard index for states Si ) set of states which feed task i S h i ) set of states produced by task i S ˆ ics ) variable representing the product Lic(∆Ssc + Tcrsc) Scst ) amount of material stored in state s during time interval t in a cycle of campaign c Sw ) set of states that can be stored in warehouse w ∆Ssc ) net accumulation of state s over a cycle in campaign c ) upper bound on ∆Ssc ∆Smax sc ∆Smin sc ) lower bound on ∆Ssc SMc ) measure of similarity between campaigns c and c + 1 tc ) starting time of campaign c Ts ) set of tasks receiving material from state s T h s ) set of tasks producing material in state s u ) standard index for utilities c ) amount of utility u used during time interval t in a Uut cycle of campaign c max ) maximum availability of utility c over campaign c Uuc c c ) variable representing the product LicUut U ˆ iut ∆Uuµ ) change in maximum availability of utility u caused by discrete event µ UCj ) set of potential conditions of processing unit j Vj ) nominal capacity of unit j w ) standard index for warehouses c ) 1 if unit j starts processing task i at the beginning Wijt of time interval t in a cycle of campaign c; 0 otherwise c c ) variable representing the product LicWi*jt W ˆ ii*jt c W ˜ jkt ) 1 if unit j is idle in condition k over time interval t in a cycle of campaign c; 0 otherwise Xc ) 1 if campaign c is included in the plan; 0 otherwise Yci ) 1 if task i is active during campaign c; 0 otherwise Yijc ) 1 if task i is performed in unit j during campaign c; 0 otherwise

Fhis ) proportion of output of task i in state s τc(‚) ) cyclic operator τµ ) time of occurrence of discrete event µ τijRL ) minimum run length for semicontinuous task i on processing unit j φijmax ) maximum size factor when unit j is used for performing task i φijmin ) minimum size factor when unit j is used for performing task i Φ ) objective function ψi ) complexity factor associated with task i Ψ ) maximum acceptable campaign complexity ωws ) amount of storage capacity taken by a unit amount of state s stored in warehouse w

Appendix. Derivation of Bounds on Net Material Accumulation per Cycle Here we consider the derivation of bounds on the quantities ∆Ssc representing the net accumulation of material in state s over a cycle of campaign c (cf. section 4). These bounds are essential for the effective linearization of bilinear terms in the material balance constraints (see section 4.5). Two alternative procedures are described. The first one is based on the task processing capacity considering each state in isolation, while the second one employs a LP (MILP) based procedure. A.1. Bounds Based on Task Processing Capacity. The obvious upper bound on ∆Ssc is Cs, the dedicated storage capacity for state s. Unfortunately, for some states, this is likely to be much larger than the net accumulation over any single cycle. Often, a much tighter upper bound may be obtained. Summing the material balance constraints 28 over time t, we get Tc+1 c Ss,T+1 ) Scs0 +

c ( ∑ Fhis ∑ Bij,τ(t-p ∑ ) t)1 i∈T h j∈K is

s

i

Fis ∑ Bcijt) ∑ i∈T j∈K

Greek Letters Rs ) inventory cost for a unit amount of material s over unit time Ruiθ ) fixed demand factor for utility u by task i at time θ relative to the start of the task βuiθ ) variable demand factor for utility u by task i at time θ relative to the start of the task  ) penalty coefficient in objective function ζsc ) unit price for material in state s involved in continuous receipt or delivery during campaign c η* ) cost of complete plant reconfiguration ηc ) cost of plant reconfiguration between campaigns c and c+1 Θc ) duration of intercampaign changeover between campaigns c and c + 1 ΘF ) constant coefficient of changeover duration ΘV ) variable coefficient of changeover duration λic ) 1 if task i either occurs in both campaigns c and c + 1 or does not occur in either of them; 0 otherwise Λµc ) 1 if the end of campaign c coincides with distinct point µ; 0 otherwise µ ) standard index for discrete system events νs ) unit price for material in state s ξsµ ) unit price for material in state s involved in discrete receipt or delivery at time τµ Ξ ) set of mutually exclusive tasks Πcjt ) number of task batches performed in unit j between the last cleaning operation and the end of time interval t in a cycle of campaign c Fis ) proportion of input of task i from state s

s

(A.1)

i

c Since ∆Ssc ≡ Ss,T - Scs0, we can obtain, by reversc+1 ing the order of the summations on the right hand side of (A.1):

∆Ssc )

∑ Fhis j∈K ∑ Bc*ij - i∈T ∑ Fis j∈K ∑ Bc*ij

i∈T hs

i

s

(A.2)

i

Tc c where Bijc* ≡ ∑t)1 Bijt . Note that we have made use of the fact that, because of the cyclic nature of the schedule,

Tc

∑ t)1

Tc

Bij,τ(t-pis) )

Bcijt ) Bc* ∑ ij t)1

Because of the allocation constraints 25, the maximum number of batches of task i that can be performed over the cycle period Tc for an active campaign (i.e., Xc ) 1) is Tc

Tc/pi g

Wcijt ∑ t)1

(A.3)

From the batch-size constraints 27, summing over

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

time t we get Tc

Tc

Wcijt g ∑ Bcijt ) Bc* ∑ ij t)1 t)1

Vmax ij

(A.4)

where Vijmax ≡ φijmaxVj. Combining (A.3) and (A.4), we get c* Vmax ij Tc/pi g Bij g 0

(A.5)

We now consider (A.2) and (A.5) together. It is obvious that the ∆Ssc variable will take its maximum value when all the Bijc* in the first summation of (A.2) are set to their maximum value while the ones in the second summation are set to 0. In any case, ∆Ssc cannot exceed the available storage capacity Cs. We therefore have

∆Smax ) min(Cs, sc

FhisTc/pi ∑ Vmax ∑ ij ) j∈K i∈T h s

(A.6)

i

Similarly, the minimum value of ∆Ssc is taken when c* the Bijt in the first summation are set to 0 while those in the second one take their maximum value:

∆Smin sc ) -min(Cs,

FisTc/pi ∑ Vmax ∑ ij ) i∈T j∈K s

(A.7)

i

max Both ∆Smin may be calculated a priori for sc and ∆Ssc every state s. For feed states, T h s ) { } f ∆Smax ) 0, sc while for product states, Ts ) { } f ∆Smin ) 0. sc A.2. MILP-Based Bounds Derivation. One problem with the above bounds is that they are derived by considering each state in isolation, taking account only of the processing capacity available to the tasks with which it interacts directly. However, very often the net change in the inventory of state is restricted not only by limited processing capacity but also by the limited availability of other types of material used for producing this state. Further improvement of these bounds may be obtained by solving a series of MILPs for every state s in each campaign

c max(Ss,T - Scs0) c+1 (s,c)

subject to cyclic scheduling constraints 25-39 for campaign c. In practice, this procedure may require large computational times if a large number of MILPs need to be solved. There are two approaches to overcoming this difficulty. One is to solve only the LP relaxation of the above problem. Alternatively, one can still solve the MILP but replace the exact cyclic scheduling constraints by their aggregate versions as suggested by Papageorgiou and Pantelides (1995). Literature Cited Barbosa-Po´voa, A. P. F. D. Detailed Design and Retrofit of Multipurpose Batch Plants. Ph.D. Thesis, University of London, 1994. Birewar, D. B.; Grossmann, I. E. Incorporating Scheduling in the Optimal Design of Batch Processes. Comput. Chem. Eng. 1989a, 13, 141-161. Birewar, D. B.; Grossmann, I. E. Efficient Optimization Algorithms for Zero-Wait Scheduling of Multiproduct Batch Plants. Ind. Eng. Chem. Process Des. Dev. 1989b, 28, 1333-1345. Birewar, D. B.; Grossmann, I. E. Simultaneous Production Planning and Scheduling in Multiproduct Batch Plants. Ind. Eng. Chem. Res. 1990, 29, 570-580. Crooks, C. A. Synthesis of Operating Procedures for Chemical Plants. Ph.D. Thesis, University of London, 1992. Glover, F. Improved Linear Integer Programming Formulations of Nonlinear Integer Problems. Manage. Sci. 1975, 22, 455460. Hasebe, S.; Hashimoto, I. Present Status of Batch Process Systems Engineering in Japan. NATO Advanced Study Institute on Batch Processing Systems Engineering, Antalya, Turkey, 1992.

Kondili, E.; Pantelides, C. C.; Sargent, R. W. H. A General Algorithm for Scheduling Batch Operations. Proceedings Third International Symposium on Process Systems Engineering; The Institution of Engineers, Australia: Sydney, Australia, 1988; pp 62-75. Kondili, E.; Pantelides, C. C.; Sargent, R. W. H. A General Algorithm for Short-Term Scheduling of Batch Operations. Part IsMathematical Formulation. Comput. Chem. Eng. 1993, 17, 211-227. Mauderli, A.; Rippin, D. W. T. Production Planning and Scheduling for Multi-purpose Batch Chemical Plants. Comput. Chem. Eng. 1979, 3, 199-206. McCormick, G. P. Computability of Global Solutions to Factorable Nonconvex Programs: Part IsConvex Underestimating Problems. Math. Program. 1976, 10, 147-175. Pantelides, C. C. Unified Frameworks for Optimal Process Planning and Scheduling. Proceedings Second Conference on Foundations of Computer-Aided Operations; Rippin, D. W. T., Hale, J. C., Davis, J. F., Eds.; CACHE Publications: Austin, TX, 1994; pp 253-274. Papageorgiou, L. G.; Pantelides, C. C. A Hierarchical Approach for Campaign Planning of Multipurpose Batch Plants. Comput. Chem. Eng. 1993, 17S, S27-S32. Papageorgiou, L. G.; Pantelides, C. C. Optimal Campaign Planning/Scheduling of Multipurpose Batch/Semicontinuous Plants. 2. A Mathematical Decomposition Approach. Ind. Eng. Chem. Res. 1995, 34, 510-529. Parakrama, R. Improving Batch Processes. Chem. Eng. 1985, Sept, 24-25. Reklaitis, G. V. Perspectives on Scheduling and Planning of Process Operations. Proceedings Fourth International Symposium on Process Systems Engineering, Montreal, Canada; 1991. Reklaitis, G. V. Overview on Scheduling and Planning of Process Operations. NATO Advanced Study Institute on Batch Processing Systems Engineering, Antalya, Turkey, 1992. Rippin, D. W. T. Batch Process Systems Engineering: a Retrospective and Prospective Review. Comput. Chem. Eng. 1993, S17, S1-S13. Shah, N.; Pantelides, C. C. Optimal Long-term Campaign Planning and Design of Batch Operations. Ind. Eng. Chem. Res. 1991, 30, 2308-2321. Shah, N.; Pantelides, C. C.; Sargent, R. W. H. Optimal Periodic Scheduling of Multipurpose Batch Plants. Ann. Oper. Res. 1993a, 42, 193-228. Shah, N.; Pantelides, C. C.; Sargent, R. W. H. A General Algorithm for Short-Term Scheduling of Batch Operations. Part IIsComputational Issues. Comput. Chem. Eng. 1993b, 17, 229-244. Tsirukis, A. G.; Papageorgaki, S.; Reklaitis, G. V. Scheduling of Multipurpose Batch Chemical Plants with Resource Constraints. Ind. Eng. Chem. Res. 1993, 32, 3037-3050. Tsirukis, A. G.; Reklaitis, G. V. Feature Extraction Algorithms for Constrained Global Optimization I. Mathematical Foundation. Ann. Oper. Res. 1993a, 42, 229-273. Tsirukis, A. G.; Reklaitis, G. V. Feature Extraction Algorithms for Constrained Global Optimization II. Batch Process Scheduling Application. Ann. Oper. Res. 1993b, 42, 275-312. Voudouris, T. V.; Grossmann, I. E. Optimal Synthesis of Multiproduct Batch Plants with Cyclic Scheduling and Inventory Considerations. Ind. Eng. Chem. Res. 1993, 32, 1962-1980. Wellons, M. C.; Reklaitis, G. V. Optimal Schedule Generation for a Single-Product Production LinesI. Problem Formulation. Comput. Chem. Eng. 1989a, 13, 201-212. Wellons, M. C.; Reklaitis, G. V. Optimal Schedule Generation for a Single-Product Production LinesII. Identification of Dominant Unique Path Sequences. Comput. Chem. Eng. 1989b, 13, 213-227. 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 Formation and Production Planning. Ind. Eng. Chem. Res. 1991b, 30, 688-705.

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

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