Open jpatokal opened 10 years ago
Don't use distance calculations for MyMulti on rail, just use the zone numbers. Determine the zones of the origin and destination stations, and use the higher of the two.
That would require a mapping of stations to MyMulti zone numbers, which I don't have, or polygons defining the MyMulti zones (which wouldn't be too hard to draw).
Distance from Central is a fairly decent proxy though: < 10 km is MyMulti 1, 10-35 km is MyMulti 2, > 35 km is MyMulti 3.
Distance from Central isn't a suitable proxy at all if the journey doesn't involve a transfer at Central. Try say, Penrith to Kingswood + 1 bus - you'll clearly need a MyMulti 3 for that rather than the MyMulti 1 that Opal or Not says.
The handling of MyMulti tickets should actually be pretty simple:
It will get messier if you decide to handle the Newcastle based tickets later on: http://www.transportnsw.info/sites/en/tickets/multi-travel/newcastle/index.page
Distance to Central can be computed even if the journey itself does not involve Central. And again, I can only use zone numbers if I have a mapping of stations to zones. Volunteers? ;) It's actually not that big a job: if I have zones 1 & 2, the rest can default to 3.
The rest of the mapping is already done pretty much as you suggest: https://github.com/jpatokal/opal_or_not/tree/master/models/my_multi.rb
MyMulti zones are currently crudely approximated with a mapping to train zones. Using actual train distance, which is now available, would be more accurate.