Connections


How does the connection algorithm works?

The passenger selects an origin, destination, number of fares, and date of travel.

Our Trip Search Service ('service') receives the search request and begins working on it.

The service uses the routes and schedules that have been configured, as well as the origin, destination, and date of travel requested, to build a traffic simulation that simulates the movements of all of your vehicles over multiple days. All routes/schedules need to belong to the same product.

The simulation includes all vehicles that departed prior to the date of travel and which will cross over into the date of travel.

The simulation includes all vehicles that depart exactly on the date of travel.

The simulation will also include all vehicles that depart on future days.

This information allows the service to calculate passenger transfers for long trips.

The setting named Number of future days of traffic to simulate in the path finder options controls the size of the traffic simulation into the future.

Note: If you want to show 2 days of trips connecting you need to set this value to 3 days (The two days you want to show +1).

This setting should be set to the lowest value required to achieve the desired trip results for your longest connecting trips, because higher values have a slight impact on performance.

The service uses this traffic simulation to find trips. As it is finding trips, it makes sure that all of the trips that it finds respect a few rules based on the transfer restrictions settings and the path finder options.

The service has now generated a list of possible trips using the rules above.

Any trips that have been explicitly blacklisted by you (using the Filtered trips feature) will be removed.

The number of trips generated during step 4 is typically very large (many hundreds of them) and they need to be prioritized and filtered so that only the best options are shown to the customer.

The settings under the trip variety section control how the service will do this.

Next, the service will look at all of the possible trip departure and arrival times, and eliminate trips that are not desirable.

This behaviour is controlled using the settings For each available departure time, display the …. and For each available arrival time, display the …. settings.

Lastly, in the unlikely event that there is still a very large number of trip results remaining after all of the previous filtering steps, the When a direct trip is available, display only the fastest X connecting trips setting is applied.

The connection engine doesn't consider the trip capacity when finding trips, and it won't backfill other trips if there is a 0 trip. E.g, if you set only 1 connection trip for each available departure/arrival time, there are 2 connection trips available, one connection trip contains a 0 capacity trip, it will show no trip found error instead of showing the next available trip.

The service will now remove trips that may not be purchased due to the Product cutoff configuration. For example, if a trip leaves 1 hour from now, but the product cutoff is set to 2 hours, the trip will be removed.

The service will now use your fare tables and pricing rules to calculate the price of each trip. If a trip does not have a price, it will be removed.

The service will then fetch the up-to-date capacity information for each trip, using the manifests for the vehicles that are involved. If a trip does not have enough capacity on one of the vehicles, the trip will be removed.

The final set of trip results are now shown to the customer.

Settings

Navigate to admin>connections

connections navigation

Enabling connections

By default the connections engine is disable, you can enable it checking the Enable connections checkbox.

enable connections

Transfer restrictions

transfer restrictions

A trip may never include more transfers than the Never display trips that include more than X transfers setting.

A trip may never include a transfer that has the passenger waiting less than the Require at least X minutes of waiting at transfer points setting.

A trip may never include a transfer that has the passenger waiting more than the Do not allow a transfer if the passenger must wait more than X minutes at the transfer point setting.

A trip may be hidden if the trip is both X minutes AND Y % longer than the fastest available trip setting.

A trip may only use each schedule once (ie. a passenger may not exit a bus and then board the same bus again later during a single trip).

A trip may not include a segment that has no price in the route fare table.

A trip may not cross a country border more than once (ie. a passenger may not start in Scotland, enter England, and then enter Scotland again during the same trip).

This configuration can be overridden at the station level to deal with exceptions

Trip variety

trip variery

First, if the Hide trips that are much longer than the fastest available trip option is selected, the service will find the fastest trip (the trip with the smallest duration) and compare all other trips against this fastest one. Trips which are much longer than the fastest trip (as determined by the parameters you enter) will be removed.

hide trips

The settings For each available departure time, display the …. and For each available arrival time, display the …., allow the engine to look at all of the possible trip departure and arrival times, and eliminate trips that are not desirable.

For example, say that the system has found two trip results, one that departs at 8AM and arrives at 10AM, and another trip that departs at 8AM and arrives at 11AM.
If you have set For each available departure time, display the 1 fastest connecting trips, the system will discard the trip that arrives at 11AM because the trip arriving at 10AM departs at the same time, and is faster.

hide trips

The When a direct trip is available, display only the fastest X connecting trips setting will limit the total number of trip results to the configured number, keeping only the fastest ones (not taking into consideration the arrival and departure times - just looking that the trip duration).

This setting is usually set to a high number, and will probably not have any real effect.

Path finder options

path finder option

If the Allow direct schedules to be used in connecting trips setting is enabled, the system may recommend connecting trips that include parts of a direct schedule (a schedule which allows the passenger to travel directly from the origin to the destination with no transfers). However, if this setting is disabled, the system will not recommend any connecting trips that use these schedules.

The setting named Number of future days of traffic to simulate controls the size of the traffic simulation into the future.

This setting should be set to the lowest value required to achieve the desired trip results for your longest connecting trips, because higher values have a slight impact on performance.

days to simulate

Stations dependencies

To ensure connections are working properly, make sure all the @ and - special characters are removed from the station names. Also, if you wish for the station to be considered by the connections engine, the don't use for connections flag must remain unchecked.