28
/faculteit technologie management PN-1 اری ج ت دهای ن ی رآ فد د ج م ی س د ن ه م دوم: ش خ ت! ک م ک ه ب دها ن ی رآ ف ی سار ل مدPetri nets

faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

Embed Size (px)

Citation preview

Page 1: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-1

مهندسی مجدد فرآیندهای تجاری

بخش دوم: Petri netsمدلسازی فرآیندها به کمک

Page 2: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-2

High level Petri netsExtending classical Petri nets with color, time and hierarchy (informal introduction)

Page 3: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-3

Extension with time (1)

• Each token has a timestamp.

• The timestamp specifies the earliest time when it can be consumed.

2 5

Page 4: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-4

Extension with time (2)

• The enabling time of a transition is the maximum of the tokens to be consumed.

• If there are multiple tokens in a place, the earliest ones are consumed first.

• A transition with the smallest firing time will fire first.• Transitions are eager, i.e., they fire as soon as they

can.• Produced token may have a delay.• The timestamp of a produced token is the firing

time plus its delay.

Page 5: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-5

Running example: Enabling time

• Transition start is enabled at time 2 = max{0,min{2,4,4}}.

start

donewait

stop

busy

free

4

2

4

0

Page 6: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-6

Running example: Delays

• Tokens for place busy get a delay of 3

• @+3 = firing time plus 3 time units

start

donewait

stop

busy

free

4

2

4

0

@+3

@+0

@+0

Page 7: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-7

Running example: Transition start fired

• Transition start fired a time 2.

start

donewait

stop

busy

free

4 5

4

@+0

@+0

@+3

Continue to play (timed) token game…

Page 8: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-8

Page 9: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-9

Page 10: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-10

Exercise: Final state?

x

y

d

e

b

a

c

4

3

5

1

@+1

@+2

Page 11: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-11

Exercise: Final state?

red

rr

rb

bb

black

3

1

2

4

2

@+1@+1

@+2

Page 12: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-12

Extension with hierarchy

• Timed and colored Petri nets result in more compact models.

• However, for complex systems/processes the model does not fit on a single page.

• Moreover, putting things at the same level does not reflect the structure of the process/system.

• Many hierarchy concepts are possible. In this course we restrict ourselves to transition refinement.

Page 13: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-13

rg1

go1

or1

r1

g1

o1

rg2

go2

or2

r2

g2

o2

x

Instead of

Page 14: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-14

rg1

go1

or1

r1

g1

o1

rg2

go2

or2

r2

g2

o2

x

tl1 tl2

x

x

We can use hierarchy

Page 15: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-15

rg

go

or

r

g

tl1 tl2

x

x

o

Reuse

• Reuse saves design efforts.

• Hierarchy can have any number of levels

• Transition refinement can be used for top-down and bottom-up design

Page 16: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

/faculteit technologie management

PN-16

Exercise: model three (parallel) punch card desks in a hierarchical manner

start

donewait

stop

busy

free

Page 17: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

17

Workflow management concepts

A workflow definition is composed out of three parts:

• process definition: a description of the process itself

• resource classification:a classification of the resources to be used

• resource management rules: how to map work onto resources

Page 18: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

18

Process definition

A process definition specifies which steps are required and in what order they should be executed.

(routing definition, procedure, workflow script)(purchase order, tax declarations, insurance claims process)

A process definition consists of:

• Tasks (step, activity, process element)A task is atomic: commit or rollback.

• Conditions (state, phase, requirement)A condition is used to determine the enabling of a task.

• Subprocesses

Page 19: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

19

Case

A case is the 'thing' which needs to be processed by following the process definition.(process instance, job, project)(insurance claim, purchase order, complaint, loan application)

The state of a case is determined by:• case variables (case parameters)

The logistic attributes of a case which are used to route the case.

• conditions The requirements which are satisfied.

• (Application data)Beyond the scope of the WFMS.

Page 20: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

20

Mapping a process definition onto Petri nets

task condition

case

subprocess

case variables

Page 21: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

21

• Sequential"first A then B"

• Parallel"A en B at the same time or in any order"

– AND-split

– AND-join

• Choice"A or B"

– OR-split

– OR-join

• Iteration"multiple A's"

Routing of cases

Page 22: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

22

Sequential routing

"First A then B"

A B

Page 23: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

23

Parallel routing

"A and B at the same time or in any order"

A

B

AND-split AND-join

Page 24: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

24

Choice (1)

"A or B"

Overkill ?!

A

B

OR-split OR-join

Page 25: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

25

Choice (2)

Implicit choice: it depends on the "eagerness" of A and B!

A

B

OR-split OR-join

Page 26: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

26

Choice (3)

Choice is explicit and may be based on logistic attributes!

A

B

OR-splitOR-join

We use high-level Petri nets:• tokens have values: case variables

• transitions determine the number of tokens produced: explicit OR-split

Page 27: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

27

Syntactic sugaring

AND-split AND-join

Explicit OR-split OR-join

Page 28: faculteit technologie management PN-1 مهندسی مجدد فرآیندهای تجاری بخش دوم: مدلسازی فرآیندها به کمک Petri nets

28

Iteration

A

B

C

B may be executed several times.