jsprit TSP 和 VRP 求解器是否允许提供点之间的时间和距离限制?

Do the jsprit TSP and VRP solvers allow provided time and distance constraints between points?

有谁知道 jsprit 求解器是否默认使用路径中两点之间的 'as the crow flies' 几何距离?如果是这样,是否可以通过向 jsprit 提供作为相邻点之间预先计算的 times/distance 参数来限制这一点,例如由Google 路线计算?

这是为了解决经典问题,例如,如果现实世界的旅程是从河口的一侧出发,而没有可用的桥等,那么两点之间的真实距离可能比直线距离远得多?

默认情况下,jsprit 使用欧几里德距离或如您所说的 'as the crow fly' 距离。如果您想考虑自己的距离测量,只需实施 VehicleRoutingTransportCosts. Assign it when building your vehicle routing problem with .setRoutingCosts(..). If you have a time and/or distance matrix, you can also use this.