Entity Find
Find entities
Libraries:
SimEvents
Description
The Entity Find block finds entities that use a specific resource. The block receives a trigger entity from its input port. Upon receiving the trigger entity, it initiates a search across all blocks in a model for entities with a specific resource. You can further filter the search for finding entities by adding additional filtering conditions. The block can manipulate the found entities in these ways.
Search entities that satisfy a specific condition across blocks in a model to find and examine them.
Extract found entities from the model without modifying them.
Change the attributes of the found entities at their location in the model without extraction.
In this case, to customize actions when the entity is found, in the Event actions tab, in the
On found action
field enter MATLAB® code.Extract and change entity attributes. The extracted entities are queued in the block and rerouted through its output port.
In this case, to customize actions when entities enter, exit, or are blocked, enter MATLAB code in the
Entry action
,Exit action
, orBlocked action
field of the Event actions tab. For more information, see Write Event Actions for Legacy Models.
The block can extract entities from Entity Server, Entity Queue, Entity Store, Resource Acquirer, Entity Replicator, Conveyor System, Entity Selector, MATLAB Discrete-Event System, and Discrete-Event Chart blocks.
When an entity is extracted, pending events and statistics are updated accordingly. For instance, if an entity is extracted by an Entity Find block from an Entity Server block during the service period, the rest of the service is canceled and the output of the statistics are updated.
Note
The block can find only one entity type that you specify in the model and it cannot find or extract entities across model reference boundaries.
For more information about common workflows involving Entity Find block, see Find and Extract Entities in SimEvents Models.
Examples
Ports
Input
Output
Parameters
Version History
Introduced in R2018b