{"record":{"id":"3203b6ebd2f9d9f4","repo":"a-b-street/abstreet","slug":"biking-to-a-different-part-of-is-silly-why-not-walk","errorCode":null,"errorMessage":"biking to a different part of {} is silly, why not walk?","messagePattern":"biking to a different part of (.+?) is silly, why not walk\\?","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"sim/src/trips.rs","lineNumber":613,"sourceCode":"\n        let end = if let Some(end) = drive_to.goal_pos(PathConstraints::Bike, ctx.map) {\n            end\n        } else {\n            let trip = trip.id;\n            self.cancel_trip(\n                now,\n                trip,\n                format!(\"no bike connection at {:?}\", drive_to),\n                None,\n                ctx,\n            );\n            return;\n        };\n        let req = PathRequest::vehicle(driving_pos, end, PathConstraints::Bike);\n        let maybe_router = if req.start.lane() == req.end.lane() {\n            // TODO Convert to a walking trip! Ideally, do this earlier and convert the trip to\n            // walking, like schedule_trip does\n            Err(anyhow!(\n                \"biking to a different part of {} is silly, why not walk?\",\n                req.start.lane()\n            ))\n        } else {\n            ctx.map\n                .pathfind(req)\n                .map(|path| drive_to.make_router(bike, path, ctx.map))\n        };\n        match maybe_router {\n            Ok(router) => {\n                ctx.scheduler.push(\n                    now,\n                    Command::SpawnCar(\n                        CreateCar::for_appearing(\n                            self.people[trip.person.0].get_vehicle(bike),\n                            router,\n                            trip.id,\n                            trip.person,","sourceCodeStart":595,"sourceCodeEnd":631,"githubUrl":"https://github.com/a-b-street/abstreet/blob/0964f29315820c91b171b585eb51e300164e9197/sim/src/trips.rs#L595-L631","documentation":"ped_ready_to_bike handles a cyclist at a car/bike handoff point. When the computed bike PathRequest starts and ends on the same lane, routing a bike trip would be a pointless ride within one lane, so the code deliberately returns this error instead of pathfinding. The TODO in source indicates the trip should have been converted to walking earlier.","triggerScenarios":"A bike trip (via TripSpec / ped_ready_to_bike in trips.rs) whose driving_pos and end resolve to PathRequests with identical start.lane() and end.lane(), e.g., origin and destination buildings adjacent to the same lane.","commonSituations":"Very short bike trips between nearby buildings on the same street; synthetic trip generation that doesn't filter out sub-lane-length bike trips; maps with sparse building coverage along a single lane.","solutions":["Convert such trips to walking before scheduling (as schedule_trip does), per the TODO.","Filter out bike trips whose start and end lane are identical during trip generation.","Adjust trip origin/destination sampling so bike trips span meaningful distance.","If hit interactively, treat it as a signal the trip should have been a walking trip."],"exampleFix":"// before\nlet req = PathRequest::vehicle(driving_pos, end, PathConstraints::Bike);\n// after: convert short trips to walking at scheduling time\nif driving_pos.lane() == end.lane() {\n    // schedule a walking TripSpec instead of a biking one\n    return schedule_walking_trip(...);\n}","handlingStrategy":"validation","validationCode":"// Before scheduling a bike trip, ensure the lanes differ\nif driving_pos.lane() == end.lane() {\n    // schedule as walking instead of biking\n    return schedule_walking_trip(origin, destination);\n}","typeGuard":null,"tryCatchPattern":"// Treat this error as a signal to convert to walking\nmatch ped_ready_to_bike(...) {\n    Err(e) if e.to_string().contains(\"why not walk?\") => convert_to_walking(),\n    other => other,\n}","preventionTips":["Filter same-lane origin/destination pairs during trip generation","Convert trivially-short bike trips to walking at schedule time, as schedule_trip does","Respect minimum sensible trip distance per mode in synthetic data","Unit-test ped_ready_to_bike with same-lane requests to keep the guard in place"],"tags":["simulation","routing","biking","trip-scheduling"],"backgroundTag":"invalid-state-transition","analyzedSha":"0964f29315820c91b171b585eb51e300164e9197","analyzedAt":"2026-09-13T18:02:03.421Z","contentChangedAt":"2026-09-13T18:02:03.421Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}