Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Computers and Chemical Engineering 29 (2005) 249259

Petri-net based formulation and algorithm for short-term scheduling of batch plants
Mahsa Ghaelib , Parisa A. Bahria, , Peter Leec , Tianlong Gud
a

School of Engineering, Murdoch University, Rockingham Campus, Murdoch, WA 6150, Australia b Department of Chemical Engineering, Curtin University, Bentley, WA 6845, Australia c Division of Engineering, Science and Computing, Curtin University, Bentley, WA 6845, Australia d School of Computer Science, Guilin University of Electronic Technology, Guilin 541004, China Received 30 November 2001; received in revised form 2 August 2004; accepted 3 August 2004 Available online 13 November 2004

Abstract Effective scheduling of operations in batch plants has a great potential for high economic returns, in which the formulation and optimal solution algorithm are the main issues of study. Petri-nets have proven to be a promising technique to solve many difcult problems associated with the modeling, formal analysis, design and coordination control of discrete event systems. One of the major advantages of using a Petri-net model is that the same model can be used for the analysis of behavioral properties and performance evaluation, as well as for the systematic construction of discrete event simulators and controllers. This paper aims to present a Petri-net based approach for the scheduling of operations in batch plants. Firstly, the short-term scheduling of batch plants is formulated using timed Petri-net. Secondly, the heuristic search algorithm for scheduling of batch plants is given, which is based on generating and checking the markings in the reachability tree of the Petri-net model. Finally, the novel formulation and algorithm are tested using two simulation case studies, and compared against traditional methods. 2004 Elsevier Ltd. All rights reserved.
Keywords: Timed Petri-nets; Scheduling; Batch plants; Discrete event systems

1. Introduction The problem of production scheduling has been realized as one of the most important issues in industrial plant operations, especially when multipurpose/multiproduct batch plants are involved (Rippin, 1993). Effective scheduling of operations in batch plants has a great potential for high economic returns, in which formulation and optimal solution algorithms are the main issues of study. Traditionally, optimal scheduling of batch plants has been formulated as Mixed Integer Linear or Nonlinear Programming (MILP or MINLP) problems (Kondili, Pantelides, & Sargent, 1996; Papageorgaki & Reklaitis, 1990). The methodologies allow the incorporation of almost any constraint in the problem formulation, but the solution algorithms suffer from combi

Corresponding author. Tel.: +61 8 93607135; fax: +61 8 93607104. E-mail address: parisa@eng.murdoch.edu.au (P.A. Bahri).

natorial complexity. The inclusion of nonlinearities as well as integer variables creates a particularly difcult problem. To improve the computational efciency, heuristic search algorithms are often adopted (Blazewicz, Ecker, Schmidt, & Weglarz, 1996), which tend towards nding good solutions. The major problem with these algorithms is that they usually end up in local optima. As a remedy, stochastic global optimization techniques (simulated annealing and genetic algorithms) have been proposed (Graells, Espuna, & Puigjaner, 1996; Kobayashi, Ono, & Yamamura, 1995). These algorithms have proven to be efcient in optimal problems that are dominated by a combinatorial element; furthermore, they are not affected as much by nonlinearities and complex objective functions as mathematical programming algorithms. However, it is quite difcult to include complex constraints into their internal representation to ensure the feasibility of the generated schedules. More recently, to easily formulate the scheduling problem, a combinatorial technique using the

0098-1354/$ see front matter 2004 Elsevier Ltd. All rights reserved. doi:10.1016/j.compchemeng.2004.08.025

250

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259

