This encapsulates preferential resource sets available on a VM. Resource sets are two level resources that can
be assigned to tasks that specify a name to reserve for an available resource set, and the number of sub-resources
(second level of the two level resource) it needs.
A PreferentialNamedConsumableResourceSet
contains 1 or more resource sets,
PreferentialNamedConsumableResourceSet.PreferentialNamedConsumableResource
, each of which
can be assigned (or reserved to) a name requested by tasks, if currently unassigned. Each resource set contains one
or more count of resources available for assignment to tasks.
A task can be assigned to one of the resource sets if it either has no tasks assigned to it, or the name assigned
to the resource set matches what the task being assigned is requesting. The number of sub-resources requested by task
is also checked. Tasks may request 0 or more sub-resources. The assignment attempts to use as few resource sets as
possible and returns a fitness score that helps scheduler pick between multiple VMs that can potentially fit the task.
The resulting assignment contains the index of the resource set assigned. The resource sets are assigned indexes
starting with 0.