Flexible Batch Process Planning - Industrial & Engineering Chemistry

A simulated annealing algorithm for batch process planning is described. The fortmulation treats a broad range of problems involving a general profit ...
1 downloads 0 Views 459KB Size
Ind. Eng. Chem. Res. 2000, 39, 2045-2055

2045

Flexible Batch Process Planning Yang Gul Lee* and Michael F. Malone Department of Chemical Engineering, University of Massachusetts, Amherst, Massachusetts 01003-3110

A simulated annealing algorithm for batch process planning is described. The fortmulation treats a broad range of problems involving a general profit function with discrete demands and due dates. It is targeted to the planning of a batch process operated in “open shop” mode with minimum inventory and maximum on-time performance. The approach is demonstrated in case studies of a parallel network flowshop or “multiplant” structure with a zero-wait storage policy between stages. The effects of setup time and setup costs on the schedule and production capacity are illustrated in several case studies. A large and general case analogous to a real industrial problem is included. The approach finds significantly better solutions than the first come first serve, shortest processing time, or earliest due date heuristics often used for production scheduling. Introduction Batch process scheduling and planning have recently received greater attention in the literature as chemical and related processes evolved for the production of many different types of high-value-added products.1-5 However, most scheduling problems are known to be “NPhard”, and because of the related computational demands, approximate methods using heuristics have been developed.3 These methods are fast but sometimes end up with a solution far from optimal. Another approach to scheduling and planning is mathematical programming which adopts a multiperiod LP model1,2,5 in which the production horizon is divided into several fixed-length periods. In each period, the production level is decided to optimize an objective function. The problem formulation for mathematical programming is not easy to generalize, and each problem having different features is formulated separately. The formulation for large problems must be tailored in order to get an optimal or a near-optimal solution in reasonable times. A new approximate method, simulated annealing, has been introduced in the batch process scheduling.6-9 This method is suited to problems where the objective can be evaluated relatively quickly because it gains flexibility and reduced engineering time through increased function evaluations. Thanks to dramatic reductions in the cost of computing, the engineering time in formulating a problem or tailoring an algorithm in a mathematical programming approach is more costly than the calculation time of simulated annealing in some classes of problems. Especially for larger problems, simulated annealing offers advantages even though there are certain problems for which more rapid and exact algorithms are available.10 Another advantage of simulated annealing is its versatility in handling fairly general objective functions and constraints. Hence, one simulated annealing algorithm can often be used for a broad range of problems and parameters without modifying or tailoring the algorithm. In most previous studies of batch process planning, the multiperiod planning model was used and it was * To whom correspondence should be addressed E-mail: [email protected]. Present address: ExxonMobil Research & Engineering, P.O. Box 480, Paulsboro, NJ 08066.

implicitly assumed that batch processes operated in a “closed-shop” mode where customer requests are fulfilled by inventory and production tasks result from inventory replenishment decisions. However, there is often an incentive to operate batch plants in the “openshop” mode,11 in which production orders are made directly to the batch plant by customer requests. The major benefit of an open shop is much less inventory than in a closed shop, but keeping due dates is crucial. Therefore, meeting due dates of every customer order is a major goal of production planning and scheduling of an open shop. So far, most studies for batch chemical process planning and scheduling have dealt with the closed shop but only a few studies focused on the importance of keeping due dates.7,12 In this paper, we describe a new and flexible approach to the planning of batch processes whose structure is a parallel network flowshop or multiplant operated in the open-shop mode. The versatility of simulated annealing allows us to use a general objective function consisting of the net present value (NPV) of revenues, the due date penalties, the inventory costs, and the setup costs. We developed a new set of moves for the simulated annealing algorithm to handle discrete demands and due dates. The same algorithm is suitable for planning problems, with constraints such as intermediate products and/or incompatibility of some products with certain pieces of equipment. Background The simulated annealing algorithm is an approximation method based on a model for the physical annealing process originally developed for the solution of phase equilibrium models.13 It was applied for the first time to combinatorial optimization in the design of integrated circuits.14 The early applications were developed without formal study of the method, but an asymptotic convergence proof based on Markov chain theory was developed later.15 The first applications in chemical engineering include heat exchanger network synthesis, piping network optimization,16,17 and sequencing of batch chemical production.6-8,18 Das et al.6 solved minimum makespan problems in batch scheduling with simulated annealing and found that the annealing schedule of Aarts and Van Laarhoven15 along with the

