
4 Basic Queues and Servers
4-10
Determining the proportion of time the physical queue length exceeds 10 is equivalent to
determining the proportion of time the queue length signal of the logical length-90 queue
exceeds 0.
Vary the Service Time of a Server
The subsystem described in “Lesson 3: Add Event-Based Behavior” on page 2-35 includes
an Infinite Server block that serves each entity for a random amount of time. The
random duration is the value of a signal that serves as an input to the Infinite Server
block. Similarly, the Single Server block can read the service time from a signal, which
enables you to vary the service time for each entity that arrives at the server.
Some scenarios in which you might use a varying service time are as follows:
• You want the service time to come from a random number generator. In this case, set
the Single Server block's Service time from parameter to Signal port t and use
the Event-Based Random Number block to generate the input signal for the Single
Server block. Be aware that some distributions can produce negative numbers, which
are not valid service times.
• You want the service time to come from data attached to each entity. In this case,
set the Single Server block's Service time from parameter to Attribute and set
Attribute name to the name of the attribute containing the service time. An example
is in the figure below.
To learn more about attaching data to entities, see “Set Entity Attributes” online.
Kommentare zu diesen Handbüchern