graph representation has been proposed (Adams, Balas, & Zawack, 1988; Carlier & Pinson, 1988). This technique was then extended to the short-term scheduling of multipurpose batch plants (Sanmarti, Friedler, & Puigjaner, 1998). However, the main problem with this method is that it can only handle unlimited or no intermediate storage cases. Petri-nets have proven to be a promising technique to solve many difcult problems associated with the modeling, formal analysis, and the design of discrete event systems (Murata, 1989). One of the major advantages of using a Petri-net model is that the same model can be used for the analysis of behavioral properties and performance evaluation, as well as for systematic construction of discrete-event simulators and controllers. Petri-nets have been used extensively in discrete manufacturing systems (Chu & Venkatesh, 1998; Desrochers & Al-Jaar, 1995), through representing simple production lines with buffers, exible manufacturing systems, intelligent machines and robotics, to implementing supervisory control of their logical behaviors. Timed Petrinet-based optimal scheduling of discrete manufacturing systems was also been reported (Lee & Dicesare, 1993; Onaga, Silva, & Watanabe, 1991; Shen, Chen, & Luh, 1992). Petrinet based techniques adopted for batch chemical industries were reported by Yamalidou and Kantor (1991) and Hanisch (1992), where Petri-net was used for the logic modeling and coordination control of discrete batch operations. Gonnet and Chiotti (1997) presented the Petri-net supervisory control technique for multipurpose plants, while Gu and Bahri (2002) reviewed the Petri-net techniques in chemical batch plants. However, Petri-net based optimal scheduling of batch plants has not been given much attention to date (Gu & Bahri, 1999). The aim of this paper is to present a timed Petri-net based novel approach for scheduling of batch plants. In Section 2, some background on timed Petri-nets is given. Section 3 is devoted to the formulation of the short-term scheduling of batch plants. The applicability of the proposed approach is illustrated through two simulation case studies in Section 4. In Section 5, the benets of Petri-net comparing to MILP is discussed. The summary of this paper is explained in Section 6.

by It (t) (or Ip (p)), i.e., I t (t) = {p |(p P)(p , t) R}, I p (p) = {t |(t T )(t , p) R}, for t T ; for p P.

The set of places (or transitions) connected from a transition t (or place p) is called as the set of output places (or transitions) of t (or p), denoted by Ot (t) (or Op (p)), i.e., Ot (t) = {p |(p P)(t, p ) R}, Op (p) = {t , |(t , T )(p, t , ) R}, for t T ; for p P.

Furthermore, It : T 2P (or IP : P 2T ) is dened as transition (or place) input function, and OT : T 2P (or Op : T 2T ) as transition (or place) output function. Then, an ordinary Petri-net can also be formally represented as: PN = (P, T, It , Ot ) or PN = (P, T, Ip , Op ). A marked Petri-net contains tokens in addition to the elements described above. Tokens remain in places, travel along arcs, and their ow through the net is regulated by transitions. Tokens are graphically represented by dots. The marking of a place p in ordinary Petri-nets is a mapping of the place to a non-negative integer representing the number of tokens residing in this place, denoted by m(p). The markings of all the places in an ordinary Petri-net constitute the marking vector m: P N (non-negative integer set), where the ith component m(Pi ) represents the number of tokens in the ith place pi . The initial marking is denoted by m0 . Formally, a marked Petri-net is represented as PN = (P, T, R, m0 ), or PN = (P, T, It , Ot , m0 ), or PN = (P, T, Ip , Op , m0 ). In a marked Petri-net, places are static and transitions are dynamic. The latter can be triggered in terms of the enabled conditions and ring rules: enabled conditions: For some t T and marking mk , if p I t (t) satises mk (p) 1, then t is called as enabled transition under this marking; ring rules: The occurrence of transition t under marking mk results in a new marking mk+1 : p (I t (t) Ot (t)); mk+1 (p) = mk (p) 1, p (I t (t) Ot (t)); mk+1 (p) = mk (p) + 1, p (Ot (t) I t (t)). mk+1 (p) = mk (p), Obviously, ring of transitions results in changeable distribution of tokens in places, or changeable markings. Alternative occurrences of transitions produce a ring sequence = m0 ti0 m1 ti1 m2 ti2 . . . tik mk+1 , where the occurrence of transitions ti0 , ti1 , ti2 and tik has a partial relation ti0 < ti1 < ti2 < tik . An ordinary Petri-net is a powerful tool used to model and analyze the logical behavior of complex discrete event systems. However, in many cases time plays an important role in system evolution, and cannot be ignored. Time constants can be included into a Petri-net by associating either with transitions (called as a timed transition Petri-net, TTPN), or with places (called as a timed place Petri-net, TPPN). In a TTPN, there are two modes of ring. In one

