a heuristic based batching and assigning method for online