Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma)...

36
Power Tool Development Simulators . Language s . . Petri Nets Turing Machine Event Graphs(Sigma) Queueing . Usability
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    212
  • download

    0

Transcript of Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma)...

Page 1: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Power

Tool Development

Simulators.

Languages

. .Petri Nets

Turing Machine

Event Graphs(Sigma)

Queueing.

Usability

Page 2: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

A B

Complete Edge Definition

( j )k

t (i)~

After executing event A, a vector of expressions, k, is evaluated. If condition (i) is then true, event B will be scheduled to occur after a delay of t with variable vector, j, equal to those values of k.

Page 3: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Figure 2.2: Main Event Scheduling Algorithm

Cancel Events

Initialize

Advance Clock to Time of Next Event

Execute Event

Remove Event From List

State

Event List

Change State

Schedule Events

Summary StatisticsStop YesNo

Page 4: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

The values of k become the attributes of scheduled events…

PENDING EVENTS LIST (“Future” Events list is not necessarily in future)

Time Event Priority Attributes

3.32 Breakdown 2 3,4,6

4.47 Finish 3 3,4,6

5.64 Arrival 4 7 Part number 7 5.64 Finish 3 2,5,1

Tool 3, worker 4, part 6

The “attributes” for the edge that scheduled the Breakdown event are expressions for the values for the “parameters”, (Tool,Worker,Part)

Page 5: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Simulated Call Center (3 classes of caller and agent skill levels)

Policy: Highest priority calls answered first with the lowest skilled agents that can handle the call.

Exercise: Find the error… ( should be )C,0 C,C

RUNN,S[N]‘s

{S[A]=S[A]-1,Q[C]=Q[C]-1}

{S[A]=S[A]+1}

LEAVESTART

(Q[C]>0)

ts(C,A)(S[A]>0)

ARRIVE

tc

{R=RND,C=(R>.4)+(R>.8),

Q[C]=Q[C]+1}

C,0 C,A(C,A) (A)

CHECK(C,A)

(S[A]<=0&A<N-1)

~

~~

A

CHKQs(C,A)

Q[C]==0&C>0)

~

C,A+1A,A

C,A

C-1,A

Page 6: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

State for BANK2.MOD

Customers Waiting In Line

16 14 13 1215 11

8

10

6

Customers In Service

NEXT=11ID=15

Pending Events ListTime Type Parameters3.243 Leave 84.210 Enter5.593 Leave 66.478 Leave 10

Page 7: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Do EVENT FOR I = 2 to 7 and J = 0 to I

I+1 , 0

EVENT (I,J)

~ ( I < 7 & J = = I )

~

I , J+1

~

( I 7 & J < I )

2 , 0

( I 7 & J I )

Page 8: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

BANK2.MOD

RUN

{Q=Q-1, S=S-1, NEXT=NEXT+1}

{S=S+1,W[IN]=CLK-W[IN]}

LEAVE

(Q>0)

tsSTART

(S>0)ENTER

ta

{ID=ID+1, Q=Q+1, W[ID]=CLK}

(S) (IN)

NEXT

(IN)ID IN

~

~

Page 9: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

BANK2.MOD – can you simplfy? (IN not used in START)

RUN

{Q=Q-1, S=S-1, NEXT=NEXT+1}

{S=S+1,W[IN]=CLK-W[IN]}

LEAVE

(Q>0)

tsSTART

(S>0)ENTER

ta

{ID=ID+1, Q=Q+1, W[ID]=CLK}

(S) (IN)

NEXT

(IN)ID IN

~

~

Page 10: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

BANK2.MOD (modifiedWhat about collecting wait in line only?)

RUN

{Q=Q-1, S=S-1, NEXT=NEXT+1}

{S=S+1,W[IN]=CLK-W[IN]}

LEAVE

(Q>0)

tsSTART

(S>0)ENTER

ta

{ID=ID+1, Q=Q+1, W[ID]=CLK}

(S) (IN)

~

~ NEXT

Page 11: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

BANK2.MOD (modified – wait in queue only)

RUN

{Q=Q-1, S=S-1, W[IN]=CLK-W[IN],NEXT=NEXT+1}

{S=S+1}

LEAVE

(Q>0)

tsSTART(IN)

(S>0)ENTER

ta

{ID=ID+1, Q=Q+1, W[ID]=CLK}

(S)

~

~

NEXT

ID

Page 12: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

BANK2.MOD – LIFO? Error – why?

RUN

{Q=Q-1, S=S-1}

{S=S+1,W[IN]=CLK-W[IN]}

LEAVE

(Q>0)

tsSTART

(S>0)ENTER

ta

{Q=Q+1, W[ID]=CLK}

(S) (IN)(IN)Q+1

