Create a resource acquisition event
event = eventAcquireResource(resourceSpec,tag)
creates an event to acquire resources from existing Resource Pool blocks. You
can specify names and amount of resources to acquire. For more details, see
event = eventAcquireResource(
If all the requested resources are not available during the event execution, the acquisition event remains active. When the requested resources become available, the event is rescheduled for immediate execution.
resourceSpec— Specify name and amount of resources for acquisition
Specify the name and the amount of resources to be acquired by the entities.
tag— Identifier tag for the resource acquisition event
Custom tag of this entity resource acquisition event. You can use the tag to identify an event when multiple events act on the same entity. For more information about managing multiple events, see Custom Entity Storage Block with Multiple Timer Events.
event— Resource acquisition event
Event that acquires resources for the entity.
On entity entry to a storage element, an entity acquires one resource
Test1. The tag of this resource acquisition event is
function [entity,events] = entry(obj, storage, entity, source) % On entity entry, acquire a resource from the specified pool. resourceSpec = obj.resourceSpecification('Test1', 1); event = obj.eventAcquireResource(resourceSpec, 'TestTag'); end