In this research it was considered the particular case of a railway problem, specifically, the construction of orders delivery schedule for one locomotive plying among three railway stations. In this paper it was suggested a polynomial algorithm and were shown the results of a computing experiment.