10.1021/ie990185m CCC: $19.00 © 2000 American Chemical Society Published on Web 04/27/2000

2046

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000

Figure 1. Multiplant structure.

Metropolis criterion gave somewhat better results than exponential cooling14 or other acceptance criteria. Simulated annealing has been applied primarily for the optimization of discrete variables. However, it can also be used for continuous variable optimization.19,20 Tricoire9 adapted a simulated annealing algorithm to solve several difficult chemical engineering problems such as the determination of multiple steady states in polymer reactors or azeotropes in ternary and quaternary mixtures. Optimal control problems have also been solved successfully, but those are not discussed here. In this work, we used the Metropolis acceptance criterion and the exponential cooling schedule. The parameters for the cooling schedule will be described later.

The size factor is the size of a process unit required to produce a unit amount of a product. The size factor for each task is required to estimate the batch size of a product in each production line. The objective function is the net profit which consists of the product value less manufacturing costs such as raw materials, processing, and labor. In the planning of an open shop, it is crucial to find a production plan that meets demands on time (or to identify when this is impossible for the given data) and that takes the inventory cost into account. To find these plans, we use due date penalties in the objective. The penalty for early production is the inventory cost for holding finished products. A penalty or shortage cost for late production is also included; this will often be larger than the inventory cost and, in fact, may be essentially infinite. Because equipment changeover has significant potential costs and because this depends on the number of changes between products, the setup cost is also considered as a separate term. The capital investment for units is not considered in this study because we consider the equipment to be fixed. The resulting objective function is to maximize a profit penalized by due date (lateness) penalties, inventory (earliness) costs, and setup costs. For production line l, the net present value (NPVl) and the net penalized present value (NPPVl) are Ncl Nbj

NPVl )

∑ ∑{VpBp,l exp[-r max (tf , td )] i)1 j)1 j

p

PRMpBp,l exp[-rtsj]} (1) Problem Definition The multiplant structure (Figure 1) is a set of production lines (network flowshops). Each production line has a sequence of stages, and each stage involves one or more pieces of processing equipment (units) and may be separated by intermediate storage. For simplicity, only zero-wait intermediate storage is used in this study. The number of stages can be different in each production line and the set of units in each stage can process one or more operations (tasks). This “task-tounit assignment” does not change during the production horizon. The sequence of stages in each production line is fixed, and a product is processed by passing through the sequence of stages in that production line. Because each product has a recipe (a sequence of tasks for its production), there can be an incompatibility between products and lines when a unit in a production line cannot execute a task in the recipe of a product (“product-to-unit compatibility”). When a production line has no stage that can execute a task required for a product, then the product is not compatible with that line. The goal of batch process planning is to determine a feasible production plan which maximizes an objective function, given the following information: (i) number of production lines; (ii) number of stages in each production line; (iii) number, types, and sizes of parallel units in each stage; (iv) task-to-unit assignments; (v) product-to-unit compatibility; (vi) production horizon; (vii) product structure of intermediate and final products; (viii) product recipe; (ix) processing times, setup times, transfer times, and size factors for each task; (x) product values, raw material, processing, and setup costs for each product; and (xi) demands and due dates for each product.

Ncl

NPPVl ) NPVl -

{CS + CV + CD } ∑ i)1 i

i

i

(2)

where Ncl and Nbi are the number of campaigns in production line l and the number of batches in campaign i, respectively. The subscript p represents the product produced in campaign i and Bp,l is the batch size of product p on production line l. Note that Bp,l is decided by the smallest stage batch size of product p among all of the stages on production line l. The stage batch size (bp,k) is equal to the unit size (uk,l) on stage k divided by the size factor (Sp,k). Vp is the product value and PRMp is the manufacturing cost which is the sum of the raw material costs, processing costs, and labor costs for product p produced in campaign i (these can also be treated separately, e.g., according to differential labor rates for different shifts, etc., though we do not include this here). The completion time and the starting time for batch j are tfj and tsj, respectively; tdp is the due date of product p. The discount rate for continuous compounding is r. CSi is the setup cost for campaign i and is imposed only when the product produced in the previous campaign; i - 1, is different from that of the present campaign. (If the data are available, it is simple to make these setup costs sequence-dependent, but this is not our focus here.) CVi and CDi are the inventory cost and the due date penalty charged during campaign i, respectively. Their values are discussed in the following section. The profit objective is as follows: Nl

