| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimEvents |
| Contents | Index |
| Learn more about SimEvents |
Timing
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.
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 Assigning Event Priorities and Processing Sequence for Simultaneous Events.
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.
Entity Input Ports
| Label | Description |
|---|---|
| IN | Port for arriving entities. |
Signal Input Ports
| Label | Description |
|---|---|
| ti | Timeout interval for a newly arrived entity. You see this port only if you set Timeout interval from to Signal port ti. |
Entity Output Ports
| Label | Description |
|---|---|
| OUT | Port for entities whose timeout event the block has just scheduled. |
Signal Output Ports
| Label | Description | Time of Update When Statistic Is On |
|---|---|---|
| #d | Number of entities that have departed from this block since the start of the simulation. | After entity departure |
The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0.

Name of the timeout to associate with each entity.
Determines whether the timeout interval is computed from a parameter in this dialog box, an input signal, or an attribute of the arriving entity.
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.
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.
The priority of the timeout event, relative to other simultaneous events in the simulation.
Behavior of the block if a timeout event with the specified timeout tag is already scheduled for the arriving entity.
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.
These parameters determine whether certain ports produce data throughout the simulation, produce data only when you stop or pause the simulation, or are omitted from the block. For descriptions of the affected ports, see the preceding table, "Signal Output Ports".

Forcing Departures Using Timeouts
![]() | Replicate | Set Attribute | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |