Class CostingOptions.Bicycle

java.lang.Object
globus.glroute.CostingOptions
globus.glroute.CostingOptions.Bicycle
Enclosing class:
CostingOptions

public static class CostingOptions.Bicycle extends CostingOptions
Options for bicycle mode
  • Field Details

    • penalties

      public CostingOptions.Penalties penalties
      Penalties
    • bicycleType

      public int bicycleType
      The type of bicycle. Road: a road-style bicycle with narrow tires that is generally lightweight and designed for speed on paved surfaces. Hybrid or City: a bicycle made mostly for city riding or casual riding on roads and paths with good surfaces. Cross: a cyclo-cross bicycle, which is similar to a road bicycle but with wider tires suitable to rougher surfaces. Mountain: a mountain bicycle suitable for most surfaces but generally heavier and slower on paved surfaces. The default type is `GLRouteBikeType.HYBRID`.
    • cyclingSpeed

      public float cyclingSpeed
      Cycling speed is the average travel speed along smooth, flat roads. This is meant to be the speed a rider can comfortably maintain over the desired distance of the route. It can be modified (in the costing method) by surface type in conjunction with bicycle type and (coming soon) by hilliness of the road section. The default speed is determined by the bicycle type and are as follows: Road = 25 KPH (15.5 MPH), Cross = 20 KPH (13 MPH), Hybrid/City = 18 KPH (11.5 MPH), Mountain = 16 KPH (10 MPH).
    • useRoads

      public float useRoads
      A cyclist's propensity to use roads alongside other vehicles. This is a range of values from 0 to 1, where 0 attempts to avoid roads and stay on cycleways and paths, and 1 indicates the rider is more comfortable riding on roads. Based on the use_roads factor, roads with certain classifications and higher speeds are penalized in an attempt to avoid them when finding the best path. The default value is 0.5.
    • useHills

      public float useHills
      A cyclist's desire to tackle hills in their routes. This is a range of values from 0 to 1, where 0 attempts to avoid hills and steep grades even if it means a longer (time and distance) path, while 1 indicates the rider does not fear hills and steeper grades. Based on the use_hills factor, penalties are applied to roads based on elevation change and grade. These penalties help the path avoid hilly roads in favor of flatter roads or less steep grades where available. Note that it is not always possible to find alternate paths to avoid hills (for example when route locations are in mountainous areas). The default value is 0.5.
    • useFerry

      public float useFerry
      This value indicates the willingness to take ferries. This is a range of values between 0 and 1. Values near 0 attempt to avoid ferries and values near 1 will favor ferries. Note that sometimes ferries are required to complete a route so values of 0 are not guaranteed to avoid ferries entirely. The default value is 0.5.
    • useLivingStreets

      public float useLivingStreets
      This value indicates the willingness to take living streets. This is a range of values between 0 and 1. Values near 0 attempt to avoid living streets and values from 0.5 to 1 will currently have no effect on route selection. Note that sometimes living streets are required to complete a route so values of 0 are not guaranteed to avoid living streets entirely. The default value is 0.5.
    • avoidBadSurfaces

      public float avoidBadSurfaces
      This value is meant to represent how much a cyclist wants to avoid roads with poor surfaces relative to the bicycle type being used. This is a range of values between 0 and 1. When the value is 0, there is no penalization of roads with different surface types; only bicycle speed on each surface is taken into account. As the value approaches 1, roads with poor surfaces for the bike are penalized heavier so that they are only taken if they significantly improve travel time. When the value is equal to 1, all bad surfaces are completely disallowed from routing, including start and end points. The default value is 0.25.
    • bssReturnCost

      public float bssReturnCost
      This value is useful when bikeshare is chosen as travel mode. It is meant to give the time will be used to return a rental bike. This value will be displayed in the final directions and used to calculate the whole duation. The default value is 120 seconds.
    • bssReturnPenalty

      public float bssReturnPenalty
      This value is useful when bikeshare is chosen as travel mode. It is meant to describe the potential effort to return a rental bike. This value won't be displayed and used only inside of the algorithm.
    • shortest

      public boolean shortest
      Changes the metric to quasi-shortest, i.e. purely distance-based costing. Note, this will disable all other costings and penalties. Also note, shortest will not disable hierarchy pruning, leading to potentially sub-optimal routes for some costing models. The default is false.
  • Constructor Details

    • Bicycle

      public Bicycle()
  • Method Details