~

~

Page 13: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

DISK Function

Reads input from files during a run.

DISK{F;R} reads record R from file F.

Record can be:Numerical Data......or

EXPRESSIONS (e.g. Q+5*BET{.5;.3})Program can change itself during execution.

Page 14: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

DISK FunctionExamples:

1. The file QUE.DAT is: 11 12 13 14 15

Q=DISK{QUE.DAT;4} = 14

Q=DISK{QUE.DAT;9} = 14 (wraps around at EOF)

Q=DISK{QUE.DAT;0} (reads file in sequence, wrap at EOF)

Q=DISK{QUE.DAT;1+5*RND}= Uniform{11,12,...15}

Page 15: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Read(I)

3. Tabled Data in TOOL.DAT

//JID IST BIN MTTF MTTR

1 3.5 4 14.4 15.2

2 3.7 3 10.0 18.7

3 2.5 2 15.4 16.6

4 0.5 5 8.4 12.4

{ JID[I]=DISK{TOOL.DAT;1+5*I}, IST[I] =DISK{TOOL.DAT;2+5*I}, BIN[I]=DISK{TOOL.DAT;3+5*I}, MTTF[I] = DISK{TOOL.DAT;4+5*I}, MTTR[I] = DISK{TOOL.DAT;5+5*I}}

... is Read by...0

I+1~ (I<3)

~(I= =3)

Think of I as the “row” in the data table (starting with 0)!

0

Page 16: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

3.5

5.5

7.5

9.5

11.5

13.5

15.5

17.5

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

Traffic Intensity

Execution Time of Queuing System in Series

70.0

120.0

170.0

220.0

270.0

320.0

370.0

420.0

470.0

520.0

570.0

RD Simulation

JD Simulation

JD Simulation(Network)ASAP (Minutes)

Execution time in seconds of the JDS and RDS at different traffic intensities for “minifab lite”.

From Jesus Jimenez report on John Fowler’s SRC Project at Arizona State

Page 17: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Enter StartRun(R,M)

Leave

ta

ts(S)

(Q)

~

~

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

{S=S+1}

Can get average Q from this model – say, wantAverage W? (use Little’s Law).

Page 18: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Enter StartRun(R,M)

Leave(IN)

NEXT

ta

ts(S)

(Q)

~

~

{NEXT=0,S=R}

{Q=Q+(Q<(M-R)), ID=MOD{ID+1;M},W[ID]=CLK}

{Q=Q-1,S=S-1,NEXT=MOD{NEXT+1;M}}

{S=S+1,W[IN]=CLK-W[IN]}

Could use MOD function to recycle elements ofThe W[ ] array. (Assume that Max Q << M-R)

Page 19: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Enter StartRun(R,M)

Leave(IN)

NEXT

ta

ts(S)

(Q)

~

~

{NEXT=1,S=R}

{Q=Q+(Q<(M-R)), ID=MOD{ID+1;M},W[ID]=CLK}

{Q=Q-1,S=S-1,NEXT=MOD{NEXT+1;M}}

{S=S+1,W[IN]=CLK-W[IN]}

Or...Can use (Much Faster and Easier) Resident Entity Model to get Average Delay (Eliminate W[.]!)

Page 20: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Estimates PROB = Prob{Wait<X} as average number of Delays (D) after Starts (S) Homework: Check Priorities between Delay and Start? Is it O.K. for R>1 resources? Why NOT?

Enter StartRun(R,x)

ta

ts(R)

(Q)

~

~

{Q=Q+1}

{D=D+1,W=W+(S>=D),PROB = W/D }

{R=R+1}

Delay

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

Delay.mod

Leave

Page 21: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Records of Transient Entity Attributes

The Array,

ENT[0], ... ,ENT[N],

Acts as a Temporary Buffer for Transferring Data Between theModel and Ranked Lists (Queues).

Queue M will be Ranked by Attribute ENT[ RNK [M] ].

Page 22: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Priority Queues

• PUT{C;L} will add ENT[ ] to list L according to ranking criterion C.– Returns a value of 1– e.g. Q = Q + 1

• GET{C;L} will move a record from list L into ENT[ ] according to criterion C– e.g. Q = Q - 1

Page 23: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Queue Ranking Options• PUT{Option;List}

• 1 or FIF: First is First • 2 or LIF: Last is First • 3 or INC: Increasing values of a rank attribute• 4 or DEC: Decreasing values of rank attribute• 5 or EVN: Breaking Ties between rank

• Get{Option;List}• 1 or FST: First in line• 2 or LST: Last in line• 3 or Key: Specific entity

Page 24: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

The ENT[ ] Array

ENT [ ]

ENT [ ]

PUT

GET

LIST

LIST