Profit )

NPPVl ∑ l)1

(3)

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000 2047

Inventory Cost The inventory costs can be simplified into two categories: capital cost and storage cost. The capital cost is the loss of opportunity to invest funds tied up in inventory and is mainly determined by the annual discount rate. The storage cost includes all other costs required to maintain the inventory in a physical facility. The capital inventory cost is often the most significant component of holding costs.21 However, certain highvalue-added products may need special treatment such as refrigeration, humidity control, etc. In that case, the storage cost may become the dominant component of the inventory cost. In this study, those two types of inventory costs are implemented separately and the methods to estimate them are described in this section. To estimate the inventory cost of each product, it is required to calculate the completion time of each campaign in a production plan. The minimum batch size of each product in a production line is calculated from its size factor and the size of units in each stage of that production line. Then, the minimum batch size is used to estimate the number of batches produced in a campaign. The length of the campaign is estimated from the number of batches. A more detailed derivation for the completion time calculation can be found in ref 9. Consider the situation (Figure 2a) where a batch in campaign i producing product p begins at t1 and is completed at t2. It is first stored in the inventory and then delivered to the customer at its due date (tdp). The net present value if the income is earned at the due dates of a product (NPV1) is

NPV1 ) VpBp,l exp[-rtdp] - PRMpBp,l exp[-rt1]

(4)

NPV2 is the net present value when a batch of product is sold as soon as it is produced.

NPV2 ) VpBp,l exp[-rt2] - PRMpBp,l exp[-rt1]

(5)

(INVcj )

The capital inventory cost of batch j producing product p is the difference between NPV2 and NPV1.

INVcj ) VpBp,l(exp[-rt2] - exp[-rtdp])

(6)

This inventory cost is greater than zero only when the completion time (t2) of a batch is before the due date time (tdp). If a batch is produced after the due date time (t2 > tdp), it is assumed that the batch is shipped instead of being stored in the inventory. Therefore, the capital inventory cost is zero. However, the due date penalty for the lateness is charged as discussed in the next section. After the completion time calculation, the storage inventory cost is estimated from a production plan and the given due dates as follows. First, a list of all relevant events for each product, including starting and completion times of campaigns as well as due dates, is generated. These events are then ordered chronologically; the inventory level is initialized to zero and incremented by applying the following operations successively at the time of each event. If the event is a due date, the amount due is subtracted from all of the following events. If the event is the beginning of a campaign, the amount of the product produced in this campaign is added to all of the following events. For simplicity, a continuous average production rate is assumed to estimate how much of a product is produced

Figure 2. Schematic for calculation of (a) capital cost for inventory and (b) storage cost inventory and due date penalty.

at any event time between the beginning and end of a campaign. Finally, the storage inventory cost (INVsl ) and due date penalty (CDi) of a campaign i are estimated by integrating the inventory level above and below the abscissa, respectively, as shown in Figure 2b. This gives

INVsi ) rvpArea1

(7)

CDi ) rdpArea2

(8)

where rvp and rdp are the storage inventory cost and due date penalty coefficients of product p which is produced in a campaign i, respectively. The total inventory cost (CVi) of campaign i in eq 2 is the sum of capital inventory costs and storage inventory costs. Nbi

C Vi )

INVsi

+

INVcj ∑ j)1

(9)

Simulated Annealing Algorithm The performance of the algorithm was not very sensitive to the choice of the parameters. In this study, the Kirkpatrick cooling schedule is used.

Ti+1 ) RTi

(10)

The parameters are the initial temperature (T0), the cooling rate (R), the length of the Markov chain, and a stopping criterion. The initial temperature should be high enough to accept essentially all of the generated solutions. This means that the initial acceptance ratio (the ratio between the number of accepted solutions and the total number of randomly generated solutions) at T0 should be close to 1.0. In contrast, the cooling process should proceed until the acceptance ratio is close to zero.

2048

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000

Table 1. Types of Moves

idle time may reduce the earliness for some batches but delay the production of others. The idle time is sometimes desirable in order to take advantage of the excess capacity of the plant at certain times in order to provide some flexibility in the schedule. This flexibility can be used to carry out regular maintenance or to accommodate uncertainties due to new orders, breakdowns, off-specification production, etc. Intermediate Products

