opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.17k stars 1.02k forks source link

generalizedCost is not equal to duration for walk legs when walkReluctance is set to 1.0 #5472

Closed miklcct closed 6 months ago

miklcct commented 10 months ago

I want the walk legs of my journeys to be weighted by duration. I set walkReluctance to 1.0 for my query.

Expected behavior

It returns walking legs with generalizedCost exactly equal to the duraion

Observed behavior

It returns walking legs with generalizedCost not equal to the duration

Version of OTP used (exact commit hash or JAR name)

2.3.0

Data sets in use (links to GTFS and OSM PBF files)

DfT GTFS + National Rail from dtd2mysql

Command line used to start OTP

Router config and graph build config JSON

otp-config.json:

{
        "otpFeatures" : {
                "TransferConstraints" : false,
                "SandboxAPILegacyGraphQLApi": true
        }
}

router-config.json

{
  "routingDefaults": {
    "wheelchairAccessibility": {
      "trip": {
        "onlyConsiderAccessible": false,
        "unknownCost": 600,
        "inaccessibleCost": 3600
      },
      "stop": {
        "onlyConsiderAccessible": false,
        "unknownCost": 600,
        "inaccessibleCost": 3600
      },
      "elevator": {
        "onlyConsiderAccessible": false
      },
      "inaccessibleStreetReluctance": 25,
      "maxSlope": 0.08333,
      "slopeExceededReluctance": 50,
      "stairsReluctance": 25
    }
  },
  "updaters": []
}

Here is some sample journeys with walkReluctance = 1.0

