Restricting to Route/Vehicle Types for searches #397
-
Is there a way I can implement some restriction to the routes/vehicles. I found One example would be to restrict a search on Germany data to transportation covered by the national "49€" ticket. Another example could be avoiding long distance buses? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It would probably be possible, to exclude those routes in the routing algorithm. For 100% correctness, also the "route" definition of the RAPTOR algorithm would need to be adjusted so that all transports that are grouped in one route have the same properties regarding all filter search options (i.e. all are 49€ ticket compatible or non of them are). In most cases, this would probably be the case anyway so as a first step, it would be sufficient to store a boolean for each transport "is 49€ compatible" and filter routes that are not compatible. Same for long distance buses. Another option (that would not require to change the algorithm and data loader) would be to filter the data and create a GTFS dataset that does not contain the trips that are not eligible for the 49€ ticket (same for long distance buses). Then start a separate server with the filtered data. Since in most cases you'll have a load balancer anyway, the load balancer can then redirect the queries to the server with the filtered/unfiltered dataset depending on the search options. |
Beta Was this translation helpful? Give feedback.
It would probably be possible, to exclude those routes in the routing algorithm. For 100% correctness, also the "route" definition of the RAPTOR algorithm would need to be adjusted so that all transports that are grouped in one route have the same properties regarding all filter search options (i.e. all are 49€ ticket compatible or non of them are). In most cases, this would probably be the case anyway so as a first step, it would be sufficient to store a boolean for each transport "is 49€ compatible" and filter routes that are not compatible. Same for long distance buses.
Another option (that would not require to change the algorithm and data loader) would be to filter the data and creat…