New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect train fares for City destinations #2

Open
dsymonds opened this Issue Feb 24, 2014 · 14 comments

Comments

Projects
None yet
7 participants
@dsymonds

Artarmon is in the (Gordon/Chatswood) fare group, so a weekly from Artarmon to Town Hall is $35. http://www.opalornot.com shows it as $28.

@jpatokal

This comment has been minimized.

Show comment
Hide comment
@jpatokal

jpatokal Feb 24, 2014

Owner

Another case: Mortdale to Town Hall is reported as $35, but is actually $42.

Owner

jpatokal commented Feb 24, 2014

Another case: Mortdale to Town Hall is reported as $35, but is actually $42.

@jpatokal

This comment has been minimized.

Show comment
Hide comment
@jpatokal

jpatokal Feb 24, 2014

Owner

One more: Ashfield to Town Hall is quoted as:
$26.40 opal
$28.00 train weekly

whereas, Sydney Transport fare calculator says the weekly ticket cost $35.00 and I pay $4.10 each way peak with Opal, so lets say $32.80 per week (though I actually get a fair number of off-peak discounts per week).

Owner

jpatokal commented Feb 24, 2014

One more: Ashfield to Town Hall is quoted as:
$26.40 opal
$28.00 train weekly

whereas, Sydney Transport fare calculator says the weekly ticket cost $35.00 and I pay $4.10 each way peak with Opal, so lets say $32.80 per week (though I actually get a fair number of off-peak discounts per week).

@jpatokal

This comment has been minimized.

Show comment
Hide comment
@jpatokal

jpatokal Feb 24, 2014

Owner

Artarmon-Town Hall: Google reports 9.2 km (zone 1), Sydney Trains 11.5 km (zone 2), diff 2.3 km.
Mortdale-Town Hall: Google 18.5 km (zone 2), Sydney Trains 20.3km (zone 3), diff 1.8 km.
Ashfield-Town Hall: Google 9.6 km (zone 1), Sydney Trains 11.6 km (zone 2), diff 2.0 km.

So looks like Sydney Trains is arbitrarily adding ~2 km to all fares to the city! Will adjust calculator to do the same.

Owner

jpatokal commented Feb 24, 2014

Artarmon-Town Hall: Google reports 9.2 km (zone 1), Sydney Trains 11.5 km (zone 2), diff 2.3 km.
Mortdale-Town Hall: Google 18.5 km (zone 2), Sydney Trains 20.3km (zone 3), diff 1.8 km.
Ashfield-Town Hall: Google 9.6 km (zone 1), Sydney Trains 11.6 km (zone 2), diff 2.0 km.

So looks like Sydney Trains is arbitrarily adding ~2 km to all fares to the city! Will adjust calculator to do the same.

@jpatokal jpatokal closed this Feb 24, 2014

@jpatokal

This comment has been minimized.

Show comment
Hide comment
@jpatokal

jpatokal Feb 24, 2014

Owner

Digging into this a bit deeper, it looks like Sydney Trains applies a reality distortion field to Town Hall!

Artarmon-Wynyard: Google 8.4 km, Sydney Trains 8.3 km
Wynyard-Town Hall: Google 0.9 km, Sydney Trains 3.1 km
Artarmon-Town Hall: Google 9.2 km, Sydney Trains 11.5 km

Mortdale-Central: Google 17.5 km, Sydney Trains 17.1 km
Central-Town Hall: Google 1.6 km, Sydney Trains 3.2 km
Mortdale-Town Hall: Google 18.5 km, Sydney Trains 20.3 km

So I'll apply the 2 km bonus to Town Hall only. WTF.

Owner

jpatokal commented Feb 24, 2014

Digging into this a bit deeper, it looks like Sydney Trains applies a reality distortion field to Town Hall!

Artarmon-Wynyard: Google 8.4 km, Sydney Trains 8.3 km
Wynyard-Town Hall: Google 0.9 km, Sydney Trains 3.1 km
Artarmon-Town Hall: Google 9.2 km, Sydney Trains 11.5 km

Mortdale-Central: Google 17.5 km, Sydney Trains 17.1 km
Central-Town Hall: Google 1.6 km, Sydney Trains 3.2 km
Mortdale-Town Hall: Google 18.5 km, Sydney Trains 20.3 km

So I'll apply the 2 km bonus to Town Hall only. WTF.

@subs0nic

This comment has been minimized.

Show comment
Hide comment
@subs0nic

subs0nic Feb 24, 2014

If you have a look at the "CityRail Passenger Fares Handbook" it contains the following clauses which help explain this:
d. ... the distance fare between any City Railway station ... will be for the distance of 3.21km.
e. ... the distance fare between any station outside the City Railway to any City Railway station, will be the distance to the designated gateway station plus 3.21km.
f. ... the distance fare between two stations outside the city railway when travel is through the City Railway, will be the total distances to the two designated gateway stations plus 3.21km.

You can read a copy and example here: http://www.shittytrains.info/tickets/pdf/Passenger_Fares_Handbook.pdf

If you have a look at the "CityRail Passenger Fares Handbook" it contains the following clauses which help explain this:
d. ... the distance fare between any City Railway station ... will be for the distance of 3.21km.
e. ... the distance fare between any station outside the City Railway to any City Railway station, will be the distance to the designated gateway station plus 3.21km.
f. ... the distance fare between two stations outside the city railway when travel is through the City Railway, will be the total distances to the two designated gateway stations plus 3.21km.

You can read a copy and example here: http://www.shittytrains.info/tickets/pdf/Passenger_Fares_Handbook.pdf

