distanceTo

fun distanceTo(vehicle: FleetVehicle, location: String): Double(source)

Distance from where a vehicle is now to a location, along the guide path.

Never straight-line: see the warning on NetworkDistanceBid. Returns Double.POSITIVE_INFINITY when the location is unreachable from where the vehicle stands, so a policy comparing distances naturally never picks a vehicle that cannot get there.