This example shows different ways to generate and initialize entities and their attribute values.
Generate entities periodically by setting a constant value of intergeneration time in the Entity Generator. You can then initialize these entities in the Entity Generator using MATLAB code as shown below.
Generate entities using intergeneration time sampled from a random distribution by writing a custom intergeneration time action in the Entity Generator block, as shown below.
In this example, initialize the generated entities by calling into a Simulink Function that returns initial values for attributes as shown below.
This example shows how you can generate multiple entities simultaneously at the start of simulation to preload a queue. To generate N entities, the intergeneration time for these entities must be 0 (zero). To stop generation after N entities, set the intergeneration time to infinity (inf).
This example shows how you can generate entities when certain events occur in the model. Each such event can be translated into a message arrival at the event input port of the Entity Generator.
This example shows how you can generate entities where the intergeneration times are specified from a sequence or an array. Use a Repeating Sequence Stair block inside the Simulink Function
Initialize the generated entities using data from a spreadsheet by importing the data to a MATLAB table object. Individual columns of this table can then be read by the Repeating Sequence Stair block in the Simulink Function