Minimal cost heuristic algorithm for delay constrained loop network