2. What is a timed Petri-net A Petri-net is a directed, weighted, bipartite graph consisting of two kinds of nodes, called places and transitions. Graphically, places are represented by circles and transitions by bars. An arc connects either a place to a transition or a transition to a place. Formally, an ordinary Petri-net is represented as: PN = (P, T, R), where P = {p1 , p2 , . . . , pn } is a nite set of places; T = {t1 , t2 , . . . , tm } is a nite set of transitions; R (p T ) (T P) is a binary relation corresponding to the set of directed arcs from P to T or from T to P (Murata, 1989). Here, P and T are disjoint sets, i.e., P T = (where is the null-set). The set of places (or transitions) connected to a transition t (or place p) is called as the set of input places (or transitions) of t (or p), denoted

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259

251

mode, tokens are removed from the input places when a transition becomes enabled. The transition res after a certain period of time (time delay), depositing tokens on the output places. In the other mode, tokens remain on the input places of an enabled transition. After the time delay, the transition res by removing tokens from the input places, and deposits tokens on the output places. In a TPPN, a token deposited in places becomes available only after a certain period of time (time delay). Only available tokens can enable transitions. A TPPN can be formally represented as a six-tuple: PN = (P, T, I t , Ot , m0 , ), or PN = (P, T, I p , Op , m0 , ) where P, T, It , Ot , Ip , Op and m0 have the same denitions as those for ordinary Petri-nets; : P R+ (non-negative real numbers) is the time delay function of places.

3. Formulating the scheduling operation of a batch plant using Petri-nets In a batch plant, there are n (where n > 1) products to be produced using m (where m > 1) processing units. For each product, the sequence by which the processing units will be visited is pre-specied and is referred to as the product (or job) routing or processing recipes. Normally, the processing time ij for a product (or job) i (i = 1, 2, . . ., n) in unit j (j = 1, 2, . . ., m) is given. In a TPPN, places can be used to model activities or resources, and time constants associated with places represent the processing duration of activities. A token residing in a place means either the availability of a resource, or an intermediate product being processed. Transitions can be used to model the discrete events of the involved activities, such as

opening a valve, starting an operation, nishing a reaction, etc. Let Oij represent the operation (or processing activity) of product i at unit j. Operation Oij can be represented by two transitions tsij and tfij for the start and the termination of this operation, respectively, and one place pij with time duration ij for the processing activity (see Fig. 1a). For product i, suppose that Oij is the upward activity of operation Oik (see Fig. 1b). All the activities of the same product can be linked by additional intermediate places (see Fig. 1c). In a batch plant, different products may be processed in the same unit. This kind of resource sharing can be modeled by introducing a resource place pj (j = 1, 2, . . ., m) for each processing unit. Suppose that operations Oij (j = 1, 2, . . ., m) share the same unit j, then place pj is both the input of the starting events and the output of the terminating events for all these activities. All operations in a batch plant can then be formulated by the following procedures: S1: For product i, each processing activity is represented by two transitions tsij and tfij , and one place pij . When there is no intermediate storage between activities, the nal point of one place will correspond to the starting point of the following place; S2: For product i, the ith initially marked place psi to represent the beginning of the job (e.g., the raw materials are ready), and the ith nal place pfi to represent the nishing of the ith job are introduced; S3: For processing unit j, resource place pj is introduced to represent its availability; S4: In terms of job routing or product recipe, all the activities involved in product i are linked, and modeled as a TPPN sub-model;

Fig. 1. Modeling a batch plant via TPPNs.

252 Table 1 Processing times (h) of products Units Products p1 u1 u2 3.0 4.0

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259

p2 4.0 5.0

p3 3.0 7.0