We acquire T0 empirically so that the acceptance ratio is close to 1.0. The cooling stops if the average profits at four consecutive temperatures are below a prefixed value.15 The prefixed value for the termination is decided empirically so that the acceptance ratio becomes close to zero. Another requirement in the cooling process is that, for the Markov chain constructed at each cooling temperature, the distribution of importance-sampled data is close to the equilibrium distribution. In other words, the process remains in quasi-equilibrium during the cooling process. To maintain quasi-equilibrium, the cooling process should be slow or the length of the Markov chain should be long. This condition is realized by setting the cooling rate parameter (R) between 0.90 and 0.98, and the length of the Markov chain is decided by precalculations. Another component of a simulated annealing algorithm is the generation of new solutions (moves) from the previous solution. In order to guarantee asymptotic convergence of a simulated annealing algorithm, it must be possible to generate any feasible solution. Among the possible moves that could be used for given types of problems, only some sets of moves yield good solutions. For example, both large and small perturbations should be generated proportions so that the entire solution space can be explored efficiently while allowing relatively small adjustments near the optimal solution. When the temperature is high at the beginning of the algorithm, nearly all moves are accepted but only small changes are accepted near the end of the annealing. Therefore, some moves must be large enough to escape from a local optimum in a reasonable number of moves, while others should be small enough to approach the global optimum closely. We have designed and tested a set of moves for batch process planning problems. These are in four categories shown in Table 1. To generate a random move during the calculation, the relative proportion of moves from each category is set to be equal. These proportions do not change the final solution very much, but in certain problems removing some move types increases the calculation efficiency. For example, if a process has only dedicated production lines, we can reduce the proportion of line assignment moves to zero and increase the others. When idle time is added in the form of “dummy” batches, the penalties for early production can be reduced. However, when a batch plant is fully utilized,

Batch processes often produce various types of products using the same set of units. The product structure in chemical technology is usually complicated by the presence of intermediate products which are raw materials for other products. To make a production plan feasible, intermediates must be prepared before their final products are processed. We deal with intermediates without any major changes in the algorithm. First, the due dates for intermediate products are set to the end of the production horizon. The due date penalty will make all of the required amount of intermediate produced within the horizon. However, there might be local infeasibility in which an intermediate product is late for the production of its final product in some period of the production horizon. A penalty method was adopted to make all of the intermediates produced ahead of final products through the production horizon. Additional input data for treatment of intermediates are the intermediate-final products relationship, i.e., product structure, and the stoichiometry between them. Using the data, we estimate the lateness or earliness penalties for an intermediate product and add them to the penalty terms of NPPV (eq 2). Compatibility of Products In the multiplant structure, there may also be a compatibility problem between production lines and products. When a task in the recipe for a product cannot be executed in a unit in a production line or a task for a product cannot be performed in a production line because there is no stage for that task in that line, there is incompatibility between the product and the production line. Considering the compatibility, an algorithm must assign the campaigns of a product only to compatible production lines. The simulated annealing algorithm handles this using a “product-to-unit compatibility” matrix. When the algorithm assigns or moves any campaign of a product to a production line during the random generation of a solution, it first checks the compatibility matrix between all of the units in that production line and the product. Then, it checks that all of the tasks in the recipe of that product can be done in that production line. The solution is rejected and another is generated when an incompatibility is found. Examples The relation between the inventory cost and setup cost has been a big issue in production planning for closed shops.22-24 In the planning of an open shop, meeting due dates is the most important issue and how to find a production plan which produces all of the demands on time with a given batch process is the most important goal. Reducing inventory costs may be a

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000 2049 Table 2. Cost Data, Due Dates, and Demands for All Products in the Base Case Examplea

product

product price ($/kg)

PRM cost ($/kg)

due date penalty coeff. ($/kg/week)

inventory cost coeff. ($/kg/week)

A B C D

14.693 14.421 10.907 12.507

4.927 4.441 6.454 7.004

5.000 5.000 5.000 5.000

5.000 5.000 5.000 5.000

a

product

due date time (h)

product demand (1000 kg)

A A B B C C D D

500 2000 1000 2500 1300 1900 800 1500

70.0 32.8 50.0 99.5 60.0 82.6 63.5 80.0

Annual discount rate (r) ) 15%. b Setup cost ) $100/changover.

