Skip to content
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

"High speed train": more distinction needed #136

Open
bugzillus opened this issue Jan 30, 2017 · 6 comments
Open

"High speed train": more distinction needed #136

bugzillus opened this issue Jan 30, 2017 · 6 comments

Comments

@bugzillus
Copy link

Would it be possible to separate "high speed train" into "high speed train" (DB: ICE = Produktklasse A) and "long-distance train" (DB: IC/EC = Produktklasse B)?

It does not help if one has an IC ticket and gets ICE timetable results ... (cf. grote/Transportr#300 )

Thanks

@bugzillus
Copy link
Author

Maybe this is of help: In the sources of https://rabdc.bahn.de/bin/query.exe/dn the checkbox "Nur Nahverkehr" is still present, but hidden:
<input type="hidden" name="HWAI=QUERY$PRODUCTS!nahverkehr" disabled="disabled" value="0!" id="productsNahverkehr" /> <input type="checkbox" class="hide" name="REQ0JourneyProduct_prod_list" value="4:0001111111000000" id="REQ0JourneyProduct_prod_list_4" onclick="toggleProductBitfields(this.checked,'0001111111000000','1111111111000000', 'productsNahverkehr')" disabled="disabled" /> <label for="REQ0JourneyProduct_prod_list_4">Nur Nahverkehr</label> <input type="hidden" name="existProductNahverkehr" value="1" />

Then, further down, there's the checkboxes for ICE (high speed), IC/EC/IC-Bus (other long distance), and the other "product" (means of transportation) options:
<input type="hidden" id="prodSection_0_0" name="HWAI=QUERY$PRODUCTS$0_0!show" value="yes" /> <input type="hidden" name="advancedProductMode" value="yes" id="advancedProductsModeHidden" /> <input type="checkbox" class="checkbox hide" id="REQ0JourneyProduct_prod_section_0_0" name="REQ0JourneyProduct_prod_section_0_0" value="1" title="ICE-Züge" checked="checked" onclick="checkGlobalProductChoice('0','0','0','Journey')" /> <input type="checkbox" class="checkbox hide" id="REQ0JourneyProduct_prod_section_0_1" name="REQ0JourneyProduct_prod_section_0_1" value="1" title="Intercity- und Eurocityzüge" checked="checked" onclick="checkGlobalProductChoice('0','0','1','Journey')" /> (...)

@schildbach
Copy link
Owner

Yes, I think for DB ICE has product-bit 0 and IC has bit 1. Both are mapped to HIGH_SPEED_TRAIN, see the PRODUCTS_MAP. But I wonder if this distinction makes sense on a world-wide scale. As a starter, how would you name the two distinct high speed train enum values? Would it match for Austria, Switzerland, France? US?

Or shall we redo this much more thoroughly and give up on the idea of generic product classes and allow all the native products, maybe even using their brand names?

@bugzillus
Copy link
Author

As a starter, how would you name the two distinct high speed train enum values?

I would use:

  • HIGH_SPEED_TRAIN for ICE, TGV, Thalys, railjet (DB-Sprech: Produktklasse A)

  • LONG_DISTANCE_TRAIN for IC/EC, IC-Bus, nightjet, all other Fernverkehr (DB-Sprech: Produktklasse B)

  • REGIONAL_TRAIN is listed twice in the PRODUCTS_MAP, correct? Internationally, it could also be called LOCAL_TRAIN, but anyway.

Probably these three categories are the most important ones for the users to toggle.

Would it match for Austria, Switzerland, France? US?

I think so, yes. The three levels high-speed (premium long-distance), all other long-distance and local trains should be quite universal and understandable. The rules, tickets, and trade names behind are different and sometimes inconsistent/overlapping in every country.

Or shall we redo this much more thoroughly and give up on the idea of generic product classes and allow all the native products, maybe even using their brand names?

  • To split up high-speed into two categories for Germany would help the German users a lot and give them more flexibility.

  • Having generic categories is always a good thing, at least as a fall-back. Why change the whole system which went quite well until now?

  • Maybe it is possible to add some more categories when (really) needed and adapt the mapping individually where needed. So, the apps do not need to list plenty of unavailable options, but use the same 8 category slots for up to 8 categories a provider supports.

  • Maybe it is possible to adapt the category names and logos for the different providers individually. Most of the brand names appear in the train numbers, that's fine. For the categories, I would use the generic name that is being used in every-day language in that country. For Germany, that would probably be ICE, IC/EC, R/NV. In France, ICE could be called TGV, in the Netherlands HS (high speed). Local people should be able to tell what categories, names, and logos would be best for that country. https://de.wikipedia.org/wiki/Liste_von_Zuggattungen

Thanks for your efforts.

@derhuerst
Copy link

For what it's worth, I will describe what we agreed on at friendly-public-transport-format:

  • There's a distinction between a "product" and a "mode" (as in means of transport). A mode describes the characteristics of the vehicle, its tracks, stations, etc. A product is more, it has a local context and often specific fares. As an example, Berlin has MetroBus which is a normal bus, but runs more often and throughout the night. In local public transport, it's helpful to know that it is not a regularly scheduled bus. We therefore agreed to have both a "mode" and a "product".
  • We also discussed what should be a mode and what shouldn't. We decided that keeping a few, broad modes allows for easier parsing and less breaking changes, whereas a "sub mode" allows for a more detailed specification for those who need it.

@sebalis
Copy link

sebalis commented Jul 27, 2018

I think that the distinction that we’re discussing here is a very common one in several countries now. So it would very helpful to get some progress on this in whatever way seems right.

@schildbach
Copy link
Owner

Ok, given that there seems to be real interest in this I'd be fine with the separation. However, someone would need to go through all the existing providers and find out which Product.HIGH_SPEED_TRAIN is actually only a Product.LONG_DISTANCE_TRAIN. If someone wants to tackle this, please go ahead and submit a PR.

@derhuerst Interesting idea you're introducing with Mode and Product. In this logic, our existing Product should probably be renamed to Mode (or TransportMode). However, ultimtely I suspect it's too much of work to maintain the data for your Products as I think not much of it is available via API. It would be a bit like our line colors/symbols I guess.

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

No branches or pull requests

4 participants