S5: All activities that share the same resource places pj (j = 1, 2, . . ., m) are interconnected, and the complete TPPN for the scheduling of batch plants is created. Fig. 1d shows the TPPN for a multiproduct batch plant consisting of three products (p1p3) and two processing units (u1u2), where the processing times are given in Table 1. In most industrial plants, due to the expense of moving materials, there is no intermediate storage between processes. Under No Intermediate Storage (NIS) policy, the intermediate product of the ith job nished at unit j has to be held in unit j until the next unit (unit j + 1) is ready to implement the ith job interconnected. 3.1. Branch and bound algorithm In this paper, branch and bound algorithm is used to solve batch plant scheduling problem modeled with Petri-nets. This method employs an intelligent algorithm where a particular solution is proven to be optimal based on successive partitioning of the solution space and assessment of the branches of the reachability tree. This tree is developed with the initial marking as the root of the tree and the ring enabled transitions creating the branches of the tree. As soon as the nal marking is achieved, the cycle time is stored as the current makespan (total time until the last job is completed) of the schedule. Then, an upward search starts. The search continues until a branch is encountered that has not yet been assessed. Once again, ring enabled transitions are started until the nal marking is obtained. If a new schedule with shorter makespan is achieved, the upper bound of makespan is updated to the new one. The upward search continues until all branches are assessed. The following shows the details of the branch and bound algorithm for short-term scheduling of batch plants using timed Petri-net: S1: Begin with the initial marking and a large number for makespan. S2: With the initial marking check which transitions are enabled. Determine the new markings and the usage time for each unit with respect to the transitions and put them together with the old markings into one result matrix. S3: If the latest usage time of the units is greater than or equal to the makespan, go to S6.

S4: If the new marking is not equal to the nal marking, set the new marking as the initial marking and go to S2. S5: If the latest usage time of the units is less than makespan, update makespan to this new time. S6: If all the rows of the result matrix have been assessed, the search is complete; output the makespan and optimum schedule; then stop. S7: Start checking from the last row of the result matrix upward and nd the row in which the associated transition is enabled and has not been red yet; set the marking of this row as an initial marking and go to S2. 3.2. The heuristic search algorithm In the TPPN formulation of the batch plant, all possible operations of different sequences can be completely tracked by its reachability tree. Theoretically, the optimal schedule of the plant can therefore be obtained by generating the reachability tree and nding the optimal path from the initial marking to the nal marking. This path is a ring sequence of the transitions of the TPPN model. However, even for a simple Petri-net, the reachability tree may be too large to generate as a whole. Instead of generating the entire reachability tree, a heuristic algorithm is developed to generate only the necessary portion of the tree. The heuristic algorithm that is used here is adapted from the well-known graph search algorithm A* (Russell & Norvig, 1995). Given a TPPN model, the algorithm expands the reachability tree from the initial marking until the generated portion of the reachability tree touches the nal marking. Once the nal marking is found, the feasible path is constructed by tracing the pointers that denote the parenthood of the markings, from the nal marking to the initial marking. Then, the transition sequence of the path provides the order of the activities or operations, i.e., the schedule. In this algorithm, expanding and checking are two important aspects. (1) Expanding: For the current node or marking mk+1 , all possible enabled transitions are found and their new marking mk+1 is computed in terms of enabled conditions and ring rules. These new markings {mk+1 } are the descendant or new nodes expanded from current node mk , and stored in the result matrix. Here, {mk+1 } is used to represent the set of all possible new markings. In this expanding process, some important information is recorded, such as the time that the new marking is produced, denoted by g(mk+1 ), the duration that each processing unit has been utilized, denoted by UTj (mk+1 ) (j = 1, 2, . . . , m), the duration that each product has been processed, denoted by PTi (mk+1 ) (i = 1, 2, . . . , n), and the return pointer of {mk+1 } as the current node mk . (2) Checking: When the expanding reaches the nal marking, a feasible schedule is obtained, and it is determined whether the current upper bound of the objective function should be updated or not; If the current

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259

253