second goal. The inventory cost and the setup cost are intimately related to the lot sizing of production campaigns. That is, there is a trade-off between the setup cost and inventory cost. When setup costs are not large, the inventory cost can be minimized by many short campaigns and by running all production lines simultaneously before the due dates. By this is done, the length of time when finished products are stored as inventory is minimized. However, if setup costs are significant, longer campaigns are preferred to reduce the number of changeovers. The setup cost also interacts with the due date (lateness) penalty in the planning of an open shop. Particularly when an open shop is in a capacity-limited condition, some of the demands cannot be produced on time because of the longer campaigns caused by the large setup costs. In the following cases, we will show how the due date penalty, the inventory cost, the setup time, and the setup cost interact in the production planning of an open shop. For these case studies, we prepared a base case example a follows. A multiplant has three identical production lines which each consist of five processing stages with the zero-wait storage policy. Each stage has one processing unit which has the same size, 10 m3, and performs a single task. There are four products to be produced, and they all have the same recipes which are composed of five tasks in series. All of the units are compatible with each product. Therefore, all of the products are compatible with any production line. There are no intermediate products, and the production horizon is 3000 h. The cost data, the due dates, and the demands are summarized in Table 2. The processing time and size factors are shown in Table 3. Except as noted, cases 1-4 are based on these numerical values. Case 1: No Penalties or Setup Costs. When there are no due dates and no inventory costs, the profit function is equal to NPV in eq 1. In this case, the product values are credited at the completion time of each batch within a campaign. The only factor affecting the profit is the interest income on the revenue. In this case, the best plan is to produce the most valuable product first (Figure 3) as might be expected. In the “production plan diagram” of Figure 3, each horizontal bar represents a campaign. The character and the numbers above or below a production campaign indicate the product and the number of batches produced in that campaign, respectively. The vertical line shows a due date time of a product which is marked on top of each due date line. The thicker vertical line at 3000 h represents the production horizon. An “inventory diagram” corresponding to this production plan is shown in Figure 4, where the solid line is the inventory level of each product. The vertical lines show the due dates. The numbers at the top and bottom of a due date line

Table 3. Processing Time Data and Size Factors in the Base Case Example

product

task

processing time (h)

A

1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

22.9 20.8 11.9 9.6 10.7 21.9 8.4 14.6 28.3 28.6 26.3 24.4 23.0 27.5 16.5 9.9 15.6 22.9 22.9 22.0

B

C

D

setup time (h)

transfer time (h)

size factor (m3/1000 kg)

4.37 1.29 2.42 3.02 2.65 1.24 1.74 3.09 4.97 0.33 3.70 0.17 0.47 3.97 1.89 0.21 4.47 0.99 1.38 1.30

1.132 1.369 1.325 1.158 1.383 1.288 1.220 1.367 1.058 1.122 1.545 1.157 1.036 1.163 1.142 1.269 1.268 1.047 1.292 1.334

3.137 4.727 3.124 4.334 3.137 3.93 4.99 4.19 4.69 4.57 2.97 2.96 2.29 3.16 4.09 4.94 3.12 2.80 1.63 2.00

represent the due date time and the amount due at that time, respectively. Note that negative inventory levels represent shortages. In this production plan, products C and D are very late while products A and B have a lot of inventory. Therefore, this production plan is not at all suitable when the due date penalties and inventory costs are important. Case 2: High Due Date Penalties. In practice, it is often critical for a batch plant to keep due dates as far as possible. In other words, due date penalties are typically severe. To study this situation, we consider a large due date penalty (rdp ) 5.0 ($/kg/week)) and zero inventory cost coefficient (rvp ) 0.0 ($/kg/week)) for all products. However, the capital inventory cost is taken into account in this case, even for a zero inventory cost coefficient, simply because the objective includes the present value of the revenues. Figure 5 shows the best production plan found. The corresponding inventory diagram in Figure 6 shows that there are no shortages during the production horizon. This plan produces a total to 583.4 × 103 kg of four products, all on time. The total capital inventory cost is $31 970, and because all of the demands are satisfied on time, then the next target is to reduce this inventory cost. Figure 5 suggests that, in order to minimize the inventory cost, we may use all of the production lines simultaneously near the due dates of each product, which minimizes the duration that finished products are stored as inventory. This depends on the setup times and costs, which are studied below.

2050

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000

