Documentation

Entity Generator

Generate entities

Library

Basic

Description

This block generates entities.

Parameters

Generation method

Select the method of generation. Choose Time-based to generate entities using intergeneration times from an input signal or statistical distribution. Choose Event-based for an external event to determine the entity intergeneration time.

Time source

Select the source of the intergeneration time. Select Dialog to specify a fixed period between entity generations. Select Signal port to generate entities based on an input signal. Select MATLAB action to define a MATLAB® script that defines the intergeneration time. This parameter is visible when Generation method is set to Time-based.

Period

Define the period between the generation of entities. This parameter is visible when Generation method is set to Time-based.

Generate entity at simulation start

Check this box to generate an entity at the start of the simulation.

Entity type

Choose the type of entity to generate. The Anonymous type has a data value associated with it. The Structured type includes attributes that you can set. The Bus object type lets you generate bus objects as entities.

Entity priority

Determines the priority of the generated entity. A lower value indicates higher priority.

Entity type name

Specify the name of the generated entity. This parameter is visible when Entity type is set to Bus object or Structured.

Data initial value

Specify the initial value of the data of an anonymous entity. This parameter is visible when you set Entity type to Anonymous. This value cannot be of type int64.

Define attributes

Define the attributes of the generated entity. This parameter is visible when Entity type is set to Structured.

Note

When done, you can export the structured entity type as a bus object, with the name Entity type name, to the base workspace. You need to export this bus object when using the MATLAB Discrete-Event System and Discrete Event Chart blocks.

Event actions

Specify the behavior of the entity on certain events. Define the behavior in the Event action parameter. For example, the Generate action is called when an entity is generated.

Event action

Define the behavior for the event action specified in Event actions.

Number of entities departed, d

Outputs the number of entities that have departed the block.

Pending entity present in block, pe

Indicates whether there are pending entities that have yet to depart the block.

Average intergeneration time, w

Outputs the average time between generation of entities.

Introduced in R2016a

Was this topic helpful?