Merging and Splitting Resource Entities

The Resource Pool and Release blocks provide a unique capability referred to as resource entity merging and splitting. All resource entities have a numeric ResourceUnits attribute which can be assigned a nonnegative value. The value contained in this attribute represents the capacity or available units that are associated with the individual resource entity object. The default value for the ResourceUnits attribute is 1. Therefore by default, each new resource entity that is created represents one unit of that particular resource.

The Teller Pool block in the previous example used the merging/splitting feature of the Resource Pool block. When the merging/splitting option is selected in a Resource Pool block, mini-pools of entities based on a user defined criteria are kept. A common criteria is to merge and split the resource entities based on resource entity type. Merging and splitting helps reduce the number of resource entity objects needed in a model during a simulation run. Figure 9.7 shows the Block Properties for Teller Pool dialog box.

If you want to use the merging/splitting feature of a Resource Pool block, you have to specify the criteria to use for grouping the resource entities in the pool. The simplest approach is to select the Merge/Split resource units among resource entities of same type check box in the Resource Pool block properties dialog box. This uses the resource entity type as the grouping criteria. You can also specify more definitive grouping criteria by using the Key Entity Attribute Fields section of the dialog box.

With the merging/splitting option enabled on a Resource Pool block, the first resource entity for any defined group that enters the block remains in the block for the duration of the simulation run. It effectively becomes the mini-pool for that group. Any other resource entities that enter the Resource Pool block and are a match for the criteria for that group are merged with the first resource entity of that group. That is, the value of the ResourceUnits attribute of the resource entity just coming into the Resource Pool is added to the value of the ResourceUnits attribute of the existing, matching resource entity, and the incoming resource entity is disposed.

When a resource request comes into the Resource Pool block, the block looks for a resource entity in its possession with the matching criteria. If it finds a matching resource entity, it then looks at the ResourceUnits attribute on the matching resource to see whether sufficient units are available to fill the request. If enough units are available, the Resource Pool block creates a new resource entity from the matching resource entity, populates its ResourceUnits value with the requested number of units, and decreases the value of the ResourceUnits in the original resource entity accordingly. (The original resource entity might end up with a ResourceUnits value of 0.)

Although the Release block does not have (or need) any resource entity merging capabilities, it does provide an option for splitting resource entities. When the Splittable option is selected on a Release block, you can deallocate or release some of the ResourceUnits associated with an incoming resource entity. Fields are available in the Release Block Properties dialog box for defining the criteria to use for releasing and splitting resource entities. If the Splittable option is selected and an incoming resource entity meets the Splittable criteria you have defined on the Release block, the Release block looks for the ResourceUnits attribute value on the incoming resource entity and compares it to the value you specified to be deallocated from the resource entity. If the value to be deallocated is less than the value of units available in the incoming resource entity, the Release block creates a new resource entity from the incoming resource entity, populates its ResourceUnits value with the specified number of units, and decreases the value of the ResourceUnits in the incoming resource entity accordingly. The newly created resource entity then flows out the appropriate Release block output port. The original resource entity, with its ResourceUnits now decreased, flows out of the Release block with the controlling entity.

When the simulation model does not have the merging and splitting options enabled in its Resource Pool and Release blocks, the model is sometimes referred to as an object-based resource model. When the merging or splitting options in either of these types of blocks are enabled, the model is called a unit-based resource model. The Resource Pool and Release blocks provide special options that take advantage of the ResourceUnits attribute in a resource entities for unit-based models.

Additional details about the Resource Pool and Release blocks can be found in Appendix A: Templates.