Figure 3. Best production plan found for case 1 (no penalties for late or early production).

Figure 4. Inventory diagram for the production plan in Figure 3.

With given product demands and due dates, it is useful to know if there is any solution where all of the demands are met on time. In this case, there is such a solution and the process can meet the demands at the times and amounts specified. In other cases, for due dates much closer to one another, this may not be possible, and the approach described here can be used to assess this situation as it changes with the market demands. This is equivalent to deciding if a batch process will be overutilized or underutilized and at which times. Furthermore, the demands that can be

most profitably satisfied, in whole or in part can be decided by adding a move that places some part of the demand into another facility (elsewhere or subcontracted, etc.). Cases 3: Large Setup Times. All of the setup times for products are increased by 10 times those in Table 3 to generate case 3. Except for the large setup times, the other parameter values were used as in case 2. Figure 7 shows the resulting production plan. Because of the large setup times, there are a smaller number of campaigns than for case 2. Many changeovers will make

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000 2051

Figure 5. Best production plan found for case 2 (large due date penalties are charged on all of the products).

Figure 6. Inventory diagram for case 2; every product is produced on time.

some of products violate their due dates because the long setup times reduce the available production time within the horizon. To make up for the low time utilization and to reduce late production, the number of changeovers should be minimized. For the plan shown in Figure 7, 4.65% (25.05 × 103 kg) of the demands are late. Case 4: Large Setup Costs. The effect of setup costs is similar to the setup times in that it leads to a few

long campaigns in the production plan (Figure 8). The production planning was carried out with the setup costs of $75 000/changeover for each product. Reducing the number of changeovers and keeping a few long campaigns increase the inventory cost and the late production. In contrast, the total setup cost increases when many small campaigns are used. Figure 9 shows that, in the best production plan, some of products are in shortage because longer campaigns are used to mini-

2052

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000

Figure 7. Best production plan found for case 3 (long setup times). The number of changeovers is reduced, but all of the products are on time.

Figure 8. Best production plan for case 4 (large setup costs). The large setup costs result in a few long campaigns with a length decided by the competition between due date penalties and setup costs.

mize the setup cost. In this case, 14.1% (76.14 × 103 kg) of demands were not produced by the due dates. The capital inventory cost was increased by 20.05% ($38 380). Thus, the capacity of the process for this set of conditions is insufficient. Cases 3 and 4 demonstrate the trade-off between the inventory cost and the setup cost or revenue loss during setup times. It is also shown that the effective capacity of a batch process changes according to its setup times and costs. For example, the production of some products can be made on time if a few of the other products are removed from the schedule, e.g., made in another facility or purchased, etc. The method described here can easily be used to assess changes in the batch process capacity under various given conditions as reflected in changes of the demand patters and parameter values. A General Case. To see the overall performance of the simulated annealing algorithm, we prepared a general case combining many of the features in the previous cases. This example has 30 products, 11 of them intermediates for others. The product structure and stoichiometry between intermediates and final products are shown in Table 4. There are 127 demands and due dates for the 30 products (A-Z and a-d) within the 8640 h of the production horizon. Ten production lines are available, and the compatible products for each line are summarized in Table 5. Each production line has either two or three stages; between the stages a zero-wait intermediate storage policy is used. The setup time varies between 24 and 312 h/changeover depending on the product, and the setup cost is up to $45 000/

Table 4. Product Structure and Stoichiometry between Intermediates and Final Products in the General Casea

a The boldface and italic characters represent the final and intermediate products, respectively.

changeover. The due date penalties are large; each product is set to 50% of the product value; i.e., we lose 50% of the product value when it is 1 week late. The input data used for this case are summarized in the Supporting Information for this paper. The best solution is presented in Figure 10 and was obtained in 49.9 CPU min using a DEC Alpha Station 250 running Windows NT 4.0. The campaigns of all

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000 2053

Figure 9. Inventory for case 4. Some demands are slightly late for this set of parameters because the due date penalties are outweighed by the setup costs for changeovers. Table 5. Compatible Products of Each Line in the General Case production line 1 2 3 4 5

products are lines. All 11 produce final are produced

compatible products

production line

A, F, G, M B, H, I, L, S B, C, I, L, T, V E, K, T, Y, Z, a, c J, Y, U, b

6 7 8 9 10

compatible products D, Q, R D, N, U Q, W, X, d O, d P

