0% found this document useful (0 votes)
2 views2 pages

Track Server Queue Time Exceeding 9

The document describes a modeling approach to determine the time at which a server queue first exceeds 9 entities during a simulation run. It involves: 1. Creating state variables to track the queue length and time; 2. Using an add-on process to update the queue length variable when entities enter the server; 3. Creating a monitor to trigger an event when the queue length crosses 9; 4. Adding a process triggered by the monitor event to record the time in the time variable; 5. Stopping the simulation once the time variable is set, displaying the result.

Uploaded by

maverick2660
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Track Server Queue Time Exceeding 9

The document describes a modeling approach to determine the time at which a server queue first exceeds 9 entities during a simulation run. It involves: 1. Creating state variables to track the queue length and time; 2. Using an add-on process to update the queue length variable when entities enter the server; 3. Creating a monitor to trigger an event when the queue length crosses 9; 4. Adding a process triggered by the monitor event to record the time in the time variable; 5. Stopping the simulation once the time variable is set, displaying the result.

Uploaded by

maverick2660
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Problem:

I have a simple model with a source, server and sink and I would like to know at what point in time during the
simulation run the queue for the server exceeds 9 for the first time.
Categories:
Add-On Process Logic, Custom Statistics
Key Concepts:
Add-On Process, Contents, CrossingStateChange, Event, InputBuffer, Monitor, On Entered, Process Triggering
Event, Real State Variable, Stopping Condition, [Link]

Assumption:
Since the time is the only information desired, the simulation stops running after the queue reaches 9 for the first
time.
Technical Approach:
A state variable is updated with the number of entities in the server queue each time a new entity enters the
server. A Monitor element is used to track this state variable and trigger an event when the state variable goes
over the value of 9. The triggering of this event executes a process that updates another variable with the current
simulation time and the simulation stops. The variable with the simulation time is displayed in the Results Window
as a State Statistic.
Details for Building the Model:
Simple System Setup
 Place a Source, Server and Sink in the Facility Window. Update the Processing Time property of the Server
to be ‘[Link](.2,.3,.5)’ so that the Server has some queuing.
 Connect the Source and Server, as well as the Server and Sink with Paths.

Creating Discrete State Variables


 Click on the Definitions tab and select the States panel. Create two discrete state variables, one called
‘NumberInQueue’ and the other called ‘TimeWhenOver9’.
Using an Add-On Process Trigger
 Within the Server object, create an Add-On Process by double-clicking on Entered. This will take you to
the Processes Window. In this process, add an Assign step that assigns the State Variable Name
‘NumberInQueue’ to the New Value of ‘[Link]’. (Note: This is a function that
returns the number in the InputBuffer queue for this Server).
Creating and Using a Monitor
 Select the Elements Panel within the Definitions tab to add a Monitor element with its Name as
‘Monitor_Over9’. The Monitor Type property should be changed to ‘CrossingStateChange’. The State
Variable Name that it is monitoring should be set to ‘NumberInQueue’ and the Threshold Value is ‘9’.
Adding a New Process
 Create a new process using the Create Process icon in Processes Window. Set the Triggering Event
property for the process to the name of the Monitor you just created, followed by .Event,
‘Monitor_Over9.Event’.
 Place an Assign step in this new process and have that Assign step update the State Variable Name
‘TimeWhenOver9’ to the current simulation time, using with the function ‘[Link]’ as the New
Value.
Stopping the Simulation Run
 Click on the Definitions Window and select the Elements panel to create a new State Statistic.
 Set the State Variable Name to ‘TimeWhenOver9’ and the Stopping Condition to ‘TimeWhenOver9 > 0’.
This will stop the simulation run once this threshold is met for the first time.

You might also like