| | 1 | | namespace Itinero.Routing.Alternatives; |
| | 2 | |
|
| | 3 | | /// <summary> |
| | 4 | | /// The alternative route settings. |
| | 5 | | /// </summary> |
| | 6 | | public class AlternativeRouteSettings |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// The maximum number of alternative routes. |
| | 10 | | /// </summary> |
| | 11 | | /// <remarks> |
| | 12 | | /// It is possible less alternatives are returned depending on the other settings. |
| | 13 | | /// </remarks> |
| 0 | 14 | | public int MaxNumberOfAlternativeRoutes { get; set; } = 3; |
| | 15 | |
|
| | 16 | | /// <summary> |
| | 17 | | /// The percentage of edges that are allowed to be overlapping with any other route. |
| | 18 | | /// </summary> |
| | 19 | | /// <remarks> |
| | 20 | | /// When an alternative overlaps more than this given threshold is will not be considered a viable alternative route |
| | 21 | | /// </remarks> |
| 0 | 22 | | public double MaxPercentageOfEqualEdges { get; set; } = 0.2; |
| | 23 | |
|
| | 24 | | /// <summary> |
| | 25 | | /// The maximum increase in weight. |
| | 26 | | /// </summary> |
| | 27 | | /// <remarks> |
| | 28 | | /// When the weight of the next potential alternative exceeds the weight in this setting the search for alternatives |
| | 29 | | /// </remarks> |
| 0 | 30 | | public double MaxWeightIncreasePercentage { get; set; } = 1.5; |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// The default penalty factor the algorithm uses to penalize already seen edges. |
| | 34 | | /// </summary> |
| 0 | 35 | | public double PenaltyFactor { get; set; } = 2.0; |
| | 36 | | } |