public Capacity applyOn(Capacity capacity, boolean exclusive) {
        var min = applyOn(capacity.minResources(), capacity, exclusive);
        var max = applyOn(capacity.maxResources(), capacity, exclusive);
        var groupSize = capacity.groupSize().fromAtMost(max.nodes() / min.groups())
                                            .toAtLeast(min.nodes() / max.groups());
        return capacity.withLimits(min, max, groupSize);
    }
Defines the policies for assigning cluster capacity in various environments.

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