private int decideGroups(int requestedNodes, int requestedGroups, int decidedNodes) {
        if (requestedNodes == decidedNodes) return requestedGroups;
        int groups = Math.min(requestedGroups, decidedNodes); // cannot have more groups than nodes
        while (groups > 1 && decidedNodes % groups != 0)
            groups--; // Must be divisible by the number of groups
        return groups;
    }
Defines the policies for assigning cluster capacity in various environments.

@author bratseth
config-provisioning/src/main/java/com/yahoo/config/provision/CapacityPolicies.java