Resource Pool
A ResourcePool represents a list of Resources from which resources can be selected to fill requests made by Entities.
Resources are selected according to a ResourceSelectionRule. The assumption is that any of the resources within the pool may be used to fill the request.
If no selection rule is supplied the pool selects a list of resources that can fully satisfy the request and makes allocations to the resources based on the order in which they are listed in the pool.
Author
rossetti
Parameters
the parent model element
a list of resources to be included in the pool
the name of the pool
Inheritors
Constructors
Properties
Functions
Adds a resource to the pool. The model must not be running when adding a resource.
It is an error to attempt to allocate resource units to an entity if there are insufficient units available. Thus, the amount requested must be less than or equal to the number of units available at the time of this call.
For use, before calling allocate()
This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called
Uses the pool's resource selection rule to select resources from those that are available that have enough units available to satisfy the request in full. If there are insufficient resources in the pool to satisfy the full amount, then the returned list will be empty. In general, the returned list may have more units available than the requested amount.