node mk is not a nal marking, it is determined whether a branch should be expanded (forward search) or discarded (backward search). The checking is based on the estimated cost f(mk ) and the upper bound UB. The upper bound of cost can be initialized as a large number M to ensure that a reasonably optimal makespan is not left out. Suppose that the optimal scheduling is to satisfy the minimal makespan, the estimated cost can therefore be calculated as follows: f (mk ) = h(mk ) + g(mk ) max i (ij ) UTj (mk ) , max h(mk ) = max j where ( i (ij ) UTj (mk )) is the total remaining duration of batch units which are assumed to be utilized consecutively for product i, and ( j (ij ) PTi (mk )) is the total remaining duration of products which are assumed to be processed consecutively in unit j; f(mk ) is an estimate of the cost, i.e., the makespan from the initial marking to the nal marking along a path which goes through the current marking mk ; g(mk ) is the current lowest cost obtained from the initial marking to the current marking mk ; h(mk ) is the heuristic function, or an estimate of the cost from the current marking mk to the nal marking along a path which goes through the current marking mk . If the estimated cost f(mk ) never overestimates the actual cost, then the obtained result is optimal (Russell & Norvig, 1995). In this paper, the estimated cost f(mk ) always gives the lowest bound of the makespan since any idle times that may occur henceforward are not included in h(mk ) and it satises the following condition, 0 h(mk ) h (mk ) where h (mk ) is the actual cost from the current marking mk to the nal marking. Therefore, the scheduling algorithm is admissible (Russell & Norvig, 1995). The heuristic algorithm for short-term scheduling of batch plants is implemented in the following steps: S1: Begin with the initial marking and a large number for makespan. S2: With the initial marking check which transitions are enabled. Determine the new markings and usage time for each unit with respect to the transitions and put them together with the old markings into one result matrix. S3: If the latest usage time of the units is greater than or equal to the makespan go to S8. S4: Compute (for each marking) the maximum between the time remaining for each product in each unit and also the time remaining for each product to be processed (h). Add h to the starting time of the new marking (g), compute f. Put f in the relevant row of the result matrix. S5: If f is greater than or equal to the makespan go to S8.

S6: If the new marking is not equal to the nal marking, set the new marking as the initial marking and go to S2. S7: If the latest usage time of the units is less than makespan, update makespan to this time. S8: If all the rows of the result matrix have been assessed, the search is completed; output the makespan and the schedule to this makespan; then stop. S9: Start checking from the last row of the result matrix upward and nd the row in which the associated transition is enabled and has not been red yet; set the marking of this row as the initial marking and go to S2.

(ij ) PTi (mk )


i

4. Case studies Both branch and bound and heuristic algorithms are implemented in Visual C++ 6.0 on a PC/Pentium 4 and tested on two case studies as follows: 4.1. Case study 1 A multiproduct batch plant consisting of three products (p1p3) and two processing units (u1u2) is considered. The processing times of each product in each unit are given in Table 1. The TPPN model for the NIS policy is shown in Fig. 1d. The solutions are as follows: Solution 1, using branch and bound (Table 2): All searches to nd the optimal schedule in reachability tree is presented in Fig. 2. Note that the optimal schedule in Fig. 2 is colored in gray. Solution 2, using a heuristic algorithm: The simulation result from the heuristic algorithm is presented in Fig. 3. The number of searches is decreased from 114 in solution 1 to 98 in solution 2 while the results are the same. Fig. 4 illustrates the Gantt chart of the best schedule for this case. It should be noted that for a multiproduct system, the usage duration of each unit is calculated by adding the processing time of the current product in that unit to the previous usage time of the same unit. Also, the time that each product should wait until the next unit is available, is important and has to be considered in coding of the algorithm. 4.2. Case study 2 A multipurpose batch plant with three products (p1p3) and three processing units (u1u3) is considered as the second case study, whose product recipe and processing time are

254

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259 m61 m62 m63 m64 m65 m66 m67 m68 m69 m70 m71 m72 m73 m74 m75 m76 m77 m78 m79 m80 m81 m82 m83 m84 m85 m86 m87 m88 m89 m90 m91 m92 m93 m94 m95 m96 m97 m98 m99 m100 m101 m102 m103 m104 m105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 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1

given in Table 3. The TPPN model for the NIS policy is shown in Fig. 5. Both branch and bound and heuristic algorithms have been implemented in this example. The number of searches can be decreased from 337 to 164 by the use of the heuristic algorithm and again the results were the same as the results from branch and bound. The Gantt Chart of optimal schedule is shown in Fig. 6.

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259

255

Fig. 2. The optimal searches of reachability tree (solution 1 of case study1).

The calculation of usage duration for each unit in the multipurpose case is very similar to that for the multiproduct example. The only difference is that since in multipurpose cases, different products have different processing paths, therefore at each time, these calculations need to be done only for some of the units which have relations with the current product.

5. Comparison between MILP and timed Petri-net methods MILP is a typical method, which is traditionally used for the scheduling of batch plants. The objective function to be
Table 3 Processing times (h) of products (case study 2) Units Products p1 u1 u2 u3 2.0 0.0 3.0 p2 0.0 1.0 4.0 p3 2.0 0.0 5.0

optimized and the physical constraints in a scheduling problem are rst dened in terms of the process variables. With NIS policy, some of the time constraints are dened as: (1) the time at which product i left unit j (the associated unit) must be after the time at which it left unit j 1 (previous associated unit) for a multiproduct plant (multipurpose plant), (2) the ith product can not leave unit j (the associated unit) until the (i 1)th product (previous associated product) has left that unit for multiproduct plant (multipurpose plant), and (3) product i cannot leave unit j until unit j + 1 (next associated product) for multiproduct (multipurpose) is free. Therefore, in MILP, initially all the constraints and relations between products and units in a batch process plant should be written, then the best schedule could be determined. The main problem with this method is the increase in the number of constraints due to the increasing number of products and units in a system, which can lead to combinatorial problems making it impractical for large industrial batch processes. Petri-net based method has shown to be promising with respect to this problem. Timed Petri-nets as a graphical and mathematical tool provide an applicable environment for the modeling and design

256

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259

Fig. 3. The search paths of reachability tree (solution 2 of case study1).

Fig. 4. The Gant chart for optimal scheduling (case study 1).

analysis of many systems (Gu, Bahri, & Lee, 2002). As a graphical tool, they can help to visually formulate the problem similar to that in the ow chart. As a mathematical tool, timed Petri-net can be used to systematically formulate the

model used in optimization and control problems (Peterson, 1981). These formulations are famous for their solid theoretical base and clear syntax (Bulitco, 2000). The dynamic and static behavior of the manufacturing system can be illustrated formally and graphically through the use of timed Petri-nets, and therefore the sequence planning and the unit allocations are done simultaneously. This can be viewed as a language over an alphabet of symbols, i.e., the scheduling is observed step by step as the products are processed through associated units. Furthermore, the time constraints in MILP formulation are replaced by ring rules of the enabled transitions.

Fig. 5. TPPN model for a batch plant (case study 2).

Fig. 6. The Gantt chart of optimal schedule.

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259

257

In summary, the main advantages of the timed Petri-net methodology are, its locality and concurrency, its graphical and algebraic representation and its asynchronous and parallel capabilities. The theoretical benets of Petri-nets were discussed above and below the advantages of Petri-nets comparing to MILP are shown computationally. This is done by formulating and solving the rst case study using MILP method and then comparing it with the Petri-net approach. In order to use the MILP method, rst the objective and the associated constraints should be formulated by creating several variables. These are shown as follows: Objective: min: x6; Constraints: +x2 x1 4 x7 5 x9 7 x11 >= 0; +x4 x3 4 x8 5 x10 7 x12 >= 0; +x6 x5 4 x13 5 x14 7 x15 >= 0; +x1 3 x7 4 x9 3 x11 >= 0; +x3 x1 3 x8 4 x10 3 x12 >= 0; +x5 x3 3 x13 4 x14 3 x15 >= 0; +x7 + x9 + x11 1 = 0; +x8 + x10 + x12 1 = 0; +x13 + x14 + x15 1 = 0; +x7 + x8 + x13 1 = 0; +x9 + x10 + x14 1 = 0; +x11 + x12 + x15 1 = 0; +x3 x2 >= 0; +x5 x4 >= 0; int x7, x8, x9, x10, x11, x12, x13, x14, x15; Lp solve, an optimization code for linear and mixed-integer programming (Powers, 1995), is then used to solve the above problem. The results for the objective and the sequence of product processing are the same as the ones resulted from the TPPN. This means that the resulting Gantt Chart from either method is the same, but as it can be seen, to nd the optimal schedule of a small multiproduct plant with three products and two units with MILP, 23 constranits and 15 variables should be dened. However, in TPPN there is no need for these formulations and the only steps are to create the TPPN model that is very similar to the physical set-up and to dene the incidence matrix with all the constraints already being considered in the ring rules of the TPPN. The incidence matrix shows the relations between each place and each transition by 0 for those with no relations, 1 for an input place of a transition and 1 for an output place of a transition. This incidence matrix is very easy to derive and it can be achieved graphically. It should be noted that the number of variables and constraints in MILP problem increases tremendously by increasing the size of the problem. In the following, another multiproduct example Karimi (1991) is considered which has four