SIGMA Memory File

Transient Entity Attributes using the ENT[ ] Array

Page 25: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

SORTING N Random Numbers

{ LINE=4,

RNK[LINE]=6 }

{ X=RND,

ENT[6]=X }

{ X=ENT[6] }~

~

~

1 1(I==N)

I+1

(I) (I)

I+1

(I<N&PUT{DEC;LINE}) (GET{FST;LINE})

SORTRUN SHOW

Page 26: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

A Priority Queue State Changes

{R=R+1}{R=1,RNK[5]=3}

{ID=ID+1,

ENT[1]=ID, ENT[2]=CLK, ENT[3]=1+(RND>.5), Q=Q+PUT{INC;5}}

{Q=Q-GET{FST;5}, W[ENT[1]]=CLK-ENT[2],

R=R-1}

RUN ENTER STARTLEAVE

Page 27: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Time Constrained Process SequenceExample: stamping mill in heavy mfg.

Heat Press

Maximum Cooling Time = tc

ta

thtp

QF = queue for furnacesQP = queue for pressesF = number idle furnacesP = number idle presses

Page 28: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Run(tc,F,P)

Enter Heat

Ready

Press Done

Cold(ENT[0])

Redo

{QF=QF+1}

{F=F+1,QP=QP+1}

{P=P-1,QP=QP-1} {P=P+1}

{QP=QP-1,QF=QF+1}{F=F-1,

QF=QF-1}

ta

th

tc

tp

(F>0)

(QF>0)

(P>0)

(F>0)

(QP>0)

~

~ ~~

~

Straight-Forward Approach to TBS

Problems: non-FIFO or Random tc

Page 29: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Run(tc)

Enter Heat

Ready

Press Done

Cold(ENT[0])

Redo

{F=1,P=1} {QF=QF+1}

{F=F+1,ID=ID+1,ENT[0]=ID,QP=QP+PUT{FIF;1}}

{P=P-1,QP=QP-GET{FST;1}}

{P=P+1}

{QP=QP-1,QF=QF+1}

{F=F-1,QF=QF-1}

ta

th

tc

tp

(F>0)

(QF>0)(GET{KEY;1})

(P>0)

(F>0)

(QP>0)

ID

~~

~ ~~

~

Page 30: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.
Page 31: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

Conditional Get• CGET{Condition;List}• Example: Want to start the first job line 8, if any, with

ENT[3]=2 or ENT[4]>.5, if the Buffer B is not full, and a Worker of skill W is Idle.

Check Start~

CGET{(ENT[3]==2 ENT[4]>.5) & B & W ; 8}

Will Develop a conceptual job shop with 2 Events

Page 32: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

~

FINISHENTER

ta

ts

{Q = Q+1}

~(Q = = 1)

Start with Single Resource Queue

ts

(Q1)

{Q = Q-1}

Q = total number of jobs in the systemta = time between job arrivals

ts = processing times

Page 33: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

~

FINISHENTER

ta

ts

~(QM)

ts

(QM)

{Q = Q+1} {Q = Q-1}

M Resource Queue

Page 34: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

~ FINISH(i)

ENTER(i)

ta

ts(i)

{Qi = Qi+1}

~(QiMi)

N Step Process

Mi = number of resources for ith step Qi = total number of jobs in the ith step

ta = time between job arrivals

ts(i) = processing times at ith step

ts(i)

i+1

~(i= =1)

~(i<N)

(QiMi)

{Qi = Qi-1}

i

i1

Page 35: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

General “Job Shop”

Mk = number of resources of type k

Qk = total number of jobs in queue k,

rank increasing priority (RNK[k]=2) .

Dj,k = priority for job type j at resource k

ta(j) = time between type j job arrivals

ts(i,j) = processing times at ith step of job j

Ri,j = The resource type needed by the

jth job type at the ith step of Nj steps.

1. K processing resources2. J job types, each with a different routingSubscript “everything” with the ith step for the jth job using the kth resource.

Page 36: Power Tool Development Simulators. Languages.. Petri Nets Turing Machine Event Graphs(Sigma) Queueing. Usability.

~ FINISH(I,J,K)

ENTER(I,J,K)

ta(j)

ts(i,j)

{ENT[0]=I, ENT[1]=J, ENT[2]=D[J;K],

Q[K] = Q[K] + PUT{ INC ; K } }

~

( CGET { Q[K] M[K] ; K } )

I+1, J, R[I+1;J]

~(I = =1)

~

(I<N[J])

ENT[0], ENT[1], K

1, J, R[1;J]

{Q[K] = Q[K] -1}

( CGET { Q[K] M[K] ; K } )

Note: RNK[K] = 2 for all queues

ts(i,j)

ENT[0], ENT[1], K