Made the old robust tests for logistic work

Added the utility function grouping.calculation to help the grouping
computation.