Energy relaxation in one-dimensional polariton condensates