Added logic for train wait if stockpiles are full