@jpatokal jpatokal reopened this Feb 24, 2014

@jpatokal

This comment has been minimized.

Show comment
Hide comment
@jpatokal

jpatokal Feb 24, 2014

Owner

Brilliant, thank you! Reopening this then until I can work out a more accurate general solution.

For reference, the 'City' stations are: Central, Town Hall, Wynyard, Circular Quay, Martin Place, Kings Cross, St. James and Museum.

Owner

jpatokal commented Feb 24, 2014

Brilliant, thank you! Reopening this then until I can work out a more accurate general solution.

For reference, the 'City' stations are: Central, Town Hall, Wynyard, Circular Quay, Martin Place, Kings Cross, St. James and Museum.

@Jeremy512

This comment has been minimized.

Show comment
Hide comment
@Jeremy512

Jeremy512 Feb 24, 2014

Yep was just going to chime in about the passenger fares handbook too. It also gives you the official distance between stations. Which is going to be a bit of an effort to program if you want to be 100% accurate, due to the number of possible transfer points for certain trips. For example, travel from Strathfield to Chatswood - you have to consider via Macquarie Park and via the City. Or trips like Glenfield to CIty there are about four or five different routes (via East Hills, via Granville, via Liverpool/Regents Park/Stratfield, via Liverpool/Bankstown/Sydenham, etc.)

Fares are always calculated by the shortest route (not counting the distortion field around the City Railway previously discussed.)

Yep was just going to chime in about the passenger fares handbook too. It also gives you the official distance between stations. Which is going to be a bit of an effort to program if you want to be 100% accurate, due to the number of possible transfer points for certain trips. For example, travel from Strathfield to Chatswood - you have to consider via Macquarie Park and via the City. Or trips like Glenfield to CIty there are about four or five different routes (via East Hills, via Granville, via Liverpool/Regents Park/Stratfield, via Liverpool/Bankstown/Sydenham, etc.)

Fares are always calculated by the shortest route (not counting the distortion field around the City Railway previously discussed.)

@MrTrick

This comment has been minimized.

Show comment
Hide comment
@MrTrick

MrTrick Feb 25, 2014

Another one;
Cityrail's fares from West Ryde or Meadowbank to Central are $35/wk, the same as from the Rhodes / Concord West / North Strathfield stations.
(opal_or_not currently puts them in the higher Denistone / Eastwood price bracket)

MrTrick commented Feb 25, 2014

Another one;
Cityrail's fares from West Ryde or Meadowbank to Central are $35/wk, the same as from the Rhodes / Concord West / North Strathfield stations.
(opal_or_not currently puts them in the higher Denistone / Eastwood price bracket)

@mzhou

This comment has been minimized.

Show comment
Hide comment
@mzhou

mzhou Feb 25, 2014

This calculates correctly according to the Ticketing Customer Handbook, but the data isn't complete yet. Only has Opal area up to 28 Februrary.

http://54.252.228.192:6725/train/Wynyard/TownHall
http://54.252.228.192:6725/train/Atarmon/TownHall

Source: https://github.com/mzhou/opaldist

mzhou commented Feb 25, 2014

This calculates correctly according to the Ticketing Customer Handbook, but the data isn't complete yet. Only has Opal area up to 28 Februrary.

http://54.252.228.192:6725/train/Wynyard/TownHall
http://54.252.228.192:6725/train/Atarmon/TownHall

Source: https://github.com/mzhou/opaldist

@jpatokal

This comment has been minimized.

Show comment
Hide comment
@jpatokal

jpatokal Feb 25, 2014

Owner

@mzhou, you're the man! That's awesome... and it's Haskell. Now I just need to figure out a way to call that from/convert it into Ruby.

Owner

jpatokal commented Feb 25, 2014

@mzhou, you're the man! That's awesome... and it's Haskell. Now I just need to figure out a way to call that from/convert it into Ruby.

@mzhou

This comment has been minimized.

Show comment
Hide comment
@mzhou

mzhou Feb 26, 2014

The example HTTP server (opaldisthttp) would be easiest. I haven't really done and cross-language library stuff myself.

mzhou commented Feb 26, 2014

The example HTTP server (opaldisthttp) would be easiest. I haven't really done and cross-language library stuff myself.

@jpatokal

This comment has been minimized.

Show comment
Hide comment
@jpatokal

jpatokal Mar 4, 2014

Owner

I've now got a copy of opaldist 99% up and running on Heroku, but I need to be able to set the port it listens on (mzhou/opaldist#3) before I can start using it. =/

Owner

jpatokal commented Mar 4, 2014

I've now got a copy of opaldist 99% up and running on Heroku, but I need to be able to set the port it listens on (mzhou/opaldist#3) before I can start using it. =/

@Soliah

This comment has been minimized.

Show comment
Hide comment
@Soliah

Soliah Mar 27, 2014

@mzhou, @jpatokal why not expose an JSON API from opaldist so opal_or_not can just ping it for distances?

Soliah commented Mar 27, 2014

@mzhou, @jpatokal why not expose an JSON API from opaldist so opal_or_not can just ping it for distances?

@jpatokal

This comment has been minimized.

Show comment
Hide comment
@jpatokal

jpatokal Mar 28, 2014

Owner

I've got the server up and running now on Heroku's preferred post, but I still need to add in all the stations that have recently opened before I can migrate.

Owner

jpatokal commented Mar 28, 2014

I've got the server up and running now on Heroku's preferred post, but I still need to add in all the stations that have recently opened before I can migrate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment