Resources


Locating Resource Entities

Resource entities are usually stored in the Resource Pool block. Resource entities need to be located, requested, and allocated to fulfill the resource requirements of other entities. Locating resources is also essential for other resource operations, including scheduling, statistics collection, and preemption. For example, the resource entities of interest need to be identified so their statistics can be collected during the simulation.

Simulation Studio primarily uses attribute-based rules to locate resource entities. An attribute rule is a Boolean expression that the attributes of targeted resource entities must satisfy. Run-time resource information, such as resource state and seize or unseize status, is also used to locate and identify resource entities.

The resource requirements of an entity that enters a Seize block (referred to as a controlling entity) can be specified using entity type or attribute rules in the Seize block. Multiple types of resource entities can be seized simultaneously, and resource entities can seize other resource entities. A Seize block dynamically creates an input resource entity port for each defined resource requirement. The input resource ports of a Seize block are connected to a Resource Pool block. During the simulation run, the Seize block uses the links to its input resource ports to locate and request resource entities from a Resource Pool block when a controlling entity enters the Seize block.

It is also possible to locate resource entities by their object references. Resource entities can flow through an Entity Group Holder block to form a resource entity group, which holds a group of references to these resource entities. The entity group and its subgroups can be queried later for locating and requesting the corresponding resource entity objects.