def next_group_id
        if @groups.empty?
          # Start each time from 1 to make sure groups get the same id's for the
          # same input data
          1
        else
          id = @groups.last.id
          loop do
            id += 1
            break id if @groups.find { |g| g.id == id }.nil?
          end
        end
      end
def next_group_id
        if @groups.empty?
          # Start each time from 1 to make sure groups get the same id's for the
          # same input data
          1
        else
          id = @groups.last.id
          loop do
            id += 1
            break id if @groups.find { |g| g.id == id }.nil?
          end
        end
      end
Get next group ID number.

 @return [Fixnum]