Products & Services Solutions Academia Support User Community Company

Learn more about SimEvents   

Event-Based Sequence - Generate sequence of numbers from specified column vector

Library

Generators / Signal Generators

Description

This block generates an event-based signal using data you provide, inferring from a subsequent block when to output the next value from your data. You specify the data as a column vector using the Vector of output values parameter. The parameter value can be any MATLAB language expression that evaluates to a column vector, including the name of a column vector variable in the MATLAB base workspace. As an example of inferring timing from a subsequent block, if you connect this block to the t input port of a Single Server block, then the Event-Based Sequence block outputs a new value each time an entity arrives at the server.

Behavior After Data Runs Out

If the block needs more data than the vector contains, subsequent output values follow a rule you specify using the Form output after final data value by parameter. The table below lists possible values for this parameter.

Parameter ValueDescription
Cyclic repetitionWhen the block needs a new output value after exhausting the data, it starts over at the beginning of the vector.
Holding final valueAfter exhausting the data, the block outputs the last data value for every sample time hit.
Setting to infinityAfter exhausting the data, the block outputs the value inf for every sample time hit. For example, if the block outputs intergeneration times for an entity generator, then the generator produces up to a fixed number of entities.
Setting to zeroAfter exhausting the data, the block outputs zero for every sample time hit. For example, if the block outputs service times for a server, then the server delays up to a fixed number of entities.

Connecting to Other Blocks

The Event-Based Sequence block has a restricted set of valid connections to other blocks because it is designed to infer from a subsequent block when to generate a new number.

Connections from the Event-Based Sequence block must satisfy all of these conditions:

Ports

This block has one signal output port for the numbers in the sequence. The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0.

The block has no entity ports, and no signal input port.

Dialog Box

Vector of output values

A column vector whose entries become values of this block's output signal. To use a column vector variable in the MATLAB base workspace, enter the variable name.

This parameter is tunable from one rapid simulation run to the next, but not within a simulation run. For details, see Running Discrete-Event Simulations Programmatically.

Form output after final data value by

The method for generating output after the block exhausts the data referenced in the Vector of output values parameter.

Examples

See Also

Event-Based Random Number, Repeating Sequence Stair, From Workspace

Using Data Sets to Create Event-Based Signals

  


Related Products & Applications

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