**3. Modelling procedure**

2 Will-be-set-by-IN-TECH

structure could be gained [21]. On the other hand, data from the production process could be used to determine the actual resource availability. MRP II and ERP systems are commonly used in discrete manufacturing for upper level production control, such as production planning. Standard production management tools, such as MRP, are also used in batch production environment [20]. As defined with standard S88.01 the required raw materials and their quantities are determined from a dedicated data structure named *Formula*. This way the formula can be linked to standard Bill of Materials (BOM) used within MRP II concept [7]. While in a discrete manufacturing processes BOM are used to determine process materials and their quantities needed for production of finished products, in batch production processes these data are given with Formula. The same is with information that defines a sequence of operations required to produce an item. In discrete manufacturing processes these are defined

These two groups of data items, together with the given resource units, form the basic elements of the production process. These data can be effectively used to build up a model of the batch production system with timed Petri nets. An algorithm will be introduced, which builds a Petri-net model from the existing data. The model is built directly in a top-down manner, starting from the Formula (BOM) and the Manufacturing recipes (routings) [21]. First a class of Petri nets used is presented in a formal manner with detailed discussion on time representation. Next a method to describe a Formula with Petri net structure is given. Root item, representing the product, is composed of sub-items (sub-processes). Later a method of describing the basic production activities with timed Petri net is presented. The obtained

In the Petri net literature, three basic ways of representing time in Petri nets are used [2]: firing durations (FD), holding durations (HD) and enabling durations (ED). When using FD principle the transition firing has duration [23]. In contrast, when using HD principle, a firing has no duration but a created token is considered unavailable for the time assigned to transition that created the token, which has the same effect. With ED principle, the firing of the transitions has no duration while the time delays are represented by forcing transitions that are enabled to stay so for a specified period of time before they can fire. This is a more general concept since it allows for modelling of task interruption. Some authors use an even more general concept, which assigns delays to individual arcs, either inputs or outputs of a

When modelling several performance optimisation problems, e.g. scheduling problems, such a general framework is not needed. It is natural to use HD when modelling most scheduling processes as operations are considered non-preemptive. The timed version of CPNs defined by [9] uses a HD equivalent principle, where the unavailability of the tokens is defined implicitly through the corresponding time stamps. While CPNs allow the assignment of delays both to transition and to output arcs, we further simplify this by allowing time delay inscriptions to transitions only. This is sufficient for the type of examples investigated here,

To include a time attribute of the marking tokens, which determines their availability and unavailability, the notation of timed CPN will be adopted. Tokens are accompanied with a timestamp, which is written next to the token number and separated from the number by @. E.g., two tokens with time stamp 10 are denoted 2@10. A collection of tokens with different

with Routing, and Manufacturing recipes are used in batch production.

model is applied in optimisation of batch scheduling problem.

**2. Timed PN**

transition [10].

and can be generalised if necessary.

Petri nets are a family of tools that provide a framework, which can be used for various problems that appear during the life-cycle of a production system [18]. In this section we present the modelling of production system using timed Petri nets for the purpose of performance control. When timed Petri nets are used, it is possible to derive performance measures such as makespan, throughput, production rates, and other temporal quantities. The Petri net model is built based on the data stored in production management information systems, i.e., ERP system.

### **3.1. The class of production systems**

With the method presented here several scheduling problems that appear in various production systems can be solved. In a discrete manufacturing different jobs are needed to produce a final product that is composed of several components. Similarly in batch production different activities have to be performed in order to produce a final product. However, here the resultant product is produced with some irreversible change, e.g. products are mixed from quantities of ingredients.

#### 4 Will-be-set-by-IN-TECH 6 Petri Nets – Manufacturing and Computer Science Automated Petri-Net Modelling for Batch Production Scheduling <sup>5</sup>

Different management systems (*ERP*) can be applied for different types of production systems to plan the production process activities. We are assuming here a management system that can provide plan for both, discrete and batch process. The system generates work orders that interfere with the demands for the desired products. Different jobs/procedures are needed to produce a desired product. Set of operations needed to produce one item represent a job. In general, more operations have to be performed using different resources in order to complete a specific job. To complete a specific product, more sub-products may be needed. To list these components a BOM is used in discrete manufacturing and formulas in batch manufacturing. These components determine sub-jobs that are needed to manufacture a parent item. In this way the general scheduling problem is defined that can be applied both in discrete or batch production environment and can be given as:

An elementary operation can be described with one place and two transitions, see Figure 1. When all the input conditions are met (raw material and resources are available) the event that starts the operation occurs, *t*1. This transition also determines the processing time of an operation. During that time the created token is unavailable in place *p*<sup>2</sup> and the operation is being executed. After that time the condition for ending the operation is being satisfied and *t*<sup>2</sup> can be fired. Place *p*<sup>1</sup> is not a part of the operation, it determines the input condition, e.g.

p1 p2 <sup>t</sup>

When parallel activities need to be described the Petri-net structure presented in Figure 2 is used. Transition *t*<sup>0</sup> sets the input conditions for the parallel execution of two operations. In places *p*<sup>01</sup> and *p*<sup>02</sup> operations can wait for the available resource(s). The time delays of the transitions *t*11*in* and *t*12*in* define the duration of each operation. An available token in place *p*<sup>11</sup> (*p*12) indicates that operation is finished. Transition *t*<sup>1</sup> is used to synchronise both operations.

t1 t0

An operation might need resources, usually with a limited capacity, to be executed; this is illustrated in Figure 3. Place *pR*<sup>1</sup> is used to model a resource *R*1. Its capacity is defined with the initial marking of that place. The resource is available to process the operation if there are enough available tokens in it. When the resource is used at the start of the operation the unavailable token appears in place *p*1*o p*. After the time defined by transition *t*1*in* the token becomes available, *t*1*out* is fired, and the resource becomes free to operate on the next job. For this reason zero time needs to be assigned to the transition *t*1*out*. An additional place *p*<sup>1</sup> models the control flow. When the token is present in this place, the next operation can begin.

td t t t+t t t <sup>f</sup> f fd t t+t f d

t1

td

<sup>2</sup> p1 p2 <sup>t</sup>

p11op p11

t 11out

<sup>t</sup> <sup>p</sup> 12out 12op

1in p1op p1

t 1out

pR1

A particular operation can often be done on more different (sets of) resources with different availability, and the time duration can be different on each set of resources. An example where

p12

t1

Automated Petri-Net Modelling for Batch Production Scheduling 7

2

<sup>2</sup> p1 p2 t1 <sup>t</sup>

p01

t 11in

t 12in

td2

td1

p02

p0

**Figure 3.** Operation that uses a resource with finite capacity.

t

td

the availability of the input material.

**Figure 1.** Operation described with timed Petri net.

td

**Figure 2.** Two parallel operations.


Using this definition, the following assumptions have to be considered:

