Suppose that you want to:
Preload a queue or server with entities at the start of the simulation, before you analyze queueing or processing delays.
Initialize the capacity of a shared resource before you analyze resource allocation behavior.
In these scenarios, you can simultaneously generate multiple entities at the start of the simulation. You can then observe the behavior of only those entities for the remainder of the simulation.
To generate multiple entities at time
use MATLAB® code in the Entity Generator block.
In a new model, from the SimEvents® library, drag the Entity Generator, Entity Terminator, and Dashboard Scope blocks.
Double-click the Entity Generator block.
From the Time source drop-down
In the Intergeneration time action field,
use MATLAB code to enter the number of entities that you want
to generate. For example, you could use 8. In that case, at simulation
0, the Entity Generator block
generates 8 simultaneous events.
In the Events action tab, randomize the entity attribute. Select the Generate event action and, in the Generate action field, enter the MATLAB code:
The output of the Dashboard Scope block shows
that the software generates multiple entities at time
Composite Entity Creator | Composite Entity Splitter | Discrete Event Chart | Entity Gate | Entity Generator | Entity Input Switch | Entity Multicast | Entity Output Switch | Entity Queue | Entity Replicator | Entity Server | Entity Terminator | MATLAB Discrete Event System | Multicast Receive Queue | Resource Acquirer | Resource Pool | Resource Releaser