5.4: Simulating the Two Workstation Model
- Page ID
- 30978
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)This section discusses and illustrates the record of the time ordered sequence of events that are processed by a simulation engine for a particular model. This record is called a trace and includes the changes in state variable values that occur as well as other relevant information such as entity attributes. All simulation engines provide a trace that the modeler can examine to determine the step-by-step behavior of a simulation for verification and validation.
Consider one possible simulation of the two workstations in sequence model. Let’s follow the sequence of events processed in time order when only one entity moves through the two workstations, assuming that no other entities arrive in the meantime.
The trace for the simulation with one entity is shown Table 5-1. Only the new values of state variables whose values are changed by an event are shown. At the start of the simulation there are no entities in the model, the buffers are empty and the workstation resources are in the IDLE state. The entity with ID number 1 arrives at time 0 and enters the buffer of workstation A. Since the workstation A resource is IDLE, the start service at A event occurs at time 0. This event removes the entity from the buffer of workstation A and makes the workstation A resource BUSY.
Table 5-1: Simulation Trace for One Entity | ||||||
Current Simulation Time | Event | Entity ID | Number in Buffer – Station A | State of Workstation A Resource | Number in Buffer – Station B | State of Workstation B Resource |
0.0 | Initial Conditions | 0 | IDLE | 0 | IDLE | |
0.0 | Entity Arrives to A | 1 | 1 | |||
0.0 | Start Service at A | 1 | 0 | BUSY | ||
8.0 | End Service at A | 1 | IDLE | |||
8.0 | Entity Arrives to B | 1 | 1 | |||
8.0 | Start Service at B | 1 | 0 | BUSY | ||
16.5 | End Service at B | 1 | IDLE |
The simulation engine must determine the duration of processing at workstation A for this particular entity. This is done by computing a random sample from the processing time distribution: uniform (5,13). Suppose the value turns out to be 8.0. Thus, the end of service at A event is placed at time 8.0. At this time, the workstation A resource becomes IDLE.
The entity arrives at B event occurs at time 8.0 as well since there is no time delay for movement between the workstations. The entity enters the buffer of workstation B. Since the workstation B resource is IDLE, the start service at B event occurs at time 8.0. The duration of processing at workstation B is a constant 8.5. Thus, the end of service at B event is placed at time 16.5.
Now, suppose a second entity arrives in the simulation at time 5.0. This time is determined by computing a value from the time between arrivals distribution: exponential (10) when the entity arrives at A event is processed for entity 1 at time 0. Suppose further that the simulation engine computes the service time at workstation A to be 7.0. Table 5-2 shows the trace of the simulation for this situation.
Note the events involving entity 2. Since the workstation A resource is BUSY when entity 2 arrives at time 5.0, it remains in the buffer of station A. At time 8.0, all events concerning entity 1 are processed first. After these events are processed, the start service at A event is processed for entity 2. Since the processing time is computed to be 7.0, the end of service at A event is placed at time 15.0.
At time 15.0, the end of service at A event occurs for entity 2 as well as the entity arrives to B event. Since workstation B resource is busy, entity 2 waits in the buffer of station B.
At time 16.5, the end of service at B event occurs for entity 1. Since the workstation B resource becomes IDLE, start of service at B event occurs for entity 2. At time 25.0, entity 2 completes processing at workstation B.
Table 5-2: Simulation Trace for Two Entities | ||||||
Current Simulation Time | Event | Entity ID | Number in Buffer – Station A | State of Workstation A Resource | Number in Buffer – Station B | State of Workstation B Resource |
0.0 | Initial Conditions | -- | 0 | IDLE | 0 | IDLE |
0.0 | Entity Arrives to A | 1 | 1 | |||
0.0 | Start Service at A | 1 | 0 | BUSY | ||
5.0 | Entity Arrives to A | 2 | 1 | |||
8.0 | End Service at A | 1 | IDLE | |||
8.0 | Entity Arrives to B | 1 | 1 | |||
8.0 | Start Service at B | 1 | 0 | BUSY | ||
8.0 | Start Service at A | 2 | 0 | BUSY | ||
15.0 | End Service at A | 2 | IDLE | |||
15.0 | Entity Arrives to B | 2 | 1 | |||
16.5 | End Service at B | 1 | IDLE | |||
16.5 | Start Service at B | 2 | 0 | BUSY | ||
25.0 | End Service at B | 2 | IDLE |