Documentation Center

  • Trials
  • Product Updates

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.

    Note:   In all cases, the choice of parameter value affects only the values, not the timing, of the output signal. The output signal is always an event-based signal whose sample time hits depend on notifications from a subsequent block.

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

This block has a restricted set of valid connections to other blocks because the Event-Based Sequence block infers from a subsequent block when to generate a new random number.

The direct or indirect connections to signal input ports must have the multiplicities in the table.

Type of Signal Input PortExact Number of Connections
Notifying Ports1
Reactive Ports

0

Monitoring PortsArbitrary number
Ports of blocks that appear in Sink BlocksArbitrary number

All indirect connections must be via blocks that have all of the following characteristics:

    Tip   For an indirect connection to the Atomic Subsystem block, the restrictions on input and output signals apply to the subsystem itself, not the blocks inside the subsystem.

Ports

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

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.

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.

Was this topic helpful?