modeling worldviews event scheduling – event graphs state machines activity scanning – event...

35
Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and Block Diagrams

Post on 22-Dec-2015

223 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Modeling Worldviews

• Event Scheduling – Event Graphs

State Machines

• Activity Scanning – Event Graphs

and Petri Nets

• Process Interaction – Event Graphs

and Block Diagrams

Page 2: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Resident Entities

Variables describe the state.

Focus on cycles. (busy-idle-busy...)

Transient Entities

Variables describe state and location.

Focus on flow paths.

System Entities

Page 3: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Block LanguagesProcess “World View”• Focus on Transient Entity Flow – “JOB DRIVEN”.

• Preprogrammed blocks of code.• Block execution is triggered by a

Transient Entity entering a block. • Execution Controlled by Job Moves.• Common Languages

Arena (Siman), AutoMod, GPSS, SLAM (AweSim)

Page 4: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Block LanguagesCommon Languages

SLAM SIMAN GPSS (fundamental Blocks)

Generate - Transactions enter modelQueue - Transactions wait for facilitySeize - Transactions take resourceDepart - Transactions leave queueAdvance - Transactions are delayedRelease - Transactions release resourceTerminate - Transactions leave the model

Page 5: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Block LanguagesCommon Languages

SLAM SIMAN (fundamental blocks)GPSS

Create - Entities enter modelQueue - Entities wait for facilitySeize - Entities take resourceDepart - Transactions leave queueDelay - Entities are delayedRelease - Entities release resource (Entities may leave using “Dispose” )

Page 6: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Single Queue

QUEUE

SEIZE

DEPART

ADVANCE

RELEASE

GENERATE

TERMINATE

1

1

1

1

GPSSSIMANCREATE

DELAY

RELEASE

1

QUEUE

SEIZE1

1

Page 7: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Main Event Scheduling Algorithm for Process Interaction

Cancel Events

Initialize

Advance Clock to Time of Next Event

Execute Event

Remove Event From Listand move “tokens” until blocked or delayed

State

Event List

Change State

Schedule Events

Summary StatisticsStop YesNo

Page 8: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Loading Unloading

Processing

Time

Labor Modeling “Machine Interference”

tool1

Oper.

tool2

Loading

Processing

Unloading

Page 9: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

QUEUE

SEIZE

GENERATE

TERMINATE

1

1

SEIZE2

DEPART

Load

RELEASE

1

1

Cycle

RELEASE2

SEIZE1

RELEASE1

Unload

Semiautomatic Machine

Worker is Resource 1Machine is Resource 2

Page 10: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Single Queue with FailuresSIMAN

CREATE

DELAY

RELEASE

1

QUEUE

SEIZE1

1

CREATE

DELAY

RELEASE

1

QUEUE

SEIZE1

1

(Job Processing) (Failure Processing)

TTR

TBF

Proc. time

IA time

HIGH PRIORITY

JOB

Page 11: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and
Page 12: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and
Page 13: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and
Page 14: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and
Page 15: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Siman Blocks View (File/Template/Attach/Blocks)

This is what the Arena Processes viewgenerates..

Eventually you will need to understand this to use Arena

In a real problem...

Page 16: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Bank Queue with Jockeying

Page 17: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

MACHINEMACHINE MACHINE MACHINE

TRANSFER SEGMENT

TOOL BANK TOOLBANK

TOOLBANK

TOOLBANK

TRANSFERSEGMENT 1

TRANSFERSEGMENT 2

TRANSFERSEGMENT 3

TRANSFERSEGMENT 4

TRANSFERSEGMENT 5

DIESEL ENGINE MANUFACTURING LINE MODEL(SIMAN IV)

WALKING CRANE

ONLINE BUFFER

OFFLINE BUFFER

Page 18: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

• ; *****************************• ; * Mechanical Failures *• ; ***************************• CREATE;• ASSIGN: J = 0;• DUPLICATE:NumSegs-1; !create entity for each segment• ASSIGN: J = J + 1: !increment counter• SegNum = J; !set segment number• MechLoop DELAY: ED(MTBF(SegNum)); !delay for mean time btwn failures• QUEUE, MechFail1_Q; !wait for machine• SEIZE: Mach(SegNum); !seize machine• ASSIGN: MStat(SegNum) = 6: !segment status to mech fail• State = 0;• BRANCH,2: IF,TR_Policy.EQ.2.OR.TR_Policy.EQ.3,PM:• ALWAYS,M_Rep;• M_Rep ASSIGN: DTime = ED(MTR(SegNum)); !assign mean time to repair• TALLY: MechFail_1 + SegNum - 1, DTime;• DELAY: DTime; !delay for mean time to repair• BRANCH,1: IF,TR_Policy.EQ.2.OR.TR_Policy.EQ.3,PM_GetR:• ELSE,MF_Done;• MF_Done ASSIGN: MStat(SegNum) = 2; !segment status to starved• RELEASE: Mach(SegNum): !release machine• NEXT(MechLoop);