assigned to the compatible production intermediates are prepared in time to products, and all of the 19 final products on time.

Comparison with Heuristics In comparison to the simulated annealing algorithm, we tested sequencing rules25 that are frequently used for real production scheduling. These are the FCFS (first come first serve), SPT (shortest processing time), and EDD (earliest due date). In FCFS, demands are processed in the sequence in which they are ordered. In this case, we assume that the sequence is Al, A2, B1, B2, C1, C2, D1, and D2, where A1 and A2 are the demands of product A at its first and second due dates and so forth. With SPT, we produce the product de-

Table 6. Profits, NPVs, Due Date Penalties, and Inventory Costs of the Product Plans Obtained by Heuristics and Simulated Annealing Algorithma heuristics

profit ($)

NP ($)

due date penalty ($)

inventory cost ($)

FCFS EDD SPT SAb

-0.175 × 106 2.901 × 106 2.596 × 106 3.771 × 106

3.783 × 106 3.805 × 106 3.805 × 106 3.804 × 106

3.900 × 106 0.877 × 106 1.181 × 106 0.000 × 106

0.580 × 105 0.264 × 105 0.283 × 105 0.320 × 105

a The input data for case 2 were used for this test. b Simulated annealing.

mands having the shortest processing time first. In this example, the sequence acquired by the SPT rule is A2, C1, B1, D1, A1, D2, C2, and B2. The EDD rule processes the demand in increasing order of their due dates. The sequence of demands by the EDD rule is Al, D1, B1, C1, D2, C2, A2, and B2. The input data for case 2 were used for this test, and each demand in the sequence by each rule is assigned to a single campaign on a production line by turns. The profits, the NPVs, the due date penalties, and the inventory costs for the solution obtained by the three rules and those from the best solution we found for case 2 are summarized in Table 6. All of the rules have much lower profits than the best solution of case 2. The plan from FCFS produces all of

2054

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000

Figure 10. Best production plan for the general case.

product D very late and carries the large inventories of products A, B, and C. The plans of EDD and SPT have the same NPVs as the best solution of simulated annealing and the lower inventory costs. However, both of them produce some product demands very late, with large due date penalties. In contrast, the simulated annealing solution produces all of the demands on time but carries somewhat more inventory than the EDD and SPT plans.

Conclusions Batch process planning for parallel network flowshops can be done effectively using the simulated annealing technique and the associated move set described here. The algorithm seeks a solution which satisfies discrete demands and due dates and maximizes a profit function including the NPV of the product slate less the inventory and setup costs. Batch process planning problems

Ind. Eng. Chem. Res., Vol. 39, No. 6, 2000 2055

with intermediate products can also be solved by this algorithm. When there is product incompatibility, the approach assures that the campaigns of all of the products are assigned to compatible production lines. Case studies show how setup times and setup costs change the effective capacity of a batch process. The simulated annealing algorithm can be used to estimate the capacity as well as the degree of utilization of the batch process and how these change with the demand pattern, due dates, and other parameters. As shown in the general case, even with a large number of due dates and a complicated product structure, the algorithm can find good solutions even in the face of incompatibility between products and production lines. Compared to typical heuristics, this approach finds substantially better solutions. Every example was solved by the same software implementation and only a different input file for each case was prepared. In this work, we focused mainly on the implementation and demonstration of the algorithm. Therefore, we expect that there is potential to reduce the calculation time with further work. Because sustained decreases in computation costs are expected for some time, the utility of this approach should increase simultaneously. Acknowledgment This work was supported by the sponsors of the Process Design and Control Center, Department of Chemical Engineering, and by the National Environmental Technology Institute, University of Massachusetts, Amherst, MA. Supporting Information Available: Input data for the general case. This material is available free of charge at http://pubs.acs.org. Literature Cited (1) Birewar, D. B.; Grossmann, I. E. Efficient Optimization Algorithms for Zero-Wait Scheduling of Multiproduct Batch Plants. Ind. Eng. Chem. Res. 1989, 2, 1333. (2) Birewar, D. B.; Grossmann, I. E. Simultaneous Production Planning and Scheduling in Multiproduct Batch Plants. Ind. Eng. Chem. Res. 1990, 29, 570. (3) Kudva, G.; Elkamel, A.; Pekny, J. F.; Reklaitis, G. V. Heuristic Algorithm for Scheduling Batch and Semi-Continuous Plants with Production Deadlines, Intermediate Storage Limitations and Equipment Changeover Costs. Comput. Chem. Eng. 1994, 18, 859. (4) Lazaro, M.; Espuna, A.; Puigjaner, L. A Comprehensive Approach To Production Planning in Multipurpose Batch Plants. Comput. Chem. Eng. 1989, 13, 1031. (5) Papageorgiou, L. G.; Pantelides, C. C. Optimal Campaign Planning/Scheduling of Multipurpose Batch/Semi-Continuous Plants. 1. Mathematical Formulation. Ind. Eng. Chem. Res. 1996, 35, 488.

