Of course we want to include returns, but we're aware it's a complicated proposition, because we'd need specific times for both journeys, and to therefore determine which calling stations are common.
Not really, you can just list the through fare for comparison purposes, without attempting to split.
Also the system attempts to choose specific times at the moment, and in many cases the calling points would be similar. The work flow I would go for is:
* user selects outbound and (optionally) return date, and times
* system returns a list of train times and tickets, identical to National Rail Enquiries, example:
http://ojp.nationalrail.co.uk/service/timesandfares/IPS/SWI/150114/0900/dep/220114/1115/dep
The user can then view and chooses the most convenient trains from the list.
Since you then have a specific outbound and return journey, you can perform a split check separately for each leg (the functionality for this is already built), and display the costs alongside the cheapest flexible return fare for the through journey (a simple lookup).
This is adding no additional splitting logic, it's just showing the fares.
Also I would tend in any case if a user only selects a return journey to list the cheapest return fare valid on that train, because he may not realise that the return ticket is about the same price.
So the final output for say Reading - Leeds, single, would be (the advance fares will obviously vary by date/time):
* Walk-up single fare: £109
* Walk-up return fare: £110
* Advance single fare: £54.50
* Single advance split fare £52.50
For the return, I would list the following options:
* Walk-up return fare: £110
* Advance single fare outbound and return: £54.50 + £43.50 = £98
* Advance split fares = £52.50 + £41.50 = £94
I don't like the results for Reading - Coventry:
http://www.moneysavingexpert.com/split-cheap-train-tickets/results/52b1ea09678b94.97428684
£41.50 Advance Single is compared with £11.60 CDS + £9 Advance = £20.60
I would prefer to see this output:
'Non-split'
* Walk-up Single £48.30
* Advance Through Single £41.50
'Split':
* Split walk-up-only singles: £11.60 + £11.60 = £23.20 (this is the actual walk-up fare, split at Banbury)
* Split singles with Advance: £20.60
The current output implies that you need to get an Advance to get a big saving on this route - you don't, the big saving comes from splitting at Banbury.
And again the lack of a return is a problem here, if we are coming back the same day, the cost is only:
£11.70 + £13 = £24.70, which is far cheaper than buying two sets of two singles at £20.60 each
In terms of return splits, I don't see it as hugely complicated - once the user has selected his trains you just find the common set of calling points, and try splits at each. This approach shouldn't increase complexity much, because the number of potential splits would be no higher than the number of splits on the single journey (since the common calling points cannot exceed the number of calling points on any one journey).
There is I suppose a slight additional complexity, in that you do have to compare both advances + returns and advances and singles:
E.g.,
Swindon - Ipswich, we can potentially buy tickets
Swindon - Didcot, Didcot - Ipswich, Swindon -Reading, Reading - Ipswich, Swindon - Paddington, Paddington - Ipswich, Swindon - Colchester, Colchester - Ipswich, Colchester - Ipswich, Swindon - Manningtree, Manningtree - Ipswich, and so on.
For the single journey, it's just the cheapest sum of any two such pairs.
But for the return, we can do:
(Swindon - Manningtree Advance, Manningtree - Ipswich single) * 2
or we can also consider
(Swindon - Colchester advance) * 2 + Colchester - Ipswich return
Given the constraint that we won't split into more than two tickets, given
A - B via splitting point X
A-X single (cheapest fare either advance/walk-up) + X-B single (ditto)
A-X single + X-B return
A-X return + X-B return
A-X return + X-B single
So there are four times as many comparisons I guess.