{
  "data": {
    "plan": {
      "date": 1698927903000,
      "from": {
        "name": "Origin",
        "lon": -0.11005,
        "lat": 51.5200283
      },
      "to": {
        "name": "Destination",
        "lon": -0.1510795,
        "lat": 51.5562456
      },
      "itineraries": [
        {
          "startTime": 1698927903000,
          "endTime": 1698932799000,
          "duration": 4896,
          "generalizedCost": 4551,
          "waitingTime": 0,
          "walkTime": 4896,
          "walkDistance": 5716.71,
          "legs": [
            {
              "startTime": 1698927903000,
              "endTime": 1698932799000,
              "departureDelay": 0,
              "arrivalDelay": 0,
              "mode": "WALK",
              "duration": 4896,
              "generalizedCost": 4551,
              "legGeometry": {
                "length": 538,
                "points": "womyHdoTBLFb@?Bf@tDBNFh@R|A?DBPA?G@E@EDEBKF]NSLOFGDC@KFEBQJg@VC@A?KFYPC@KFMHMHC@CBA?CBOHC@OHEBEBUN]XEBEDa@XQJGDKFUNMJIDEBA@UTCBMHGDIHCDGB]XCBGFMHEBIFGDKJSNEFEBMJCBEBGFEDIJKLe@h@GFWX??KLGHQRSRGHMLKNEDCDEDIJQRMNKNSTA@CDCBUVKLKHEDEDEFCBIHQRQRA@IFQNA?GFCBYRIFYPC@IFQLEDQLMHMJKFIFC@GDE@MHEBGFE@CBWLMJC@GBEBA@KDMFEBC@E@IDIBC@c@NEBGDMFSPGDGDYTAFABCBIDA@EA[\\c@ZEDQRGFBLAF@F@V@L@\\?H@hB?NB|C@R?^@v@MDADiAlABJHVy@x@{BbCIJOPKTS\\EHGLINOXOZGDIFaBlAQLOJGDDT@NPjAV`BWPeAt@aAp@VvA@Hs@\\_@TSJYPSLe@XWPa@XqA|@OLA@C@G`@ONKPA@EHGHCBOJILa@f@OVEFMPCFGLQZABKXcA~C_@fAQj@KZ?@CDCFAFSl@Y|@Sx@AH?@?@@@?@?@?BAHADALCX?HCJAFGNAL?HGBCBCDGH_@XEDKFGDuAdA_@XSNEDmA`AC@URGHOJIFMHIFoAz@aBrAG@KHIF[TYTABEDOLCFCBC@G@QLOLYT[RKJa@XIFEDIHCBEDMFE@OJeBrAQNOLIFGDCBEDEDIHc@\\OLEBGDKHMJ_@\\C?UTQRUREDQLmCzBi@b@aAx@CBKHA@CFGDCBEFCHEFc@d@IFGFY`@QRCBGHIDSRSNA@KCo@f@o@d@OJEDEDMTAVCACAC@C?WBODMBGFi@LTvDD`@@NAF?HAHGRM`@Sf@EDABKFOJULCFEP?TK?WAIAC?WAA?E?E?Q?@x@MFGBYPIFIFEBcAdAy@|@CBABADAD?FAFAFAFE@CBQXADAHU^KNKPe@r@KRKTWl@K\\Ul@IRK`@GTGTGPELQZa@n@W^u@dA]b@KJo@r@MJgAx@UN_@XGDEBEDIF}@p@ABGBA@s@b@c@\\oA~@OJEBC@IFGHEFMTITCLCH?HC^AJAHABCFABGFC@G?E?G?CAGEAAGGGEGAQGA?QEGAg@Ek@GS?KAO?K@E@E?GDKc@GWOi@]oAaAr@_Az@AIMk@GYi@iDMo@CIMNcAj@o@^@TAHEHYXEFEH?@R~ACDIWCBNd@A?CB"
              },
              "realTime": false,
              "distance": 5716.71,
              "transitLeg": false,
              "walkingBike": false,
              "rentedBike": false,
              "from": {
                "name": "Origin",
                "lat": 51.5200283,
                "lon": -0.11005,
                "arrivalTime": 1698927903000,
                "departureTime": 1698927903000,
                "stop": null
              },
              "to": {
                "name": "Destination",
                "lat": 51.5562456,
                "lon": -0.1510795,
                "arrivalTime": 1698932799000,
                "departureTime": 1698932799000,
                "stop": null
              },
              "trip": null,
              "intermediatePlaces": null,
              "intermediatePlace": false,
              "steps": [
                {
                  "distance": 150.2,
                  "lon": -0.1101079,
                  "lat": 51.5201256,
                  "elevationProfile": [],
                  "relativeDirection": "DEPART",
                  "streetName": "Baldwins Gardens",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 1132.99,
                  "lon": -0.1121603,
                  "lat": 51.519686,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Gray's Inn Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 173.44,
                  "lon": -0.11956,
                  "lat": 51.5287062,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "Argyle Street",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 74.64,
                  "lon": -0.1220496,
                  "lat": 51.5286024,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "path",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 37.98,
                  "lon": -0.1226747,
                  "lat": 51.528984,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Argyle Square",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 100.66,
                  "lon": -0.1229695,
                  "lat": 51.5292721,
                  "elevationProfile": [],
                  "relativeDirection": "CONTINUE",
                  "streetName": "Belgrove Street",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 168.31,
                  "lon": -0.1237776,
                  "lat": 51.5300243,
                  "elevationProfile": [],
                  "relativeDirection": "CONTINUE",
                  "streetName": "Pancras Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 78.43,
                  "lon": -0.1251275,
                  "lat": 51.5312576,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "path",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 99.04,
                  "lon": -0.1261836,
                  "lat": 51.5310053,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "The Arcade",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 36.62,
                  "lon": -0.1268,
                  "lat": 51.5318093,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "underpass",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 212.69,
                  "lon": -0.1272828,
                  "lat": 51.5316743,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Midland Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 360.4,
                  "lon": -0.1285113,
                  "lat": 51.5334261,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "Pancras Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 43.68,
                  "lon": -0.1324845,
                  "lat": 51.5354499,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "Crowndale Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 8.65,
                  "lon": -0.133066,
                  "lat": 51.5355532,
                  "elevationProfile": [],
                  "relativeDirection": "SLIGHTLY_LEFT",
                  "streetName": "Pancras Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 1215.73,
                  "lon": -0.13319,
                  "lat": 51.535563,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Royal College Street",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 68.59,
                  "lon": -0.1415161,
                  "lat": 51.5451052,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Kentish Town Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 186.4,
                  "lon": -0.1416887,
                  "lat": 51.5457037,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "Kelly Street",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 58.58,
                  "lon": -0.1439268,
                  "lat": 51.5461249,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Castlehaven Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 19.84,
                  "lon": -0.1438995,
                  "lat": 51.5466513,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "Prince of Wales Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 1025.15,
                  "lon": -0.1441862,
                  "lat": 51.5466452,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Grafton Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 73.24,
                  "lon": -0.1514488,
                  "lat": 51.5540313,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Lamble Street",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 82.08,
                  "lon": -0.1505332,
                  "lat": 51.5543625,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "Oak Village",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 116.31,
                  "lon": -0.151097,
                  "lat": 51.5550117,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Gordon House Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 95.46,
                  "lon": -0.1495597,
                  "lat": 51.5554348,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "service road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 21.11,
                  "lon": -0.150225,
                  "lat": 51.5561145,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "service road",
                  "exit": null,
                  "stayOn": true,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 73.19,
                  "lon": -0.1503961,
                  "lat": 51.5562713,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "path",
                  "exit": null,
                  "stayOn": true,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 3.49,
                  "lon": -0.151051,
                  "lat": 51.5562197,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "path",
                  "exit": null,
                  "stayOn": true,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                }
              ],
              "pickupType": "SCHEDULED",
              "dropoffType": "SCHEDULED",
              "interlineWithPreviousLeg": false,
              "nextLegs": null
            }
          ],
          "elevationGained": 0,
          "elevationLost": 0,
          "arrivedAtDestinationWithRentedBicycle": false
        },
        {
          "startTime": 1698928608000,
          "endTime": 1698930796000,
          "duration": 2188,
          "generalizedCost": 2132,
          "waitingTime": 0,
          "walkTime": 1648,
          "walkDistance": 1907.24,
          "legs": [
            {
              "startTime": 1698928608000,
              "endTime": 1698929040000,
              "departureDelay": 0,
              "arrivalDelay": 0,
              "mode": "WALK",
              "duration": 432,
              "generalizedCost": 413,
              "legGeometry": {
                "length": 28,
                "points": "womyHdoTG_@QaBhBg@n@Qv@MIiACCAC?GOiBWeEGu@OuBAGAEWcAEQCMCMCSBQY}AIIMk@KHMJ@D"
              },
              "realTime": false,
              "distance": 507.8,
              "transitLeg": false,
              "walkingBike": false,
              "rentedBike": false,
              "from": {
                "name": "Origin",
                "lat": 51.5200283,
                "lon": -0.11005,
                "arrivalTime": 1698928608000,
                "departureTime": 1698928608000,
                "stop": null
              },
              "to": {
                "name": "Farringdon (platform 4)",
                "lat": 51.5201871,
                "lon": -0.1048397,
                "arrivalTime": 1698929040000,
                "departureTime": 1698929040000,
                "stop": {
                  "gtfsId": "2:ZFD_4",
                  "name": "Farringdon (platform 4)",
                  "lat": 51.5201871,
                  "lon": -0.1048397,
                  "code": "ZFD",
                  "desc": "3",
                  "platformCode": "4",
                  "parentStation": {
                    "gtfsId": "2:ZFD",
                    "name": "Farringdon",
                    "lat": 51.5201871,
                    "lon": -0.1048397,
                    "code": "ZFD",
                    "desc": "3",
                    "platformCode": null
                  }
                }
              },
              "trip": null,
              "intermediatePlaces": null,
              "intermediatePlace": false,
              "steps": [
                {
                  "distance": 47.3,
                  "lon": -0.1101079,
                  "lat": 51.5201256,
                  "elevationProfile": [],
                  "relativeDirection": "DEPART",
                  "streetName": "Baldwins Gardens",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 118.91,
                  "lon": -0.1094549,
                  "lat": 51.5202508,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Leather Lane",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 240.87,
                  "lon": -0.1090922,
                  "lat": 51.519206,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "Greville Street",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 10.77,
                  "lon": -0.1057655,
                  "lat": 51.5197741,
                  "elevationProfile": [],
                  "relativeDirection": "CONTINUE",
                  "streetName": "path",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 73.56,
                  "lon": -0.1056219,
                  "lat": 51.5198115,
                  "elevationProfile": [],
                  "relativeDirection": "CONTINUE",
                  "streetName": "Cowcross Street",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 16.41,
                  "lon": -0.104698,
                  "lat": 51.5200665,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "path",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                }
              ],
              "pickupType": "SCHEDULED",
              "dropoffType": "SCHEDULED",
              "interlineWithPreviousLeg": false,
              "nextLegs": null
            },
            {
              "startTime": 1698929040000,
              "endTime": 1698929580000,
              "departureDelay": 0,
              "arrivalDelay": 0,
              "mode": "RAIL",
              "duration": 540,
              "generalizedCost": 540,
              "legGeometry": {
                "length": 4,
                "points": "cpmyHfnSmiA`mC??spBvfA"
              },
              "realTime": false,
              "distance": 4227.77,
              "transitLeg": true,
              "walkingBike": null,
              "rentedBike": null,
              "from": {
                "name": "Farringdon (platform 4)",
                "lat": 51.5201871,
                "lon": -0.1048397,
                "arrivalTime": 1698929040000,
                "departureTime": 1698929040000,
                "stop": {
                  "gtfsId": "2:ZFD_4",
                  "name": "Farringdon (platform 4)",
                  "lat": 51.5201871,
                  "lon": -0.1048397,
                  "code": "ZFD",
                  "desc": "3",
                  "platformCode": "4",
                  "parentStation": {
                    "gtfsId": "2:ZFD",
                    "name": "Farringdon",
                    "lat": 51.5201871,
                    "lon": -0.1048397,
                    "code": "ZFD",
                    "desc": "3",
                    "platformCode": null
                  }
                }
              },
              "to": {
                "name": "Kentish Town (platform 2)",
                "lat": 51.5502783,
                "lon": -0.1390467,
                "arrivalTime": 1698929580000,
                "departureTime": 1698929580000,
                "stop": {
                  "gtfsId": "2:KTN_2",
                  "name": "Kentish Town (platform 2)",
                  "lat": 51.5502783,
                  "lon": -0.1390467,
                  "code": "KTN",
                  "desc": "1",
                  "platformCode": "2",
                  "parentStation": {
                    "gtfsId": "2:KTN",
                    "name": "Kentish Town",
                    "lat": 51.5501727,
                    "lon": -0.1388654,
                    "code": "KTN",
                    "desc": "1",
                    "platformCode": null
                  }
                }
              },
              "trip": {
                "route": {
                  "agency": {
                    "name": "Thameslink",
                    "url": "https://www.thameslinkrailway.com/",
                    "fareUrl": null
                  },
                  "shortName": "TL1747",
                  "longName": "Sutton (London) → St Albans City",
                  "mode": "RAIL",
                  "type": 2,
                  "desc": "Train service from Sutton (London) to St Albans City, Standard class only, Reservation not possible",
                  "url": null,
                  "color": null,
                  "textColor": null
                },
                "tripHeadsign": null,
                "directionId": "0",
                "blockId": null,
                "wheelchairAccessible": "POSSIBLE",
                "bikesAllowed": "NO_INFORMATION"
              },
              "intermediatePlaces": [
                {
                  "name": "London St. Pancras International (platform B)",
                  "lat": 51.5320927,
                  "lon": -0.1275652,
                  "arrivalTime": 1698929280000,
                  "departureTime": 1698929280000,
                  "stop": {
                    "gtfsId": "2:SPL_B",
                    "name": "London St. Pancras International (platform B)",
                    "lat": 51.5320927,
                    "lon": -0.1275652,
                    "code": "SPL",
                    "desc": "9",
                    "platformCode": "B",
                    "parentStation": {
                      "gtfsId": "2:STP",
                      "name": "London St Pancras International",
                      "lat": 51.5318912,
                      "lon": -0.1268506,
                      "code": "STP",
                      "desc": "3",
                      "platformCode": null
                    }
                  }
                }
              ],
              "intermediatePlace": false,
              "steps": [],
              "pickupType": "SCHEDULED",
              "dropoffType": "SCHEDULED",
              "interlineWithPreviousLeg": false,
              "nextLegs": [
                {
                  "startTime": 1698929940000,
                  "endTime": 1698930480000,
                  "departureDelay": 0,
                  "arrivalDelay": 0,
                  "mode": "RAIL",
                  "duration": 540,
                  "generalizedCost": 0,
                  "legGeometry": {
                    "length": 4,
                    "points": "cpmyHfnSmiA`mC??spBvfA"
                  },
                  "realTime": false,
                  "distance": 4227.77,
                  "transitLeg": true,
                  "walkingBike": null,
                  "rentedBike": null,
                  "from": {
                    "name": "Farringdon (platform 4)",
                    "lat": 51.5201871,
                    "lon": -0.1048397,
                    "arrivalTime": 1698929940000,
                    "departureTime": 1698929940000,
                    "stop": {
                      "gtfsId": "2:ZFD_4",
                      "name": "Farringdon (platform 4)",
                      "lat": 51.5201871,
                      "lon": -0.1048397,
                      "code": "ZFD",
                      "desc": "3",
                      "platformCode": "4",
                      "parentStation": {
                        "gtfsId": "2:ZFD",
                        "name": "Farringdon",
                        "lat": 51.5201871,
                        "lon": -0.1048397,
                        "code": "ZFD",
                        "desc": "3",
                        "platformCode": null
                      }
                    }
                  },
                  "to": {
                    "name": "Kentish Town (platform 2)",
                    "lat": 51.5502783,
                    "lon": -0.1390467,
                    "arrivalTime": 1698930480000,
                    "departureTime": 1698930480000,
                    "stop": {
                      "gtfsId": "2:KTN_2",
                      "name": "Kentish Town (platform 2)",
                      "lat": 51.5502783,
                      "lon": -0.1390467,
                      "code": "KTN",
                      "desc": "1",
                      "platformCode": "2",
                      "parentStation": {
                        "gtfsId": "2:KTN",
                        "name": "Kentish Town",
                        "lat": 51.5501727,
                        "lon": -0.1388654,
                        "code": "KTN",
                        "desc": "1",
                        "platformCode": null
                      }
                    }
                  },
                  "trip": {
                    "route": {
                      "agency": {
                        "name": "Thameslink",
                        "url": "https://www.thameslinkrailway.com/",
                        "fareUrl": null
                      },
                      "shortName": "TL3067",
                      "longName": "Sutton (London) → St Albans City",
                      "mode": "RAIL",
                      "type": 2,
                      "desc": "Train service from Sutton (London) to St Albans City, Standard class only, Reservation not possible",
                      "url": null,
                      "color": null,
                      "textColor": null
                    },
                    "tripHeadsign": null,
                    "directionId": "0",
                    "blockId": null,
                    "wheelchairAccessible": "POSSIBLE",
                    "bikesAllowed": "NO_INFORMATION"
                  },
                  "intermediatePlaces": [
                    {
                      "name": "London St. Pancras International (platform B)",
                      "lat": 51.5320927,
                      "lon": -0.1275652,
                      "arrivalTime": 1698930180000,
                      "departureTime": 1698930180000,
                      "stop": {
                        "gtfsId": "2:SPL_B",
                        "name": "London St. Pancras International (platform B)",
                        "lat": 51.5320927,
                        "lon": -0.1275652,
                        "code": "SPL",
                        "desc": "9",
                        "platformCode": "B",
                        "parentStation": {
                          "gtfsId": "2:STP",
                          "name": "London St Pancras International",
                          "lat": 51.5318912,
                          "lon": -0.1268506,
                          "code": "STP",
                          "desc": "3",
                          "platformCode": null
                        }
                      }
                    }
                  ],
                  "intermediatePlace": false,
                  "steps": [],
                  "pickupType": "SCHEDULED",
                  "dropoffType": "SCHEDULED",
                  "interlineWithPreviousLeg": false
                },
                {
                  "startTime": 1698930840000,
                  "endTime": 1698931380000,
                  "departureDelay": 0,
                  "arrivalDelay": 0,
                  "mode": "RAIL",
                  "duration": 540,
                  "generalizedCost": 0,
                  "legGeometry": {
                    "length": 4,
                    "points": "cpmyHfnSmiA`mC??spBvfA"
                  },
                  "realTime": false,
                  "distance": 4227.77,
                  "transitLeg": true,
                  "walkingBike": null,
                  "rentedBike": null,
                  "from": {
                    "name": "Farringdon (platform 4)",
                    "lat": 51.5201871,
                    "lon": -0.1048397,
                    "arrivalTime": 1698930840000,
                    "departureTime": 1698930840000,
                    "stop": {
                      "gtfsId": "2:ZFD_4",
                      "name": "Farringdon (platform 4)",
                      "lat": 51.5201871,
                      "lon": -0.1048397,
                      "code": "ZFD",
                      "desc": "3",
                      "platformCode": "4",
                      "parentStation": {
                        "gtfsId": "2:ZFD",
                        "name": "Farringdon",
                        "lat": 51.5201871,
                        "lon": -0.1048397,
                        "code": "ZFD",
                        "desc": "3",
                        "platformCode": null
                      }
                    }
                  },
                  "to": {
                    "name": "Kentish Town (platform 2)",
                    "lat": 51.5502783,
                    "lon": -0.1390467,
                    "arrivalTime": 1698931380000,
                    "departureTime": 1698931380000,
                    "stop": {
                      "gtfsId": "2:KTN_2",
                      "name": "Kentish Town (platform 2)",
                      "lat": 51.5502783,
                      "lon": -0.1390467,
                      "code": "KTN",
                      "desc": "1",
                      "platformCode": "2",
                      "parentStation": {
                        "gtfsId": "2:KTN",
                        "name": "Kentish Town",
                        "lat": 51.5501727,
                        "lon": -0.1388654,
                        "code": "KTN",
                        "desc": "1",
                        "platformCode": null
                      }
                    }
                  },
                  "trip": {
                    "route": {
                      "agency": {
                        "name": "Thameslink",
                        "url": "https://www.thameslinkrailway.com/",
                        "fareUrl": null
                      },
                      "shortName": "TL1749",
                      "longName": "Sutton (London) → St Albans City",
                      "mode": "RAIL",
                      "type": 2,
                      "desc": "Train service from Sutton (London) to St Albans City, Standard class only, Reservation not possible",
                      "url": null,
                      "color": null,
                      "textColor": null
                    },
                    "tripHeadsign": null,
                    "directionId": "0",
                    "blockId": null,
                    "wheelchairAccessible": "POSSIBLE",
                    "bikesAllowed": "NO_INFORMATION"
                  },
                  "intermediatePlaces": [
                    {
                      "name": "London St. Pancras International (platform B)",
                      "lat": 51.5320927,
                      "lon": -0.1275652,
                      "arrivalTime": 1698931080000,
                      "departureTime": 1698931080000,
                      "stop": {
                        "gtfsId": "2:SPL_B",
                        "name": "London St. Pancras International (platform B)",
                        "lat": 51.5320927,
                        "lon": -0.1275652,
                        "code": "SPL",
                        "desc": "9",
                        "platformCode": "B",
                        "parentStation": {
                          "gtfsId": "2:STP",
                          "name": "London St Pancras International",
                          "lat": 51.5318912,
                          "lon": -0.1268506,
                          "code": "STP",
                          "desc": "3",
                          "platformCode": null
                        }
                      }
                    }
                  ],
                  "intermediatePlace": false,
                  "steps": [],
                  "pickupType": "SCHEDULED",
                  "dropoffType": "SCHEDULED",
                  "interlineWithPreviousLeg": false
                },
                {
                  "startTime": 1698931740000,
                  "endTime": 1698932280000,
                  "departureDelay": 0,
                  "arrivalDelay": 0,
                  "mode": "RAIL",
                  "duration": 540,
                  "generalizedCost": 0,
                  "legGeometry": {
                    "length": 4,
                    "points": "cpmyHfnSmiA`mC??spBvfA"
                  },
                  "realTime": false,
                  "distance": 4227.77,
                  "transitLeg": true,
                  "walkingBike": null,
                  "rentedBike": null,
                  "from": {
                    "name": "Farringdon (platform 4)",
                    "lat": 51.5201871,
                    "lon": -0.1048397,
                    "arrivalTime": 1698931740000,
                    "departureTime": 1698931740000,
                    "stop": {
                      "gtfsId": "2:ZFD_4",
                      "name": "Farringdon (platform 4)",
                      "lat": 51.5201871,
                      "lon": -0.1048397,
                      "code": "ZFD",
                      "desc": "3",
                      "platformCode": "4",
                      "parentStation": {
                        "gtfsId": "2:ZFD",
                        "name": "Farringdon",
                        "lat": 51.5201871,
                        "lon": -0.1048397,
                        "code": "ZFD",
                        "desc": "3",
                        "platformCode": null
                      }
                    }
                  },
                  "to": {
                    "name": "Kentish Town (platform 2)",
                    "lat": 51.5502783,
                    "lon": -0.1390467,
                    "arrivalTime": 1698932280000,
                    "departureTime": 1698932280000,
                    "stop": {
                      "gtfsId": "2:KTN_2",
                      "name": "Kentish Town (platform 2)",
                      "lat": 51.5502783,
                      "lon": -0.1390467,
                      "code": "KTN",
                      "desc": "1",
                      "platformCode": "2",
                      "parentStation": {
                        "gtfsId": "2:KTN",
                        "name": "Kentish Town",
                        "lat": 51.5501727,
                        "lon": -0.1388654,
                        "code": "KTN",
                        "desc": "1",
                        "platformCode": null
                      }
                    }
                  },
                  "trip": {
                    "route": {
                      "agency": {
                        "name": "Thameslink",
                        "url": "https://www.thameslinkrailway.com/",
                        "fareUrl": null
                      },
                      "shortName": "TL3069",
                      "longName": "Sutton (London) → St Albans City",
                      "mode": "RAIL",
                      "type": 2,
                      "desc": "Train service from Sutton (London) to St Albans City, Standard class only, Reservation not possible",
                      "url": null,
                      "color": null,
                      "textColor": null
                    },
                    "tripHeadsign": null,
                    "directionId": "0",
                    "blockId": null,
                    "wheelchairAccessible": "POSSIBLE",
                    "bikesAllowed": "NO_INFORMATION"
                  },
                  "intermediatePlaces": [
                    {
                      "name": "London St. Pancras International (platform B)",
                      "lat": 51.5320927,
                      "lon": -0.1275652,
                      "arrivalTime": 1698931980000,
                      "departureTime": 1698931980000,
                      "stop": {
                        "gtfsId": "2:SPL_B",
                        "name": "London St. Pancras International (platform B)",
                        "lat": 51.5320927,
                        "lon": -0.1275652,
                        "code": "SPL",
                        "desc": "9",
                        "platformCode": "B",
                        "parentStation": {
                          "gtfsId": "2:STP",
                          "name": "London St Pancras International",
                          "lat": 51.5318912,
                          "lon": -0.1268506,
                          "code": "STP",
                          "desc": "3",
                          "platformCode": null
                        }
                      }
                    }
                  ],
                  "intermediatePlace": false,
                  "steps": [],
                  "pickupType": "SCHEDULED",
                  "dropoffType": "SCHEDULED",
                  "interlineWithPreviousLeg": false
                }
              ]
            },
            {
              "startTime": 1698929580000,
              "endTime": 1698930796000,
              "departureDelay": 0,
              "arrivalDelay": 0,
              "mode": "WALK",
              "duration": 1216,
              "generalizedCost": 1179,
              "legGeometry": {
                "length": 120,
                "points": "elsyH`dZ@@Uj@Sl@Ob@CLOd@Ph@Lb@@DFJA`@?BATUCMAI?IA[AUCI?G@[Hc@b@KJWTGFCDE?IFKLANKLCBGFUTA@IHURm@ZKF[ROJEBIFWXABOTIN[n@INMZ]v@GLc@bAGLQVGJEDk@z@]`@c@b@OLOJc@X[NKD[PSNMJA?A@[ZGDMNOPIHGJYZ[b@IHEBMNCBKJq@n@GDEDWVHLBFFHN^Rl@z@|BL\\\\jABLb@hBFZLj@Np@BJMNcAj@o@^@TAHEHYXEFEH?@R~ACDIWCBNd@A?CB"
              },
              "realTime": false,
              "distance": 1399.44,
              "transitLeg": false,
              "walkingBike": false,
              "rentedBike": false,
              "from": {
                "name": "Kentish Town (platform 2)",
                "lat": 51.5502783,
                "lon": -0.1390467,
                "arrivalTime": 1698929580000,
                "departureTime": 1698929580000,
                "stop": {
                  "gtfsId": "2:KTN_2",
                  "name": "Kentish Town (platform 2)",
                  "lat": 51.5502783,
                  "lon": -0.1390467,
                  "code": "KTN",
                  "desc": "1",
                  "platformCode": "2",
                  "parentStation": {
                    "gtfsId": "2:KTN",
                    "name": "Kentish Town",
                    "lat": 51.5501727,
                    "lon": -0.1388654,
                    "code": "KTN",
                    "desc": "1",
                    "platformCode": null
                  }
                }
              },
              "to": {
                "name": "Destination",
                "lat": 51.5562456,
                "lon": -0.1510795,
                "arrivalTime": 1698930796000,
                "departureTime": 1698930796000,
                "stop": null
              },
              "trip": null,
              "intermediatePlaces": null,
              "intermediatePlace": false,
              "steps": [
                {
                  "distance": 59.12,
                  "lon": -0.1390589,
                  "lat": 51.5502684,
                  "elevationProfile": [],
                  "relativeDirection": "DEPART",
                  "streetName": "Platform 3",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 15.48,
                  "lon": -0.1397533,
                  "lat": 51.5505785,
                  "elevationProfile": [],
                  "relativeDirection": "CONTINUE",
                  "streetName": "steps",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 61.3,
                  "lon": -0.1399435,
                  "lat": 51.5506519,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "footbridge",
                  "exit": null,
                  "stayOn": true,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 139.58,
                  "lon": -0.1407255,
                  "lat": 51.5504695,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "Kentish Town Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 3.23,
                  "lon": -0.1411304,
                  "lat": 51.551648,
                  "elevationProfile": [],
                  "relativeDirection": "SLIGHTLY_RIGHT",
                  "streetName": "Fortess Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 679,
                  "lon": -0.1411333,
                  "lat": 51.551677,
                  "elevationProfile": [],
                  "relativeDirection": "SLIGHTLY_LEFT",
                  "streetName": "Highgate Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 248.53,
                  "lon": -0.1465785,
                  "lat": 51.5566593,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "Gordon House Road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": false,
                  "walkingBike": false
                },
                {
                  "distance": 95.46,
                  "lon": -0.1495597,
                  "lat": 51.5554348,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "service road",
                  "exit": null,
                  "stayOn": false,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 21.11,
                  "lon": -0.150225,
                  "lat": 51.5561145,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "service road",
                  "exit": null,
                  "stayOn": true,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 73.19,
                  "lon": -0.1503961,
                  "lat": 51.5562713,
                  "elevationProfile": [],
                  "relativeDirection": "LEFT",
                  "streetName": "path",
                  "exit": null,
                  "stayOn": true,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                },
                {
                  "distance": 3.49,
                  "lon": -0.151051,
                  "lat": 51.5562197,
                  "elevationProfile": [],
                  "relativeDirection": "RIGHT",
                  "streetName": "path",
                  "exit": null,
                  "stayOn": true,
                  "area": false,
                  "bogusName": true,
                  "walkingBike": false
                }
              ],
              "pickupType": "SCHEDULED",
              "dropoffType": "SCHEDULED",
              "interlineWithPreviousLeg": false,
              "nextLegs": null
            }
          ],
          "elevationGained": 0,
          "elevationLost": 0,
          "arrivedAtDestinationWithRentedBicycle": false
        }
      ]
    }
  }
}

As shown above, the first itinerary is a walk-only itinerary but its generalizedCost is less than the duration for the walk leg despite walkReluctance is set to 1.0, and the walk legs of the other itineraries are similarly affected as well.

leonardehrenfried commented 10 months ago

This is expected as there are many, many factors other than walk reluctance that determine the cost of a walk (or indeed any) leg.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days