Text this: Algorithm for Making the Optimal Decision for Further Operation of Freight Cars