ItineraryFilterParameters Data Type

Group by Similarity filter parameters

Properties
name data type constraints description
debug boolean required Switch on to return all itineraries and mark filtered itineraries as deleted.
groupSimilarityKeepOne number required Keep ONE itinerary for each group with at least this part of the legs in common. Default value is 0.85 (85%), use a value less than 0.50 to turn off.
groupSimilarityKeepThree number required Keep maximum THREE itineraries for each group with at least this part of the legs in common. Default value is 0.68 (68%), use a value less than 0.50 to turn off.
groupedOtherThanSameLegsMaxCostMultiplier number required Of the itineraries grouped to maximum of three itineraries, how much worse can the non-grouped legs be compared to the lowest cost. 2.0 means that they can be double the cost, and any itineraries having a higher cost will be filtered. Default value is 2.0, use a value lower than 1.0 to turn off
transitGeneralizedCostLimit DoubleFunctionOfDouble   A relative maximum limit for the generalized cost for transit itineraries. The limit is a linear function of the minimum generalized-cost. The minimum cost is lowest cost from the set of all returned transit itineraries. The function is used to calculate a max-limit. The max-limit is then used to to filter by generalized-cost. Transit itineraries with a cost higher than the max-limit is dropped from the result set. None transit itineraries is excluded from the filter.
  • To set a filter to be 1 hours plus 2 times the lowest cost use: 3600 + 2.0 x
  • To set an absolute value(3000) use: 3000 + 0x
The default is 3600 + 2x - 1 hours plus 2 times the lowest cost.
bikeRentalDistanceRatio number required This is used to filter out bike rental itineraries that contain mostly walking. The value describes the ratio of the total itinerary that has to consist of bike rental to allow the itinerary. Default value is off (0). If you want a minimum of 30% cycling, use a value of 0.3.
parkAndRideDurationRatio number required This is used to filter out park and ride itineraries that contain only driving plus a very long walk. The value describes the ratio of the total itinerary duration that has to consist of driving to allow the itinerary. Default value is 0.3 (30%), use a value of 0 to turn off.
nonTransitGeneralizedCostLimit DoubleFunctionOfDouble   This is a a bit similar to transitGeneralizedCostLimit, with a few important differences. This function is used to compute a max-limit for generalized-cost. The limit is applied to itineraries with no transit legs, however ALL itineraries (including those with transit legs) are considered when calculating the minimum cost.

The smallest generalized-cost value is used as input to the function. For example if the function is f(x) = 1800 + 2.0 x and the smallest cost is 5000, then all non-transit itineraries with a cost larger than 1800 + 2 * 5000 = 11 800 is dropped. The default is 3600 + 2x - 1 hours plus 2 times the lowest cost.

Example

{
  "debug" : true,
  "groupSimilarityKeepOne" : 12345.0,
  "groupSimilarityKeepThree" : 12345.0,
  "groupedOtherThanSameLegsMaxCostMultiplier" : 12345.0,
  "transitGeneralizedCostLimit" : { },
  "bikeRentalDistanceRatio" : 12345.0,
  "parkAndRideDurationRatio" : 12345.0,
  "nonTransitGeneralizedCostLimit" : { }
}