Table 4 Processing times (h) of products (case study 2) Units Products p1 u1 u2 u3 3.5 4.3 8.7 p2 4.0 5.5 3.5 p3 3.5 7.5 6.0 p4 12.0 3.5 8.0

products and three units. All the information of this case is shown in Table 4. In order to solve this problem with MILP, the following formulations are done: Objective: min: x28; Constraints: +x2 x1 4.3 x10 5.5 x14 7.5 x18 3.5 x22 >= 0; +x5 x4 4.3 x11 5.5 x15 7.5 x19 3.5 x23 >= 0; +x8 x7 4.3 x12 5.5 x16 7.5 x20 3.5 x24 >= 0; +x27 x26 4.3 x13 5.5 x17 7.5 x21 3.5 x25 >= 0; +x3 x2 8.7 x10 3.5 x14 6.0 x18 8.0 x22 >= 0; +x6 x5 8.7 x11 3.5 x15 6.0 x19 8.0 x23 >= 0; +x9 x8 8.7 x12 3.5 x16 6.0 x20 8.0 x24 >= 0; +x28 x27 8.7 x13 3.5 x17 6.0 x21 8.0 25 >= 0; +x1 3.5 x10 4.0 x14 3.5 x18 12.0 x22 >= 0; +x4 x1 3.5 x11 4.0 x15 3.5 x19 12.0 x23 >= 0; +x7 x4 3.5 x12 4.0 x16 3.5 x20 12.0 x24 >= 0; +x26 x7 3.5 x13 4.0 x17 3.5 x21 12.0 x25 >= 0; +x10 + x14 + x18 + x22 1 = 0; +x11 + x15 + x19 + x23 1 = 0; +x12 + x16 + x20 + x24 1 = 0; +x13 + x17 + x21 + x25 1 = 0; +x10 + x11 + x12 + x13 1 = 0; +x14 + x15 + x16 + x17 1 = 0; +x18 + x19 + x20 + x21 1 = 0; +x22 + x23 + x24 + x25 1 = 0; +x4 x2 >= 0; +x7 x5 >= 0; +x26 x8 >= 0; +x5 x3 >= 0; +x8 x6 >= 0; +x27 x9 >=0; int x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25; As can be seen, 42 constraints and 28 variables should be dened for solving this example, which means that by increasing the number of the products and the units each by one, 19 constraints and 10 variables are added. While by using TPPN, the changes are only restricted to the model and the resulting incidence matrix. These changes in the model are shown in Fig. 7 by different color.

258

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259

