350 likes | 621 Views
Modeling Worldviews. Event Scheduling – Event Graphs State Machines Activity Scanning – Event Graphs and Petri Nets Process Interaction – Event Graphs and Block Diagrams. System Entities. Resident Entities Variables describe the state.
E N D
Modeling Worldviews • Event Scheduling – Event Graphs State Machines • Activity Scanning – Event Graphs and Petri Nets • Process Interaction – Event Graphs and Block Diagrams
System Entities Resident Entities Variables describe the state. Focus on cycles. (busy-idle-busy...) Transient Entities Variables describe state and location. Focus on flow paths.
Block Languages • Process “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)
Block Languages Common 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
Block Languages Common 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” )
1 1 Single Queue SIMAN GPSS GENERATE CREATE 1 QUEUE QUEUE 1 SEIZE SEIZE DEPART 1 1 DELAY ADVANCE RELEASE RELEASE 1 TERMINATE
Main Event Scheduling Algorithm for Process Interaction State Initialize Event List Advance Clock to Time of Next Event Change State Execute Event Cancel Events Schedule Events Remove Event From List and move “tokens” until blocked or delayed Stop Yes Summary Statistics No
Processing Processing Loading Loading Unloading Unloading Labor Modeling “Machine Interference” tool1 tool2 Oper. Time
Cycle SEIZE 1 1 Unload 2 1 RELEASE 2 RELEASE 1 Semiautomatic Machine GENERATE 1 QUEUE SEIZE SEIZE Worker is Resource 1 Machine is Resource 2 DEPART 1 Load TERMINATE RELEASE
SingleQueue with Failures SIMAN CREATE CREATE TBF IA time QUEUE 1 QUEUE 1 HIGH PRIORITY JOB SEIZE SEIZE 1 1 DELAY DELAY TTR Proc. time RELEASE RELEASE 1 1 (Failure Processing) (Job Processing)
Siman Blocks View (File/Template/Attach/Blocks) This is what the Arena Processes view generates.. Eventually you will need to understand this to use Arena In a real problem...
; ***************************** • ; * 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);
Block Languages Process 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 ! ! !
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.
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 Systemsand • Continuous Flow Processes
Screen Capture of ARENA Output: Svc Time = 1.85 Ref: Kim Branch and Jay Gillespie
Maximum of 100 Entities Exceeded! (Svc Time = 18.5) What is the effect on Bias of ignoring runs that did not terminate correctly?
DELAY SEIZE RELEASE Queue Idle Resources 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.
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
GEN T A TERM 1 QUEUE yes yes (Q>0) (S>0) SEIZE 1 DEPART 1 TERM T S 1 RELEASE • Notes: • 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.
ConventionalEG Model (Q>0) Ta (R>0) Ts SEIZE Release QUEUE {Q=Q+1} {R=R-1, Q=Q-1} {R=R+1}
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}
Start (I) Run (S[0],S[1]) Finish (I) I I (Q[I]) ~ tA (S[I]) tS ~ Enter {Q[I]--, S[I]--} { I=(Q[0]>10), Q[I]++ } { S[I]++ }