allocate
It is an error to attempt to allocate a movable resource unit to an entity if there are insufficient units available at the time of allocation.
Return
an allocation representing that the unit has been allocated to the entity. The reference to this allocation is necessary in order to deallocate the allocated unit. The allocation belongs to the individual movable resource that was selected, but it records this pool as the pool the request was made against, so that releasing it processes the queue on the pool's behalf. Without that, the release would name the individual resource and match none of the pool's waiting requests, which name the pool.
Parameters
the entity that is requesting the units
an optional name for the allocation
the queue associated with the allocation. That is, where the entities would have had to wait if the allocation was not immediately filled
The rule to use to select resources to allocate from
The rule to use to determine the resources to allocate from given the selected resources