You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I now know why this is going wrong. Each CVRPLIB instance has an EDGE_WEIGHT_TYPE attribute, which is used to calculate the solution values. CVRPLIB makes a distinction between EUC_2D, which are Euclidean distances, and EXPLICIT, meaning that the distance matrix is explicit.
The problem is with EUC_2D. Some instance sets, e.g., the X set, use integral rounding of the distances following the VRPLIB convention. Other sets, such as Li, do not use integral rounding, because they were proposed before the VRPLIB standards. However, both instance sets use EUC_2D as edge weight type, so there's no way to make a distinction which rounding function to use.
LKH-3 has two different types of edge weight types: EXACT_2D, meaning that we compute the distances exactly (no rounding), or FLOOR_2D, meaning that we use the floor function.
Since there are so many different rounding standards, I think it's useful to allow users to pass-in their own rounding functions.
leonlan
changed the title
Distance calculation incorrect for non-integral instances
Pass custom distance rounding functions
Nov 27, 2022
For the non-integral CVRP instances and VRPTW instances, I am unable to compute the same cost as given by the solution.
The text was updated successfully, but these errors were encountered: