Computers in Industry 18 (1992) 279-287 Elsevier
279
Applications
An application of network scheduling optimization in a pharmaceutical firm E n r i q u e D e l Castillo Department of Industrial and Management Systems Engineering, Arizona State University, Tempe, AZ 85287, USA
Received June 1, 1991 Revision accepted August 1, 1991 This paper describes an application of production scheduling optimization methods in a major pharmaceuticalfirm located in Mexico City, Mexico. A PC-based decision support system was developed based on the idea of network schedule representation and specific scheduling optimization algorithms were incorporated into the system.The systemcontains a graphical input interface, in which the user draws the network describing the scheduling problem in a manner that resembles p r o ject planning software. Our implementationof solution algorithms for minimizingtotal manufacturingtime, average flowtime, and lateness is discussed. An example illustrates the methodolo~ of solution for different types of situations typical of pharmaceuticalcompanies,
of active ingredients have made many pharmaceutical firms to look into advanced automatized processes. A typical example is the manufacturing process of tablets, the most used dosage in the world. Traditionally, transfer of materials and machine set-ups in this type of processes relied in manual operations. Today, flexible manufacturing
Keywords: Production scheduling, Pharmaceutical industry,
mainly because of the low cost of labor and the relatively high cost of capital. Typically, health care systems in developing countries are not as advanced as in developed countries, thus pharmaceutical firms confront high, steady demands in most of their products. Also, expensive active ingredients are usually imported, and this can be slow and difficult to monitor. These two circumstances suggest the reason why pharmaceutical firms in developing countries have adopted roodern MatcAal Resource Planning Systems (MRP II), while most of their production processes remain manual, batch-oriented. MRP II systems, based in the so-called closed-loop manufacturing approach, are now iraplemented and well understood in a variety of firms [2]. These systems have extended infiniteload MRP systems with some kind of capacity planning procedure. Nevertheless, scheduling
Applied optimization, Batch processing, Network schedule, Optimization, Decision support,
1. Introduction The pharmaceutical industry has evolved through many changes since the Second World War. These changes have been motivated mainly because of expanding Research and Development ( R & D ) investments. Some products have required R & D expenses in the order of 100 to 150 million dollars, and the benefits have been in the order of thousands of millions of dollars, Regulatory authorities demand very strict controis in manufacturing processes, due to health considerations, which makes the industry unique, Increasing competition, costs of labor and costs
systems are used increasingly in the pharmaceutical sector [1]. In developing countries, automation has not been fully implemented in this type of industries (as well as in many other types of industries)
0166-3615/92/$05.00 © 1992 - Elsevier Science Publishers B.V. All rights reserved
280
Appfications
problems tend to arise in practice. Manufacturing lead times are considered standard and given, and not a function of the facility workload. In addition to this, capacity planning " . . . Is usually done in an iterative, ad-hoc, manual fashion. The manual approach is often a frustrating and impossible task" [3]. Researchers have focused on scheduling algorithms using simulation studies and optimization techniques [4,5]. In particular, production scheduling network algorithms have been proposed in the Operations Research litersture. In the chemical industries, Janicke [6] discusses the relation between production scheduling and plant design for a multi-purpose batch chemical plant, This paper describes an application of production scheduling optimization methods in a major pharmaceutical firm located in Mexico City, Mexice. As mentioned above, this is a batch-oriented production facility that has to meet high demands. Although the company used a well-known MRP package for planning purposes, the production scheduling department encountered problems with day-to-day operations. Planners were using a project scheduling software (Microsoft Project) on a PC. Operations were represented by nodes in a critical-path (CPM) type of network as if they were activities of a project, and precedence relations were represented by directed arcs between the nodes. This set-up provided them with a simple yet powerful form of organization in the factory floor and its sole use was beneficial
EnriqueDelCastillowasbornin 1963. He has a BS in Industrial Engineering i k fro~l Panamerican University(Mexico • I City), a Master of Engineering in Uperations Research from Cornell University(U.S.A.)and is currentlya PhD candidate in the department of Industrial Engineeringat Arizona State University (USA) He has been a lec/ turerin Production Planning and Uperations Research at the Mexican Institute of Technology (ITAM), at S Panamerican University(MexicoCity) and at Arizona State University. He has also worked as a consultant for Pepsi Bottling Companyof Mexico, Kenworth Truck Companyand Mennen, and as a Systems Engineer for Cuproquim S.A., an agrochemical firm, in Mexico. His research interests include statistical quality control, production planning, inventorycontrol, and the application of optimization techniques in these areas, He is a member of IIE, ORSA and ASQC.
Computers in Industry
to the company. The project scheduling software provided database and critical-path analysis capsbilities, but it did not include specific production scheduling algorithms.
2. System description A PC-based decision support system was developed based on the idea of network schedule representation and specific scheduling optimization algorithms were incorporated into the system. Because of the familiarity planners had with project planning software, the system had to provide a graphical input interface similar to that type of software. Therefore, a graphical input interface was developed in which the user "draws" a network in a manner that resembles CPM software. The hardware and software requirements are minimal: an IBM PC el compatible with at least 128K of memory and a CGA monitor. For larger problems, using a more rapid PC (386based or 486-based) with a math coprocessor greatly improves solution speed for large problems. The program was coded in the Turbo Pascal programming language. An overall description of the system options is depicted in Fig. 1. The main difference between the system developed and CPM systems is the availability of production scheduling optimization algorithms that will be presented in the next sections. Jager et al. [7] recently reported a decision support system for a pharmaceutical company in which a large linear programming model was used for planning the production of active ingredients. Their system provides all the planning functions that an MRP II system provides. In this paper, on the contrary, we assume that the company has a fully operational MRP system and concentrate in solving day-to-day scheduling problems usually not addressed by MRP by means of a simple scheduling DSS. The remaining part of this paper presents the types of problems encountered in production scheduling in pharmaceutical firms and the algorithms used for their solution using the decision support system. An example will illustrate the methodology of solution for different types of situations that tend to arise in such firms.
Computers in Industry
E. Dei Castillo / Network scheduling optimization
3. Production scheduling problems
4. Disjunctive networks
The use of networks for representing production planning problems is widely known in scheduling theory [4,5]. In this representation, nodes (i.e., vertices) describe operations of diverse jobs that are going to be processed in some manufacturing facility. Directed arcs that link two nodes represent a precedence relation between two operations, that is, if n o d e / , say, has an arc directed to node j, then we are representing the fact that operation / has to be processed before operation j. Under this setup, a job is a set of operations to be processed in a set of machines, A machine is a specific step in the production process of a drug that has limited capacity and thus ha~ to be scheduled. We will use the notation (i, j ) - (job, operation). Machine conflicts may arise due to different operations "competing" for the same machine at the same time. The scheduling function consists in finding an assignment of operations to machines such that: (1) no machine conflict exists; (2) some performance measure is optimized, Blackstone et al. [8] provide a comprehensive study on different performance measures for scheduling problems. In this paper we will only concentrate on methods for minimizing the following four performance measures: (1) total manufacturing time (i.e., makespan);
(2) average flowtime of a batch through the facility; (3) fiowtime considering different priorities among the jobs; (4) lateness of jobs.
New
Change
model
current model
(Graphical input interface)
281
File manager
Solve
A simple network representation for the case of activities (in our case, operations) competing for scarce resources (machines) is the concept of disjunctive networks. A disjunctive network is a directed graph with two types of arcs: conjunctive arcs which join nodes (i.e., operations) that represent precedence constraints, and disjunctive arcs that join nodes that occupy the same resource (i.e., machines). Consider for example the scheduling problem depicted in Fig. 2. In this example, there are three machines in which nine operations are to be scheduled. Darker lines correspond to disjunctive arcs and lighter lines to conjunctive arcs. As another example consider the problem described in Fig. 3. This is a problem known in the scheduling literature as "flow-shop" since each job "flows" through the same operations. Such problem could arise, when, for example, two or more batches of the same product have to be produced, a situation very common in the pharmaceutical industry. Typically, most of the scheduling networks we have found in pharmaceutical firms belong to the flow-shop category. More formally, let G = (V, E) be a directed graph, where V is a set of jobs and E is a set of arcs, representing precedence relations. Suppose we have subsets V~ of V such that {V~}cover V and there is a function f" M --, V that assigns a machine mi in M to each V~. After processing the job element of Vk, m~ is available again to process other jobs in Vk. This condition can be
Oantt
Print
Update
(graphical output) .Production orders l.Operations d a m
- Load Save -Minimize makespan -Director~ -Minimize flowtime/priorities - PaU~ -Minimize lateness -
Fig. 1. Overview of the system's main options.
Quit
282
Applications
Computers in Industry
il \ ~
\
112%\. "-',,,J
/
"~L.~'
maclaine:(operations) c: (2,6,1o)
Fig. 2. A three-machine nine-operations network problem.
represented in a graph by introducing a pair of disjunctive arcs {(i, j), (j, i)} Vi, j in V k, i ~ j, such that there is no path connecting i with j (or viceversa) in G. Recently, White and Rogers [9] presented modeling strategies that extend the disjunctive network scheduling formulation to more general cases, such as assembly and disassembly operations, scheduled maintenance, and material handling delays. They show that the disjunctive formulation is more robust than what might be iramediately apparent. This work illustrates a practicai implementation of this conclusion.
5. Balas' implicit enumeration algorithm for minimizing total manufacturing time The classical n-jobs m..machines job-shop scheduling problem in which one attempts to minimize makespan is known to be an NP-Hard problem [10]. So in practice, any known algorithm
"
that attempts to solve this problem can only be used for small problems. In the pharmaceutical industry, routings have a relatively small number of operations, but the number of jobs (i.e., batches of the same product) can be very high and this adds c~mplexity to the scheduling problem. The increased complexity that many jobs bring to the scheduling problem is illustrated in the example section. In this section, we will present the computer implementation of an algorithm proposed by Balas that tries to minimize makespan. Balas' algorithm [11] finds a critical path in the disjunctive rather than in the co1~!unctive graph. An order is imposed between disjunctive arcs, resolving in this fashion machine e~,nflicts. Figure 4 shows a possible machine conflict resolution for the problem depicted in Fig 2. It has been our experience that galas' algorithm finds good solutions quickly, but assuring optimality is what makes the method to iterate almost forever for large problems. A default upper bound in the number of iterations (that can be changed by the user) was provided in our computer implementation. If the algorithm reaches this upper bound, it reports the best solution found so far. For explaining how machine conflicts are resolved in galas' algorithm, let
A={(i,j),(j,i)inV B: C3,6) c: (4,7) Fig. 3. A flow-shop problem,
k"
k f l,...,m}.
(i, j) and (j, i) are called settled if one of the arcs has been added to a subset of selected disjunctive arcs S and the other has been rejected.
Computers in Industry
E. Del Castilio / Network scheduling optimization
283
4
~t
hine:(operattons)
" ~.2 '
"~t_//
iX / I0
^: !3.~>
B: (4,$,7,9) C: (2,6,I0)
Fig. 4. A possible conflict resolution.
By doing so, we are imposing a precedence relation between jobs i and j (if we select (i, j) then job i has to be processed before job j in some common machine mk). The set S is a feasible selection if (i, j) in S iff (j, i) in ( S - A ) and if G(S)- (V, E u S) is acyclic. This selection resolves all machine conflicts by introducing an order between all jobs members of Vk, k = 1,...,m. Balas' algorithm finds a critical path for every feasible selection S using an implicit enumeration technique. Among these critical paths the algorithm finds the one with the least duration, and in this way it finds a schedule that minimizes the makespan. For a detailed description of the algorithm, see [11].
6. Dispatching rules for minimizing other performance measures In a pharmaceutical industry such as in Mexico, production orders (jobs) are usually not all equally important, something that Balas' algo-
rithm for makespan minimization ignores. For example, sales to any government agency usually have higher priorities, mainly since these agencies have widespread distribution facilities and thus order in large quantities. Another case is when work-in-process considerations give higher priorities to smaller orders in an attempt to reduce inventories quickly. When some of these situations arise in practice, dispatching rules can be used. Dispatching rules have received a lot of attention by researchers [4,8]. Most of the research has been conducted by digital simulation of a hypothetical shop, in which different rules were tested against different performance measures. Although some rules have very good performance with respect to several measures (see for example Conway's et al. "compound rule" [4]), they are too complex for practical implementation. The dispatching rules that the decision support system provides are shown in Table 1. Of all the simple rules perhaps the one that gives the best overall performance is SPT, shortest processing time. It is recommended when the
Table 1 Dispatching rules provided by the decision support system Name
Rule
Objective
SPT
Shortest processing time; job priority equals processing time.
Minimize average flow-time
WSPT
Weighted SPT; job priority is given by the ratio weight/processing time
Minimizes weighted processing time
DDATE
Due date dispatching; job priority is given by the due date
Minimize mean lateness of jobs
284
Applications
workload in the shop is very high since it tends to minimize mean flow time, and therefore, work in process or queue time [8]. A weighted version of this rule, WSPT, gives a similar performance as SPT but accounts for the case when jobs have different priorities. In our implementation, the user specifies the priorities with a numerical value, giving higher numbers to most important jobs. It can be proved that SPT scheduling mini-
Computers in Industry
Algorithm1 Non-delayschedule generation. Notation i
machine subscript
j job subscript {Sso}, set of schedulable operations in machine i (operations
s,jk
with all predecessors completed) completion time of current job in machine i potential starting time of operation k, job j in ma-
mizes average flowtime in the case of a singlemachine process [12]. Also, WSPT minimizes the total weighted flowtime for a one-machine problem as proved by Smith [13]. For the case of
Pjk
processing time of job j, operation k
EST
earliest time when a machine is available for process-
T
ing a job total number of operations to schedule
multi-stage, multi-machine production processes, simulation studies have shown a similar behavior of these rules. When due dates are fixed in a reasonable way with respect to the workload of the shop, it is recommended to use DDATE (due date) scheduling. J o b lateness tends to be re-
Algorithm
duced, and it is as simple as SPT or WSPT to implement in the shop floor. Jackson [14] showed how, for a one-machine problem, DDATE scheduling minimizes maximum lateness. Again, in the multi-stage case, simulation studies have shown a similar behavior for this rule.
7. Non-delay schedule generation In order to generate efficient schedules, a scheduling procedure that generates non-delay schedules was incorporated into the decision support system. Algorithm 1 shows a modification of Gliffer and Thompson's algorithm [15] for generating such schedules. Non-delay schedules are important from a practical viewpoint since there is empirical evidence that they are better as a whole than other types of schedules with respect to many performance measures. A non-delay schedule is one in which we cannot left shift in time (i.e., advance) any operation in any machine without violating a precedence constraint, incurring in machine conflicts or changing the sequence of operations, Also, no operation could have been scheduled in any idle period on any machine, so operations are processed as soon as possible once their predecessors are processed. Whenever there is a tie between two or more operations that can be scheduled in the same
ci
chine i
1. t = 0, Cs, = 0 for all k 2. {Sso}i= set of (j, k)tobe processed in machine i subject to (j, k) has no predecessors (i.e., initial operations) 3~ Repeat 4. EST=min{max(Ci, Sijk)}; r = i that achievessuch value
5.
6.
7. 8. 9. 10.
Sort all operations (j, k) in {Ssolr that have srjk -- EST
~ccording ~;J sov:e priority value. Call (j', k') the job/operat~ba with the best priority value
(SSO}r=iSSO}r--(j',.~') Update {Sso}i for all i checking the successors of ( j ' , k ' )
Cr=Cr + pj,k,
t--t+ 1 Until t = r
machine at the same time, the dispatching rule selected by the user gives a priority value that is used to break those conficts.
8. Example Consider the production process of two different coated tablets shown in Fig. 5. The network representation of this problem is shown in Fig. 6 and the total production times for each operation is shown in Table 2. We assume that the production facility cannot process two batches at the same time on the same machine. If the objective is to minimize makespan so that the maximum production quota are achieved, then the resulting schedule for producing one batch of product A and one batch of product B is shown in Fig. 7. The batch sizes are 500 kg for product A and 300 kg for product B. Obviously, a more realistic situation is when there are more batches of products A and B to be produced. Table 3 shows the makespans (or total
Computers in Industry
E. Dei Castillo / Network scheduling optimization
SievelMill~L_ active ~n~1.~ --~ ~.~.,..~ I "~/ J ge~:L~"hStationJ ex~zp:tent J.e:Lghq/ StationJ e~]/cipient [B~end]~ ,veicjhstationI
, IC~l~t~
I
Coating"'pil
..
.
[Blister PackagincjI
i'ubricant,eighI
~
Y [Cqatincj J,~ Coatingpr'epJ [elZster I
,~,
/ ~'~°~g~-ng I
TABLETA Lot size: 500 kgs.
TABLET B Lot size: 300 kge.
Fig. 5. Process diagrams for the fabrication of two types of Tablets (adapted from [l]).
•
•
0'% ,I
0'%
Fig. 6. Network created for the batch example.
B: g ~A¢Ii ' ~eigh',~12
plend hill
h,9 ;oM]pe
3:41 '
5:23 '
Ill, lit'J/
Yh:
JF4
I, Fl~ 1'~3 ! ~
?:11 '
:'~'l~
Plbl
;F7
:oa~
Fig. 7. Minimum makespan schedule for the two-batch problem.
11:46
285
286
Applications
Computers in Industry
Table 2 Processing times for the production of Tablets A and B
Table 3 Total manufacturing times for different problems
(adapted from [1]) Operation name
Number of batches
Makespan (hours)
Iterations
One A and one B Two A and one B Three A and one B Four A and one B
11:46 14:35 17:30 20:35
70 301 500 * 500 *
Product
Total processing
Sieve/mill Weigh station
A A
time per batch (rain) 120 30
Excipient weigh Blend Compress
A A A
15 20 15
Coat preparation Coat Blister packaging
A A A
180 150 180
Sieve/mill Weigh station Blend Excipientweigh
B B B B
120 30
B
Fluid bed dry
B
30
Mill
B
60
Lubricants weigh Compress
B
15
B
15 120
Coating
additional iterations.
2o 15 60
Mill Blend
* Suboptimal solution; no better solution was found in 4500
B
20
Coating preparation
B B
180
Blister packaging
B
120
manufacturing times) for problems of increasing complexity, Notice that for more complex problems, finding the minimum makespan was not achieved in 5000 iterations (approximately 10 minutes on a IBM AT compatible at 20 MHz); nevertheless the best solution reported was found in the first 500 iterations. This illustrates the fact that Balas'
l
g: 9 ACH'
eve. m ~ ' I J l l r A 1
~i
eighig? 211 lend
i'~'~! ;~'~l
i 11
.pr a~ ~ ~ 3
lacla
3:4 ' ff,/,~•
i,m '
~
algorithm finds good solutions quickly but it spends too much time in proving optimality. Suppose now that the batch of product B is considered as more important than the batch of product A, probably because of different customers that will receive the products. Scheduling according to these priorities gives the schedule in Fig. 8. Note that in Fig. 8 (WSPT scheduling)job number 2, for product B, was left-shifted as desired. Also, note that this results in a makespan equal to 12:16 as opposed to the minimum makespan of 11:46 of Fig. 7. Here, the batch of product B is finished approximately 8 hours after production starts. In the schedule of Fig. 7, the same batch is finished at time 11:46. Similar schedules can be obtained using SPT or DDATE scheduling. Updating a given schedule (in a manner that resembles CPM update features) is also provided by the decision support system. Operations that have been completed are deleted from the network and new operations can be added to it.
6:8 ,
8:11 ,
|F#~ r~'if,'3
'W7 4 , yl,m~tA,,mm r~m m ~ , m
Fig. 8. Priority schedule for the two-batch problem.
12:t6
Computers in Industry
After this procedure, t h e user resolves the problem using any of the algorithms provided.
9. Conclusion We have presented a practical approach to production scheduling in a pharmaceutical industry. Scheduling problems are represented using networks and a simple decision support system was presented. The system requires minimum hardware and software requirements, yet it provides powerful scheduling algorithms for aiding production planners. The pharmaceutical industry has certain characteristics that makes it unique. From a logistics point of view, most of the processes do not change with time, due to strict process specifications. Also, the number of operations in a production process is typically small. This causes the use of a graphical interface for entering the routings to be practical. In other types of industries that have high variability in bill of materials such approach is obviously not rec-
ommended. The Gantt charts generated by the DSS presented in this work can be enhanced so that the user can have the ability to change the chart interactively with the aid of some pointing device such as a mouse. We will report the work in that a r e a in the future.
References [1] G. Cole, Pharmaceutical Production Facilities, Design and Applications, Ellis Horwood, Chichester, UK, 1990. [2] T.E. Vollman, W.L. Berry and D.C. Whybark, Manufac-
E. Del Castillo / Network scheduling optimization
287
turing Planning and Control Systems, Irwin, Homewood,
IL, 2nd edn., 1988. [3] R. Dattero, J.J. Kanet and E,M. White, "Enhancing manufacturing planning and control systems with artificial intelligence techniques", in: A. Kusiak (ed.), Knowledge-Based Systems in Manufacturing, Taylor and Francis, London, 1989, pp. 137-150. [4] R. Conway, W.L. Maxwell and L.W. Miller, Theory of Scheduling, Adison-Wesley Reading, MA, 1967. [5] L.A. Johnson and D.C. Montgomery, Operations Research in Production Planning, Scheduling and Inventory Control, Wiley, New York, 1974. [61 W. Janicke, "On the design of multi-purpose batch chemical plants", Computers in Industry, Vol. 9, 1987, pp. 19-24. [7] K. Jager, W. Peemoiler and M. Rohde, "A decision support system for planning chemical production of active ingredients in a pharmaceutical company", Eng. Costs Prod. Econom., Vol. 17, 1989, pp. 377-387. [8] J.H. Blackstone, D.T. Phillips and G.L. Hogg, "A state of the art survey of dispatching rules for manufacturing job shop operations", Int. J. Prod. Res., Vol. 20, 1982, pp. 27-45. [9] K.P. White and R.V. Rogers, "Job shop scheduling: Limitsof the binary disjunctive formulation", Int. J. Prod.
Res., Vol. 28, 1990, pp. 2187-2200. [10] E. Horowitz and S. Sahni, Fundamentals of Computers Algorithms, Computer Science Press, 1978. [11] E. Balas, "Machine sequencing via disjunctive graphs: An implicit enumeration algorithm", Oper. Res., Vol. 17, 1969, pp. 941-957. [12] D.D. Bedworth and J.E. Bailey, Integrated Production Conool Systems, Prentice-Hall, Englewood Cliffs, NJ, 1986. [13] W.E. Smith, Various optimizers for single stage production, Nat'. Res. Logist. Q., 3, 1956, pp. 59-66. [14] J.R. Jackson, Scheduling a production line to minimize maximum tardiness, Research Report No. 43, Management Science Research Project, University of California at Los Angeles, January 1955. [15] B. Giffler and G.L. Thompson, "Algorithm for solving scheduling problems", Oper. Res., Vol. 8, 1960, pp. 487503.