References
Adams, J., Balas, E., & Zawack, D. (1988). The shifting bottleneck procedure for job shop scheduling. Management Science, 34, 391 410. Blazewicz, J., Ecker, L., Schmidt, G., & Weglarz, J. (1996). Scheduling computer and manufacturing processes. Berlin: Springer. Bulitco, V. (2000, January). Envisionment-based scheduling using timed interval PetriNetworks: Representation, inference, and learning, http://www-old.cs.uiuc.edu/Dienst/UI/2.0/Describe/ncstrl.unic cs/ UIUCDCS-R-2000-2124. Carlier, J., & Pinson, E. (1988). An algorithm for solving the job shop problem. Management Science, 35, 164176. Chu, Z. M., & Venkatesh, K. (1998). Modeling, simulation, and control of exible manufacturing systems: A Petri net approach. World Scientic Publishing Co. Desrochers, A. A., & Al-Jaar, R. Y. (1995). Application of Petri nets in manufacturing systems: Modelling, control and performance analysis. Piscataway, NJ: IEEE Press. Gonnet, S., & Chiotti, O. (1997). Modelling of the supervisory control system of a multipurpose batch plant. Computer and Chemical Engineering, 21S, S691S696. Graells, M., Espuna, A., & Puigjaner, L. (1996). Sequencing intermediate products: A practical solution for multi-purpose production scheduling. Computer and Chemical Engineering, 20S, 11371142. Gu, T., & Bahri, P. A. (1999). Timed Petri-net representation for short term scheduling of multiproduct batch plants. In Proceedings of 1999 American Control Conference (pp. 40924096). Gu, T., & Bahri, P. A. (2002). A survey of Petri-net applications in batch processes. Computers in Industry, 47, 99111. Gu, T., Bahri, P. A., & Lee, P. (2002). Development of hybrid time Petri nets for scheduling and control of mixed batch/continuous processes. In Proceedings of 15th IFAC World Congress. Hanisch, H. M. (1992). Coordination control modelling in batch production systems by means of Petri nets. Computer and Chemical Engineering, 16(1), 110. Karimi, I. (1991). Multiproduct batch plant scheduling. Chemical Engineering Optimization Models with GAMS, 6. Kobayashi, S., Ono, I., & Yamamura, M. (1995). An efcient genetic algorithm for job shop scheduling problems. In Proceedings of the 6th International Conference on Genetic Algorithms (pp. 506 511). Kondili, E., Pantelides, C. C., & Sargent, R. W. H. (1996). Optimal scheduling of multi-product batch processes for various intermediate storage policies. Industrial and Engineering Chemistry Research, 35, 40584066. Lee, D. Y., & Dicesare, F. (1993). Scheduling exible manufacturing systems with the consideration of setup times. In Proceedings of the 32nd IEEE CDC (pp. 32643269). Murata, T. (1989). Petri nets: Properties, analysis and applications. Proceedings of IEEE, 77, 541580. Onaga, K., Silva, M., & Watanabe, T. (1991). On periodic schedules for deterministically timed Petri net systems. In Proceedings of the 4th International Workshop on Petri Nets and Performance Models (pp. 210215). Papageorgaki, S., & Reklaitis, G. V. (1990). Optimal design of multipurpose batch plants, I: Problem formulation. Industrial and Engineering Chemistry Research, 29. Peterson, J. L. (1981). Petri net theory and the modelling of systems. Prentice-Hall. Powers, P. (1995, September). lp solve version 2.0 to Dos. Rippin, D. W. T. (1993). Batch process systems engineering: A retrospective and prospective review. Computers and Chemical Engineering, 17(Suppl), s1s13. Russell, S., & Norvig, P. (1995). Articial intelligence: A modern approach. Prentice-Hall.

Fig. 7. TPPN model for a batch plant.

As shown, the problem with methods like MILP to nd the optimal schedule in a batch plant is a rise in the number of constraints and variables to be formulated, by enlarging the plant, which results in difculties and possible mistakes. The difculties of formulating the problems which leads to further mistakes appear more in multipurpose plants. On the other hand, Petri-net method greatly improves the efciency graphically and systematically, and can be considered as a capable method to nd the optimal schedule of large multiproduct and multipurpose batch plants.

6. Conclusions This paper presents a novel approach based on the TPPN formulation for the scheduling of batch plants. It has been shown that the changes in the markings of a TPPN model completely describe the evolution of different operations. The optimal schedule can be obtained by searching through the reachability tree of the TPPN model using branch and bound method. Next, the heuristic algorithm is applied in order to decrease the number of searches through the reachability tree. The schedules of two batch plants are simulated to show the applicability of the proposed techniques. In addition, improving computational efciency of the algorithm for scheduling and giving performance comparisons of TPPN based algorithms with traditional MILP is also discussed. The great benet of a Petri-net based approach is the graphical and concise representation of activities, resources and constraints of a batch plant in a single coherent formulation, which is very helpful for designers to better understand and formulate scheduling problems. Moreover, it is understood from this research that the Petri-net based approach has a great potential for solving a variety of complicated scheduling problems in batch plants. In this regard, further research is also being undertaken to accommodate complicated situations such as variable batch size, variable cycle time, scheduling of mixed batch/continuous plants and implementation of integrated supervisory control and scheduler using Petri-nets.

M. Ghaeli et al. / Computers and Chemical Engineering 29 (2005) 249259 Sanmarti, E., Friedler, F., & Puigjaner, L. (1998). Combinatorial technique for short-term scheduling of multi-purpose batch plants based on schedule-graph representation. Computers and Chemical Engineering, 22, 847850. Shen, L., Chen, Q., & Luh, J. Y. S. (1992). Truncation of Petri Net Models of Scheduling Problems for Optimum Solutions. In Proceed-

259

ings of the Japan/USA Symposium on Flexible Automation (pp. 1681 1688). Yamalidou, E. C., & Kantor, J. C. (1991). Modelling and optimal control of discrete-event chemical processes using Petri nets. Computers and Chemical Engineering, 15(7), 503519.

You might also like