Page 19: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Block LanguagesProcess World View:+Transient Entity Focus Helps Animation+Easy to Use for Simple Applications-Limited to Pre-programmed blocks-Difficult to Model Complex Logic-Difficult to Model Resource Failure or (say, on

amount of time worked.)-Hard to Learn Well-Simulation Slows (or stops) as the System

Becomes Congested ! ! !

Page 20: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Block Languages

Why the simulation slows (or stops) as the system becomes congested.A record of each active transient entity

must be maintained during a run.e.g.: Process Flow in a semi-conductor

fabrication facility. A resident entity model will run hundreds

of times faster.

Page 21: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Block Languages

Resident Entity models are required to have practical simulations of any system with many active transient entities.e.g.

• Communications Networks• Large Scale Manufacturing Systems

and• Continuous Flow Processes

Page 22: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Screen Capture of ARENA Output: Svc Time = 1.85

Ref: Kim Branch and Jay Gillespie

Page 23: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Maximum of 100 Entities Exceeded! (Svc Time = 18.5)

What is the effect on Bias of ignoring runs that did not terminate correctly?

Page 24: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Resource/Job Driven Simulations

0

50

100

150

200

250

300

350

400

450

0 0.5 1 1.5

traffic intensity

tim

e p

er1

00

K j

ob

s

transient entity

resident entity

Page 25: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

RunTime Ratios

24.6 25.5 27.9 29.4

100

60

45

30

0

20

40

60

80

100

120

0.10 0.20 0.90 0.95 0.99 1.11 1.25 1.43

Traffic Intensity

Ru

n T

ime

Ra

tio

(A

ren

a/S

igm

a)

Page 26: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Speed comparisons with Automod ASAP

M/M/1 System

100.0

150.0

200.0

250.0

300.0

350.0

400.0

40% 50% 60% 70% 80% 90% 100% 110%

CP

U T

ime

(S

eco

nd

s/1

,000

,00

0 U

nit

s)

RD DESJD NetworkJD DESASAP

6.0

8.0

10.0

12.0

14.0

16.0

18.0

40% 50% 60% 70% 80% 90% 100% 110%

Traffic Intensity

Page 27: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Little Slowdown from using PUT/GET

Runtimes, no queue capacity

0

500

1000

1500

2000

2500

3000

3500

0 200 400 600 800 1000

# servers

Ru

nti

me

in s

eco

nd

s

Arena RD

Arena JD

SIGMA RD

SIGMA JD

Page 28: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Using Activity Scanning to Develop Process Models

“Color” tokens that represent Transient Entities - - track these tokens’ paths.Parse Activities into “SEIZE”, “DELAY” and “RELEASE” Blocks.

SEIZE

DELAY

RELEASE

Idle Resources

Queue

Page 29: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Process -> EG Mapping

Process World View:Automated SLAM to Event Graphs

(Woodward and Mackulak, ASU)

Resource deadlock detection

SIMAN to Event Graphs (Barton and Gonzalez, PSU)

Premature run termination

Page 30: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Notes: 1. Model "footprint" is "number of servers" not "size of queue" - insensitive to congestion – complexity grows with resources!2. Q statistics are O.K. but what about Delays? - ambiguity of the mystery blocks - Use Little's Law or transient entity (PUT/GET) method.

(S>0) (Q>0)

TA

GEN

1QUEUE

DEPART

TS

SEIZE

RELEASE

yes

TERM

yes

TERM

1

1

1

Page 31: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Conventional EG Model

SEIZE Release

{Q=Q+1} {R=R-1,Q=Q-1}

{R=R+1}

(R>0)

(Q>0)

QUEUE

Ta

Ts

Page 32: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and
Page 33: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and
Page 34: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

NOTE: Can change Distns.dat while model is running!

//CREATE block 1 - interval.5*TRI{.5}

//DELAY block 1 - duration

2*TRI{.5}

//DELAY block 2 -duration

2+3*BET{.5;.5}

Page 35: Modeling Worldviews Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and

Run (S[0],S[1])

Enter

{ I=(Q[0]>10), Q[I]++ }

Start(I)

Finish(I)

I~(Q[I])

tS

tA

{Q[I]--, S[I]--}

{ S[I]++ }

I

~

(S[I])