Documentation Center

  • Trials
  • Product Updates

Schedule Timeout

Schedule timeout event for each entity

Library

Timing

Description

This block schedules a timeout event for each arriving entity. Timeout events enable you to limit the time that an entity spends on designated entity paths during the simulation. Topologically, this block designates a beginning of an entity path that is relevant to the time limit.

Characteristics of Timeout Event

The timeout event is on the event calendar and has these characteristics:

  • Event time equal to the entity's arrival time plus a timeout interval. You specify the timeout interval via a parameter, attribute, or signal, depending on the Timeout interval from parameter value. The block determines the absolute event time of an entity's timeout event upon the entity's arrival.

      Note:   If you specify the timeout interval via an event-based signal, be sure that its updates occur before the entity arrives. For common problems and troubleshooting tips, see Unexpected Use of Old Value of Signal.

    For example, if an entity arrives at T=5 and the timeout interval is 3 (seconds), then the block schedules the timeout event to occur at T=5+3=8.

  • A name that you specify via the Timeout tag parameter. The event calendar can contain multiple independent timeout events for the same entity, as long as they have distinct timeout tags. This block does not affect timeout events having other timeout tags.

  • Event priority that you specify via the Timeout event priority parameter. Note that if timeout events for two entities have distinct event priorities and are scheduled for the same value, or sufficiently close values, of the simulation clock, then the priority values determine which entity times out first. For details, see Assign Event Priorities and Processing Sequence for Simultaneous Events.

Occurrence of Timeout Event

If the timeout event occurs for a specific entity, then that entity attempts to depart from a TO entity output port of the storage block in which it resides. To configure a block so that it has a TO port, select the Enable TO port for timed-out entities parameter in the block's dialog box. If the timeout event occurs while the entity is in a block that has no TO port, then the Schedule Timeout block's If entity has no destination when timeout occurs parameter indicates whether the simulation halts with an error message, or discards the entity while issuing a warning.

To cancel a timeout event before it occurs, use the Cancel Timeout block. You cannot directly change the scheduled time or priority of a timeout event that is already on the event calendar. You can, however, cancel a timeout event and subsequently schedule a new one having the same timeout tag.

Ports

Entity Input Ports

LabelDescription
INPort for arriving entities.

Signal Input Ports

LabelDescription
tiTimeout interval for a newly arrived entity. This signal must be an event-based signal. You see this port only if you set Timeout interval from to Signal port ti.

Entity Output Ports

LabelDescription
OUTPort for entities whose timeout event the block has just scheduled.

Signal Output Ports

LabelDescriptionTime of Update When Statistic Is On
#dNumber of entities that have departed from this block since the start of the simulation.After entity departure

The initial output value is 0. This value is in effect from the start of the simulation until the first update by the block.

Dialog Box

Schedule Timeout Tab

Timeout tag

Name of the timeout to associate with each entity. Enter a new timeout tag, or reschedule a previous timeout by choosing it in the drop-down list.

Timeout interval from

Determines whether the timeout interval is computed from a parameter in this dialog box, an input signal, or an attribute of the arriving entity.

Timeout interval

The length of time between an entity's arrival time and the scheduled timeout event for that entity. You see this field only if you set Timeout interval from to Dialog.

Attribute name

The name of the attribute whose value the block uses as the timeout interval for an entity. You see this field only if you set Timeout interval from to Attribute.

Timeout event priority

The priority of the timeout event, relative to other simultaneous events in the simulation.

If timeout is already scheduled

Behavior of the block if a timeout event with the specified timeout tag is already scheduled for the arriving entity.

If entity has no destination when timeout occurs

Behavior of the block if a timeout event occurs for an entity that resides in a block that has no visible TO entity output port.

Statistics Tab

These parameters determine whether the block produces data at signal output ports or omits those ports.

Number of entities departed

Allows you to use the signal output port labeled #d.

Was this topic helpful?