(6) Das, H.; Cummings, P. T.; LeVan, M. D. Scheduling of Serial Multiproduct Batch Processes via Simulated Annealing. Comput. Chem. Eng. 1990, 14, 1351. (7) Ku, H.; Karimi, I. A. Scheduling in Serial Multiproduct Batch Processes with Due Date Penalties. Ind. Eng. Chem. Res. 1990, 29, 580. (8) Malone, M. F. Batch Sequencing by Simulated Annealing. AIChE Annual Meeting, San Francisco, Nov 1989; Paper 23f. (9) Tricoire, B. Design and Scheduling of Multiproduct Batch Plants with Application to Polymer Production. Ph.D. Thesis, University of Massachusetts, Amherst, MA, 1992. (10) Miller, D. L.; Pekny, J. F. Exact Solution of Large Asymmetric Traveling Salesman Problems. Science 1991, 251, 754. (11) Graves, S. C. A Review of Production Scheduling. Oper. Res. 1981, 29, 646. (12) Musier, R. F. H.; Evans, L. B. An Approximate Method for the Production Scheduling of Industrial Batch Processes with Parallel Units. Comput. Chem. Eng. 1989, 13, 229. (13) Metropolis, N.; Rosenbluth, A. W.; Rosenbluth, M. N.; Teller, A. H.; Teller, E. Equation of State Calculations by Fast Computing Machines. J. Chem. Phys. 1953, 21, 1087. (14) Kirkpatrick, S.; Gelatt, C. D., Jr.; Vecchi, M. P. Optimization by Simulated Annealing. Science 1983, 220, 671. (15) Aarts, E. H. L.; Van Laarhoven, P. J. M. Statistical Cooling: A General Approach to Combinatorial Optimization Problems. Philips J. Res. 1985, 40, 193. (16) Dolan, W. B.; Cummings, P. T.; LeVan, M. D. Heat Exchanger Network Design by Simulated Annealing. In Foundations of Computer Aided Process Operations; Reklaitis, G. V., Spriggs, H. D., Eds.; CACHE Corp., Elsevier: New York, 1987. (17) Dolan, W. B.; Cummings, P. T.; LeVan, M. D. Process Optimization via Simulated Annealing: Application to Network Design. AIChE J. 1989, 35, 725. (18) Das, H.; Cummings, P. T.; LeVan, M. D. Application of Simulated Annealing to Scheduling of Serial Multiproduct Batch Processes. AIChE Annual Meeting, San Francisco, Nov 1989; Paper 23e. (19) Bohachevsky, I. O.; Johnson, M. E.; Stein, M. L. Generalized Simulated Annealing for Function Optimization. Technometric 1986, 28, 209. (20) Vanderbilt, D.; Louie, S. G. A Monte Carlo Simulated Annealing Approach to Optimization over Continuous Variables. J. Comput. Phys. 1984, 56, 259. (21) Love, S. F. Inventory Control; McGraw-Hill: New York, 1979. (22) Aggarwal, A.; Park, J. K. Improved Algorithms for Economic Lot Size Problems. Oper. Res. 1993, 41, 549. (23) Karmarkar, U. S. Lot Sizes, Lead Times and In-Process Inventory. Manage. Sci. 1987, 33, 409. (24) Trigeiro, W. W.; Thomas, L. J.; McClain, J. O. Capacitated Lot Sizing with Setup Times. Manage. Sci. 1989, 35, 353. (25) Nahmias, S. Production and Operations Analysis; Richard D. Irwin, a Times Mirror Higher Education Group, Inc.: Chicago, 1997.

Received for review March 15, 1999 Revised manuscript received August 26, 1999 Accepted March 16, 2000 IE990185M