|On this page…|
Your requirements for handling entities that time out might depend on your application or model. For example, you might want to
Count timed-out entities to create metrics.
Process timed-out entities specially.
Discard timed-out entities without reacting to the timeout event in any other way.
To process or count timed-out entities, use one or more of the following optional ports of the individual queues, servers, and Output Switch blocks in the entities' path. Parameters in the dialog boxes of the blocks let you enable the optional ports.
|Port||Description||Parameter that Enables Port|
|Entity output port TO||Timed-out entities depart via this port, if present.||Enable TO port for timed-out entities on Timeout tab|
|Signal output port #to||Number of entities that have timed out from the block since the start of the simulation.||Number of entities timed out on Statistics tab|
To combine paths of timed-out entities from multiple blocks, use a Path Combiner block.
In this example (open modelmodel), timeouts and a priority queue combine to expedite the handling of requests that have waited for a long time in the queue. Requests initially have priority 3, which is the least important priority level in this model. If a request remains unprocessed for too long, it leaves the Priority Queue block via the TO entity output port. Subsequent processing is as follows:
A priority-3 request becomes a priority-2 request, the timeout interval becomes shorter, and the request reenters the priority queue. The queue places this request ahead of all priority-3 requests already in the queue.
A priority-2 request becomes a priority-1 request, the timeout interval remains unchanged, and the request reenters the priority queue. The queue places this request ahead of all priority-3 and priority-2 requests already in the queue.
A priority-1 request, having timed out three times, is discarded.